/* ═══════════════════════════════════════════════════════════════════
   DS WEALTH ADVISORS — MOBILE FIX OVERRIDE v1.0
   Loads AFTER style.css to undo "FORCE DESKTOP LAYOUT" block
   Activates only ≤900px screens — desktop layout untouched
   ═══════════════════════════════════════════════════════════════════ */

/* ───── 1. UNDO desktop-force on phones/tablets ───── */
@media (max-width: 992px) {
  .hero-content,
  .ds-hero-left {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  .hero-visual,
  .ds-hero-right,
  .ds-hero-image-wrap {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    justify-content: center !important;
  }
  .hero,
  section.hero.ds-premium-hero {
    flex-wrap: wrap !important;
    flex-direction: column !important;
    padding: 60px 18px !important;
    min-height: auto !important;
  }
  .ds-hero-shell {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 16px 0 !important;
  }
  .ds-hero-divider { display: none !important; }
  .ds-hero-right-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .ds-hero-image {
    width: min(280px, 70vw) !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 14px auto 0 !important;
  }
  .ds-hero-image-wrap::before { display: none !important; }
  .ds-hero-points,
  .ds-hero-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .ds-hero-stat-card { min-height: 130px !important; padding: 14px 10px !important; }
  .ds-hero-title { font-size: clamp(28px, 9vw, 44px) !important; line-height: 1.15 !important; }
  .ds-hero-desc { font-size: 15px !important; }
  .ds-hero-reg-card,
  .ds-hero-urgency,
  .ds-hero-actions { width: 100% !important; }
  .ds-hero-actions { flex-direction: column !important; }
  .ds-hero-actions .btn-primary,
  .ds-hero-actions .btn-outline {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
  }
}

/* ───── 2. SHOW hamburger / hide desktop nav on mobile ───── */
@media (max-width: 900px) {
  .desktop-nav,
  .nav-links,
  .nav-cta { display: none !important; }
  .hamburger,
  .mobile-toggle {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    position: relative;
    z-index: 10000;
  }
  .hamburger span,
  .mobile-toggle span {
    width: 24px !important;
    height: 2px !important;
    background: #D4AF37 !important;
    transition: 0.3s !important;
  }
  .mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: min(320px, 85vw) !important;
    height: 100vh !important;
    background: #0b1a2e !important;
    padding: 80px 24px 24px !important;
    transition: right 0.4s ease !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4) !important;
  }
  .mobile-menu.open,
  .mobile-menu.active { right: 0 !important; }
  .mobile-menu ul { list-style: none !important; padding: 0 !important; }
  .mobile-menu ul li { margin-bottom: 4px !important; border-bottom: 1px solid rgba(212,175,55,0.1) !important; }
  .mobile-menu ul li a {
    color: #fff !important;
    font-size: 16px !important;
    padding: 14px 0 !important;
    display: block !important;
    text-decoration: none !important;
  }
  .mobile-menu ul li a:hover { color: #D4AF37 !important; }
  .mobile-menu .mob-btns { display: flex !important; gap: 10px !important; margin-top: 24px !important; }
  .mobile-menu .mob-btns a {
    flex: 1 !important;
    text-align: center !important;
    padding: 14px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
  }
}

/* ───── 3. iOS auto-zoom fix on form inputs (min 16px font) ───── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ───── 4. Mobile sticky CTA bar ───── */
@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    background: #0a2416 !important;
    padding: 10px 14px !important;
    gap: 8px !important;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4) !important;
  }
  .mobile-sticky-cta a {
    flex: 1 !important;
    text-align: center !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
  }
  .mobile-sticky-cta .cta-call { background: #D4AF37 !important; color: #071c39 !important; }
  .mobile-sticky-cta .cta-whatsapp { background: #25D366 !important; color: #fff !important; }
  body { padding-bottom: 64px !important; }
  .whatsapp-float { bottom: 80px !important; }
  .back-to-top { bottom: 140px !important; }
}

/* ───── 5. Make data tables scroll horizontally on mobile ───── */
@media (max-width: 900px) {
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px !important;
    border: 1px solid rgba(212,175,55,0.2) !important;
  }
  .table-wrap table {
    min-width: 760px !important;
    font-size: 12px !important;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 8px 6px !important;
    font-size: 12px !important;
  }
  .filter-line {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .filter-line::-webkit-scrollbar { height: 4px !important; }
  .filter-line::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3) !important; border-radius: 2px !important; }
  .filter-btn,
  .utility-btn,
  .pager-btn,
  .range-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .search { min-width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; }
}

/* ───── 6. Touch-friendly tap targets (44×44 min — Apple HIG) ───── */
@media (max-width: 768px) {
  button,
  .btn-primary,
  .btn-outline,
  .btn-white,
  .btn-ghost,
  .filter-btn,
  .pager-btn,
  .utility-btn,
  .range-btn,
  .calendar-link,
  .ds-nav-link {
    min-height: 44px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

/* ───── 7. Cookie banner compact on mobile ───── */
@media (max-width: 768px) {
  .ds-cookie-container {
    flex-direction: column !important;
    padding: 12px 16px !important;
    gap: 10px !important;
  }
  .ds-cookie-text { font-size: 12px !important; min-width: 0 !important; }
  .ds-cookie-actions { width: 100% !important; }
  .ds-cookie-actions .ds-btn { flex: 1 !important; padding: 10px 12px !important; font-size: 12px !important; }
}

/* ───── 8. Compact spacing & smaller hero h1 on small phones ───── */
@media (max-width: 480px) {
  .page-wrap { padding: 16px 12px !important; }
  h1 { font-size: 26px !important; }
  .eyebrow { font-size: 11px !important; letter-spacing: 2px !important; }
  .subtitle { font-size: 13px !important; }
  .cards-grid { grid-template-columns: 1fr !important; }
  .ds-hero-points,
  .ds-hero-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .ds-hero-cert-card {
    grid-template-columns: 28px 1fr !important;
  }
  .ds-hero-cert-meta { grid-column: 2 !important; text-align: left !important; margin-top: 4px !important; }
  .ds-hero-credstrip-inner { grid-template-columns: 1fr !important; }
  .ds-hero-creditem:not(:last-child)::after { display: none !important; }
  .calculator-box { padding: 24px 16px !important; }
  .calc-result { grid-template-columns: 1fr !important; gap: 10px !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* ───── 9. Prevent horizontal scroll & fix viewport ───── */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}
img, video, iframe { max-width: 100% !important; height: auto !important; }

/* ───── 10. Footer mobile compact ───── */
@media (max-width: 768px) {
  footer { padding: 40px 16px 20px !important; }
  .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 8px !important; }
  .newsletter-form { flex-direction: column !important; }
  .newsletter-input,
  .newsletter-btn { width: 100% !important; }
}