/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-cream: #F4EEE2;
  --bg-card: #FBF7EE;
  --bg-dark: #17171F;
  --bg-dark-card: #21212C;
  --border-color: #E0D8C8;
  --border-dark: #3A3A45;
  
  /* Accent Colors */
  --color-red: #C8102E;
  --color-red-light: #FF8A80;
  --color-teal: #2A9D8F;
  --color-yellow: #E2A03F;
  --color-blue: #2D5A7B;
  
  /* Text Colors */
  --text-dark: #17171F;
  --text-muted: #5A5A66;
  --text-light: #F4EEE2;
  --text-light-muted: #B9B4A8;
  
  /* Font Stacks */
  --font-thai: 'IBM Plex Sans Thai', sans-serif;
  --font-heading: 'Anuphan', sans-serif;
  --font-numeric: 'Outfit', sans-serif;
  
  /* Transitions & Shadows */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(23, 23, 31, 0.04);
  --shadow-md: 0 8px 24px rgba(23, 23, 31, 0.08);
  --shadow-lg: 0 16px 40px rgba(23, 23, 31, 0.12);
  --glass-bg: rgba(244, 238, 226, 0.92);
  --glass-border: rgba(224, 216, 200, 0.5);
}

/* System Default Dark Mode disabled by user request to preserve the brand theme */

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-thai);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Selection Highlight */
::selection {
  background-color: var(--color-red);
  color: #fff;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 28px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--text-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.countdown-badge {
  font-family: var(--font-numeric);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-red);
  background-color: rgba(200, 16, 46, 0.08);
  padding: 6px 12px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.lang-btn {
  cursor: pointer;
  border: 1.5px solid var(--text-dark);
  background: transparent;
  color: var(--text-dark);
  border-radius: 100px;
  padding: 5px 14px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: var(--transition-smooth);
}

.lang-btn:hover {
  background-color: var(--text-dark);
  color: var(--bg-cream);
}

.nav-tabs {
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for nav-tabs */
.nav-tabs::-webkit-scrollbar {
  display: none;
}
.nav-tabs {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs-container {
  display: flex;
  gap: 6px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px;
  white-space: nowrap;
}

.tab-link {
  flex: none;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.tab-link:hover {
  background-color: var(--border-color);
  color: var(--text-dark);
}

.tab-link.active {
  background-color: var(--text-dark);
  color: var(--bg-cream);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
}

.badge-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--text-dark);
  color: var(--bg-cream);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-red);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.text-red {
  color: var(--color-red);
}

.hero-meta {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: flex-end;
}

.hero-description p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  text-wrap: pretty;
}

.hero-cards {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.meta-card {
  padding: 20px 24px;
  border-radius: 16px;
  min-width: 140px;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.meta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.dark-card {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.red-card {
  background-color: var(--color-red);
  color: #fff;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.meta-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
}

.meta-value.text-lg-meta {
  font-size: 25px;
}

.meta-unit {
  font-size: 16px;
  font-weight: 500;
}

.meta-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

/* ==========================================================================
   INFO BANNER
   ========================================================================== */
.info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-yellow);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.info-icon {
  font-weight: 700;
  color: var(--color-yellow);
  font-size: 18px;
  line-height: 1;
}

/* ==========================================================================
   CONTENT SECTIONS GENERAL
   ========================================================================== */
.content-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
}

/* ==========================================================================
   SECTION 01 - STATS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 32px 28px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.stat-unit {
  font-size: 20px;
  font-weight: 600;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.highlight-red .stat-number { color: var(--color-red); }
.highlight-teal .stat-number { color: var(--color-teal); }

/* ==========================================================================
   SECTION 02 - TIMELINE (DARK SECTION)
   ========================================================================== */
.timeline-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-bottom: none;
}

.text-yellow {
  color: var(--color-yellow);
}

.timeline-section .section-lead {
  color: var(--text-light-muted);
}

.timeline-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.timeline-item {
  position: relative;
}

.timeline-line {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
}

.dot-yellow { background-color: var(--color-yellow); }
.dot-light { background-color: var(--text-light); }
.dot-red { background-color: var(--color-red); }
.dot-teal { background-color: var(--color-teal); }

.timeline-bar {
  flex: 1;
  height: 2px;
  background-color: var(--border-dark);
  margin-left: 12px;
}

.timeline-time {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.timeline-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 12.5px;
  color: var(--text-light-muted);
  line-height: 1.4;
}

/* Timeline State Modifiers */
.timeline-item.past {
  opacity: 0.45;
  transition: opacity var(--transition-smooth);
}

.timeline-item.past:hover {
  opacity: 0.85;
}

.timeline-item.past .timeline-dot {
  background-color: var(--text-muted) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item.past .timeline-dot::after {
  content: '✓';
  color: var(--bg-dark);
  font-size: 11px;
  font-weight: 700;
}

.timeline-item.current {
  transform: scale(1.08);
  transform-origin: left center;
  z-index: 10;
  transition: transform var(--transition-smooth);
}

.timeline-item.current .timeline-time {
  color: var(--color-yellow);
  font-size: 30px;
  text-shadow: 0 0 10px rgba(244, 162, 97, 0.4);
}

.timeline-item.current .timeline-label {
  color: #fff;
  font-size: 16.5px;
}

.timeline-item.current .timeline-desc {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
}

.timeline-item.current .timeline-dot {
  background-color: var(--color-red) !important;
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.25);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(200, 16, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
  }
}

.timeline-item.future {
  opacity: 0.9;
}

/* ==========================================================================
   SECTION 03 - ELIGIBILITY
   ========================================================================== */
.eligibility-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.eligibility-checklist {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.check-item-static {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: rgba(42, 157, 143, 0.04);
  border: 1px solid rgba(42, 157, 143, 0.15);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition-smooth);
}

.check-item-static:hover {
  transform: translateY(-2px);
  background-color: rgba(42, 157, 143, 0.07);
}

.static-checkmark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--color-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex: none;
}

.check-title {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 2px;
}

.check-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.btn-check-portal-wrapper {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  gap: 12px;
}

.btn-check-portal {
  display: inline-block;
  text-align: center;
  flex: 1;
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1.5px solid var(--text-dark);
}

.btn-check-portal:hover {
  background-color: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-check-portal.secondary {
  background-color: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--text-dark);
}

.btn-check-portal.secondary:hover {
  background-color: var(--text-dark);
  border-color: var(--text-dark);
  color: var(--bg-cream);
}

.docs-card {
  background-color: var(--color-red);
  color: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-white {
  color: #fff !important;
}

.text-white-opacity {
  color: rgba(255, 255, 255, 0.8) !important;
}

.docs-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.doc-category-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  transition: var(--transition-smooth);
}

.doc-category-item:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.doc-cat-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-yellow);
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.doc-cat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-cat-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  line-height: 1.3;
}

.doc-cat-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

/* ==========================================================================
   SECTION 04 - HOW TO VOTE
   ========================================================================== */
.vote-steps-section {
  background-color: var(--bg-card);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.step-card {
  background-color: var(--bg-cream);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.step-card:hover {
  transform: translateY(-4px);
}

.step-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 40px;
  color: var(--color-red);
  line-height: 1;
  margin-bottom: 16px;
}

.step-title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.ballot-visual-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  background-color: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.ballot-paper {
  border: 2px solid var(--bg-dark);
  border-radius: 12px;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.ballot-note {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.85;
  padding: 8px 12px;
  text-align: center;
  background-color: rgba(23, 23, 31, 0.02);
  border-top: 1px dashed var(--border-color);
}

.ballot-header {
  background-color: var(--bg-dark);
  color: var(--bg-cream);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ballot-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.ballot-row:last-child {
  border-bottom: none;
}

.ballot-box {
  width: 36px;
  height: 36px;
  border: 2px solid var(--bg-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--bg-dark);
  flex: none;
  background-color: #fff;
}

.ballot-row.selected {
  background-color: rgba(200, 16, 46, 0.04);
}

.ballot-row.selected .ballot-box {
  border-color: var(--color-red);
  color: var(--color-red);
}

.ballot-num {
  font-weight: 600;
  font-size: 15px;
}

.ballot-candidate {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
}

.font-bold {
  font-weight: 700;
  color: var(--color-red);
}

.ballot-warning {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warning-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
}

.warning-desc {
  font-size: 15px;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 05 - CANDIDATES (DARK)
   ========================================================================== */
.dark-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-bottom: none;
}

#sec-candidates .container {
  max-width: 1200px;
}

.candidates-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 24px;
}

.btn-outline-yellow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: center;
  background-color: #fff;
  color: var(--text-dark);
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1.5px solid var(--border-color);
}

.btn-outline-yellow:hover {
  background-color: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Candidates Carousel */
.candidates-carousel-container {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 30px;
  gap: 16px;
}

.candidates-carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.candidates-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 20px;
}

.candidates-carousel-track .candidate-card {
  flex: 0 0 calc((100% - (20px * 3)) / 4);
  margin-bottom: 0;
  box-sizing: border-box;
}

.candidates-carousel-btn {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex: none;
  font-size: 16px;
  user-select: none;
}

.candidates-carousel-btn:hover:not(:disabled) {
  background-color: var(--color-red);
  border-color: var(--color-red);
  transform: scale(1.08);
}

.candidates-carousel-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.candidates-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.candidates-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.candidates-carousel-dot.active {
  background-color: var(--color-red);
  width: 20px;
  border-radius: 4px;
}

.candidate-card {
  background-color: var(--bg-dark-card);
  border-radius: 20px;
  overflow: hidden;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1.5px solid rgba(255, 255, 255, 0.03);
}

.candidate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Portrait photo wrapper with 3:4 aspect ratio */
.candidate-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.candidate-photo-placeholder {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.candidate-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.candidate-card:hover .candidate-photo {
  transform: scale(1.05);
}

.candidate-card:hover .candidate-photo-placeholder {
  transform: scale(1.1);
  color: rgba(255, 255, 255, 0.25);
}

/* Floating number badge on top-left of the photo */
.candidate-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.badge-teal { background-color: var(--color-teal); }
.badge-red { background-color: var(--color-red); }
.badge-yellow { background-color: var(--color-yellow); color: var(--bg-dark) !important; }
.badge-blue { background-color: var(--color-blue); }
.badge-purple { background-color: #8338ec; color: #fff !important; }
.badge-orange { background-color: #f77f00; color: #fff !important; }

.avatar-teal { color: rgba(42, 157, 143, 0.35) !important; }
.avatar-red { color: rgba(200, 16, 46, 0.35) !important; }
.avatar-yellow { color: rgba(226, 160, 63, 0.35) !important; }
.avatar-blue { color: rgba(45, 90, 123, 0.35) !important; }
.avatar-purple { color: rgba(131, 56, 236, 0.3) !important; }
.avatar-orange { color: rgba(247, 127, 0, 0.3) !important; }

/* Profile details below the photo */
.candidate-profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
  width: 100%;
}

.candidate-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 4px;
  color: #fff;
  width: 100%;
}

.candidate-party {
  font-size: 12px;
  color: var(--text-light-muted);
  width: 100%;
}

.candidate-desc {
  font-size: 12.5px;
  color: var(--text-light-muted);
  line-height: 1.42;
  text-align: center;
  margin-top: auto;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  width: 100%;
}

/* ==========================================================================
   SECTION 06 - POLICIES
   ========================================================================== */
.filter-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-btn {
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-dark);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background-color: var(--border-color);
}

/* ── Badge Picker ─────────────────────────────────────── */
.badge-picker-wrapper {
  margin: 0 0 28px;
}

.badge-picker-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  margin-left: 10px;
}

.legend-dot.legend-a { background: #f4a261; box-shadow: 0 0 6px rgba(244,162,97,0.6); }
.legend-dot.legend-b { background: #4895ef; box-shadow: 0 0 6px rgba(72,149,239,0.6); }
.legend-dot:first-child { margin-left: 0; }

.badge-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.badge-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
  width: 52px;
}

.badge-btn:hover {
  background: rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

.badge-btn-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  background-color: var(--bg-cream);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.badge-btn-name {
  font-size: 9.5px;
  color: var(--text-muted);
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  transition: color 0.18s ease;
}

/* Candidate A — golden */
.badge-btn.sel-a .badge-btn-circle {
  background: #f4a261;
  border-color: #e76f51;
  color: #fff;
  box-shadow: 0 0 12px rgba(244,162,97,0.55);
}
.badge-btn.sel-a .badge-btn-name { color: #e76f51; font-weight: 700; }

/* Candidate B — blue */
.badge-btn.sel-b .badge-btn-circle {
  background: #4895ef;
  border-color: #3a7bd5;
  color: #fff;
  box-shadow: 0 0 12px rgba(72,149,239,0.55);
}
.badge-btn.sel-b .badge-btn-name { color: #3a7bd5; font-weight: 700; }

.compare-empty-hint {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.7;
}

.policy-matrix-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.policy-matrix {
  min-width: 750px;
  display: flex;
  flex-direction: column;
}

.matrix-header, .matrix-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
}

.matrix-header {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
}

.header-cell {
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cand-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  flex: none;
}

.matrix-row {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.matrix-row.alt {
  background-color: var(--bg-cream);
}

.matrix-row:last-child {
  border-bottom: none;
}

.row-label {
  padding: 20px;
  font-weight: 700;
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.matrix-cell {
  padding: 20px;
  color: var(--text-muted);
  border-right: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  line-height: 1.45;
}

.matrix-cell:last-child {
  border-right: none;
}

/* Specific Highlight Colors for Cells */
.text-teal { color: var(--color-teal) !important; }
.text-red { color: var(--color-red) !important; }
.text-yellow { color: var(--color-yellow) !important; }
.text-blue { color: var(--color-blue) !important; }
.text-orange { color: #f77f00 !important; }
.compare-col-a { color: #e76f51 !important; }
.compare-col-b { color: #3a7bd5 !important; }

.policy-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ==========================================================================
   SECTION 07 - COUNTDOWN DASHBOARD
   ========================================================================== */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.countdown-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.countdown-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.countdown-big-val {
  font-family: var(--font-numeric);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.countdown-big-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.countdown-card.highlight-red {
  background-color: var(--color-red);
  border-color: var(--color-red);
}

.countdown-card.highlight-red .countdown-big-val {
  color: #fff;
}

.countdown-card.highlight-red .countdown-big-label {
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--bg-cream);
  color: var(--text-dark);
  padding: 56px 0 0;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-icon {
  border-color: var(--text-dark);
  color: var(--text-dark);
}

.footer-brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
}

.footer-about {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

.footer-license {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.license-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-link:hover { color: var(--color-red); }

.footer-muted {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.footer-privacy {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  margin: 4px 0 0;
}

.footer-bottom {
  background-color: var(--bg-dark);
  border-top: none;
  padding: 18px 0;
  margin-top: 8px;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.footer-bottom-link {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.footer-bottom-link:hover {
  color: #fff;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 850px) {
  .hero-meta {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .hero-cards {
    justify-content: flex-start;
  }
  
  .eligibility-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Timeline turns into vertical layout */
  .timeline-flow {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    padding-left: 24px;
    margin-top: 30px;
  }
  
  .timeline-flow::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background-color: var(--border-dark);
  }
  
  .timeline-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-line {
    position: absolute;
    left: -24px;
    top: 6px;
    margin-bottom: 0;
    width: 18px;
  }
  
  .timeline-dot {
    border: 3px solid var(--bg-dark);
  }
  
  .timeline-bar {
    display: none;
  }
  
  .timeline-time {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
  }

  /* Policy Matrix 3-column fit on mobile */
  .policy-matrix-container {
    overflow-x: auto;
  }
  
  .policy-matrix {
    min-width: 100%;
  }

  .matrix-header, .matrix-row {
    grid-template-columns: 85px 1fr 1fr;
  }

  .row-label {
    padding: 12px 6px;
    font-size: 11px;
  }

  .matrix-cell, .header-cell {
    padding: 12px 8px;
    font-size: 11.5px;
  }

  .cand-no {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
}

@media (max-width: 600px) {
  .main-header {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 36px;
  }

  .header-container {
    padding: 14px 16px;
  }

  .brand-text {
    font-size: 16px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
    border-width: 2px;
    font-size: 15px;
  }

  .tabs-container {
    padding: 6px 16px;
  }

  .tab-link {
    padding: 6px 12px;
    font-size: 13px;
  }

  .hero-section {
    padding: 40px 0 40px;
  }
  
  .badge-accent {
    margin-bottom: 16px;
    font-size: 11px;
    padding: 4px 10px;
  }

  .hero-cards {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  
  .meta-card {
    width: 100%;
    padding: 16px 20px;
  }

  .meta-value {
    font-size: 28px;
  }

  .meta-value.text-lg-meta {
    font-size: 22px;
  }

  .content-section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .section-lead {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .eligibility-checklist {
    padding: 20px;
  }

  .checklist-header h3 {
    font-size: 18px;
  }

  .check-item {
    padding: 12px;
    gap: 12px;
  }

  .custom-checkbox {
    width: 20px;
    height: 20px;
  }

  .check-title {
    font-size: 14.5px;
  }

  .check-desc {
    font-size: 12.5px;
  }

  .btn-check-portal-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .btn-check-portal {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
  }

  .docs-card {
    padding: 24px 20px;
  }

  .docs-card h3 {
    font-size: 18px;
  }

  .doc-category-item {
    padding: 12px;
    gap: 12px;
    border-radius: 10px;
  }

  .doc-cat-title {
    font-size: 13.5px;
  }

  .doc-cat-desc {
    font-size: 11.5px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }

  .step-card {
    padding: 16px;
  }

  .step-num {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .step-title {
    font-size: 15.5px;
  }

  .step-desc {
    font-size: 13px;
  }
  
  .ballot-visual-box {
    padding: 20px 16px;
    gap: 20px;
  }

  .ballot-paper {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .ballot-row {
    padding: 12px;
    gap: 12px;
  }

  .ballot-box {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .ballot-num {
    font-size: 14px;
  }

  .ballot-candidate {
    font-size: 12px;
  }

  .warning-title {
    font-size: 17px;
  }

  .warning-desc {
    font-size: 13.5px;
  }

  .candidates-carousel-container {
    gap: 8px;
  }

  .candidates-carousel-track .candidate-card {
    flex: 0 0 100%;
  }

  .candidates-carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .candidate-card {
    padding: 16px;
  }

  .candidate-name {
    font-size: 15px;
  }

  .candidate-number-badge {
    width: 32px;
    height: 32px;
    font-size: 15px;
    top: 8px;
    left: 8px;
  }

  .candidate-photo-placeholder {
    font-size: 28px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
  }

  .countdown-card {
    padding: 20px 12px;
    border-radius: 14px;
  }

  .countdown-big-val {
    font-size: 32px;
    margin-bottom: 6px;
  }

  .countdown-big-label {
    font-size: 11px;
  }

  .footer-container {
    align-items: flex-start;
    gap: 16px;
  }

  .footer-brand-text {
    font-size: 13px;
  }

  .footer-disclaimer {
    font-size: 11.5px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .stat-number {
    font-size: 32px;
    margin-bottom: 6px;
  }

  .stat-unit {
    font-size: 16px;
  }

  .stat-label {
    font-size: 11.5px;
  }
}

/* ==========================================================================
   LIVE RESULTS — SECTION 07
   ========================================================================== */

/* Status bar */
.res-status-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.res-live-badge {
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-numeric);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.res-meta-text {
  font-size: 14px;
  color: var(--text-muted);
}
.res-updated-text {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Progress track */
.res-progress-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.res-progress-fill {
  height: 100%;
  background: var(--color-red);
  border-radius: 99px;
  transition: width 1s ease;
}

/* Vote summary */
.res-vote-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.res-vote-item {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
}
.res-vote-item.good { border-top: 3px solid var(--color-teal); }
.res-vote-item.bad  { border-top: 3px solid var(--color-red); }
.res-vote-item.novote { border-top: 3px solid var(--color-yellow); }
.res-vote-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.res-vote-val {
  font-family: var(--font-numeric);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* Section label */
.res-section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Podium */
.res-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.podium-slot {
  flex: 1;
  max-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.podium-slot.rank-1 {
  border-top: 3px solid #F4C430;
  transform: translateY(-12px);
}
.podium-slot.rank-2 { border-top: 3px solid #C0C0C0; }
.podium-slot.rank-3 { border-top: 3px solid #CD7F32; }

.podium-rank-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.podium-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: var(--bg-cream);
}
.podium-slot.rank-1 .podium-photo { width: 88px; height: 88px; }
.podium-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}
.podium-pct {
  font-family: var(--font-numeric);
  font-size: 1.5rem;
  font-weight: 700;
}
.podium-slot.rank-1 .podium-pct { font-size: 2rem; }
.podium-votes {
  font-size: 12px;
  color: var(--text-muted);
}

/* Ranked list */
.res-ranked-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.res-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}
.res-rank {
  font-family: var(--font-numeric);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.res-no-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-numeric);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.res-info {
  flex: 1;
  min-width: 0;
}
.res-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.res-bar-wrap {
  height: 6px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}
.res-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s ease;
  min-width: 2px;
}
.res-stats {
  text-align: right;
  flex-shrink: 0;
}
.res-pct {
  font-family: var(--font-numeric);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}
.res-count {
  font-size: 11px;
  color: var(--text-muted);
}

.res-source-note {
  margin-top: 1.5rem;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}
.res-error {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
}

@media (max-width: 600px) {
  .res-podium { gap: 0.5rem; }
  .podium-photo { width: 56px; height: 56px; }
  .podium-slot.rank-1 .podium-photo { width: 68px; height: 68px; }
  .podium-pct { font-size: 1.2rem; }
  .podium-slot.rank-1 .podium-pct { font-size: 1.5rem; }
  .res-vote-item { min-width: 80px; }
}
