/* Zero Horizontal Overflow Guard & Full-Width Viewport */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Edge-to-Edge Sections */
section, header, footer, .edge-to-edge {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* --------------------------------------------------------------------------
   CRITICAL MOBILE NAVIGATION ROW ENFORCEMENT
   Logo + Brand + Hamburger MUST stay in ONE SINGLE ROW (No wrapping)
   -------------------------------------------------------------------------- */

.mobile-header,
.nav-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
}

.brand {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-decoration: none;
    gap: 0.6rem;
}

.brand-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0 !important;
    object-fit: contain;
}

.brand-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden;
}

.brand-name {
    font-family: 'Outfit', 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #ffffff;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.brand-tagline {
    font-size: 0.65rem;
    line-height: 1.15;
    font-weight: 500;
    color: #9AD82B;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.mobile-menu-button {
    flex-shrink: 0 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Tablet & Desktop Scaling */
@media (min-width: 640px) {
    .brand-logo {
        width: 46px;
        height: 46px;
    }
    .brand-name {
        font-size: 1.22rem;
    }
    .brand-tagline {
        font-size: 0.74rem;
    }
}

@media (min-width: 1024px) {
    .brand-logo {
        width: 52px;
        height: 52px;
    }
    .brand-name {
        font-size: 1.35rem;
    }
    .brand-tagline {
        font-size: 0.80rem;
    }
}

/* --------------------------------------------------------------------------
   Narrow Mobile Breakpoints (320px - 380px, including 365px!)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
    .glass-nav > div {
        padding-inline: 10px !important;
    }

    .brand {
        gap: 0.45rem !important;
    }

    .brand-logo {
        width: 34px !important;
        height: 34px !important;
    }

    .brand-name {
        font-size: 0.90rem !important;
    }

    .brand-tagline {
        font-size: 0.58rem !important;
    }

    .mobile-menu-button {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        padding: 7px !important;
    }
}

/* Very Small Screens (<340px) */
@media (max-width: 340px) {
    .glass-nav > div {
        padding-inline: 6px !important;
    }
    
    .brand-logo {
        width: 30px !important;
        height: 30px !important;
    }
    
    .brand-name {
        font-size: 0.82rem !important;
    }
    
    .brand-tagline {
        display: none !important; /* Prevent any wrapping under 340px */
    }
}

/* Responsive Table & Overflow Wrappers */
.table-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

/* Responsive Grid Adapters */
@media (max-width: 640px) {
    .hero-heading {
        font-size: 2.15rem !important;
        line-height: 1.18 !important;
    }
    
    .section-padding {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
    
    .stats-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .hide-on-mobile {
        display: none !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-heading {
        font-size: 3.25rem !important;
        line-height: 1.15 !important;
    }
    
    .section-padding {
        padding-top: 4.5rem !important;
        padding-bottom: 4.5rem !important;
    }
}

@media (min-width: 1025px) {
    .hero-heading {
        font-size: 4.25rem !important;
        line-height: 1.1 !important;
    }
    
    .section-padding {
        padding-top: 6rem !important;
        padding-bottom: 6rem !important;
    }
}

/* --------------------------------------------------------------------------
   CTA BUTTON SINGLE-LINE GUARANTEE ACROSS ALL BREAKPOINTS
   -------------------------------------------------------------------------- */
.btn-pcea-primary,
.btn-pcea-secondary,
.btn-pcea-outline,
.btn-pcea-white,
.cta-button {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

@media (max-width: 640px) {
    .btn-pcea-primary,
    .btn-pcea-secondary,
    .btn-pcea-outline,
    .btn-pcea-white,
    .cta-button {
        min-width: 0 !important;
        padding: 0.80rem 1.40rem !important;
        font-size: 0.84rem !important;
        gap: 0.5rem !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 380px) {
    .btn-pcea-primary,
    .btn-pcea-secondary,
    .btn-pcea-outline,
    .btn-pcea-white,
    .cta-button {
        min-width: 0 !important;
        padding: 0.72rem 1.15rem !important;
        font-size: 0.78rem !important;
        gap: 0.40rem !important;
        white-space: nowrap !important;
    }
}

