/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(0, 100%, 33%);
  --title-color: hsl(0, 0%, 9%);
  --text-color: hsl(230, 12%, 40%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(230, 100%, 97%);
  --border-color: hsl(230, 25%, 80%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Syne", sans-serif;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
  --z-modal: 1000;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1023px) {
  :root {
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
}

input,
button {
  border: none;
  outline: none;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  margin-inline: 3.5rem;
}

.main {
  display: flex;
  position: relative;
  height: fit-content;
  justify-content: center;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-weight: bold;
  transition: color 0.4s;
  display: flex;
  align-items: center;
}

.nav__logo img {
  height: 50px;
  padding-right: 15px;
  padding-left: 15px;
}

.nav__logo .nav__logo_text {
  display: grid;
  font-size: 20px;
}

.nav__logo .nav__logo_text .subtext {
  font-weight: lighter;
  font-size: 12px;
}

.nav__actions {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.nav__toggle,
.nav__login,
.nav__close {
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
  transition: color 0.4s;
}

:is(.nav__logo, .nav__toggle, .nav__link, .nav__login):hover {
  color: var(--first-color);
}

.nav__item a.active {
  color: var(--first-color);
  font-weight: bold;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    background-color: var(--body-color);
    box-shadow: 0 8px 16px hsla(0, 75%, 32%, 0.15);
    width: 100%;
    padding-block: 4.5rem 4rem;
    transition: top 0.4s;
  }

  .main {
    margin-bottom: 2rem;
    margin-inline: 1.5rem;
  }

  .title {
    margin-top: var(--header-height);
    margin-inline: 1.5rem;
  }

  .nav__logo img {
    padding-left: 0px;
  }

  .container {
    margin-inline: 1.5rem;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
  text-align: center;
}

.nav__link {
  color: var(--title-color);
  transition: color 0.4s;
  font-size: 16px;
}

.nav__close {
  position: absolute;
  top: 1.15rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Title Section */
section .title {
  top: 0;
  position: absolute;
  width: 100%;
}

.title {
  height: fit-content;
  padding: 20px 0px 40px;
}

.title h1 {
  color: #730000;
  text-align: center;
  font-size: 30px;
  margin-bottom: 15px;
}

.title p {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: lighter;
  color: #909090;
  margin-inline: 1.5rem;
}

.title .selection {
  display: flex;
  margin-top: 13px;
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically */
  height: fit-content;
  /* background-color: #8E0B16; */
}

.title .selection form {
  display: flex;
  height: fit-content;
}

.title .selection form .select {
  position: relative;
}

.title .selection form .select select {
  -webkit-appearance: none;
  appearance: none;
  border-color: #363636;
  border-width: 2px;
  border-radius: 7px;
  padding: 10px 22px;
  width: 300px;
}

.title .selection form .select::after {
  content: "▼";
  color: #730000;
  font-size: 13px;
  top: 11px;
  right: 22px;
  position: absolute;
}

.title .selection form .button {
  margin-left: 10px;
  border-radius: 7px;
  padding: 10px 22px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  color: white;
  background-color: #730000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.title .title_position {
  margin-left: 20px;
}

.title .title_position h2 {
  width: fit-content;
  padding: 10px 47px;
  text-align: center;
  background-color: #730000;
  color: #fff;
}

/* Main */
.main .left_portion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 20px;
  height: 100vh;
  width: fit-content;
  /* background-color: rgb(187, 255, 255); */
}

.main .left_portion .card {
  display: grid;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 200px;
}

.main .left_portion .card .card_header {
  padding-top: 5px;
  font-size: 13px;
  font-weight: var(--font-semi-bold);
  padding-bottom: 5px;
  color: #363636;
}

.main .left_portion .card:last-child .card_header {
  color: #bababa;
}

.main .left_portion .card .card_subtext {
  font-size: 20px;
  font-weight: bold;
  padding-bottom: 5px;
  color: #ffffff;
}

.main .left_portion .card:first-child {
  background-color: #e5ca1a;
}

.main .left_portion .card:last-child {
  background-color: #730000;
}

.main .right_portion {
  display: grid;
  grid-auto-rows: min-content;
  padding: 10px 0px;
  flex-grow: 1;
  /* background-color: rgb(205, 205, 205); */
}

.main .right_portion .selection {
  display: flex;
  height: fit-content;
  /* background-color: #8E0B16; */
}

.main .right_portion .selection form {
  display: flex;
  height: fit-content;
}

.main .right_portion .selection form .select {
  position: relative;
}

.main .right_portion .selection form .select select {
  -webkit-appearance: none;
  appearance: none;
  border-color: #363636;
  border-width: 2px;
  border-radius: 7px;
  padding: 10px 22px;
  width: 300px;
}

.main .right_portion .selection form .select::after {
  content: "▼";
  color: #730000;
  font-size: 13px;
  top: 11px;
  right: 22px;
  position: absolute;
}

.main .right_portion .selection form .button {
  margin-left: 10px;
  border-radius: 7px;
  padding: 10px 22px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  color: white;
  background-color: #730000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main .right_portion .show {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.main .right_portion .show .results {
  border-radius: 8px;
  box-shadow: 0 1px 9px 5px rgba(0, 0, 0, 0.1);
  width: fit-content;
}

.position {
  background-color: #730000;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 12px;
  text-align: center;
}

.position .position-name {
  font-size: 16px;
  font-weight: bolder;
  color: #ffffff;
}

.main .right_portion .results table {
  margin-top: 15px;
  width: 100%;
  border-collapse: collapse;
}

.results table,
.results th,
.results td {
  /* border: 1px solid #ccc; */
}

.results th,
.results td {
  padding: 5px;
  text-align: left;
}

.results tr {
  margin: 50px;
}

.result-table {
  padding: 0 14px 14px;
}

.results table .number {
  width: 40px;
  font-size: 20px;
  font-weight: bolder;
  text-align: right;
  color: #730000;
}

.results table .name {
  font-size: 14px;
  font-weight: 600;
  color: #363636;
  width: 250px;
}

.results table .party {
  font-size: 11px;
  font-weight: 550;
  color: #777777;
  width: 15%;
}

.results table .count {
  font-size: 14px;
  font-weight: 600;
  color: #787878;
}

.results table tbody tr div.progress {
  background: #fffcfc;
  justify-content: flex-start;
  border: 1px solid #730000;
  border-radius: 100px;
  align-items: center;
  position: relative;
  display: flex;
  height: 10px;
  width: 90%;
}

.results table tbody tr div.progress-value {
  animation: load 3s normal forwards;
  box-shadow: 0 10px 40px -10px #fff;
  border-radius: 100px;
  background: #730000;
  height: 10px;
  width: 0;
}

/* Candidate and Partylists General Section */
.lists_section {
  display: grid;
  width: 80%;
  grid-template-columns: 1fr; /* Single column layout */
  grid-gap: 15px; /* Adjust the gap as needed */
  justify-content: center;
  align-items: start; /* Align items at the start of the grid */
}

.search_bar {
  position: relative;
  align-items: center;
  gap: 10px;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  flex: 1 0 0;
  /* background-color: #212121; */
}

.search_button {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px; /* Adjust padding to give some space around the icon */
  padding-right: 10px;
  border: none;
  background: none;
  cursor: pointer;
}

.search_button:focus {
  outline: none; /* Remove the default focus outline */
}

#placeholder {
  padding: 8px;
  padding-left: 10px;
  border: 1px solid #ccc;
  width: 100%;
  border-radius: 5px;
}

#searchButton {
  padding: 8px 15px;
  background-color: #730000; /* Change to your desired button color */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#searchButton:hover {
  background-color: #0056b3; /* Change to your desired button color on hover */
}

.main .lists_section .information {
  display: grid;
  /* background-color: #212121; */
  gap: 15px;
}

.main .lists_section .information .information_position h2 {
  margin: 20px 15px 0px 15px;
  padding-bottom: 10px;
  color: #770000;
  border-bottom: 5px solid #280000;
  /* background-color: #8e0b16; */
}

.main .lists_section .information .information_profile {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 50px;
  justify-content: center; /* Centers the cards horizontally */
  align-items: center;
}

.main .lists_section .information .information_profile .card a {
  display: flex;
  flex-direction: column; /* Adjust as needed */
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  width: fit-content;
  padding: 20px;
  text-decoration: none;
  color: #212121;
}

.main .lists_section .information .information_profile .card a:hover {
  color: #730000;
}

.main .lists_section .information .information_profile .card a img {
  height: 200px;
  width: 200px;
  border-radius: 50%;
}

.main .lists_section .information .information_profile .card a:hover img {
  transition: all 0.2s;
  border: 5px solid #730000;
}

.main .lists_section .information .information_profile .card a .profile_name {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.main .lists_section .information .information_profile .card a .profile_name p {
  font-weight: bold;
}

/* Candidate Information */
.main .left_information {
  display: grid;
  padding: 0px 15px;
  width: fit-content;
  /* background-color: #212121; */
}

.main .left_information .img img {
  height: 500px;
  width: 500px;
  border-radius: 50%;
}

.main .right_information {
  display: grid;
  flex: 1;
  grid-auto-rows: min-content;
  padding: 10px px;
  flex-grow: 1;
  margin-left: 50px;
}

.main .right_information .main_information {
  display: grid;
  height: fit-content;
  /* background-color: #979595; */
}

.main .right_information .main_information span {
  display: flex;
  gap: 10px;
}

.main .right_information .main_information span i {
  font-size: 50px;
  color: rgb(27, 27, 27);
}

.main .right_information .main_information span p {
  font-size: 35px;
  align-content: center;
  color: #730000;
  font-weight: bold;
}
.main .right_information .main_information > p {
  background-color: #484848;
  width: fit-content;
  color: #fff;
  padding: 8px 46.5px;
  border-radius: 22px;
  margin-left: 65px;
  font-weight: bold;
}

.main .right_information .main_information .partylist_name,
.main .right_information .main_information .soc_meds {
  margin-left: 60px;
}

.main .right_information .main_information .soc_meds i {
  font-size: 24px;
  margin-top: 10px;
  color: #484848;
}

.main .right_information .description_information {
  display: grid;
  /* background-color: #d3c3c3; */
  margin-left: 65px;
  margin-top: 30px;
  height: fit-content;
  grid-gap: 30px;
}

.content {
  display: flex;
  flex-direction: column;
  padding-left: 50px;
}

.content .content_header {
  padding: 10px 0px;
}

.candidate_style {
  margin-top: 20px;
  padding-bottom: 30px;
}

.content .content_header h2 {
  color: #770000;
}

.content .content_description {
  padding-left: 50px;
}

.content .content_description table {
  margin-top: 15px;
  margin-bottom: 20px;
}

.content .content_description .lists td {
  padding-top: 10px;
}

.content .content_description ul {
  list-style-type: disc;
}

.content .content_description ul li {
  margin: 0px 35px 0 0;
}

.content .content_description .departments {
  display: grid;
}

.content .content_description .departments .department_card {
  display: grid;
}

.content .content_description .departments .department_card .department_name {
  display: flex;
  flex-flow: row;
  gap: 25px;
  padding: 0;
  margin-top: 20px;
}
.content
  .content_description
  .departments
  .department_card
  .department_name
  h3 {
  font-weight: bold;
  cursor: pointer;
}

.content .content_description .departments .department_card .department_name i {
  font-size: 20px;
  cursor: pointer;
}

.content
  .content_description
  .departments
  .department_card
  .department_name
  i.flipped {
  transform: rotate(180deg);
}

.content .content_description .departments .department_card .lists {
  margin-inline: 70px;
  display: none;
}

/* @keyframes load {
    0% { width: 0; }
    100% { width: 68%; }
  } */

/*=============== FOOTER ===============*/
footer {
  background-color: #212121;
  padding: 3.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  gap: 3.5rem;
  position: absolute;
  left: 0;
  right: 0;
  /* bottom: 0; */
}

.footer-content h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 15px;
}

.footer-content li {
  list-style: none;
  margin-bottom: 10px;
}

.footer-content li a {
  display: block;
  color: #aeaeae;
  font-weight: 200;
  font-size: 13px;
  transition: all 0.4s ease;
}

.footer-content li a:hover {
  font-weight: 500;
  color: #b71d2a;
}

.footer-content p {
  font-weight: bold;
  font-size: 15px;
  color: #fff;
  margin: 10px 0;
}

.footer-content img {
  height: 90px;
  filter: saturate(0) hue-rotate(180deg) invert(1) brightness(150%);
  transition: var(--tran-05);
}

.icons a {
  display: inline-block;
  font-size: 20px;
  margin-right: 8px;
  transition: all 0.4s;
  color: #aeaeae;
}

.icons a:hover {
  color: #b71d2a;
}

/*=============== BREAKPOINTS ===============*/
/* For large devices */
@media screen and (min-width: 1023px) {
  .nav {
    margin-top: 20px;
    height: 7rem;
    column-gap: 2rem;
    /* border-bottom: 4px solid #8e0b16; */
  }

  .nav__close,
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    margin-left: auto;
    box-shadow: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 2rem;
  }

  .main {
    margin-bottom: 2rem;
    margin-inline: 3.5rem;
  }

  .title {
    margin-top: 9rem;
    margin-inline: 3.5rem;
  }

  .content {
    margin-bottom: 2rem;
    margin-inline: 3.5rem;
  }
}

.waiting {
  text-align: center;
  margin-bottom: 100px;
  padding: 40px 20px;
  color: #555;
  font-size: 18px;
  font-family: "Arial", sans-serif;
}

.waiting .loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.waiting .loading-dots span {
  width: 12px;
  height: 12px;
  background-color: var(--first-color);
  border-radius: 50%;
  animation: blink 1.4s infinite ease-in-out both;
}

.waiting .loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.waiting .loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.waiting .loading-dots span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.waiting p {
  margin-top: 10px;
  color: #666;
  font-size: 16px;
  font-style: italic;
}

/*=============== REGISTRATION ADVERTISEMENT ====================*/
.registration-ad {
  padding: 40px 0;
  padding-top: 10px;
  text-align: center;
}

.registration-ad .ad-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.registration-ad .ad-item {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 500px;
  padding-bottom: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

.registration-ad .ad-item:hover {
  transform: translateY(-10px);
}

.registration-ad .ad-item h2 {
  color: var(--first-color);
  font-size: 20px;
  margin-bottom: 10px;
}

.registration-ad .ad-item p {
  font-size: 14px;
  color: #555555;
  margin-bottom: 20px;
}

.registration-ad .ad-item .button {
  background-color: #730000;
  color: white;
  padding: 10px 20px;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.registration-ad .ad-item .button:hover {
  background-color: #8e0b16;
}
