/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — FIXED
   Apply to BOTH index.php & storyfacts.php
   ═══════════════════════════════════════════════════════════ */

/* ── DESKTOP BASE (768px+) ── */
@media (min-width: 769px) {
  .page-layout {
    display: flex !important;
    flex-direction: row !important;
  }
  .page-left {
    flex: 0 0 65% !important;
    min-width: 0 !important;
  }
  .page-right {
    display: block !important;
    flex: 0 0 35% !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
  }
  .hamburger {
    display: none !important;
  }
  .mobile-nav {
    display: none !important;
  }
  .nav-links,
  .sf-nav-links {
    display: flex !important;
  }
  .mobile-marquee-strip {
    display: none !important;
  }
}

/* ── TABLET (769px – 1200px) ── */
@media (min-width: 769px) and (max-width: 1200px) {
  .page-left  { flex: 0 0 60% !important; }
  .page-right { flex: 0 0 40% !important; }
}

/* ══════════════════════════════════════════════
   MOBILE (≤ 768px) — main fix zone
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Layout ── */
  .page-layout {
    display: block !important;
    grid-template-columns: unset !important;
    flex-direction: column !important;
  }
  .page-left {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-right {
    display: none !important;
    width: 0 !important;
    flex: none !important;
    position: static !important;
    height: 0 !important;
    overflow: hidden !important;
    border: none !important;
  }

  /* ── Navbar ── */
  #netflix-nav,
  #sf-nav {
    padding: 0.75rem 1.25rem !important;
  }
  .nav-links,
  .sf-nav-links {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .nav-cta,
  .sf-cta {
    display: none !important;
  }
  .nav-badges {
    display: none !important;
  }

  /* ── Mobile Nav overlay — fix clash ── */
  .mobile-nav {
    display: none;               /* default hidden */
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;    /* below dropdown (9999) but above everything */
    background: rgba(8,8,8,0.98) !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2rem !important;
    /* Make sure desktop nav links don't show through */
    backdrop-filter: blur(4px);
  }
  .mobile-nav.open {
    display: flex !important;
  }
  .mobile-nav a {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 2.5rem !important;
    color: #ffffff !important;
    text-decoration: none !important;
    letter-spacing: 3px !important;
  }
  .mobile-nav .close-btn {
    position: absolute !important;
    top: 1.25rem !important;
    right: 1.25rem !important;
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    z-index: 10 !important;
  }

  /* ── Hero sections ── */
  #hero {
    min-height: 100svh !important;
    padding: 100px 1.25rem 4rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .hero-content {
    max-width: 100% !important;
    align-items: center !important;
  }
  .hero-title {
    font-size: clamp(2.8rem, 9vw, 3.5rem) !important;
    line-height: 0.92 !important;
  }
  .hero-stats {
    gap: 1rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  .hero-btns {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }
  .btn-play,
  .btn-info,
  .btn-primary,
  .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    max-width: 340px !important;
  }

  /* ── StoryFacts Hero ── */
  #sf-hero {
    min-height: 100svh !important;
    padding: 100px 1.25rem 4rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .sf-hero-content {
    max-width: 100% !important;
    align-items: center !important;
  }
  .sf-hero-title {
    font-size: clamp(2.8rem, 9vw, 3.5rem) !important;
  }
  .sf-hero-btns {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }
  .sf-badges {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* ── Mobile Marquee strip (horizontal) ── */
  .mobile-marquee-strip {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    background: #0f0f0f !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    padding: 0.75rem 0 !important;
  }
  .mobile-marquee-track {
    display: flex !important;
    gap: 1rem !important;
    animation: mobileScroll 22s linear infinite !important;
    width: max-content !important;
  }
  @keyframes mobileScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  .mobile-marquee-card {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    min-width: 120px !important;
  }
  .mobile-marquee-card img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
    filter: grayscale(20%) !important;
  }
  .mobile-marquee-card-name {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 0.7rem !important;
    letter-spacing: 1.5px !important;
    color: rgba(255,255,255,0.6) !important;
    white-space: nowrap !important;
  }

  /* ── Sections padding ── */
  #timeline,
  #founders,
  #faq,
  #contact,
  #framework,
  #sf-services,
  #sf-process,
  #sf-metrics,
  #sf-faq,
  #sf-contact,
  footer {
    padding: 3rem 1.25rem !important;
  }

  /* ── Timeline ── */
  .tl-item {
    grid-template-columns: 60px 1fr !important;
    gap: 1rem !important;
    padding: 1.25rem 0 !important;
  }
  .tl-year { font-size: 0.8rem !important; }
  .tl-brand { font-size: 1.2rem !important; }

  /* ── Founders ── */
  .founders-grid {
    grid-template-columns: 1fr !important;
    gap: 1px !important;
  }
  .founder-card { padding: 2rem 1.25rem !important; }
  .fc-name { font-size: 2rem !important; }

  /* ── Framework grid ── */
  .fw-grid {
    grid-template-columns: 1fr !important;
  }
  .fw-step { padding: 2rem 1.5rem !important; }

  /* ── Services pillars ── */
  .sv-pillar-header {
    grid-template-columns: 40px 1fr auto !important;
    gap: 0.75rem !important;
    padding: 1.25rem !important;
  }
  .sv-pillar-num { font-size: 2rem !important; }
  .sv-pillar-title { font-size: 1.3rem !important; }
  .sv-items {
    grid-template-columns: 1fr !important;
  }
  .sv-pillar-body.open,
  .sv-pillar.open .sv-pillar-body {
    padding: 0 1.25rem 1.5rem !important;
    max-height: 1000px !important;
  }

  /* ── Process ── */
  .process-grid {
    grid-template-columns: 1fr !important;
  }
  .process-step::after { display: none !important; }

  /* ── Metrics ── */
  .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Contact ── */
  .contact-title,
  .sf-contact-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem) !important;
  }
  .contact-details,
  .sf-contact-details {
    gap: 1.5rem !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .contact-btns,
  .sf-contact-btns {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* ── Footer ── */
  footer {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    padding: 2rem 1.25rem !important;
  }

  /* ── Profile screen ── */
  .profiles-row {
    gap: 1.5rem !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .profile-avatar {
    width: 120px !important;
    height: 120px !important;
  }
  .profile-title {
    font-size: 1.5rem !important;
  }

  /* ── Cards scroll ── */
  .cards-scroll {
    padding: 1rem 1.25rem !important;
  }
  .row-title,
  .row-label {
    padding: 0 1.25rem !important;
  }

  /* ── Nav profile button — trim on mobile ── */
  #navName {
    display: none !important;
  }
  .nav-caret {
    display: none !important;
  }
}