/*
 * MOBILE FIXES — GildenRow Advisory
 * Loaded on all pages. Fixes horizontal scroll and overflow issues on mobile.
 * Do not remove. These rules are additive — they do not override desktop layout.
 */

/* ── Root overflow fix ──────────────────────────────────────
   Prevents ANY element from causing horizontal scroll.
   The single most impactful mobile fix on the site.
─────────────────────────────────────────────────────────── */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ── Global section containment ────────────────────────────
   Every direct child of body that uses padding must
   not allow its children to bleed past the viewport.
─────────────────────────────────────────────────────────── */
section, main, nav, footer, header,
.lp-hero-wrap, .lp-operate-wrap, .lp-audience-wrap,
.lp-signal-wrap, .lp-what-wrap, .lp-cycle-wrap,
.gra-audience-wrap, .gra-signal-wrap, .gra-what-wrap,
.gra-cycle-wrap, .gra-geo-section, .gra-adv-wrap,
.gra-whynow-wrap, .gra-email-wrap, .gra-dual-cta,
.pg-section, .svc-body, .svc-statbar,
.ins-wrap, .ins-context-wrap, .ins-capture-wrap,
.mth-position-wrap, .mth-steps-wrap, .mth-commit-wrap,
.mth-audience-wrap, .mth-cta-wrap,
.ab-wrap, .ct-wrap, .ty-wrap, .dl-policy-wrap,
.dl-summary-wrap, .dl-cta-wrap, .tx-wrap, .tx-cta-wrap {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 768px) {

    /* ── Navigation ── */
    .nav-container {
        padding: 14px 16px;
    }

    /* ── Hero sections ── */
    .lp-hero-wrap,
    .svc-hero,
    .pg-hero,
    .mth-hero,
    .ins-hero,
    .tx-hero,
    .dl-hero {
        padding-left: 20px;
        padding-right: 20px;
        text-align: center;
    }

    /* ── Stat bars ── */
    .svc-statbar-inner,
    .pg-statbar-inner,
    .lp-stat-bar {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 16px;
        padding-right: 16px;
    }

    /* ── All grids collapse to single column ── */
    .svc-g3,
    .svc-g2,
    .svc-dg3,
    .pg-qualify-grid,
    .pg-process-grid,
    .pg-assurance-grid,
    .pg-buybox-split,
    .pg-svc-grid,
    .pg-engage-grid,
    .ins-past-grid,
    .ins-context-grid,
    .mth-commit-grid,
    .mth-audience-grid,
    .mth-cta-inner,
    .ab-principal,
    .ab-approach-grid,
    .tx-cta-inner,
    .dl-summary-grid,
    .dl-cta-inner,
    .svc-cta-inner,
    .gra-dual-cta-inner,
    .ty-inner,
    .ct-inner {
        grid-template-columns: 1fr !important;
    }

    /* ── Split headers collapse ── */
    .svc-split-header,
    .svc-intel-header,
    .ins-featured,
    .pg-form-wrap {
        grid-template-columns: 1fr !important;
    }

    /* ── Split images get fixed height when stacked ── */
    .svc-split-img,
    .svc-intel-himg,
    .ins-featured-img {
        min-height: 220px;
        order: -1;
    }

    /* ── Form rows collapse ── */
    .pg-form-row,
    .ct-row {
        grid-template-columns: 1fr !important;
    }

    /* ── Email capture form ── */
    .gra-email-field,
    .ins-capture-form {
        flex-direction: column;
    }
    .gra-email-field button,
    .ins-capture-form button {
        width: 100%;
    }

    /* ── Section padding tightened ── */
    .pg-section,
    .svc-body,
    .mth-position-wrap,
    .mth-steps-wrap,
    .mth-commit-wrap,
    .mth-audience-wrap,
    .mth-cta-wrap,
    .ins-wrap,
    .ins-context-wrap,
    .ins-capture-wrap,
    .tx-wrap,
    .tx-cta-wrap,
    .ab-wrap,
    .dl-summary-wrap,
    .dl-policy-wrap,
    .dl-cta-wrap,
    .svc-cta-wrap,
    .ty-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* ── Deal cycle steps ── */
    .pg-cycle-step,
    .mth-step {
        grid-template-columns: 52px 1fr !important;
    }
    .pg-cycle-side,
    .mth-step-tag {
        display: none !important;
    }

    /* ── Geo section ── */
    .gra-geo-layout {
        grid-template-columns: 1fr !important;
    }
    .gra-geo-sub-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── Featured report split ── */
    .ins-featured {
        flex-direction: column !important;
    }

    /* ── Why Now ── */
    .gra-whynow-inner,
    .gra-email-inner {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }

    /* ── About page ── */
    .ab-bio-panel,
    .ab-platform-panel {
        padding: 36px 24px !important;
    }

    /* ── Methodology audience panels ── */
    .mth-audience-panel {
        padding: 36px 24px !important;
    }

    /* ── Transaction deals ── */
    .tx-deal {
        grid-template-columns: 1fr !important;
    }

    /* ── Data licensing policy ── */
    .dl-policy-inner {
        grid-template-columns: 1fr !important;
    }
    .dl-toc {
        display: none !important;
    }
    .dl-rev-row {
        grid-template-columns: 1fr !important;
    }

    /* ── CTA panels ── */
    .svc-cta-panel,
    .mth-cta-panel,
    .tx-cta-panel,
    .dl-cta-panel,
    .gra-cta-panel {
        padding: 36px 24px !important;
    }

    /* ── Tier nav ── */
    .svc-tier-nav-inner {
        justify-content: flex-start !important;
        padding: 0 16px !important;
    }

    /* ── Buyers buy box ── */
    .pg-criteria-row {
        flex-direction: column;
        gap: 6px;
    }

    /* ── Scroll progress bar ── */
    #scroll-progress {
        display: none;
    }
}

@media (max-width: 480px) {

    /* Extra small screens — tighten font sizes */
    .lp-section-title,
    .mth-position-title,
    .pg-form-prose h2,
    .pg-buybox-prose h3 {
        font-size: clamp(22px, 6vw, 30px) !important;
    }

    /* Signal grid — 2 columns max */
    .gra-signal-grid,
    .pg-signals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Stats — stack fully */
    .svc-statbar-inner,
    .pg-statbar-inner {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Geo featured stats */
    .gra-geo-featured-stats {
        flex-direction: column !important;
    }
}