* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  /* Primary Colors (from logo) */
  --color-primary: #204a34; /* Main dark green */
  --color-primary-dark: #141a17; /* Main dark green */
  --color-primary-light: #2f6a4c; /* Lighter green for hover */
  --color-secondary: #f7b900; /* Gold accent */
  --color-secondary-hover: #e6a800; /* Darker gold for hover */

  /* Supporting Colors */
  --color-green-soft: #3c7d5c; /* Secondary green tone */
  --color-accent-bg: #fff3cc; /* Pale yellow background */
  --color-accent-primary-bg: #2f6a4c34; /* Pale yellow background */
  --color-bg-light: #f5f8f6; /* Page background */
  --color-border: #d8d8d8; /* Border / Divider */

  /* Text Colors */
  --text-dark: #1f1f1f; /* Main body text */
  --text-light: #555555; /* Secondary text */
  --text-on-primary: #ffffff; /* Text on dark green */
  --text-on-accent: #1f1f1f; /* Text on yellow background */

  /* Utility Colors (Optional) */
  --success: #3c7d5c;
  --warning: #e6a800;
  --error: #d9534f;
}

.highlight {
  background-color: var(--color-accent-bg);
  color: var(--text-dark);
  border: 1px solid var(--color-border);
}

/* Colors */
.text-color {
  color: #454547 !important;
}

.text-error,
.text-success {
  line-height: 1.5;
}

.text-success {
  color: #059669;
}

.text-error {
  color: #b43b3b;
}
/* End Colors */

body {
  background-color: var(--color-bg-light);
  color: var(--text-dark);
  overflow-x: hidden !important;
}

a.inline-link {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: none;
}

.container {
  width: min(1200px, 90%);
  max-width: 1200px;
  margin: 0 auto;
}

.container-md {
  width: min(400px, 80%);
  margin: auto;
}

.alert {
  background: rgba(12, 12, 12, 0.856);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  padding: 1em;
  position: fixed;
  z-index: 2000;
  top: -10dvh;
  opacity: 0;
  left: 50%;
  margin: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  border-radius: 5px;
  text-align: center;
  transition: all ease 0.5s;
}

.alert p {
  padding: 1em;
  color: white;
  font-weight: 500;
}

.alert.show {
  top: 2dvh;
  opacity: 1;
}

.alert--error {
  color: rgb(219, 60, 60);
}

.alert--success {
  color: rgb(19, 107, 19);
}

.section {
  padding: 60px 0 !important;
}

.section-title {
  font-size: 1.7rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2rem;
}

.spinner-container {
  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.6);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100vw;
  min-height: 100%;
}

.spinner-container.show {
  display: flex;
}

.spinner {
  width: 100px;
  aspect-ratio: 1/1;
  border: 15px solid var(--color-green-soft);
  border-top-color: var(--color-secondary);
  border-left-color: var(--color-secondary);
  border-radius: 50%;

  animation: spinner infinite forwards linear 1s;
}

@keyframes spinner {
  100% {
    transform: rotate(1turn);
  }
}

.error-text {
  color: #c43434;
  font-size: 0.9em;
  font-weight: bold;
  margin-block: 1em;
  text-align: center;
}

.form-group {
  width: 100%;
  margin-bottom: 0.5em;
}

input {
  color: var(--text-light);
  font-size: 1rem;
  border: 1px solid var(--color-green-soft);
  border-radius: 0.5em;
  padding: 1em 1em;
  outline: none;
  width: 100%;
}

input:focus {
  border-color: var(--color-primary);
}

label {
  display: inline-block;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 1em;
}

.otp-selection {
  max-width: 400px;
  margin: auto;
  font-family: "Segoe UI", sans-serif;
  text-align: center;
}

.otp-selection h4 {
  color: var(--text-light);
  margin: 1rem 0;
}

.otp-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0f0f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  border: 2px solid transparent;
}

.otp-option:hover {
  background: #e0e0e0;
}

.otp-option input[type="radio"] {
  accent-color: #204a34;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.otp-option i {
  font-size: 1.2rem;
  color: #204a34;
}

.otp-option span {
  flex: 1;
  text-align: left;
  font-size: 1rem;
}

.py-2 {
  padding-block: 2rem;
}

.min-h-40vh {
  min-height: 40dvh;
}

/* Navigation */

.mobile-nav {
  background: var(--color-bg-light);
  border-bottom: 2px solid var(--color-green-soft);

  display: flex;
  z-index: 1000;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  justify-content: space-between;
  align-items: center;
  height: 10dvh;
}

.mobile-nav span {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-on-primary);
}

.nav-toggle {
  color: var(--color-primary);
  font-size: 1.5rem;
  display: block;
  cursor: pointer;
  padding: 0.2em 0.3em;
  background: transparent;
  border: none;
  outline: none;
}

.mobile-nav-links {
  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  position: absolute;
  top: 10dvh;
  bottom: 0;
  left: 0;

  background: var(--text-dark);

  width: 70vw;
  height: calc(100vh - 10dvh);
  overflow-y: auto;
  padding: 1rem;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-nav-links.show {
  transform: translateX(0);
}

.mobile-nav-links a {
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s;
  padding: 1em;
  border-radius: 0.5rem;
  display: block;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.mobile-nav-overlay.show {
  display: block;
}

.desktop-nav {
  display: none;
  color: var(--text-on-primary);
  padding: 1rem 0;
  background: var(--color-primary);

  position: sticky;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
}

.desktop-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.desktop-nav-links a {
  color: var(--text-on-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s;
}

.logo-box {
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
}

.logo {
  width: 32px;
  height: 32px;
}

.brand {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-on-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-accent-bg);
}

/* HOMEPAGE */

/* Hero Section */
.hero {
  background: linear-gradient(rgba(16, 53, 14, 0.8), rgba(231, 203, 44, 0.5)),
    url("../img/hero.webp");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.hero h1,
.candidates-header h1,
.results-header h1 {
  color: var(--color-secondary);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p,
.candidates-header p,
.results-header p {
  font-size: 1.25rem;
  color: var(--text-on-primary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero .cta {
  font-size: 1.1rem;
  color: #f3f4f6;
  margin-bottom: 2rem;
}
.hero .cta strong {
  color: var(--color-secondary);
  font-weight: bold;
}

.hero a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border: 2px solid var(--color-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s;
}

.hero a:hover {
  background: var(--color-secondary);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.hero a:active {
  transform: scale(0.95);
}
.hero a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
}

/* Features Section */
.features {
  padding: 6rem 0;
}

.features-grid,
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card,
.timeline-item {
  background: var(--text-on-primary);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  text-align: center;
  max-width: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dark);
  text-decoration: none;
}

.feature-card:hover,
.timeline-item:hover {
  transform: translateY(-5px);
}

.feature-icon,
.timeline-icon,
.stat-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6f6f3, #ebe845);
}

.feature-card h3,
.timeline-item h4 {
  color: var(--text-dark);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-card p,
.timeline-item p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Timeline Section */
#timeline {
  padding: 60px 0;
  background: var(--color-accent-primary-bg);
}

.timeline-item {
  width: 300px;
}
/* END HOMEPAGE */

/* CANDIDATES */

.all-candidates {
  min-height: 25dvh;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.coming-soon {
  font-size: 2rem;
  text-align: center;
  margin-top: 2em;
  color: var(--text-on-accent);
}

.candidates-header {
  background: linear-gradient(rgba(16, 53, 14, 0.8), rgba(231, 203, 44, 0.5)),
    url("../img/campaign.webp");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.position-section {
  margin: 3rem 0;
  padding: 2em 0;
  border-radius: 0.5em;
}

.position-section:nth-child(even) {
  background: var(--text-on-primary);
}

.position-title {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.candidates-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  place-items: center;
  margin-top: 2rem;
}

.candidate-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  width: 400px;
  height: 500px;
}

.candidate-card:hover {
  transform: translateY(-5px);
}

.candidate-image {
  width: 100%;
  height: 90%;
}

.candidate-name {
  text-align: center;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light) !important;
  margin: 0.5em 0;
}

.filter-section {
  margin: 2rem 0;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-input {
  padding: 0.5rem;
  border: 1px solid var(--color-green-soft);
  border-radius: 0.25rem;
  margin-right: 1rem;
  width: 200px;
}

.filter-select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  margin-right: 1rem;
}

.election-result-select {
  display: block;
  width: 50%;
  margin: auto;
}

/* END CANDIDATES */

/* RESULT */
.results-header {
  background: linear-gradient(rgba(16, 53, 14, 0.8), rgba(231, 203, 44, 0.5)),
    url("../img/result.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.results-status {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  text-align: center;
  font-weight: bold;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.result-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.position-name {
  font-size: 1rem;
  color: #1f2937;
  padding-bottom: 0.5rem;
}

.candidate-result {
  margin-bottom: 1.5rem;
}

.candidate-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.candidate-name {
  font-weight: bold;
  color: var(--text-light);
}

.vote-percentage {
  color: var(--color-green-soft);
  font-weight: bold;
}

.progress-bar {
  background: #e5e7eb;
  height: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-green-soft) !important;
  transition: width 1s ease-in-out;
}

.winner {
  background: #ecfdf5;
  border-left: 4px solid #059669;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.statistics-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem 1em;
  margin-top: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.statistic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1em;
  background: #f3f4f6;
  border-radius: 0.5rem;
}

.statistic-value {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.statistic-label {
  color: var(--text-light);
  font-weight: 500;
}
/* END RESULT */

/* VOTING */
.vote-header {
  background: linear-gradient(
    135deg,
    var(--color-accent-primary-bg) 0%,
    var(--color-primary-dark) 100%
  );
  color: white;
  padding: 2rem 0;
}

.vote-header {
  background: linear-gradient(rgba(16, 53, 14, 0.8), rgba(231, 203, 44, 0.5)),
    url("../img/hero.webp");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.vote-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.vote-timer {
  background: #fff;
  color: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.vote-info {
  border-radius: 0.5rem;
  line-height: 1.5;
  text-align: center;
  padding: 1rem;
  margin: 2rem 0;
}

.vote-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vote-position-title {
  color: var(--text-on-accent);
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.candidate-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.candidate-option:hover {
  border-color: var(--color-green-soft);
  background: #f8fafc;
}

.candidate-option.selected {
  border-color: var(--color-green-soft);
  background: #eff6ff;
}

.candidate-radio {
  margin-right: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  accent-color: var(--color-green-soft);
}

.candidate-details {
  flex-grow: 1;
}

.candidate-name {
  font-weight: bold;
  color: #1f2937;
  /* margin-bottom: 0.5rem; */
}

.candidate-party {
  color: #6b7280;
  font-size: 0.9rem;
  margin-block: 0.5em;
}

.vote-confirmation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  z-index: 1000;
  display: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.confirmation-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.confirmation-choices {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
  border: none;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
}

.btn-accent {
  background-color: var(--color-secondary);
  color: var(--text-on-accent);
  border: none;
}

.btn-accent:hover {
  background-color: var(--color-secondary-hover);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e5e7eb;
  border-radius: 1rem;
  margin: 2rem 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width 0.3s ease;
}

/* END VOTING */

/* LOGIN */
.login-container {
  width: min(400px, 80%);
  margin: auto;
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.login-container h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-block: 1rem;
}

.otp-form-group {
  display: none;
}

.otp-form-group.show {
  display: block;
}

.login-btn {
  padding: 1.4em 1em !important;
  outline: none;
  border: none;
  font-weight: bold;
  width: 100%;

  transition: all 0.5s ease;
}

/* LOGIN */

/* Footer */
footer {
  background: var(--color-primary-dark);
  color: var(--color-bg-light);
  padding: 4rem 0;
  overflow: hidden;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1em;
  margin-bottom: 2em;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-section h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: var(--color-accent-bg);
  text-decoration: none;
  line-height: 2;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--color-secondary-hover);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.copyright {
  text-align: center;
  color: var(--color-accent-bg);
  padding-top: 1em;
  line-height: 1.5;
  border-top: 1px solid var(--color-accent-bg);
}

@media screen and (min-width: 768px) {
  .mobile-nav,
  .mobile-nav-overlay,
  .nav-toggle {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .vote-section {
    width: 500px;
    margin-inline: auto;
  }
}
