/* ============================================================
   CaseFrame AI — Mobile Responsive Styles
   Breakpoints: ≤768px (tablet), ≤480px (phone)
   ============================================================ */

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  cursor: pointer;
  margin-left: 10px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: all 0.22s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ── */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 58px; /* matches --nav-h */
  left: 0; right: 0;
  background: #0b1929;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 199;
  padding: 16px 20px 24px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  display: block;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s;
  font-family: 'Inter', -apple-system, sans-serif;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active { background: rgba(255,255,255,0.08); color: white; }
.nav-mobile-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}
.nav-mobile-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.nav-mobile-actions a {
  flex: 1;
  text-align: center;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
}
.nav-mobile-actions .nav-signup {
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%) !important;
  color: white !important;
  box-shadow: 0 2px 10px rgba(194,65,12,0.4);
}
.nav-mobile-actions .nav-signin {
  border: 1px solid rgba(255,255,255,0.2) !important;
}

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

  /* ── NAV ── */
  .nav { padding: 0 16px 0 16px; }
  .nav-links { display: none !important; }
  .nav-right  { display: none !important; }
  .nav-hamburger { display: flex; }
  .nav-logo { margin-right: auto; }

  /* ── PAGE HERO ── */
  .page-hero { padding: 52px 20px 44px; }
  .page-hero h1 { font-size: 1.9rem !important; }
  .page-hero p  { font-size: 0.92rem; }

  /* ── GENERIC SECTION ── */
  .section { padding: 52px 20px; }

  /* ── FOOTER ── */
  .footer { padding: 48px 20px 32px !important; }
  .footer-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 24px !important;
  }
  .footer-brand { grid-column: 1 / -1; }

  /* ── CONTACT PAGE ── */
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* ── ABOUT PAGE ── */
  .founder-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .founder-card { position: static !important; }

  /* ── PARTNERS PAGE ── */
  .tp-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .imanage-spotlight {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* ── SUPPORT PAGE ── */
  .support-wrap {
    grid-template-columns: 1fr !important;
  }
  .support-sidebar { display: none !important; }
  .support-main { padding: 32px 20px 0 !important; }

  /* ── INDEX HERO (two-col) ── */
  .hero-inner {
    grid-template-columns: 1fr !important;
    min-height: unset !important;
  }
  .hero-visual { display: none !important; }
  .hero-copy { padding: 60px 24px 52px !important; }
  .hero h1 { font-size: 2.2rem !important; }
  .hero-sub { font-size: 0.92rem !important; }

  /* ── STATS STRIP ── */
  .stats-strip { padding: 0 20px !important; }
  .stats-inner {
    flex-wrap: wrap !important;
  }
  .stat-item {
    flex: 1 1 50% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 16px 12px !important;
  }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border) !important; }

  /* ── FEATURES / PRICING SELF-CONTAINED NAV ── */
  .sec { padding: 56px 20px !important; }
  .sec-inner { max-width: 100% !important; }

  /* Features layout grids */
  .layout-top-copy { grid-template-columns: 1fr !important; gap: 24px !important; }
  .dep-cards { grid-template-columns: 1fr !important; }
  .layout-split-wide { grid-template-columns: 1fr !important; gap: 32px !important; }
  .bullet-grid { grid-template-columns: 1fr !important; }

  /* Pricing cards */
  .pricing-grid { grid-template-columns: 1fr !important; max-width: 440px !important; margin: 0 auto !important; }
  .pricing-card { transform: none !important; }

  /* About dark section 2-col */
  .section [style*="grid-template-columns:1fr 420px"],
  .section [style*="grid-template-columns: 1fr 420px"] {
    display: block !important;
  }
}

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

  /* ── TYPOGRAPHY ── */
  .page-hero h1 { font-size: 1.65rem !important; }
  .hero h1      { font-size: 1.85rem !important; }

  /* ── NAV ── */
  .nav { padding: 0 14px; }

  /* ── SECTIONS ── */
  .section { padding: 40px 16px; }
  .page-hero { padding: 44px 16px 36px; }
  .sec { padding: 44px 16px !important; }

  /* ── HERO ACTIONS ── */
  .hero-actions { flex-direction: column !important; gap: 10px !important; }
  .hero-btn-primary,
  .hero-btn-secondary { width: 100% !important; justify-content: center !important; text-align: center !important; }

  /* ── FOOTER ── */
  .footer-inner { grid-template-columns: 1fr !important; }

  /* ── CONTACT FORM ── */
  .form-row { grid-template-columns: 1fr !important; }
  .contact-form-wrap { padding: 24px 18px !important; }

  /* ── PARTNERS ── */
  .tp-grid { grid-template-columns: 1fr !important; }
  .tp-section { padding: 56px 16px !important; }
  .imanage-section { padding: 56px 16px !important; }

  /* ── FEATURES hero ── */
  .hero { padding: 60px 16px 70px !important; }
  .hero h1 { font-size: 1.95rem !important; }

  /* ── PRICING TOGGLE ── */
  .pricing-toggle { flex-direction: column !important; align-items: center !important; }

  /* ── ABOUT dark grid ── */
  [style*="grid-template-columns:1fr 1fr"] { display: block !important; }
  [style*="grid-template-columns: 1fr 1fr"] { display: block !important; }
  [style*="grid-template-columns:repeat(2"] { display: block !important; }

  /* ── STATS ── */
  .stat-item { flex: 1 1 100% !important; border-right: none !important; }

  /* ── SUPPORT ── */
  .support-main { padding: 24px 16px 0 !important; }

  /* ── INDEX WHO SECTION CARDS ── */
  [style*="grid-template-columns: repeat(auto-fit"] { display: flex !important; flex-direction: column !important; }
}
