/* Bug 1 fix (Phase 11.8.100, chat web-1b3f6ffe): reserve space for header
   placeholder before layout.js injects it. Prevents layout shift on page load.
   --header-h is defined in /api/theme/css; fallback 60px matches default. */
#site-header { min-height: var(--header-h, 60px); }

/* B1 fix: hide hamburger on desktop (base rule, outside media queries) */
.l-nav-hamburger { display: none; }

/* ============================================================
   Base nav styles for landing pages
   Extracted from landing-HTML inline <style> (CTX-FRONTEND-CSS-REFACTOR-v1)
   Previously duplicated in 9 HTML files (index, about, consent, consultants,
   contacts, how-it-works, offer, privacy, terms) causing cascade conflicts
   with the responsive rules below (FE-2-B6 root cause). Now centralized here.
   CSS variable fallbacks preserve page-specific theming (e.g. index.html uses
   --nav-link-color, --nav-cta-pad, --nav-cta-size, --btn-bg-h).
   ============================================================ */
.l-nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.l-nav-link {
  padding: 7px 14px; border-radius: var(--r-btn);
  font-size: var(--small-size); font-weight: 500;
  color: var(--nav-link-color, var(--gray-500));
  transition: color var(--trans-fast), background var(--trans-fast);
  white-space: nowrap;
}
.l-nav-link:hover { color: var(--primary); background: var(--accent-ghost); }
.l-nav-link.active { color: var(--primary); font-weight: 700; background: var(--accent-ghost); }
.l-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff;
  padding: var(--nav-cta-pad, 8px 18px); border-radius: var(--r-btn);
  font-size: var(--nav-cta-size, var(--small-size)); font-weight: 600; margin-left: 8px;
  transition: background var(--trans-fast);
  white-space: nowrap;
}
.l-nav-btn:hover { background: var(--btn-bg-h, var(--primary-dark)); }

/* ============================================================
   Mobile-responsive layout for landing pages
   Breakpoints: 768px (tablet), 480px (phone)
   Desktop rendering: UNCHANGED
   ============================================================ */

/* ---- Tablet ≤768px ---- */
@media (max-width: 768px) {

  /* Header */
  .l-header-inner {
    padding: 0 16px;
    height: 56px;
  }
  .l-logo {
    font-size: 14px;
  }

  /* Show hamburger, hide nav links */
  .l-nav-hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    color: var(--text);
    border-radius: var(--r);
    transition: background .15s;
  }
  .l-nav-hamburger:hover { background: var(--accent-ghost); }
  .l-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    z-index: 200;
    display: none !important;
    overflow-y: auto;
  }
  .l-nav.open { display: flex !important; }
  /* B2 fix: show nav links when mobile menu is open (overrides index.html inline `@media (max-width:600px){.l-nav-link{display:none}}`) */
  .l-nav.open .l-nav-link {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    width: 100%;
    text-align: left;
  }
  .l-nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--r);
  }
  .l-nav-btn {
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
  }

  /* Hero */
  .l-hero {
    padding: 56px 16px 48px;
  }
  .l-hero h1 {
    font-size: 28px;
    line-height: 1.25;
  }
  .l-hero-sub {
    font-size: 15px;
  }
  .l-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .l-hero-actions .btn-pri,
  .l-hero-actions .btn-sec {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .l-trust-strip {
    gap: 16px;
  }
  .l-trust-item {
    flex: 1 1 40%;
    min-width: 120px;
  }

  /* Widgets */
  .l-widgets-grid {
    grid-template-columns: 1fr;
  }
  .l-widgets-section {
    padding: 48px 16px;
  }
  .l-widget {
    padding: 24px 20px;
  }

  /* Sections */
  .l-section {
    padding: 48px 16px;
  }
  .l-section-alt {
    padding: 48px 16px;
  }
  .l-inner {
    padding: 0;
  }

  /* FAQ */
  .l-faq-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* CTA */
  .l-cta {
    padding: 48px 16px;
  }
  .l-cta h2 {
    font-size: 24px;
  }
  .l-cta p {
    margin-bottom: 24px;
  }
  .l-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .l-cta-actions .btn-pri,
  .l-cta-actions .btn-amber,
  .l-cta-actions .btn-sec {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Footer */
  .l-footer {
    padding: 40px 16px 24px;
  }
  .l-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  /* Section titles */
  .l-section-title {
    font-size: 24px;
  }
}

/* ---- Phone ≤480px ---- */
@media (max-width: 480px) {

  /* Hero */
  .l-hero {
    padding: 40px 12px 36px;
  }
  .l-hero h1 {
    font-size: 24px;
  }
  .l-hero-badge {
    font-size: 12px;
    padding: 4px 10px;
    margin-bottom: 20px;
  }
  .l-trust-strip {
    gap: 12px;
  }
  .l-trust-item {
    flex: 1 1 100%;
    min-width: 0;
  }
  .l-trust-num {
    font-size: 22px;
  }

  /* Nav mobile */
  .l-nav {
    padding: 12px;
  }
  .l-nav-link {
    padding: 12px 14px;
    font-size: 15px;
  }

  /* Buttons */
  .btn-pri, .btn-sec, .btn-amber {
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Widgets */
  .l-widgets-section {
    padding: 36px 12px;
  }
  .l-widget {
    padding: 20px 16px;
  }

  /* Sections */
  .l-section, .l-section-alt {
    padding: 36px 12px;
  }

  /* FAQ */
  .l-faq-q {
    font-size: 14px;
    padding: 14px 0;
  }
  .l-faq-a {
    font-size: 14px;
  }

  /* CTA */
  .l-cta {
    padding: 36px 12px;
  }
  .l-cta h2 {
    font-size: 22px;
  }

  /* Footer — single column */
  .l-footer {
    padding: 32px 12px 20px;
  }
  .l-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 28px;
  }

  /* Section title */
  .l-section-title {
    font-size: 22px;
  }
}
