/* ============================================
   COMPONENTS.CSS — Green Key Builders Inc.
   Extends style.css with all remaining UI blocks
   ============================================ */

/* ── Trust Bar ── */
.trust-bar {
  background: var(--primary);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.trust-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
  position: relative;
}
.trust-item {
  padding: 1rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.trust-item:last-child { border-right: none; }
.trust-item .stat {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--surface);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.trust-item .stat span { color: #D4AF37; }
.trust-item p {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  color: color-mix(in srgb, var(--surface) 60%, transparent);
  margin: 0;
}

/* Night mode — the trust bar keeps a light background (--primary flips to
   soft sage), so the gold accent glyphs (+, %, s in "25+", "100%", "100s")
   wash out. A true vector stroke (not text-shadow, which renders as a
   blobby halo) gives them a crisp black contour that scales with the font. */
[data-theme="dark"] .trust-item .stat span {
  color: var(--secondary);
  -webkit-text-stroke: 0.045em #0A130E;
  paint-order: stroke fill;
}

/* ── About Teaser ── */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about-teaser img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.about-text .section-tag { margin-bottom: 1rem; }
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { color: var(--text-muted); font-size: 1.1rem; }

/* ── Why Choose Us ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.why-card {
  background: var(--light-sage);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  transition: all var(--transition-normal);
  border-bottom: 4px solid transparent;
}
.why-card:hover {
  background: var(--surface);
  border-color: var(--secondary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}
.why-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
}
.why-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.why-card p { font-size: 1rem; margin: 0; }

/* ── Project Filter Buttons ── */
.filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--surface);
}

/* ── Testimonials ── */
.testimonials-section { background: var(--light-sage); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}
.testimonial-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all var(--transition-normal);
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.quote-mark {
  font-size: 5rem;
  line-height: 0.8;
  color: var(--accent);
  opacity: 0.25;
  font-family: Georgia, serif;
  position: absolute;
  top: 1.5rem;
  left: 2rem;
}
.testimonial-card blockquote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin: 1rem 0 1.5rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}
.testimonial-author {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}
.testimonial-location {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── CTA Section ── */
.cta-section {
  background: var(--primary);
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--surface);
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cta-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cta-content h2 { 
  font-family: var(--font-heading), 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--surface); 
  margin-bottom: 1rem; 
}
.cta-content p { color: color-mix(in srgb, var(--surface) 75%, transparent); margin-bottom: 2.5rem; }

/* ── Contact Form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}
.contact-info h3 { margin-bottom: 1rem; }
.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input,
.contact-form-wrapper input,
.contact-form-wrapper select,
.contact-form-wrapper textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--light-sage);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--bg-color);
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus,
.contact-form-wrapper input:focus,
.contact-form-wrapper select:focus,
.contact-form-wrapper textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(30, 77, 58, 0.08);
}
textarea.form-input { resize: vertical; min-height: 140px; }
select.form-input { cursor: pointer; }

/* ── Project Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(30px);
  transition: all 0.4s var(--ease-spring);
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}
.modal-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-body { padding: 3rem; }
.modal-tag {
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.modal-title { font-size: 2.5rem; margin-bottom: 1.5rem; }
.modal-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--light-sage);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.modal-stat strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.3rem;
}
.modal-stat span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}
.modal-close:hover {
  background: var(--secondary);
  transform: rotate(90deg);
}
.modal { position: relative; }

/* ── Footer ── */
.footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.7);
  padding: 6rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 1.25rem;
}
.footer-logo {
  display: block;
  height: 77px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  /* optical centring: the mark's weight sits right of its bounding box */
  transform: translateX(-12px);
}
.footer-about p { font-size: 0.95rem; line-height: 1.8; color: rgba(255,255,255,0.55); }
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.5rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 0.95rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--secondary); }
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}
.social-icon:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-4px);
}
/* Land and Water Honor Frame inside Footer */
.gkb-land-ack-container {
  margin: 3.5rem auto 2rem auto;
  max-width: 1040px;
  width: 100%;
  padding: 0 1rem;
}

.gkb-land-ack-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
}

/* Background Artwork Frame */
.land-ack-art-frame {
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.land-ack-art-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2172 / 724;
  object-fit: contain;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.land-ack-art-img.land-ack-art-night {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Day/Night Theme Switching for Artwork */
html:not([data-theme="dark"]) .land-ack-art-day {
  opacity: 1;
  visibility: visible;
}
html:not([data-theme="dark"]) .land-ack-art-night {
  opacity: 0;
  visibility: hidden;
}

html[data-theme="dark"] .land-ack-art-day {
  opacity: 0;
  visibility: hidden;
}
html[data-theme="dark"] .land-ack-art-night {
  opacity: 1;
  visibility: visible;
}

/* Text Content Layer */
.land-ack-content {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5% 16.5% 10% 18%;
  box-sizing: border-box;
}

/* Language Switching */
html:not([lang="fr"]) .land-ack-pane-en {
  display: flex !important;
}
html:not([lang="fr"]) .land-ack-pane-fr {
  display: none !important;
}

html[lang="fr"] .land-ack-pane-en {
  display: none !important;
}
html[lang="fr"] .land-ack-pane-fr {
  display: flex !important;
}

.land-ack-pane {
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.4rem, 1vw, 0.85rem);
  text-align: left;
}

.land-ack-para {
  margin: 0;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(0.72rem, 1.22vw, 0.94rem);
  line-height: 1.5;
  letter-spacing: 0.15px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.land-ack-para-water {
  font-size: clamp(0.72rem, 1.25vw, 0.96rem);
}

/* Light / Day Theme Typography */
html:not([data-theme="dark"]) .land-ack-para {
  color: rgba(255, 255, 255, 0.88);
}
html:not([data-theme="dark"]) .ack-term-green {
  color: #52c41a;
  font-weight: 700;
}
html:not([data-theme="dark"]) .ack-term-gold {
  color: #faad14;
  font-weight: 700;
}

/* Dark / Night Theme Typography */
html[data-theme="dark"] .land-ack-para {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(0, 0, 0, 0.85);
}
html[data-theme="dark"] .ack-term-green {
  color: #4ade80;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.7), 0 0 20px rgba(74, 222, 128, 0.35), 0 2px 4px rgba(0, 0, 0, 0.9);
}
html[data-theme="dark"] .ack-term-gold {
  color: #fbbf24;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.7), 0 0 20px rgba(251, 191, 36, 0.35), 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Mobile & Small Screen Adaptability */
@media (max-width: 768px) {
  .gkb-land-ack-container {
    margin: 2.5rem auto 1.5rem auto;
    padding: 0 0.75rem;
  }
  .gkb-land-ack-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
  }
  .land-ack-art-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.22;
  }
  .land-ack-art-img {
    height: 100%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: auto;
  }
  .land-ack-content {
    padding: 1.5rem 1.25rem;
    position: relative;
  }
  .land-ack-para {
    font-size: 0.88rem;
    line-height: 1.6;
  }
  .land-ack-para-water {
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }
}

/* Screen reader only helper for SEO and accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-bottom {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

/* ── Mobile Hamburger ── */
.mobile-controls {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--surface);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.navbar.scrolled .hamburger span { background: var(--primary); }
body.mobile-menu-open .navbar.scrolled .hamburger span,
body.mobile-menu-open .hamburger span { background: var(--surface); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6rem 2rem 2rem;
  gap: 1.8rem;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  transition: color var(--transition-fast);
}
.mobile-nav a:hover { color: var(--secondary); }
.mobile-nav-subitem {
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,0.82) !important;
  letter-spacing: 1px;
}
.mobile-close {
  display: block;
}

/* Night mode — mobile nav & hamburger */
[data-theme="dark"] .mobile-nav {
  background: #0d1a12;
}
[data-theme="dark"] .hamburger span {
  background: var(--text-dark);
}
[data-theme="dark"] .navbar.scrolled .hamburger span {
  background: var(--text-dark);
}

/* ── Scroll Animations ── */
/* .reveal and delay helpers are defined once in style.css (premium 1s spring).
   The duplicate definitions that previously lived here were removed to resolve
   a cascade conflict where this 0.7s ease block silently overrode style.css
   (see WEBSITE_INSPECTION_REPORT.md #5). */

/* ── Preloader ── */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader img { height: 70px; }
.preloader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-progress {
  height: 100%;
  width: 0%;
  background: var(--secondary);
  border-radius: 2px;
  animation: loadBar 1.5s ease forwards;
}
@keyframes loadBar {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ── Reduced Motion Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive Overrides ── */

/* Navbar device crossover — the hamburger is for phones only (<768px);
   every tablet width — including 768×1024 iPads in portrait — gets the
   full pill (compressed via the fluid block at the bottom of this file).
   French labels run ~16% wider than English, so FR holds the hamburger
   until the pill can physically fit (~980px). */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .mobile-controls { display: flex; }
}
@media (max-width: 979px) {
  html[lang="fr"] .nav-links { display: none; }
  html[lang="fr"] .mobile-controls { display: flex; }
}

@media (max-width: 1024px) {
  .about-teaser { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item { border-right: none; }
  .contact-form,
  .contact-form-wrapper { padding: 2rem 1.25rem; }
  .form-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .modal-body { padding: 2rem; }
  .modal-title { font-size: 1.8rem; }
  .mobile-nav a { font-size: 2rem; }
  .mobile-nav-subitem { font-size: 1.2rem !important; }
}

@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 1rem; }
}

/* ============================================
   ESTIMATOR COMPONENT STYLES
   ============================================ */

/* ── Range Slider Styles ── */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: var(--light-sage);
  outline: none;
  margin: 1.5rem 0;
  transition: background 0.3s;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-glow);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-glow);
}

/* ── Finish Level Radio Cards ── */
.finish-level-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.finish-card {
  border: 2px solid var(--light-sage);
  padding: 1.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  background: var(--bg-color);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.finish-card:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-4px);
}

.finish-card.active {
  border-color: var(--secondary);
  background: var(--surface);
  box-shadow: var(--shadow-glow);
}

.finish-card i {
  transition: transform 0.35s var(--ease-spring);
}

.finish-card:hover i {
  transform: scale(1.2) rotate(8deg);
}

.finish-radio-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ── Sustainable Add-on Checkbox Items ── */
.addon-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 2px solid var(--light-sage);
  border-radius: var(--radius-md);
  background: var(--bg-color);
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.addon-item:last-child {
  margin-bottom: 0;
}

.addon-item:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateX(6px);
}

.addon-item.active {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.addon-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--surface);
}

.addon-item.active .addon-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.addon-checkbox i {
  color: var(--primary-dark);
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.addon-item.active .addon-checkbox i {
  opacity: 1;
  transform: scale(1);
}

.addon-text {
  flex: 1;
}

/* ── Glow Effect for Currency Output ── */
.budget-range {
  transition: text-shadow 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.budget-range.glow {
  text-shadow: 0 0 35px rgba(212, 175, 55, 0.9), 0 0 10px rgba(212, 175, 55, 0.5);
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .finish-level-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ── Navbar Pill Spacing & Increased Distance from Logo ── */
.nav-links {
  gap: 1.95rem;
}

/* ── Bump Build With Us Left ── */
.nav-links .nav-cta-li {
  margin-left: -18px;
}

/* ── Combined Controls (Language + Theme) without extending pill ── */
.nav-controls-li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: -14px;
}

.lang-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0 2px;
  line-height: 1;
  width: 24px;
  text-align: center;
  box-sizing: border-box;
  transition: color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.lang-toggle-btn:hover {
  color: var(--secondary);
  transform: scale(1.08);
}

/* Dark mode */
[data-theme="dark"] .lang-toggle-btn {
  color: #fff;
}

[data-theme="dark"] .lang-toggle-btn:hover {
  color: var(--secondary);
}

/* Mobile Language Toggle */
.mobile-controls .lang-toggle-btn {
  color: #fff;
  font-size: 0.82rem;
  padding: 0.3rem 0.45rem;
  margin-right: 0.2rem;
}

.navbar.scrolled .mobile-controls .lang-toggle-btn {
  color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .mobile-controls .lang-toggle-btn {
  color: #fff;
}

.mobile-lang-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.mobile-lang-toggle-wrapper span {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-lang-toggle-wrapper .lang-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 4px;
}

/* ── Premium Accessible Theme Toggle Button ── */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: background 0.3s, transform 0.3s var(--ease-spring);
  position: relative;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.navbar.scrolled .theme-toggle-btn:hover {
  background: rgba(30, 77, 58, 0.08);
}

/* Make sure mobile theme toggle looks incredible */
.mobile-theme-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
  width: 100%;
}

.mobile-theme-toggle-wrapper span {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-theme-toggle-wrapper .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
}

.mobile-theme-toggle-wrapper .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Chatbot Widget ── */
#gkb-chatbot-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  font-family: var(--font-body);
}

.gkb-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background 0.2s ease;
}

.gkb-chat-toggle:hover,
.gkb-chat-toggle:focus-visible {
  transform: scale(1.05);
  background: var(--primary-dark);
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

.gkb-chat-toggle svg {
  width: 28px;
  height: 28px;
}

.gkb-chat-toggle .gkb-chat-close {
  display: none;
  font-size: 1.8rem;
  line-height: 1;
}

.gkb-chat-toggle[aria-expanded="true"] svg {
  display: none;
}

.gkb-chat-toggle[aria-expanded="true"] .gkb-chat-close {
  display: block;
}

.gkb-chat-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gkb-chat-panel.gkb-chat-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.gkb-chat-header {
  background: var(--primary);
  color: var(--surface);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gkb-chat-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
}

.gkb-chat-title svg {
  width: 20px;
  height: 20px;
}

.gkb-chat-close-btn {
  background: transparent;
  border: none;
  color: var(--surface);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.gkb-chat-close-btn:hover,
.gkb-chat-close-btn:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.gkb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-color);
}

.gkb-chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.gkb-chat-bubble.gkb-chat-assistant {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.gkb-chat-bubble.gkb-chat-user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--surface);
  border-bottom-right-radius: 4px;
}

.gkb-chat-typing {
  align-self: flex-start !important;
  background: var(--surface) !important;
  display: flex;
  gap: 4px;
  padding: 0.9rem 1rem !important;
  width: 56px;
}

.gkb-chat-typing span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: gkbChatBounce 1.2s infinite ease-in-out;
}

.gkb-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.gkb-chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes gkbChatBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.gkb-chat-input-area {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--light-sage);
}

.gkb-chat-form {
  display: flex;
  gap: 0.5rem;
}

.gkb-chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-sage);
  border-radius: 50px;
  background: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.gkb-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 58, 0.08);
}

.gkb-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gkb-chat-send:hover,
.gkb-chat-send:focus-visible {
  background: var(--primary-dark);
}

.gkb-chat-send svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 420px) {
  #gkb-chatbot-widget {
    bottom: 1rem;
    right: 1rem;
  }
  .gkb-chat-panel {
    width: calc(100vw - 2rem);
    height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gkb-chat-panel,
  .gkb-chat-toggle,
  .gkb-chat-typing span {
    transition: none;
    animation: none;
  }
}


/* ── Proud Partners marquee (footer) ─────────────────────────────── */
.partner-marquee {
  margin-top: 0;
}

.partner-marquee-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.6rem;
}

.partner-marquee-window {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.partner-marquee-track {
  display: flex;
  width: max-content;
  animation: partnerScroll 38s linear infinite;
}

.partner-marquee-window:hover .partner-marquee-track {
  animation-play-state: paused;
}

.partner-list {
  display: flex;
  align-items: center;
  gap: clamp(3.5rem, 7vw, 6.5rem);
  padding-right: clamp(3.5rem, 7vw, 6.5rem);
  margin: 0;
  list-style: none;
}

.partner-list li {
  flex-shrink: 0;
}

.partner-list img {
  display: block;
  height: 68px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  /* white-knockout so every brand reads on the dark footer; original color on hover */
  filter: brightness(0) invert(1);
  opacity: 0.72;
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

/* Filled-disc logos (e.g. the MMF roundel) can't survive the white knockout —
   they become a blob. High-contrast greyscale keeps their internal detail
   while staying monochrome with the family. */
.partner-list img.partner-logo-muted {
  height: 68px;
  filter: grayscale(1) brightness(1.6) contrast(1.05);
  opacity: 0.95;
}

.partner-list li:hover img.partner-logo-muted {
  filter: none;
  opacity: 1;
}

.partner-list li:hover img {
  filter: none;
  opacity: 1;
}

@keyframes partnerScroll {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ── Partners column: stacked partner logo links ─────────────────── */
.footer-partner-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.footer-partner-logos a {
  display: block;
}

.footer-partner-logos img {
  display: block;
  height: 50px;
  width: auto;
  max-width: 185px;
  object-fit: contain;
  object-position: left center;
  /* white-knockout to match the Proud Partners treatment; color on hover */
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

/* Square stacked lockup reads smaller than a wide horizontal one —
   size it by width so both partner marks carry the same visual mass */
.footer-partner-logos img.partner-logo-medechan {
  width: 110px;
  height: auto;
  max-width: none;
}

.footer-partner-logos a:hover img {
  filter: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .partner-marquee-track {
    animation: none;
  }
}

/* ── Fluid compact pill (768px – 1500px) ──────────────────────────────
   Tablets (768px+, incl. 768×1024 iPad class in portrait) keep the full
   pill nav instead of a hamburger. The full-size pill + logo needs ~1310px
   (EN) / ~1450px (FR), so from 768px to 1500px the logo, gaps and type
   scale fluidly with the viewport down to a compact floor that still fits
   every link + CTA + toggles in both languages. Full spacing resumes above
   1500px. Keep this block last: it overrides the base pill rules above
   (same specificity, later order). */
@media (min-width: 768px) and (max-width: 1500px) {
  .logo img { height: clamp(48px, 6.4vw, 104px); }
  .navbar.scrolled .logo img { height: clamp(40px, 4.6vw, 72px); }

  .nav-links {
    gap: clamp(0.55rem, 2.6vw - 15px, 1.6rem);
    padding: 0.4rem clamp(0.55rem, 1.2vw, 1.5rem);
  }
  .nav-links a { font-size: clamp(0.68rem, 0.5vw + 6.3px, 0.86rem); }
  /* The clamp above also matches dropdown links — restore their size */
  .nav-links .nav-submenu a { font-size: 0.95rem; }
  .nav-links .nav-cta-li { margin-left: -6px; }
  .nav-links .nav-cta-li .btn {
    font-size: clamp(0.6rem, 0.45vw + 5.8px, 0.76rem) !important;
    padding: 0.5rem clamp(0.55rem, 1.2vw, 1.1rem) !important;
  }
  .nav-controls-li { margin-left: -4px; }
  .nav-controls-li .theme-toggle-btn {
    width: clamp(28px, 2.4vw, 38px);
    height: clamp(28px, 2.4vw, 38px);
  }
}
