/**
 * yesBTL - Fluent App-Like Mobile UI Theme
 * Pure CSS Glassmorphism, Bottom App Bar, Touch Snap Carousel & Haptic Micro-Interactions
 * SCOPED EXCLUSIVELY TO MOBILE SCREENS (<=992px) — DESKTOP VIEW REMAINS 100% UNTOUCHED
 * Incorporates Brandbook Accents: Sky Blue (#07BEEF), Tangerine (#EDAA1B), Neutral Gray (#D1D1D1) & Pastels
 */

/* BY DEFAULT: HIDE ALL MOBILE APP COMPONENTS ON DESKTOP SCREENS (>992px) */
.mobile-app-bottom-bar,
.mobile-app-drawer {
    display: none !important;
}

:root {
    --yes-skyblue: #07BEEF;
    --yes-neutral-gray: #D1D1D1;
    --yes-tangerine: #EDAA1B;
    --yes-light-green: #C9F7CD;
    --yes-light-skyblue: #B3F4FF;
    --yes-light-tangerine: #FFDCA4;
}

/* DESKTOP SPLIT GRID DEFAULT */
.service-detail-split-grid {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 48px;
    align-items: flex-start;
}

/* SAFE AREA SUPPORT FOR MODERN PHONES */
body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ONLY ENABLE MOBILE OPTIMIZATIONS & APP SHELL ON MOBILE DEVICES (<=992px) */
@media (max-width: 992px) {
    body {
        padding-bottom: 84px !important;
    }

    /* TOP HEADER RESPONSIVE OPTIMIZATIONS */
    .site-header {
        padding: 12px 0 !important;
    }
    .header-inner {
        padding: 0 16px !important;
    }
    .site-logo img {
        height: 32px !important;
    }
    .main-nav {
        display: none !important;
    }
    .btn-cta-pill {
        padding: 8px 16px !important;
        font-size: 0.82rem !important;
    }

    /* 1. SUBPAGE HERO ON MOBILE — IMAGE FIRST, TEXT SECOND */
    .subpage-hero-frame {
        padding: 90px 0 50px !important;
    }

    .hero-grid-split {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    .subpage-hero-img-box {
        order: -1 !important; /* PLACES IMAGE AT THE VERY TOP ON MOBILE */
        width: 100% !important;
        height: 240px !important;
        margin-bottom: 12px !important;
        background: #FFFFFF !important;
        padding: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 24px !important;
    }

    .subpage-hero-img-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .subpage-hero-img-box.bleed-hero {
        padding: 0 !important;
        background: transparent !important;
    }

    .subpage-hero-img-box.bleed-hero img {
        object-fit: cover !important;
    }

    .subpage-hero-title {
        font-size: clamp(1.75rem, 6.5vw, 2.4rem) !important;
        line-height: 1.25 !important;
        margin-bottom: 14px !important;
        word-break: break-word !important;
    }

    .subpage-hero-desc {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
        margin-bottom: 20px !important;
    }

    /* HERO STATS PILLS ON MOBILE */
    .hero-stats-pills {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 12px 8px !important;
        margin-top: 20px !important;
        width: 100% !important;
    }

    .stat-pill-card {
        padding: 10px 4px !important;
        text-align: center !important;
        border-radius: 16px !important;
    }

    .stat-pill-num {
        font-size: 1.15rem !important;
    }

    .stat-pill-txt {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }

    /* 2. SERVICE DETAILS SPLIT GRID ON MOBILE */
    .service-detail-split-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }

    .sec-light-canvas {
        padding: 48px 0 60px !important;
        border-radius: 36px !important;
        margin-top: -36px !important;
        margin-bottom: -36px !important;
    }

    .sec-title-clean {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
    }

    /* ADVANTAGES & PROCESS PIPELINE ON MOBILE */
    .adv-grid-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .process-steps-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* FOOTER CTA CARD ON MOBILE */
    .footer-cta-card-ref {
        padding: 32px 20px !important;
        flex-direction: column !important;
        gap: 24px !important;
        text-align: center !important;
    }

    .footer-cta-buttons {
        justify-content: center !important;
    }

    .footer-cta-title {
        font-size: 1.85rem !important;
        line-height: 1.2 !important;
    }

    /* FOOTER LINKS GRID ON MOBILE */
    .footer-links-grid-ref {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 28px 20px !important;
        padding: 0 10px !important;
    }

    .footer-brand-col,
    .footer-links-grid-ref > div:first-child {
        grid-column: 1 / -1 !important;
        text-align: center !important;
    }

    .footer-brand-col .site-logo img,
    .footer-links-grid-ref > div:first-child .site-logo img {
        margin: 0 auto !important;
    }

    /* CONTACT CARDS GRID ON MOBILE */
    .contact-cards-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    .contact-card-box {
        padding: 20px 16px !important;
        border-radius: 20px !important;
    }

    .mobile-tab-icon svg {
        display: block;
        margin: 0 auto;
    }

    /* STICKY BOTTOM APP BAR */
    .mobile-app-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        height: 72px;
        background: rgba(12, 12, 12, 0.92);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        display: grid !important;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }

    .mobile-app-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255, 255, 255, 0.65);
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 700;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 6px 0;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-app-tab:active {
        transform: scale(0.92);
    }

    .mobile-app-tab.active, .mobile-app-tab:hover {
        color: #09C824;
    }

    .mobile-tab-icon {
        font-size: 1.25rem;
        line-height: 1;
    }

    /* CENTER HIGHLIGHTED CTA TAB */
    .mobile-app-tab.tab-highlight {
        position: relative;
    }

    .mobile-app-tab.tab-highlight .mobile-tab-icon-wrap {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #09C824 0%, #07E028 100%);
        color: #000000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        font-weight: 800;
        box-shadow: 0 6px 20px rgba(9, 200, 36, 0.5);
        margin-top: -16px;
        transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .mobile-app-tab.tab-highlight:active .mobile-tab-icon-wrap {
        transform: scale(0.9) translateY(4px);
    }

    .mobile-app-tab.tab-highlight span:last-child {
        color: #09C824;
        font-weight: 800;
    }

    /* FULLSCREEN APP DRAWER MENU */
    .mobile-app-drawer {
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(8, 8, 8, 0.98);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        padding: 24px 20px calc(80px + env(safe-area-inset-bottom, 0px)) 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(100%);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .mobile-app-drawer.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .drawer-close-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        border: none;
        font-size: 1.3rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
    }

    .drawer-close-btn:active {
        background: var(--yes-green);
        color: #000;
    }

    .drawer-nav-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin: 24px 0;
    }

    .drawer-nav-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 18px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #FFFFFF;
        text-decoration: none;
        font-size: 1.05rem;
        font-weight: 700;
        transition: all 0.25s ease;
    }

    .drawer-nav-item:active {
        background: rgba(9, 200, 36, 0.15);
        border-color: var(--yes-green);
        transform: scale(0.98);
    }

    .drawer-icon-box {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: rgba(9, 200, 36, 0.12);
        color: var(--yes-green);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
    }

    .drawer-contact-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 24px;
        padding: 24px;
        margin-top: auto;
    }

    .drawer-action-btn {
        width: 100%;
        padding: 14px;
        border-radius: 999px;
        background: var(--yes-green);
        color: #000000;
        font-size: 0.95rem;
        font-weight: 800;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-decoration: none;
        box-shadow: 0 8px 24px rgba(9, 200, 36, 0.4);
    }

    /* TOUCH SNAP CAROUSEL FOR SERVICE CARDS ON MOBILE */
    .mobile-touch-snap {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 16px !important;
        padding-bottom: 16px !important;
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .mobile-touch-snap > * {
        flex: 0 0 85% !important;
        max-width: 85% !important;
        scroll-snap-align: center !important;
    }
}
