:root {
  /* Colors */
  --bg-dark: #050505;
  --bg-light: #fdfbf7;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --accent-color: #FFD700; /* Bright Yellow */
  
  --font-sans: 'Noto Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Noto Serif', serif;
  
  --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* General Body */
.cinematic-body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-sans);
  /* Removed overflow hidden and height 100vh to allow scrolling */
}



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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

/* =========================================
   Navbar Styles
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  background-color: transparent;
  transition: all var(--transition-normal);
}

/* On page 2 or scrolled */
.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #d8d3c9;
}

.navbar.scrolled .logo-text, 
.navbar.scrolled .nav-link, 
.navbar.scrolled .lang-select {
  color: var(--text-dark) !important;
}

.navbar.scrolled .logo-img {
  filter: invert(1);
}

.navbar.scrolled .lang-select {
  border-bottom: 1px solid var(--text-dark);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

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

.logo-container {
  display: flex;
  align-items: center; /* Align centers properly */
  gap: 0.4rem; /* Space between logo and text */
}

.logo-img {
  height: 45px; /* Increase slightly for better scale */
  width: auto;
  display: block;
}

.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 300; /* Match thin stroke of 'Vote niti' */
  letter-spacing: 4px; /* Space it out to match the geometric aesthetic */
  text-transform: uppercase;
  margin-top: 13px; /* Push down to align with the visual baseline of the logo */
  color: var(--text-dark); /* Default, overridden by .text-light on page 1 */
}

.text-light {
  color: var(--text-light) !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dark); /* Default */
  transition: opacity var(--transition-normal);
}

.nav-link:hover {
  opacity: 0.7;
}

/* Language Buttons */
.lang-buttons-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn, 
.lang-btn.text-light,
.navbar.scrolled .lang-btn.text-light {
  background: transparent;
  border: none;
  color: var(--text-light) !important;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-normal);
  opacity: 0.6;
  position: relative;
}

.navbar.scrolled .lang-btn.text-light {
  color: var(--text-dark) !important;
}

.lang-btn:hover {
  opacity: 0.8;
}

.lang-btn.active,
.lang-btn.text-light.active,
.navbar.scrolled .lang-btn.text-light.active {
  opacity: 1;
  background-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-btn:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -0.25rem;
  transform: translateX(50%);
  opacity: 0.5;
  pointer-events: none;
  font-weight: 400;
}

.page-links-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-right: 1.5rem;
}

.page-links-container:last-child {
  margin-right: 0;
}

.page-link {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text-light);
}

.page-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-link.active {
  background-color: var(--text-light);
  color: var(--bg-dark) !important;
  border-color: var(--text-light);
}

.navbar.scrolled .page-link.text-light {
  color: var(--text-dark) !important;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .page-link.text-light:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar.scrolled .page-link.text-light.active {
  background-color: var(--text-dark);
  color: var(--bg-light) !important;
  border-color: var(--text-dark);
}

@media (max-width: 768px) {
  .navbar { padding: 1rem 0; }
  .nav-container { 
    flex-direction: column; 
    gap: 0.8rem; 
  }
  .logo-img { height: 35px; }
  .logo-text { font-size: 1rem; letter-spacing: 2px; margin-top: 10px; }
  .nav-links { 
    flex-direction: column;
    justify-content: center; 
    width: 100%; 
    gap: 0.8rem;
  }
  .page-links-container { 
    margin-right: 0; 
    width: 100%; 
    justify-content: center; 
  }
  .lang-buttons-container { 
    width: 100%; 
    justify-content: center; 
  }
  .lang-btn { font-size: 0.8rem; }
}

/* =========================================
   Cinematic Hero Section
   ========================================= */
.cinematic-main {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden; /* Contain the absolute elements */
}

.cinematic-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.cinematic-bg-container picture {
  display: block;
  width: 100%;
  height: 100%;
}

.cinematic-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  /* GSAP will animate scale */
  transform: scale(1); 
}

.cinematic-bg-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%);
  z-index: 2;
  pointer-events: none;
}



.cinematic-overlay {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 4;
  text-align: center;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  pointer-events: none;
}

.cinematic-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.25;
  text-shadow: 0 5px 25px rgba(0,0,0,0.9), 0 2px 5px rgba(0,0,0,0.5);
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

html[lang="en"] .cinematic-title {
  line-height: 1.05;
}

@media (max-width: 768px) {
  .cinematic-title {
    font-size: clamp(2.6rem, 7.5vw, 4rem);
    letter-spacing: 2px;
  }
  html[lang="en"] .cinematic-title {
    font-size: clamp(2.7rem, 8vw, 4.2rem);
    letter-spacing: 2px;
  }
}

@media (max-width: 480px) {
  .cinematic-overlay {
    padding: 0 0.75rem;
  }
  .cinematic-title {
    font-size: clamp(2.3rem, 8.2vw, 2.65rem);
    letter-spacing: 1.5px;
    margin-right: -1.5px;
  }
  html[lang="en"] .cinematic-title {
    font-size: clamp(2.4rem, 8.8vw, 2.75rem);
    letter-spacing: 1.5px;
    margin-right: -1.5px;
  }
}

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

.hero-line-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.2em 0;
  margin: -0.2em 0;
}

html[lang="en"] .hero-line-wrapper {
  padding: 0;
}

.hero-line {
  display: inline-block;
}

/* =========================================
   Rolls Sorting Page Buttons
   ========================================= */
.rs-btn {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.rs-btn-outline {
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
}

.rs-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-light);
}

.rs-btn-solid {
  color: var(--bg-dark);
  background: var(--text-light);
  border: 1px solid var(--text-light);
}

.rs-btn-solid:hover {
  background: transparent;
  color: var(--text-light);
}

/* =========================================
   Cinematic Hero Reveal Animations (Services Page)
   ========================================= */
@keyframes heroLineReveal {
  0% {
    transform: translateY(105%);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes heroBtnReveal {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

#rolls-sorting-hero .hero-line {
  display: inline-block;
  animation: heroLineReveal 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  will-change: transform;
}

#rolls-sorting-hero .services-hero-btns {
  display: flex;
  gap: 1rem;
  pointer-events: all;
  animation: heroBtnReveal 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  will-change: transform, opacity;
}

/* =========================================
   Election Intelligence CTA Buttons (Minimalist Design)
   ========================================= */
.hero-cta-wrap {
  margin-top: clamp(2rem, 4.5vh, 3.25rem);
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.1vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.hero-cta-btn:hover {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.hero-cta-btn i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.hero-cta-btn:hover i {
  transform: translateX(4px);
}

.contact-cta-wrap {
  margin-top: clamp(1.2rem, 2.2vh, 1.8rem);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.contact-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.1vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #111827;
  background: transparent;
  border: 1px solid #111827;
  border-radius: 4px;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

.contact-cta-btn:hover {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.contact-cta-btn i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.contact-cta-btn:hover i {
  transform: translateX(4px);
}

/* =========================================
   Alternating Pages Architecture
   ========================================= */
.page-section {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center; /* Bulletproof vertical centering */
  justify-content: center;
  padding-top: 80px; /* Offset for navbar to visually center content */
  padding-bottom: 0;
}

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

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

.overview-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
}
.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}
.section-light .section-subtitle {
  color: rgba(0, 0, 0, 0.7);
}

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

/* Service Card Base */
.service-card {
  padding: 2rem 1.5rem;
  border-radius: 8px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

/* Dark Mode Service Card */
.section-dark .service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.section-dark .service-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
}
.section-dark .service-desc {
  color: rgba(255, 255, 255, 0.6);
}

/* Light Mode Service Card */
.section-light .service-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}
.section-light .service-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.section-light .service-desc {
  color: rgba(0, 0, 0, 0.6);
}

.service-icon {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.service-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.service-link {
  color: var(--accent-color);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  transition: opacity var(--transition-normal);
}

.service-link:hover {
  opacity: 0.8;
}

/* Fix contrast for Bright Yellow on Light backgrounds */
.section-light .section-title,
.section-light .service-icon,
.section-light .service-link {
  color: #B38600; /* Darker shade of yellow/gold for readability */
}



/* =========================================
   Page 3 - Data Visualization Split Layout
   ========================================= */
.split-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  width: 100%;
}

.split-text {
  width: 100%;
  max-width: 400px;
}

.split-ui {
  width: 100%;
  max-width: 680px;
}

@media (max-width: 1024px) {
  .page-section {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 120px 0; /* Provide breathing room when items stack */
  }
  .split-layout {
    flex-direction: column;
    gap: 3rem !important; /* override inline styles if any */
  }
  .split-text {
    max-width: 100%;
    text-align: center;
  }
  .split-text .overview-header {
    text-align: center !important;
  }
}

/* Mockup Container */
.viz-mockup {
  background-color: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Top Bar (Header & Controls) */
.viz-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem; /* reduced padding */
  border-bottom: 1px solid #2a2a2a;
  background-color: #151515;
}

.viz-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.viz-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.viz-tabs {
  display: flex;
  background-color: #1a1a1a;
  border-radius: 4px;
  padding: 2px;
}

.viz-tab {
  background: transparent;
  border: none;
  color: #888;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.viz-tab:hover {
  color: #ccc;
}

.viz-tab.active {
  background-color: #ffffff;
  color: #000000;
  font-weight: 500;
}

/* Right Side Controls */
.viz-right {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 250px;
}

.viz-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.viz-select {
  background-color: #1a1a1a;
  color: #e0e0e0;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px 10px; /* reduced padding */
  font-size: 0.8rem; /* slightly smaller text */
  width: 100%;
  appearance: none;
  outline: none;
  cursor: pointer;
  /* Custom arrow */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.viz-select:focus {
  border-color: #555;
}

.viz-select-row {
  display: flex;
  gap: 8px;
}

.viz-vs {
  color: #666;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 5px;
}

/* Chart Container */
.viz-chart-container {
  padding: 1rem 1.5rem; /* reduced padding */
  background-color: #121212;
  position: relative;
  height: 350px; /* reduced height */
}

.d-none {
  display: none !important;
}

.viz-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0e0e0;
  font-size: 0.85rem;
  margin: 4px 0;
}
.viz-checkbox-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  margin: 0;
}
.viz-checkbox-row input:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Block Map Controls */
.viz-viewpoint-row, .viz-overlay-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.viz-label {
  font-size: 0.65rem;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.viz-icon-group {
  display: flex;
  background: #1a1a1a;
  border-radius: 4px;
  padding: 2px;
}
.viz-icon-btn {
  background: transparent;
  border: none;
  color: #888;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}
.viz-icon-btn:hover {
  color: #ccc;
}
.viz-icon-btn.active {
  background: #fff;
  color: #000;
}
.viz-toggle-group {
  display: flex;
  gap: 6px;
}
.viz-toggle-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.viz-toggle-btn:hover {
  color: #ccc;
  border-color: #555;
}

/* Block Map Chart Area */
#blockmap-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blockmap-legend {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.bm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
}
.bm-legend-item .color-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.blockmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
}
.bm-block {
  aspect-ratio: 1;
  background-color: #242f3f;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
}
.bm-block.bg-blue { background-color: #3b82f6; color: #fff; }
.bm-block.bg-green { background-color: #10b981; color: #fff; }
.bm-block.bg-orange { background-color: #f59e0b; color: #fff; }
.bm-block.bg-red { background-color: #ef4444; color: #fff; }

/* Custom Tooltip */
.bm-tooltip {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 9999;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.bm-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -20px);
}
.bm-tooltip-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}
.bm-tooltip-row {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  color: #9ca3af;
}
.bm-tooltip-row .color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  display: inline-block;
}
.bm-tooltip-row .val {
  margin-left: auto;
  font-weight: 500;
  color: #fff;
}
.bm-tooltip-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  color: #6b7280;
  text-align: right;
}

@media (max-width: 768px) {
  .viz-top {
    flex-direction: column;
    gap: 1.5rem;
  }
  .viz-right {
    justify-content: flex-start;
    width: 100%;
  }
  .viz-control-group {
    max-width: 100%;
  }
  .viz-chart-container {
    height: 300px;
    padding: 1rem;
  }
}

/* =========================================
   Page 4 - Light Mode Dashboard
   ========================================= */
.dashboard-mockup {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  color: #333;
}

.dashboard-mockup .dash-top {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.dash-scope {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.dash-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
}

.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 3px;
}

.dash-tab {
  background: transparent;
  border: none;
  color: #666;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-tab:hover {
  color: #333;
}

.dash-tab.active {
  background-color: #ffffff;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dash-filters {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.dash-select {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 0.85rem;
  color: #333;
  outline: none;
  cursor: pointer;
  min-width: 100px;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fafafa;
}

.dash-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.dash-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f0f4f8;
  color: #3b82f6;
  border-radius: 8px;
}

.dash-stat-info {
  display: flex;
  flex-direction: column;
}

.dash-stat-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
}

.dash-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  line-height: 1;
}

.dash-chart-section {
  padding: 1rem 1.25rem;
  background-color: #ffffff;
}

.dash-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dash-chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.dash-chart-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.dash-chart-container {
  height: 220px;
  width: 100%;
}

@media (max-width: 850px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.25rem;
  }
}

@media (max-width: 550px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem;
  }
  .dash-card {
    padding: 0.75rem;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .dash-stat-value {
    font-size: 1.25rem;
  }
  .dash-scope {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .dash-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .dash-chart-section {
    padding: 1rem 1rem;
  }
  .dash-chart-container {
    height: 180px;
  }
  .dash-tab {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

/* =========================================
   Page 5 - Social Media Dashboard
   ========================================= */
.social-feed-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.locality-target-box {
    position: absolute;
    top: 15%;
    left: -10%;
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(16, 185, 129, 0.5);
    padding: 12px 18px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
}

.radar-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: radarPulse 1.5s infinite;
}

@keyframes radarPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.trending-popup-box {
    position: absolute;
    bottom: 80px;
    right: -10px;
    background: rgba(18, 20, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    z-index: 25;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 7px;
    box-sizing: border-box;
    white-space: nowrap;
}

.trending-arrow {
    font-size: 0.70rem;
    color: var(--accent-color, #ffd700);
    flex-shrink: 0;
}

.trending-tag-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
}

.trending-label {
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.phone-mockup {
    width: 290px;
    height: 580px;
    background: #000;
    border-radius: 38px;
    border: 10px solid #1c1d22;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.65), 
        inset 0 0 0 1.5px #363842,
        inset 0 0 15px rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Screen glare effect */
.phone-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(105deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 55%);
    pointer-events: none;
    z-index: 25;
}

/* Authentic iOS Status Bar */
.phone-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 30;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
    box-sizing: border-box;
}

.status-time {
    color: #fff;
    font-size: 0.70rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.2px;
}

.phone-island {
    width: 72px;
    height: 18px;
    background: #000;
    border-radius: 20px;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    box-sizing: border-box;
}

.island-camera {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0e0e12;
    border: 1px solid #2d2e36;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.9), inset -1px -1px 1px rgba(255,255,255,0.25);
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.phone-home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.45);
    z-index: 35;
    pointer-events: none;
}

.phone-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    padding-top: 30px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    background: #000;
    box-sizing: border-box;
}

/* Hide all scrollbars inside the phone mockup while keeping functionality */
.phone-mockup *::-webkit-scrollbar {
    display: none;
}
.phone-mockup * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.feed-hashtag-header {
    text-align: center;
    padding: 10px;
    background: rgba(25, 25, 35, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 5px;
    position: relative;
    z-index: 5;
}

#top-hashtag {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 600;
    text-shadow: 0 0 10px var(--accent-color);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    padding: 0 8px;
}

.grid-item {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.grid-item .cand-silhouette {
    font-size: 2rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Floating Elements */
.float-icon {
  position: absolute;
  color: var(--accent-color);
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  z-index: 1;
}

.float-emoji {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.float-svg {
  position: absolute;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.float-svg svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
}

/* Social Media & Emoji Shower (Page 5) */
.float-reaction {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  will-change: transform, opacity;
}

.float-emoji-item {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  line-height: 1;
  display: block;
}

.shower-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Original Brand Colors (OG) */
.shower-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.55), inset 0 0 2px rgba(255,255,255,0.4);
}

.shower-yt {
  background: #ff0000;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.55), inset 0 0 2px rgba(255,255,255,0.4);
}

.shower-x {
  background: #000;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), inset 0 0 2px rgba(255,255,255,0.2);
}

.shower-fb {
  background: #1877f2;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.55), inset 0 0 2px rgba(255,255,255,0.4);
}

.shower-wa {
  background: #25d366;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.55), inset 0 0 2px rgba(255,255,255,0.4);
}


.animated-bars-container {
    position: absolute;
    left: calc(50% - 240px);
    top: 45%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 5;
    padding: 20px;
    background: rgba(20, 20, 30, 0.85);
    border-radius: 20px 0 0 20px; /* Flat on the right side to 'attach' to phone */
    border: 1px solid rgba(255,255,255,0.15);
    border-right: none;
    backdrop-filter: blur(15px);
    box-shadow: -15px 15px 35px rgba(0,0,0,0.6);
}

.bars-label {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.bars-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 140px;
}

.animated-bar {
    width: 16px;
    border-radius: 8px;
    height: 20%;
    animation: eqBar 3s infinite ease-in-out;
}

.animated-bar:nth-child(1) { animation-duration: 3.2s; animation-delay: 0.1s; background: linear-gradient(to top, #ff3366, #ff7799); box-shadow: 0 0 10px rgba(255,51,102,0.4); }
.animated-bar:nth-child(2) { animation-duration: 3.8s; animation-delay: 0.4s; background: linear-gradient(to top, #33ccff, #88ddff); box-shadow: 0 0 10px rgba(51,204,255,0.4); }
.animated-bar:nth-child(3) { animation-duration: 2.9s; animation-delay: 0.7s; background: linear-gradient(to top, #ffcc00, #ffee66); box-shadow: 0 0 10px rgba(255,204,0,0.4); }
.animated-bar:nth-child(4) { animation-duration: 4.1s; animation-delay: 0.2s; background: linear-gradient(to top, #00ff99, #66ffbb); box-shadow: 0 0 10px rgba(0,255,153,0.4); }
.animated-bar:nth-child(5) { animation-duration: 3.5s; animation-delay: 0.5s; background: linear-gradient(to top, #ff99ff, #ffccff); box-shadow: 0 0 10px rgba(255,153,255,0.4); }

@keyframes eqBar {
    0% { height: 20%; }
    25% { height: 85%; }
    50% { height: 40%; }
    75% { height: 95%; }
    100% { height: 20%; }
}

@media (max-width: 991px) {
    .animated-bars-container {
        display: none;
    }
}

.service-card {
    transition: all 0.3s ease !important;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

/* Dynamic Platform Feed Styles */
.platform-feed {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    background: #000;
    color: #fff;
    overflow: hidden;
    animation: fadeInSlideUp 0.35s ease-out forwards;
}

@keyframes fadeInSlideUp {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.platform-scroll-body {
    flex: 1;
    min-height: 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

/* Universal App Bottom Navigation */
.app-bottom-nav {
    height: 36px;
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #000;
    z-index: 20;
    box-sizing: border-box;
}

/* Instagram Styles */
.ig-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px 4px 12px;
    height: 30px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ig-header-user {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ig-username {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: -0.2px;
}
.ig-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}
.ig-profile-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    gap: 16px;
    flex-shrink: 0;
}
.ig-avatar-ring-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.ig-avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.ig-avatar-inner {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 2px solid #000;
}
.ig-stats-group {
    display: flex;
    flex: 1;
    justify-content: space-around;
}
.ig-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ig-stat-col strong {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.15;
}
.ig-stat-col span {
    font-size: 0.60rem;
    color: #94a3b8;
}
.ig-bio-block {
    padding: 0 12px 4px 12px;
    flex-shrink: 0;
    line-height: 1.3;
}
.ig-bio-name {
    font-size: 0.74rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ig-bio-cat {
    color: #94a3b8;
    font-size: 0.62rem;
    margin: 1px 0;
}
.ig-bio-desc {
    color: #f1f5f9;
    font-size: 0.66rem;
}
.ig-bio-link {
    color: #93c5fd;
    font-size: 0.62rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
}
.ig-action-buttons {
    display: flex;
    gap: 6px;
    padding: 2px 12px 6px 12px;
    flex-shrink: 0;
}
.ig-btn {
    border-radius: 6px;
    padding: 4px 0;
    text-align: center;
    font-size: 0.66rem;
    font-weight: 600;
    background: #262626;
    color: #fff;
    cursor: default;
}
.ig-btn-primary {
    flex: 1;
}
.ig-btn-icon {
    width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ig-highlights-scroll {
    display: flex;
    gap: 10px;
    padding: 0 12px 4px 12px;
    justify-content: space-between;
    flex-shrink: 0;
}
.ig-hl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.ig-hl-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #262626;
    padding: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.ig-hl-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ig-hl-item span {
    font-size: 0.58rem;
    color: #cbd5e1;
}
.ig-tabs-row {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.ig-tab-btn {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    color: #64748b;
    font-size: 0.85rem;
}
.ig-tab-btn.active {
    color: #fff;
    border-bottom: 1.5px solid #fff;
}
.ig-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0;
    flex-shrink: 0;
}
.ig-grid-tile {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}
.ig-tile-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.60rem;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.ig-bottom-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #888;
    font-size: 0.82rem;
}
.ig-bottom-nav .active {
    color: #fff;
}
.ig-nav-profile-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #fff;
}

/* Twitter / X Styles */
.x-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    height: 30px;
    flex-shrink: 0;
    border-bottom: 1px solid #2f3336;
}
.x-nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.x-tabs-row {
    display: flex;
    border-bottom: 1px solid #2f3336;
    flex-shrink: 0;
}
.x-tab-item {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: #71767b;
    position: relative;
}
.x-tab-item.active {
    color: #fff;
    font-weight: 700;
}
.x-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 2px;
    background: #1d9bf0;
    border-radius: 2px;
}
.x-tweet-card {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #2f3336;
    flex-shrink: 0;
}
.x-tweet-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
}
.x-tweet-body {
    flex: 1;
    min-width: 0;
}
.x-tweet-header {
    display: flex;
    align-items: center;
    gap: 4px;
}
.x-tweet-author {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}
.x-tweet-handle {
    font-size: 0.64rem;
    color: #71767b;
}
.x-tweet-more {
    margin-left: auto;
    font-size: 0.65rem;
    color: #71767b;
}
.x-tweet-text {
    font-size: 0.68rem;
    line-height: 1.35;
    color: #e7e9ea;
    margin-top: 2px;
}
.x-tweet-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding-right: 12px;
}
.x-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.60rem;
    color: #71767b;
}
.x-trends-block {
    padding: 8px 12px;
    border-bottom: 1px solid #2f3336;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}
.x-trends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 800;
    color: #e7e9ea;
    margin-bottom: 6px;
}
.x-trend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.x-trend-row:last-child {
    margin-bottom: 0;
}
.x-trend-cat {
    font-size: 0.58rem;
    color: #71767b;
}
.x-trend-topic {
    font-size: 0.70rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.x-trend-count {
    font-size: 0.58rem;
    color: #71767b;
}
.x-fab-btn {
    position: absolute;
    bottom: 42px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.45);
    z-index: 15;
}
.x-bottom-nav {
    border-top: 1px solid #2f3336;
    color: #71767b;
    font-size: 0.82rem;
}
.x-bottom-nav .active {
    color: #fff;
}

/* YouTube Styles */
.yt-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    height: 30px;
    flex-shrink: 0;
    background: #0f0f0f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.yt-brand {
    display: flex;
    align-items: center;
    gap: 5px;
}
.yt-logo-text {
    font-weight: 700;
    font-size: 0.80rem;
    color: #fff;
    letter-spacing: -0.3px;
}
.yt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
}
.yt-nav-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}
.yt-chips-row {
    display: flex;
    gap: 6px;
    padding: 5px 10px;
    background: #0f0f0f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    overflow-x: hidden;
}
.yt-chip {
    font-size: 0.60rem;
    padding: 2px 7px;
    border-radius: 5px;
    background: #272727;
    color: #f1f1f1;
    white-space: nowrap;
}
.yt-chip.active {
    background: #fff;
    color: #0f0f0f;
    font-weight: 600;
}
.yt-video-card {
    padding: 8px 10px 6px 10px;
    flex-shrink: 0;
}
.yt-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-play-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.72rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.yt-play-btn i {
    margin-left: 2px;
}
.yt-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.58rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}
.yt-meta-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: flex-start;
}
.yt-channel-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
}
.yt-meta-content {
    flex: 1;
    min-width: 0;
}
.yt-video-title {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    color: #f1f5f9;
}
.yt-video-sub {
    font-size: 0.58rem;
    color: #94a3b8;
    margin-top: 1px;
}
.yt-meta-more {
    color: #94a3b8;
    font-size: 0.65rem;
    margin-top: 2px;
}
.yt-shorts-shelf {
    padding: 4px 10px 8px 10px;
    flex-shrink: 0;
}
.yt-shorts-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.70rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.yt-shorts-grid {
    display: flex;
    gap: 8px;
}
.yt-short-card {
    flex: 1;
    height: 96px;
    border-radius: 7px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 6px;
    box-sizing: border-box;
}
.yt-short-overlay {
    display: flex;
    flex-direction: column;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    position: absolute;
    inset: 0;
    padding: 6px;
    justify-content: flex-end;
}
.yt-short-title {
    font-size: 0.58rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.yt-short-views {
    font-size: 0.52rem;
    color: #e2e8f0;
    margin-top: 1px;
}
.yt-bottom-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f0f0f;
    color: #aaa;
}
.yt-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.52rem;
    color: #aaa;
}
.yt-nav-btn i {
    font-size: 0.78rem;
}
.yt-nav-btn.active {
    color: #fff;
}

/* =========================================
   Page 6 - Excel Mockup (AI Rolls Sorting)
   ========================================= */
.excel-mockup {
    background-color: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #333;
    width: 100%;
    overflow: hidden;
    font-size: 0.85rem;
}

.excel-header {
    background-color: #f3f2f1;
    border-bottom: 1px solid #c8c8c8;
}

.excel-tabs {
    display: flex;
    background-color: #217346; /* Excel Green */
    color: #fff;
    padding-top: 5px;
}

.excel-tabs span {
    padding: 8px 15px;
    cursor: pointer;
}

.excel-tabs span.active {
    background-color: #f3f2f1;
    color: #217346;
}

.excel-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 15px;
    border-bottom: 1px solid #e1dfdd;
}

.ai-sort-btn {
    background-color: #217346;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.ai-sort-btn:hover {
    background-color: #1b5e39;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background-color: #c8c8c8;
}

.toolbar-stats {
    font-weight: 500;
}

.excel-formula-bar {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    background-color: #fff;
    border-bottom: 1px solid #c8c8c8;
}

.excel-formula-bar .fx {
    font-style: italic;
    font-family: "Times New Roman", serif;
    color: #666;
    margin-right: 10px;
    font-weight: bold;
}

.excel-formula-bar .formula-input {
    flex: 1;
    height: 24px;
    border: 1px solid #c8c8c8;
    background-color: #fff;
}

.excel-table-container {
    width: 100%;
    max-height: 400px;
    overflow: auto;
}

.excel-table {
    width: 100%;
    min-width: 1130px; /* Prevent columns from squishing below their specified pixel widths */
    border-collapse: collapse;
    table-layout: fixed; /* Ensures specific column widths */
}

/* Ensure column headers don't wrap weirdly */
.excel-table th {
    background-color: #f3f2f1;
    border: 1px solid #c8c8c8;
    padding: 4px 8px;
    font-weight: normal;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.excel-table td {
    border: 1px solid #e1dfdd;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.excel-table tr:hover td {
    background-color: #e1dfdd; /* Subtle hover */
}

/* Row numbers column */
.excel-table th:first-child,
.excel-table td:first-child {
    background-color: #f3f2f1;
    color: #666;
    text-align: center;
    width: 30px;
    border-right: 1px solid #c8c8c8;
    position: sticky;
    left: 0;
    z-index: 5;
}

.row-num-cell {
    position: relative; /* So the absolute resizer aligns correctly */
}

.row-resizer {
    position: absolute;
    bottom: -2px; /* Position right on the border */
    left: 0;
    width: 100%;
    height: 5px;
    cursor: row-resize;
    z-index: 20;
    background-color: transparent;
}
.row-resizer:hover {
    background-color: #10b981;
}

.col-resizer {
    position: absolute;
    top: 0;
    right: -2px; /* Position right on the border */
    width: 5px;
    height: 100%;
    cursor: col-resize;
    z-index: 20;
    background-color: transparent;
}
.col-resizer:hover {
    background-color: #10b981;
}

/* Make the top-left corner double-sticky */
.excel-table th:first-child {
    z-index: 15;
}

/* Column Widths to match standard electoral roll */
.excel-table th:nth-child(2) { width: 90px; } /* Part No */
.excel-table th:nth-child(3) { width: 120px; } /* Section */
.excel-table th:nth-child(4) { width: 100px; } /* Family ID */
.excel-table th:nth-child(5) { width: 120px; } /* EPIC */
.excel-table th:nth-child(6) { width: 150px; } /* Name */
.excel-table th:nth-child(7) { width: 150px; } /* Rel Name */
.excel-table th:nth-child(8) { width: 220px; } /* House No */
.excel-table th:nth-child(9) { width: 60px; } /* Age */
.excel-table th:nth-child(10) { width: 80px; } /* Gender */

/* Cluster Highlighting Colors */
.cluster-f1 td:not(:first-child) { background-color: rgba(255, 235, 156, 0.5); }
.cluster-f2 td:not(:first-child) { background-color: rgba(198, 239, 206, 0.5); }
.cluster-f3 td:not(:first-child) { background-color: rgba(255, 199, 206, 0.5); }
.cluster-f4 td:not(:first-child) { background-color: rgba(189, 215, 238, 0.5); }
.cluster-f5 td:not(:first-child) { background-color: rgba(244, 176, 132, 0.5); }
.cluster-f6 td:not(:first-child) { background-color: rgba(217, 225, 242, 0.5); }
.cluster-f7 td:not(:first-child) { background-color: rgba(255, 217, 102, 0.5); }

/* Animation class for sorting */
.sorting-animation {
    animation: pulseSort 0.8s ease-in-out;
}

@keyframes pulseSort {
    0% { filter: blur(0px); opacity: 1; }
    50% { filter: blur(3px); opacity: 0.5; }
    100% { filter: blur(0px); opacity: 1; }
}

/* Posts Image Animation for Page 7 */
/* Posts Image Animation for Page 7 */
.posts-image-container {
    animation: floatPosts 6s ease-in-out infinite;
    transform-origin: center center;
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    padding: 30px; /* Provides internal breathing room so the scaled image doesn't hit the mask edge */
    box-sizing: border-box;
}

.posts-image-container img {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
    /* initial shadow to give it depth */
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
}

.posts-image-container:hover img {
    /* softer scale to prevent clipping by the container mask */
    transform: scale(1.04) translateY(-5px);
    /* white glow drop-shadow that perfectly wraps the transparent elements */
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8)) drop-shadow(0 15px 25px rgba(0,0,0,0.4));
    cursor: pointer;
}

@keyframes floatPosts {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Election Circuit Board SVG Animations */
.election-circuit-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.05));
}

.pulse-path {
    stroke-dasharray: 40 400;
    stroke-dashoffset: 440;
}

.pulse-1 { animation: flowCircuit 3s linear infinite; }
.pulse-2 { animation: flowCircuit 3.5s linear infinite 0.5s; }
.pulse-3 { animation: flowCircuit 2.8s linear infinite 1s; }
.pulse-4 { animation: flowCircuit 3.2s linear infinite 1.5s; }
.pulse-5 { animation: flowCircuit 2.5s linear infinite 0.8s; }
.pulse-6 { animation: flowCircuit 2.9s linear infinite 1.2s; }

@keyframes flowCircuit {
    0% { stroke-dashoffset: 440; }
    100% { stroke-dashoffset: 0;

/* Service Box Component */
.service-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.service-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- COMPREHENSIVE MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  /* Fix container paddings */
  .page-section {
    padding: 80px 1rem 3rem 1rem !important;
    height: auto !important;
    min-height: auto !important;
  }
  
  /* Make inline flex wrappers stack */
  .split-ui[style*="display: flex"] {
    flex-direction: column !important;
    gap: 2rem !important;
  }
  
  /* Make sure split layouts always stack */
  .split-layout {
    flex-direction: column !important;
    gap: 2rem !important;
  }

  /* Full width for split layout items */
  .split-ui, .split-text, .overview-visual {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Dashboard Mockup (Page 4) Stacking */
  .viz-top {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }
  .dashboard-grid, .services-grid {
    grid-template-columns: 1fr !important;
  }

  /* Fix Chart cutting off on mobile */
  .viz-chart-container, .dash-chart-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .viz-chart-container canvas, .dash-chart-container canvas {
    min-width: 550px !important;
  }

  /* Excel Mockup (Page 6) Horizontal Scrolling */
  .excel-mockup {
    width: 100% !important;
  }
  .excel-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }
  .excel-table {
    min-width: 700px; /* Forces scroll instead of squishing */
  }

  /* Services & Features (Page 6 & 7) */
  .services-list .service-item {
    flex-direction: row !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
  
  /* Contact Cards (Page 8) inline styles fix */
  #page8 .gs-reveal[style*="display: flex"] {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  div[style*="padding: 100px"] {
    padding: 60px 1rem 3rem 1rem !important;
  }
  
  /* Typography Scaling */
  .section-title {
    font-size: 2.2rem !important;
  }
  .overview-header h2 {
    font-size: 2rem !important;
  }
  

  
  /* Responsive scaling for phone mockup on mobile */
  .phone-mockup {
    width: 260px !important;
    height: 530px !important;
    border-radius: 32px !important;
    border-width: 8px !important;
  }
  .social-feed-container {
    height: 530px !important;
    max-width: 260px !important;
    margin: 0 auto !important;
  }
  .phone-screen {
    font-size: 0.78rem !important;
  }
}

@media (max-width: 1024px) {
  .phone-mockup {
    width: 270px !important;
    height: 550px !important;
    border-radius: 34px !important;
    border-width: 8px !important;
  }
  .social-feed-container {
    height: 550px !important;
    max-width: 270px !important;
    margin: 0 auto !important;
  }
  .phone-screen {
    font-size: 0.78rem !important;
  }
}

/* =========================================
   Demographics Workspace
   ========================================= */
.demographics-workspace-container {
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background-color: #0d0d0d;
    border: 1px solid #333;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    color: #e0e0e0;
    font-family: var(--font-sans);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    margin: 0 auto;
}

/* Fullscreen mode */
.demographics-workspace-container.fullscreen {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    margin: 0;
}

/* Light Theme Variables within the workspace */
.demographics-workspace-container.light-theme {
    background-color: #f8fafc;
    color: #1e293b;
    border-color: #e2e8f0;
}

.demo-sidebar {
    width: 260px;
    background-color: #050505;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    transition: background-color 0.3s, border-color 0.3s;
}

.light-theme .demo-sidebar {
    background-color: #ffffff;
    border-right-color: #e2e8f0;
}

.demo-sidebar-header {
    padding: 0 1.5rem 1.5rem;
}

.demo-sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    transition: color 0.3s;
}

.light-theme .demo-sidebar-header h2 {
    color: #0f172a;
}

.demo-sidebar-search {
    background-color: #1a1a1a;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    color: #888;
    height: 36px;
    transition: background-color 0.3s;
}

.light-theme .demo-sidebar-search {
    background-color: #f1f5f9;
}

.demo-sidebar-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1rem;
}

.demo-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.light-theme .demo-nav-item {
    color: #64748b;
}

.demo-nav-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.light-theme .demo-nav-item:hover {
    color: #0f172a;
    background-color: rgba(0, 0, 0, 0.05);
}

.demo-nav-item.active {
    background-color: #ffffff;
    color: #000000;
}

.light-theme .demo-nav-item.active {
    background-color: #0f172a;
    color: #ffffff;
}

.demo-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.demo-sidebar-bottom {
    padding: 1.5rem 1rem 0;
    border-top: 1px solid #222;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: border-color 0.3s;
}

.light-theme .demo-sidebar-bottom {
    border-top-color: #e2e8f0;
}

.demo-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #0d0d0d;
    transition: background-color 0.3s;
}

.light-theme .demo-main {
    background-color: #f8fafc;
}

.demo-main-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #222;
    transition: border-color 0.3s;
}

.light-theme .demo-main-header {
    border-bottom-color: #e2e8f0;
}

.demo-main-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    transition: color 0.3s;
}

.light-theme .demo-main-header h3 {
    color: #0f172a;
}

.demo-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.demo-empty-state {
    text-align: center;
    max-width: 400px;
}

.demo-empty-icon {
    font-size: 4rem;
    color: #444;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.light-theme .demo-empty-icon {
    color: #cbd5e1;
}

.demo-empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    transition: color 0.3s;
}

.light-theme .demo-empty-state h2 {
    color: #0f172a;
}

.demo-empty-state p {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    transition: color 0.3s;
}

.light-theme .demo-empty-state p {
    color: #64748b;
}

.demo-empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.demo-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.demo-btn-secondary {
    background-color: #222;
    color: #fff;
    border: 1px solid #333;
}

.light-theme .demo-btn-secondary {
    background-color: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.demo-btn-secondary:hover {
    background-color: #333;
}

.light-theme .demo-btn-secondary:hover {
    background-color: #f1f5f9;
}

/* Prevent body scrolling when workspace is fullscreen */
body.no-scroll {
    overflow: hidden;
}

/* =========================================
   Form Layout (Voter List Section)
   ========================================= */

.form-content-panel {
    width: 100%;
}

/* Info Buttons */
.form-info-btns {
    display: flex;
    gap: 0.75rem;
}

.form-info-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.2);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-info-btn:hover {
    background: var(--text-dark);
    color: var(--bg-light);
    border-color: var(--text-dark);
}

.form-info-btn i {
    font-size: 0.8rem;
}

/* Intro text */
.form-intro-text {
    font-size: 0.95rem;
    color: rgba(0,0,0,0.6);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Form grid */
.voter-contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.3px;
}

.form-group input, .form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    background-color: #ffffff;
    color: var(--text-dark);
    transition: border-color 0.25s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #B38600;
}

.form-submit-btn {
    padding: 0.85rem 1rem;
    background-color: var(--text-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.form-submit-btn:hover {
    opacity: 0.85;
}

.form-contact-info {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 1.25rem;
    font-size: 0.82rem;
    color: rgba(0,0,0,0.5);
    font-weight: 500;
}

.form-contact-info i {
    color: #B38600;
}

.form-submit-btn {
    padding: 0.85rem 1rem;
    background-color: var(--text-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.form-submit-btn:hover {
    opacity: 0.85;
}

.form-contact-info {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 1.25rem;
    font-size: 0.82rem;
    color: rgba(0,0,0,0.5);
    font-weight: 500;
}

.form-contact-info i {
    color: #B38600;
}

/* =========================================
   Popups
   ========================================= */
.form-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.form-popup-overlay.active {
    display: flex;
}

.form-popup {
    background: #ffffff;
    color: var(--text-dark);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 520px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: popupIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.form-popup h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dark);
}

.form-popup h3 i {
    color: #B38600;
}

.form-popup ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-popup ul li {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(0,0,0,0.7);
    padding-left: 1.2rem;
    position: relative;
}

.form-popup ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 0;
    color: #B38600;
    font-weight: 700;
    font-size: 1.1rem;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.06);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(0,0,0,0.12);
}

/* Responsive */
@media (max-width: 768px) {
    .form-split-outer {
        flex-direction: column;
    }
    .form-image-panel {
        flex: 0 0 35vh;
    }
    .form-content-panel {
        padding: 2rem 1.5rem;
    }
    .voter-contact-form {
        grid-template-columns: 1fr;
    }
}
