/* ============================================================
   MoneyMaps — responsive.css
   Mobile overrides only. Desktop (1024px+) is untouched.
   Breakpoints: 1023px (tablet), 767px (mobile L — PRIMARY), 480px (mobile S)
   DO NOT modify: Google OAuth onclick, Razorpay onclick, any JS
   ============================================================ */

/* ── HAMBURGER & MOBILE NAV (hidden on desktop) ── */
.nav-mobile-right {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark-2);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.96);
  z-index: 998;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 80px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-menu-overlay.open {
  display: flex;
  opacity: 1;
}

.mobile-menu-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

.mobile-menu-link {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s;
}

.mobile-menu-link:hover { color: #9b87f5; }

.mobile-menu-cta {
  margin-top: 24px;
  background: var(--purple, #7f5af0);
  color: white !important;
  padding: 16px 24px !important;
  border-radius: 12px;
  text-align: center;
  border: none !important;
}

/* ── MOBILE CHIPS BENTO (hidden on desktop) ── */
.hero-chips-mobile {
  display: none;
}

/* ============================================================
   TABLET — ≤1023px
   ============================================================ */
@media (max-width: 1023px) {
  .features-bento,
  .features-bento-row2,
  .features-bento-row3 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .savings-layout {
    gap: 48px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .steps-grid::before {
    display: none;
  }

  .faq-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ============================================================
   MOBILE L — ≤767px  (PRIMARY TARGET: 375px)
   ============================================================ */
@media (max-width: 767px) {

  /* Safety net */
  html, body {
    overflow-x: hidden;
  }

  /* ── SECTION SPACING ── */
  section {
    padding: 60px 5% !important;
  }

  .section-title {
    font-size: clamp(24px, 6vw, 36px) !important;
  }

  .section-subtitle {
    font-size: 15px !important;
  }

  /* ── NAVBAR ── */
  nav {
    height: 56px;
    padding: 0 16px;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    /* Fully opaque: kills the semi-transparent bleed on iOS Safari scroll */
    background: #F8F7FF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  nav.scrolled {
    background: #ffffff !important;
    box-shadow: 0 2px 16px rgba(127, 90, 240, 0.08) !important;
  }

  /* Hide desktop nav links */
  .nav-links {
    display: none !important;
  }

  /* Show mobile right side */
  .nav-mobile-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .nav-cta-mobile {
    padding: 8px 14px !important;
    font-size: 13px !important;
    border-radius: 8px;
    text-decoration: none !important;
  }

  /* ── HERO ── */
  #hero {
    padding: 80px 5% 48px !important;
    min-height: auto;
  }

  /* Hide ✨ emoji span — desktop keeps it, mobile hides it */
  .hero-badge span {
    display: none !important;
  }

  /* Shrink badge text so it fits one line at 375px */
  .hero-badge {
    font-size: 11px !important;
    padding: 5px 12px !important;
    gap: 0 !important;
  }

  .hero-title {
    font-size: clamp(22px, 5.5vw, 32px) !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    max-width: 100%;
  }

  .hero-subtitle {
    font-size: 15px !important;
    white-space: normal !important;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Stack CTAs full width */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 400px;
    gap: 12px;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Social proof: wrap and center */
  .hero-social-proof {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  /* Show video on mobile — do NOT hide dashboard-mockup-wrap */
  .dashboard-mockup-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    transform: none !important;
    margin: 16px auto 0 !important;
    box-sizing: border-box !important;
  }

  /* Hide the absolutely-positioned desktop chips */
  .hero-chip {
    display: none !important;
  }

  /* Hide old mobile chip grid — using new unified chips instead */
  .hero-chips-mobile {
    display: none !important;
  }

  /* ── UNIFIED CHIP ROW — mobile 2x2 grid ── */
  .hero-chips-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 16px auto 0 !important;
    padding: 0 20px !important;
  }

  .hero-chip-pill {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    width: 100% !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    border-radius: 9999px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .hcp-green  { background: #DCFCE7 !important; border-color: #bbf7d0 !important; color: #166534 !important; }
  .hcp-amber  { background: #FEF3C7 !important; border-color: #fde68a !important; color: #92400e !important; }
  .hcp-red    { background: #FEE2E2 !important; border-color: #fecaca !important; color: #991b1b !important; }
  .hcp-purple { background: #EDE9FE !important; border-color: #c4b5fd !important; color: #4c1d95 !important; }

  /* ── VIDEO WRAP on mobile ── */
  .hero-video-wrap {
    display: block !important;
    width: calc(100% - 32px) !important;
    max-width: 100% !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    position: relative !important;
    padding-top: 56.25% !important;
    margin: 0 auto !important;
  }

  /* ── FEATURES SECTION ── */
  #features > .text-center {
    margin-bottom: 32px !important;
  }

  .features-bento,
  .features-bento-row2,
  .features-bento-row3 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* ── ALL FC-MOCKUP: identical fixed height + equal top breathing room ──
     Triple-lock height so no inline style override can win.
     padding:14px 16px on every card = equal breathing space from top border.
     overflow:hidden clips content that exceeds 220px.                       */
  .fc-mockup,
  .fc-mockup-tall {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    overflow: hidden !important;
    padding: 14px 16px !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
  }

  /* Money Flow card intentionally uses padding:0 so the chart fills edge-to-edge.
     Its first child div already handles the 14px internal top padding. */
  .fc-mockup[style*="padding:0"] {
    padding: 0 !important;
  }

  /* Ensure images and inner content fill width without overflow */
  .fc-mockup > * {
    max-width: 100%;
  }

  /* ── SMART BUDGET: shrink the 138px donut so both columns fit side-by-side ──
     DO NOT collapse the grid-template-columns:1fr 1fr — keep it as-is.
     Just scale the donut circle down so it doesn't overflow the container.    */
  .fc-mockup-tall [style*="width:138px"],
  .fc-mockup-tall [style*="width: 138px"] {
    width: 90px !important;
    height: 90px !important;
  }

  /* Scale the inner hole proportionally (was inset:28px on a 138px circle) */
  .fc-mockup-tall [style*="inset:28px"] {
    inset: 18px !important;
  }

  /* DON'T collapse 1fr 1fr grid — that's what breaks the budget side-by-side */
  /* Remove the blanket override that was collapsing all grids to 1 col */

  .fc-copy {
    padding: 18px 20px 22px;
  }

  .feature-title {
    font-size: 17px;
  }

  /* ── SAVINGS CALCULATOR ── */
  .savings-layout {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    margin-top: 32px !important;
  }

  .savings-stats {
    gap: 16px;
  }

  .savings-card {
    padding: 24px 20px !important;
    height: auto !important;
  }

  /* CRITICAL: 16px font-size prevents iOS Safari zoom on input focus */
  .calc-input {
    font-size: 16px !important;
    padding: 12px 14px !important;
  }

  .calc-result-value {
    font-size: 32px;
  }

  /* ── HOW IT WORKS — vertical stepper ── */
  #how {
    padding: 60px 5% !important;
  }

  .steps-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-top: 40px !important;
    position: relative;
  }

  /* Remove desktop horizontal connector line */
  .steps-grid::before {
    display: none !important;
  }

  .step-item {
    display: grid !important;
    grid-template-columns: 48px 1fr !important;
    grid-template-rows: auto auto auto !important;
    column-gap: 16px !important;
    text-align: left !important;
    padding: 0 0 0 0 !important;
    position: relative;
  }

  /* Vertical connecting line between steps */
  .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    width: 2px;
    bottom: 0;
    background: #e0dff5;
  }

  .step-num {
    grid-column: 1;
    grid-row: 1;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 20px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    flex-shrink: 0;
    align-self: flex-start;
  }

  .step-emoji {
    grid-column: 2;
    grid-row: 1;
    font-size: 22px !important;
    margin-bottom: 6px !important;
    align-self: center;
  }

  .step-title {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px !important;
    margin-bottom: 4px !important;
  }

  .step-desc {
    grid-column: 2;
    grid-row: 3;
    min-height: 0 !important;
    margin-bottom: 28px !important;
    font-size: 13px;
  }

  /* ── TESTIMONIALS ── */
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* ── PRICING ── */
  .pricing-grid {
    padding: 0 !important;
  }

  .pricing-card {
    padding: 28px 20px !important;
    max-width: 100% !important;
  }

  /* Trust badges line: allow wrap */
  #pricing > p {
    white-space: normal !important;
    font-size: 12px;
    line-height: 1.8;
  }

  /* ── FAQ ── */
  .faq-wrap {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 0 !important;
    margin-top: 32px !important;
  }

  /* Ensure FAQ toggle has minimum 44px tap target */
  .faq-question {
    padding: 16px 0 !important;
    min-height: 44px;
  }

  .faq-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    flex-shrink: 0;
  }

  .support-card {
    padding: 22px 20px !important;
  }

  .support-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .support-mail-btn,
  .support-copy-btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* ── CTA BANNER ── */
  #cta-banner {
    padding: 48px 20px !important;
  }

  #cta-banner .section-title {
    font-size: clamp(24px, 6vw, 36px) !important;
  }

  .cta-btn-white {
    width: 100% !important;
    justify-content: center !important;
    padding: 16px 24px !important;
    margin-top: 24px !important;
  }

  #cta-banner > .text-center > p:last-child {
    font-size: 12px;
    white-space: normal;
    line-height: 1.8;
  }

  /* ── FOOTER ── */
  footer {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
    padding: 32px 20px !important;
  }

  /* ── MARQUEE: prevent horizontal scroll ── */
  .marquee-strip {
    overflow: hidden !important;
  }
}

/* ============================================================
   MOBILE S — ≤480px  (extra tight adjustments)
   ============================================================ */
@media (max-width: 480px) {

  .hero-title {
    font-size: clamp(20px, 5.5vw, 26px) !important;
  }

  .hero-badge {
    font-size: 10px !important;
  }

  .hero-chip-mobile {
    font-size: 11px;
    padding: 10px 12px;
  }

  .fc-mockup-tall [style*="width:138px"],
  .fc-mockup-tall [style*="width: 138px"] {
    width: 76px !important;
    height: 76px !important;
  }

  .fc-mockup-tall [style*="inset:28px"] {
    inset: 14px !important;
  }

  .feature-title {
    font-size: 16px;
  }

  .step-num {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 17px !important;
  }

  .step-item:not(:last-child)::after {
    left: 19px;
    top: 40px;
  }

  .calc-result-value {
    font-size: 28px;
  }

  .section-title {
    font-size: clamp(22px, 6vw, 30px) !important;
  }
}
