/**
 * EcoSmartHomes — Green Ameba Command Center Design System
 * Theme: Deep Forest Ink (#00241b), Emerald Signal (#10b981), Arc Mint (#34f5c5)
 * Two-Register Architecture (Dark Command Center vs Crisp Product Paper)
 */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --color-forest-ink: #00241b;       /* Primary canvas, hero, mission control */
  --color-forest-deep: #003f2d;      /* Elevated surface, nav */
  --color-forest-glow: #004d38;      /* Radial atmosphere glow */
  --color-emerald-signal: #10b981;   /* Primary focus & action */
  --color-emerald-dark: #059669;     /* Action hover */
  --color-arc-mint: #34f5c5;         /* Electric telemetry, pulse halos, status dots */
  --color-amber-gold: #f59e0b;       /* High-value grants & survey CTA */
  --color-amber-dark: #d97706;       /* Amber hover */
  --color-carbon: #1e293b;          /* Dark mode text on light product paper */
  --color-slate-body: #475569;      /* Body copy on light surfaces */
  --color-fog: #64748b;             /* Muted micro-labels, helper copy */
  --color-mist: #94a3b8;            /* Inactive tags, disabled labels */
  --color-silver-border: #e2e8f0;   /* 1px hairline dividers on light surfaces */
  --color-dark-hairline: rgba(255, 255, 255, 0.12); /* 1px hairline on dark canvas */
  --color-paper: #ffffff;           /* Clean Product Paper canvas */

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Typography Scale */
  --text-micro: 11px;
  --leading-micro: 1.82;
  --tracking-micro: 0.08em;
  --text-caption: 13px;
  --leading-caption: 1.5;
  --text-body-sm: 14px;
  --leading-body-sm: 1.54;
  --text-body: 16px;
  --leading-body: 1.6;
  --text-subheading: 24px;
  --leading-subheading: 1.35;
  --tracking-subheading: -0.015em;
  --text-heading-sm: 32px;
  --leading-heading-sm: 1.3;
  --tracking-heading-sm: -0.018em;
  --text-heading: 40px;
  --leading-heading: 1.25;
  --tracking-heading: -0.019em;
  --text-display: 54px;
  --leading-display: 1.2;
  --tracking-display: -0.022em;

  /* Geometry */
  --radius-tags: 4px;
  --radius-cards: 8px;
  --radius-buttons: 8px;
  --radius-images: 6px;

  --page-max-width: 1200px;
  --section-gap: 80px;
  --card-padding: 24px;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: #f8fafc;
  color: var(--color-carbon);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  width: 92%;
  max-width: var(--page-max-width);
  margin: 0 auto;
}

/* Header and Navigation (Ameba Minimalist Floating Nav) */
.header {
  background-color: var(--color-forest-ink);
  color: #fff;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-dark-hairline);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
  width: auto;
}

.nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  .nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 6px;
  }
  .nav ul {
    justify-content: flex-start;
  }
  .nav::-webkit-scrollbar {
    height: 3px;
  }
  .nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
  }
  .nav::-webkit-scrollbar-thumb {
    background: var(--color-emerald-signal);
    border-radius: 2px;
  }
}

/* Hero Section (Ameba Midnight Command Center Canvas) */
.hero {
  position: relative;
  min-height: 85vh;
  padding: 60px 0 80px 0;
  background: radial-gradient(circle at 50% 40%, var(--color-forest-glow) 0%, var(--color-forest-ink) 75%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  border: none;
  pointer-events: none;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 77, 56, 0.5) 0%, rgba(0, 36, 27, 0.92) 80%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 300;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-content p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-emerald-signal);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-buttons);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--color-emerald-dark);
  transform: translateY(-1px);
}

/* Section Labels and Titles */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--color-emerald-signal);
  margin-bottom: 10px;
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 300;
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  margin-bottom: 12px;
  color: var(--color-carbon);
}

.section-subtitle {
  font-size: var(--text-body);
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--color-slate-body);
}

/* --- SERVICE CARD UPGRADE (Restrained Hairline Precision) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: #fff;
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-silver-border);
  overflow: hidden;
  box-shadow: none; /* Ameba Do: Clean hairlines without muddy elevation */
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-emerald-signal);
}

.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f1f5f9;
}

.service-content {
  padding: 24px;
}

.service-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-forest-deep);
}

.service-content p {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 16px;
  color: var(--color-slate-body);
}

.service-link {
  color: var(--color-emerald-signal);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.service-link:hover {
  color: var(--color-emerald-dark);
  text-decoration: none;
}

/* Footer */
.footer {
  background-color: #003f2d;
  color: #fff;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.footer h3, .footer h4 {
  margin-bottom: 10px;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Suppress legacy floating guide trigger pill (merged into Guide & Tools drawer) */
#esh-help-floating-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Contact Section Styles */
.contact-section {
  padding: 80px 0;
  background-color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Contact Form */
.contact-form {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00a86b;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.form-group.checkbox input {
  width: auto;
  margin-right: 10px;
  accent-color: #00a86b;
}

.form-group.checkbox label {
  margin-bottom: 0;
  font-weight: 500;
}

.contact-form button {
  width: 100%;
  padding: 14px;
  background-color: #00a86b;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #007f50;
}

.contact-form button:active {
  transform: scale(0.98);
}

.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Contact Info Cards */
.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.info-card {
  padding: 25px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #00a86b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card h3 {
  margin-bottom: 12px;
  color: #003f2d;
  font-size: 1.1rem;
}

.info-card p {
  margin-bottom: 8px;
  color: #666;
  font-size: 0.95rem;
}

.info-card a {
  color: #00a86b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.info-card a:hover {
  color: #007f50;
  text-decoration: underline;
}
/* Contact Section Styles */
.contact-page {
  padding: 80px 0;
  background-color: #fff;
}

.contact-intro {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Contact Form */
.contact-form-wrapper {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.contact-form label:first-of-type {
  margin-top: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  width: 100%;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #00a86b;
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  margin-top: 20px;
  margin-bottom: 25px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin-right: 12px;
  margin-top: 4px;
  accent-color: #00a86b;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row .checkbox-label {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.checkbox-row label {
  margin: 0;
}

.contact-form button {
  padding: 14px 24px;
  background-color: #00a86b;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.contact-form button:hover {
  background-color: #007f50;
}

.contact-form button:active {
  transform: scale(0.98);
}

.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Contact Details */
.contact-details {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-details h3 {
  color: #003f2d;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.contact-details h3:first-child {
  margin-top: 0;
}

.contact-details h3:not(:first-child) {
  margin-top: 28px;
}

.contact-details p {
  margin: 8px 0;
  color: #666;
  font-size: 0.95rem;
}

.contact-details a {
  color: #00a86b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: #007f50;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .contact-form-wrapper,
  .contact-details {
    padding: 20px;
  }

  .contact-form label {
    margin-top: 14px;
  }
}
/* BER Guide Section */
.ber-guide-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.ber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.ber-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ber-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.ber-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background-color: #f5f5f5;
  padding: 20px;
  display: block;
}

.ber-card h3 {
  padding: 20px 20px 10px;
  font-size: 1.1rem;
  color: #003f2d;
  margin: 0;
}

.ber-card p {
  padding: 0 20px 20px;
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ber-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .ber-card img {
    height: 200px;
  }
}
/* Video Embed Styling */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}

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

.video-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.video-card h3 {
  padding: 20px;
  margin: 0;
  color: #003f2d;
  font-size: 1.1rem;
}

.video-card .video-embed {
  margin: 20px;
  margin-top: 0;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------- */
/* VIDEO SECTION STYLING        */
/* ----------------------------- */

.video-section {
  padding: 60px 0;
}

.video-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: #003f2d;
}

.video-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.video-card h3 {
  margin-bottom: 15px;
  color: #003f2d;
  font-size: 1.3rem;
}

.pillar-video {
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Pillars Section */
.pillars-section {
  padding: 80px 0;
  background: #ffffff;
}

.pillars-section .section-label {
  text-align: center;
  color: #00a86b;
}

.pillars-section .section-title {
  color: #003f2d;
  margin-bottom: 15px;
}

.pillars-section .section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
}

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

.pillar-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pillar-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.pillar-item h3 {
  color: #003f2d;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Responsive layout */
@media (max-width: 900px) {
  .pillar-video {
    max-width: 100%;
  }
  
  .pillars-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .pillars-section {
    padding: 60px 0;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Video Resources Section */
.video-resources-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #f9f9f9 0%, #f5f5f5 100%);
  position: relative;
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #00a86b;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #003f2d;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.6;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.resource-video {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
}

.resource-video::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00a86b, #005a3d);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: 1;
}

.resource-video:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,168,107,0.15);
  border-color: rgba(0,168,107,0.2);
}

.resource-video:hover::before {
  transform: scaleX(1);
}

.resource-video h3 {
  padding: 22px;
  margin: 0;
  color: #003f2d;
  font-size: 1.15rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f9f9f9, #f5f5f5);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  line-height: 1.4;
}

.resource-video .video-embed {
  margin: 0;
  padding-bottom: 56.25%;
  position: relative;
  flex: 1;
}

.resource-video:focus-within {
  outline: 2px solid #00a86b;
  outline-offset: 4px;
}

.resource-video:focus-within h3 {
  color: #00a86b;
}

@media (max-width: 1024px) {
  .section-title {
    font-size: 2rem;
  }
  
  .resources-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .video-resources-section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .resource-video h3 {
    font-size: 1.05rem;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  .resources-grid {
    gap: 16px;
  }
  
  .resource-video h3 {
    font-size: 1rem;
    padding: 14px;
  }
}

/* ----------------------------- */
/* CAROUSEL SECTION STYLING     */
/* ----------------------------- */

.carousel-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
  position: relative;
}

.carousel-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #003f2d;
  font-weight: 700;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-btn {
  background-color: #00a86b;
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.2);
}

.carousel-btn:hover {
  background-color: #005a3d;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.35);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn.prev {
  order: -1;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  flex: 1;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #00a86b #f0f0f0;
}

/* Webkit scrollbar styling */
.carousel-track::-webkit-scrollbar {
  height: 8px;
}

.carousel-track::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: #00a86b;
  border-radius: 10px;
}

.carousel-track::-webkit-scrollbar-thumb:hover {
  background: #005a3d;
}

.carousel-item {
  flex: 0 0 320px;
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.carousel-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 168, 107, 0.15);
}

.carousel-item h3 {
  color: #003f2d;
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #00241b;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.video-thumbnail {
  width: 100%;
  height: auto;
  display: block;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 63, 45, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.carousel-item:hover .play-overlay {
  opacity: 1;
  background: rgba(0, 63, 45, 0.5);
}

.play-icon {
  color: white;
  font-size: 3rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.carousel-item:hover .play-icon {
  transform: scale(1.1);
}

.carousel-item video {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #f0f0f0;
}

/* Responsive design */
@media (max-width: 1024px) {
  .carousel-section h2 {
    font-size: 2rem;
  }

  .carousel-item {
    flex: 0 0 280px;
  }

  .carousel-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .carousel-section {
    padding: 60px 0;
  }

  .carousel-section h2 {
    font-size: 1.75rem;
    margin-bottom: 30px;
  }

  .carousel-item {
    flex: 0 0 240px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .carousel-item h3 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .carousel-section {
    padding: 40px 0;
  }

  .carousel-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .carousel-wrapper {
    gap: 10px;
  }

  .carousel-item {
    flex: 0 0 200px;
    padding: 10px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .carousel-item h3 {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }
}

/* Roadmap Section Image Styling */
.roadmap-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 40px auto 30px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 63, 45, 0.1);
}

/* Grant Dropdown Styling */
.grant-dropdown {
  background-color: #f0f7f4;
  border-left: 4px solid #00a86b;
  border-radius: 6px;
  padding: 15px 20px;
  margin-bottom: 25px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
}

.grant-dropdown summary {
  font-weight: 600;
  color: #003f2d;
  cursor: pointer;
  list-style-type: none;
  position: relative;
  font-size: 1.05rem;
  outline: none;
}

.grant-dropdown summary::-webkit-details-marker {
  display: none;
}

.grant-dropdown summary::before {
  content: '▼';
  font-size: 0.8rem;
  margin-right: 10px;
  color: #00a86b;
  display: inline-block;
  transition: transform 0.3s ease;
}

.grant-dropdown[open] summary::before {
  transform: rotate(180deg);
}

.grant-dropdown p {
  margin-top: 10px;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  border-top: 1px solid #e0e0e0;
  padding-top: 10px;
  cursor: default;
}

/* Contact Consent Checkbox */
.consent-checkbox {
  margin: 1rem 0;
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.consent-checkbox input[type="checkbox"] {
  margin-top: 0.35rem;
  width: auto;
  cursor: pointer;
}

.consent-checkbox label {
  font-size: 0.9rem;
  font-weight: normal;
  margin: 0;
  display: inline;
  color: #c3c7cc;
}

.consent-checkbox label a {
  color: #7fd38a;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.consent-checkbox label a:hover {
  color: #a7f3d0;
}

/* Footer Privacy Links */
.footer-privacy-wrapper {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.footer-privacy-link {
  color: #7f8b96;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.footer-privacy-link:hover {
  color: #a1b0cb;
}

/* BER Voice Advisor Widget */
#ber-voice-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: system-ui, -apple-system, sans-serif;
}

#ber-voice-widget a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #059669;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.4);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

#ber-voice-widget a:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -5px rgba(4, 120, 87, 0.5);
}

#ber-voice-widget a:active {
  transform: translateY(0);
}

#ber-voice-widget a span:first-child {
  font-size: 18px;
}

/* cache bust 2 */

/* Vertical Timeline for Roadmap */
.roadmap-timeline {
  position: relative;
  padding-left: 30px;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 15px;
  bottom: 20px;
  width: 3px;
  background-color: #00a86b;
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 35px;
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #eee;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 25px;
  width: 14px;
  height: 14px;
  background-color: #00a86b;
  border-radius: 50%;
  border: 3px solid #f8fafc;
  box-shadow: 0 0 0 2px #00a86b;
}

.timeline-item .phase-badge {
  display: inline-block;
  background-color: #e6f4ef;
  color: #007f50;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-item h3 {
  color: #003f2d;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.timeline-item p {
  color: #555;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .roadmap-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Homepage SSR Article Previews */
.latest-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.home-article-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-left: 5px solid #00a86b;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.home-article-hero {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
}

.home-article-card h3 {
  color: #003f2d;
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.home-article-card p {
  color: #555555;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.home-article-card .tag-badge {
  background: #e6f4ef;
  color: #007f50;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  display: inline-block;
  margin-right: 4px;
}

.home-article-link {
  color: #00a86b;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: auto;
}
.home-article-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   INTERACTIVE ENERGY & AI SUITE SHOWCASE
   ========================================================================== */
.tools-showcase-section {
  padding: 60px 0;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

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

.tools-section-badge {
  background: #003f2d;
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 12px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.tool-card {
  background: #ffffff;
  border: 1px solid var(--color-silver-border);
  border-radius: var(--radius-cards);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: none; /* Ameba Do: No heavy elevation */
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-emerald-signal);
}

.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.tool-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.tool-card-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-tags);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-amber { background: rgba(245, 158, 11, 0.12); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-red { background: rgba(239, 68, 68, 0.12); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.12); color: var(--color-emerald-signal); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-blue { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #7e22ce; border: 1px solid rgba(168, 85, 247, 0.3); }

.tool-card-title {
  color: var(--color-forest-deep);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.tool-card-desc {
  color: var(--color-slate-body);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-buttons);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.tool-btn-emerald {
  background: var(--color-forest-deep);
  color: #ffffff;
}
.tool-btn-emerald:hover {
  background: var(--color-emerald-dark);
  color: #ffffff;
}

.tool-btn-amber {
  background: var(--color-amber-gold);
  color: #00241b;
  font-weight: 700;
}
.tool-btn-amber:hover {
  background: var(--color-amber-dark);
  color: #00241b;
}

/* ========================================================================= */
/* EcoSmartHomes Design Tokens & Modern Clean-Tech UI System (Stitch MCP)   */
/* ========================================================================= */
:root {
  --brand-emerald-dark: #00261b;
  --brand-emerald: #003f2d;
  --brand-emerald-light: #065f46;
  --brand-mint: #10b981;
  --brand-mint-hover: #059669;
  --brand-mint-light: #ecfdf5;
  --brand-gold: #f59e0b;
  --brand-gold-light: #fef3c7;
  --brand-danger: #ef4444;
  --brand-danger-light: #fef2f2;
  
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow-mint: 0 0 24px rgba(16, 185, 129, 0.25);
  --shadow-glow-gold: 0 0 24px rgba(245, 158, 11, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ber-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
}
.ber-badge-a { background: linear-gradient(135deg, #00a86b, #00875a); }
.ber-badge-b { background: linear-gradient(135deg, #57b956, #388e3c); }
.ber-badge-c { background: linear-gradient(135deg, #ffcc00, #f57f17); color: #000; }
.ber-badge-d { background: linear-gradient(135deg, #ff9900, #e65100); }
.ber-badge-e { background: linear-gradient(135deg, #ff6600, #d84315); }
.ber-badge-f { background: linear-gradient(135deg, #ff3300, #bf360c); }
.ber-badge-g { background: linear-gradient(135deg, #cc0000, #b71c1c); }

.grant-stat-chip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 95, 70, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Mobile Responsiveness for BER Tables & Data Matrices (< 768px) */
@media (max-width: 768px) {
  table.responsive-matrix {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .video-container {
    aspect-ratio: 16 / 9 !important;
  }

  .carousel-item {
    flex: 0 0 85vw !important;
    max-width: 320px;
  }
}

/* ==========================================================================
   VIEWPORT HEIGHT LOCKING (100dvh) & MOBILE SCROLL-SNAPPING
   Prevents mobile scrolling jitter and Safari navigation bar jumps
   ========================================================================== */
.viewport-container {
  height: 100vh;
  height: 100dvh;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scrollbar-width: none;
}
.viewport-container::-webkit-scrollbar {
  display: none;
}

.viewport-screen {
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Visual Anti-Slop Accents */
.noise-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.bg-tech-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
}

.glow-ambient {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(2, 6, 23, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

/* Gemini Vision Scanner Laser Sweep */
.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  box-shadow: 0 0 8px #10b981;
  animation: scanner-sweep 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanner-sweep {
  0% { top: 5%; opacity: 0.3; }
  50% { top: 95%; opacity: 1; }
  100% { top: 5%; opacity: 0.3; }
}

/* ROI Custom Slider (24px active touch thumb) */
.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10b981;
  border: 3px solid #00241b;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
}

.custom-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
  background: #eab308;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.6);
}

.custom-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #00241b;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
  cursor: pointer;
}

.custom-slider::-moz-range-thumb:active {
  transform: scale(1.2);
  background: #eab308;
}

/* iPhone Notch Protection Safe Areas */
.padding-top-safe { padding-top: env(safe-area-inset-top, 0px); }
.padding-bottom-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }


/* ==========================================================================
   HIGH-VISIBILITY BOUNDARY BOX & HEADER SYSTEM (Emerald Command Center)
   ========================================================================== */

/* Universal Reset: Prevent any browser default purple visited link bleed */
a, a:visited {
  color: inherit;
  text-decoration: none;
}

/* 1. Brand Logo: Crisp, High-Contrast & Larger */
.logo, a.logo, .logo-text, .brand-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  letter-spacing: -0.02em !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.logo:hover, a.logo:hover, .logo-text:hover {
  color: #34f5c5 !important;
  transform: translateY(-1px);
}

.logo strong, .logo-text strong {
  color: #34f5c5 !important;
  font-weight: 900 !important;
}

.logo-icon {
  font-size: 1.45rem !important;
}

/* 2. Top Emergency / Notification Bar: High Contrast Boundary Box System */
.top-bar, .top-emergency-bar, .top-bar-custom, aside.top-bar {
  background: #00120d !important;
  border-bottom: 1px solid rgba(52, 245, 197, 0.25) !important;
  color: #f1f5f9 !important;
  padding: 8px 20px !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  position: relative !important;
  z-index: 1001 !important;
}

.top-bar-container, .top-bar-inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.top-bar-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #e2e8f0 !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  flex-wrap: wrap !important;
}

/* Protocol / Arbitrage Badge Boundary Box */
.protocol-tag, .top-bar-badge, .top-emergency-badge {
  background: rgba(52, 245, 197, 0.12) !important;
  border: 1px solid rgba(52, 245, 197, 0.4) !important;
  color: #34f5c5 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Top Bar CTA Button: High-Contrast Glowing Amber Boundary Box */
.top-bar-cta, .top-emergency-link, a.top-bar-cta, a.top-emergency-link {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1.5px solid #f59e0b !important;
  color: #fbbf24 !important;
  padding: 4px 14px !important;
  border-radius: 9999px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  font-family: 'Inter', sans-serif !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
}

.top-bar-cta:hover, .top-emergency-link:hover, a.top-bar-cta:hover, a.top-emergency-link:hover {
  background: #f59e0b !important;
  color: #001711 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6) !important;
  transform: translateY(-1px) scale(1.02) !important;
}

/* 3. Navigation Links & Badges Boundary Box Styling */
.header, .main-nav-bar {
  background: rgba(0, 31, 23, 0.96) !important;
  border-bottom: 1px solid rgba(52, 245, 197, 0.2) !important;
  padding: 12px 20px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 999999 !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.nav a, .nav-link, .nav-link-item {
  color: #cbd5e1 !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.nav a:hover, .nav-link:hover, .nav-link-item:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.nav a.active, .nav-link.active, .nav-link-item.active {
  color: #34f5c5 !important;
  background: rgba(52, 245, 197, 0.12) !important;
  border-color: rgba(52, 245, 197, 0.35) !important;
  font-weight: 700 !important;
}

/* 4. Action Buttons (Tools Drawer & Book Survey) */
.btn-tools-drawer-toggle, button.btn-tools-drawer-toggle {
  background: rgba(52, 245, 197, 0.12) !important;
  border: 1.5px solid rgba(52, 245, 197, 0.4) !important;
  color: #34f5c5 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s !important;
}

.btn-tools-drawer-toggle:hover, button.btn-tools-drawer-toggle:hover {
  background: rgba(52, 245, 197, 0.25) !important;
  box-shadow: 0 0 16px rgba(52, 245, 197, 0.35) !important;
  transform: scale(1.02) !important;
}

.btn-book-nav, a.btn-book-nav, .header-actions a.btn-primary {
  background: #f59e0b !important;
  color: #001711 !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  border: 1.5px solid transparent !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-book-nav:hover, a.btn-book-nav:hover, .header-actions a.btn-primary:hover {
  background: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.6) !important;
  transform: scale(1.03) !important;
}


/* ==========================================================================
   MOBILE PERSONA DROPDOWN DRAWER ANTI-CLIPPING & STACKING FIX
   ========================================================================== */
.main-nav-bar, .header {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  z-index: 999999 !important;
}

.nav-inner {
  overflow: visible !important;
}

.mobile-persona-dropdown-wrapper {
  position: relative !important;
  overflow: visible !important;
  z-index: 1000000 !important;
}

.persona-dropdown-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 1000005 !important;
  background: rgba(6, 26, 20, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(52, 245, 197, 0.5) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(52, 245, 197, 0.35) !important;
  min-width: 250px !important;
  max-width: min(320px, 92vw) !important;
}

.persona-dropdown-panel.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
