/* ==========================================
    RESPONSIVE STYLES
========================================== */
@media(max-width: 1024px) {
    .pd-intro {
        flex-direction: column;
        padding-top: 120px;
    }

    .pd-img-container .sticky-img {
        position: relative;
        top: 0;
        height: 50vh;
        margin-bottom: 30px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .main-header {
        width: 100%;
        justify-content: flex-end;
        padding-right: 30px;
        padding-left: 20px;
    }

    .header-logo-container {
        display: flex;
        margin-right: auto;
    }

    .header-cta-container {
        position: relative;
        right: auto;
    }

    .trust-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px;
    }

    .trust-text {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item.large,
    .gallery-item.tall {
        grid-column: auto;
        grid-row: auto;
        height: 350px;
    }

    .marquee-item {
        width: 260px;
    }

    .marquee-img {
        height: 190px;
    }

    .gallery-title {
        font-size: 2.8rem;
    }
}

@media(max-width: 768px) {
    /* MOBILE FIX: Fix horizontal scroll & scroll offset */
    html, body {
        overflow-x: clip; /* clip vs hidden: doesn't create BFC, so position:sticky works */
        max-width: 100%;
        scroll-padding-top: 90px;
    }

    /* FIX: Mobile horizontal scroll — clip the SPA view container and all page sections */
    #app-view,
    .marquee-section,
    .marquee-container,
    .carousel-wrapper,
    .sectors-bento-container,
    .mission-section,
    .suits-container,
    .metrics-section,
    .hero-wrapper {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* FIX: Mobile horizontal scroll — fixed orbs on Sectors page can bleed right edge */
    .bg-orb,
    .bg-orb-1,
    .bg-orb-2,
    .bg-orb-center {
        max-width: 100vw;
        overflow: hidden;
    }

    .hero-wrapper {
        padding: 10px;
    }

    .hero-banner {
        border-radius: 20px;
    }

    /* FIX: Align hamburger vertically with logo center — 70px header / 50px button = 10px top */
    .menu-toggle {
        top: 10px;
        left: 20px;
        width: 50px;
        height: 50px;
    }

    /* FIX: Mobile Navbar */
    .main-header {
        height: 70px;
        padding: 0 15px 0 75px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        width: 100%;
        box-sizing: border-box;
    }

    /* FIX: Mobile Navbar — hide CTA buttons (Contact Us / Return Home) from navbar row */
    .header-cta-container {
        display: none !important;
    }

    /* FIX Bug2: Mobile Navbar — logo centered, overflow:visible so SVG text not clipped */
    .header-logo-container {
        display: flex !important;
        position: absolute !important;
        left: 52% !important;
        transform: translateX(-50%) !important;
        width: auto;
        max-width: calc(100% - 90px);
        overflow: visible;
        align-items: center;
        justify-content: center;
    }

    /* FIX Bug2: SVG scaled to 60px height → scale factor = 60/120 = 0.5 → text renders at ~19px (legible) */
    .brand-logo-svg {
        height: 60px;
        min-height: 60px;
        width: auto;
        min-width: unset;
        max-width: none;
        overflow: visible;
        display: block;
    }

    .btn-nav-primary {
        padding: 12px 24px;
        font-size: 0.8rem;
    }

    /* MOBILE FIX: Hero text overflow */
    .hero-title,
    .pd-content h1,
    .gallery-title,
    .suits-hero-title,
    .elegant-section-header h2 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    /* MOBILE FIX: Hero paragraph readability */
    .hero-subtitle,
    .pd-content .lead-desc,
    .section-intro,
    .benefit-card p,
    .trust-text p {
        line-height: 1.8;
        padding: 0 15px;
    }

    /* MOBILE FIX: Cards / grid layouts & Footer columns */
    .product-grid,
    .gallery-grid,
    .metrics-grid,
    .benefits-grid,
    .footer-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .product-grid {
        padding: 40px 5%;
    }

    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .menu-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 50px;
    }

    .menu-main-links {
        align-items: center;
    }

    /* MOBILE FIX: Tap targets & Hamburger menu font matching */
    .menu-main-links a,
    .footer-links a,
    .footer-contact a,
    .sp-nav-links a {
        min-height: 44px;
        min-width: 44px;
        display: inline-block;
        padding: 10px 0;
    }

    .menu-main-links a {
        font-size: 3rem;
    }

    .menu-branding {
        text-align: center;
        transform: translateX(0);
    }

    /* FIX: Issue 1 */
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile-inline {
        display: inline-block !important;
        margin-top: 20px;
    }
}

@media (max-width: 820px) {
    :root {
        --card-w: 300px;
        --card-h: 460px;
    }

    .heading {
        font-size: 28px;
    }
}

@media (max-width: 500px) {
    :root {
        --card-w: 260px;
        --card-h: 420px;
    }
}

/* New Section Responsiveness */
@media (max-width: 768px) {

    .mission-section,
    .suits-container {
        padding: 60px 20px;
        gap: 30px;
    }

    .mission-text {
        font-size: 1.2rem;
    }

    .suits-hero-title {
        font-size: 36px;
    }

    .suit-headline {
        font-size: 28px;
    }
}

/* FIX Bug4: Extra small screens (iPhone SE, small Androids) */
@media (max-width: 414px) {
    .elegant-section-header h2 {
        font-size: 30px;
    }

    .menu-main-links a {
        font-size: 2.4rem;
    }

    .hero-title,
    .gallery-title,
    .suits-hero-title,
    .elegant-section-header h2 {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    /* Ensure hamburger doesn't overlap logo on very small phones */
    .header-logo-container {
        left: 54% !important;
    }

    .brand-logo-svg {
        height: 34px;
        min-height: 34px;
    }
}