/* ================================================================
   Pulsz Casino US — Mobile CSS
   ================================================================ */

/* ── Hard overflow guards: nothing escapes the viewport horizontally ── */
html,
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* Block-level wrappers must clip horizontally so a misbehaving child
   (long table, fixed-width canvas, oversized figure) cannot blow the layout out. */
main,
section,
.section,
.section-sm,
.section-lg,
.bg-dark2,
.hero,
.page-hero,
.cta-band,
.stat-band,
.seo-section,
.site-header,
.site-footer {
    overflow-x: clip;
    max-width: 100vw;
}

/* The .container is the inner gutter; it should still allow children up to its width
   but clip if a child tries to overflow. */
.container {
    overflow-x: clip;
    max-width: 100%;
}

/* Grid/flex children need min-width:0 to honor container width on mobile. */
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.grid-split > *,
.grid-split-r > *,
.steps-row > *,
.pros-cons > *,
.footer-grid > *,
.feature-card,
.faq-item,
.bonus-pill,
.score-bar-row,
.notice {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Inline images / figures injected into seo-article never overflow ── */
.seo-article img,
.seo-article figure,
figure,
figure img,
.feature-card,
.glass-card,
.chart-box,
.notice {
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Tables: scroll horizontally INSIDE the wrap, never push the page ── */
.data-table-wrap {
    overflow: hidden !important;
    max-width: 100%;
    box-sizing: border-box;
}

.data-table-scroll {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box;
}

.data-table-scroll table {
    min-width: 100%;
}

@media (max-width: 768px) {
    .data-table-scroll table {
        min-width: 540px;
    }
    th,
    td {
        white-space: nowrap;
    }
}

/* Charts — Chart.js writes inline width/height onto <canvas>; force-override */
.chart-box {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

.chart-box canvas,
canvas[width][height] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

@media (max-width: 1024px) {

    .grid-split,
    .grid-split-r {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .stat-band-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-band-item:nth-child(4),
    .stat-band-item:nth-child(5) {
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 900px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    .pros-cons {
        grid-template-columns: 1fr !important;
    }

    .steps-row {
        flex-direction: column;
    }

    .steps-row::before {
        display: none;
    }

    .chart-box canvas {
        max-height: 280px !important;
    }
}

@media (max-width: 768px) {

    /* Header */
    .main-nav {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .header-cta .btn-ghost {
        display: none !important;
    }

    .header-cta .btn-magenta,
    .header-cta .btn-primary {
        display: inline-flex !important;
        font-size: 0.75rem !important;
        padding: 8px 16px !important;
    }

    .header-inner {
        height: 62px;
    }

    .mobile-nav {
        top: 62px;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-split,
    .grid-split-r,
    .steps-row,
    .pros-cons {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }

    /* Stat band */
    .stat-band-inner {
        grid-template-columns: 1fr 1fr !important;
    }

    .stat-band-item {
        border-top: 1px solid var(--border);
    }

    .stat-band-item:first-child,
    .stat-band-item:nth-child(2) {
        border-top: none;
    }

    .stat-band-item {
        border-right: none !important;
    }

    .stat-band-item:nth-child(odd) {
        border-right: 1px solid var(--border) !important;
    }

    /* Hero */
    .hero {
        min-height: 400px;
    }

    .hero h1 {
        font-size: clamp(1.7rem, 6vw, 2.4rem);
    }

    .hero p {
        font-size: 0.92rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 10px;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    .bonus-pills {
        flex-direction: column;
    }

    .hero-content {
        padding: 48px 0;
    }

    /* Sections */
    .section {
        padding: 56px 0;
    }

    .section-sm {
        padding: 40px 0;
    }

    .section-lg {
        padding: 72px 0;
    }

    .sec-head {
        margin-bottom: 36px;
    }

    /* Score */
    .score-wrap {
        flex-direction: column;
        text-align: center;
    }

    /* CTA */
    .cta-band {
        padding: 60px 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 340px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Chart */
    .chart-box canvas {
        max-height: 250px !important;
    }

    .page-hero {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-band-inner {
        grid-template-columns: 1fr 1fr !important;
    }

    .bonus-pill {
        width: 100%;
    }

    .chart-box canvas {
        max-height: 200px !important;
    }

    /* Long URLs, code, slugs in seo-article should break instead of overflow */
    .seo-article,
    .seo-article p,
    .seo-article li,
    .feature-card,
    .faq-body,
    .notice {
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    /* Tighten container gutter on very narrow phones */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Hero headline shouldn't push the page */
    .hero h1,
    .page-hero h1 {
        word-break: break-word;
    }

    /* Cards need internal padding adjusted at narrow widths */
    .feature-card,
    .glass-card,
    .pros-box,
    .cons-box,
    .step-card {
        padding: 20px !important;
    }

    /* Tables: allow wrap at very small width */
    .data-table-scroll table {
        min-width: 100%;
    }

    th,
    td {
        white-space: normal;
        font-size: 0.78rem !important;
        padding: 10px 12px !important;
    }
}