/* ==========================================================================
   EDUREMARKS — NATIVE MOBILE APP LANDING EXPERIENCE
   Applied to public/landing pages via includes/header.php & footer.php
   ========================================================================== */

html {
    overscroll-behavior-y: contain;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overscroll-behavior-y: contain;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
}

/* ── Native Bottom Navigation Bar (Mobile Only) ── */
.landing-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    /* Frosted App Navbar */
    nav.navbar.sticky-top {
        background: rgba(255, 255, 255, 0.90) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
        padding-top: max(10px, env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 10px !important;
    }

    /* Hide decorative floating clouds on mobile for clean minimal app look */
    .bg-blobs .svg-cloud {
        display: none !important;
    }

    /* Clean Hero Spacing */
    .er-hero {
        padding: 36px 0 32px !important;
    }
    .er-hero-title {
        font-size: clamp(1.75rem, 6.5vw, 2.35rem) !important;
        line-height: 1.15 !important;
        letter-spacing: -0.6px !important;
    }
    .er-hero-desc {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
    }
    .er-hero-btns {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .er-hero-btns .er-btn {
        width: 100% !important;
        min-height: 48px !important;
        border-radius: 14px !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
    }
    .er-trust-row {
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: flex-start !important;
    }
    .er-trust-divider {
        display: none !important;
    }

    /* Minimal App Cards */
    .er-section {
        padding: 44px 0 !important;
    }
    .er-feature-card,
    .er-pricing-card,
    .er-cta-card {
        border-radius: 20px !important;
    }

    /* Native Bottom Tab Bar */
    .landing-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: blur(24px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
        border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.07) !important;
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        justify-content: space-around !important;
        align-items: center !important;
        z-index: 1045 !important;
    }
    .landing-bottom-nav a {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #64748B;
        font-size: 0.65rem;
        font-weight: 600;
        padding: 4px 2px;
        -webkit-tap-highlight-color: transparent;
    }
    .landing-bottom-nav a i {
        font-size: 1.05rem;
        width: 44px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        transition: background-color 0.2s, color 0.2s;
    }
    .landing-bottom-nav a.active {
        color: #1E5EFF;
        font-weight: 800;
    }
    .landing-bottom-nav a.active i {
        background: rgba(30, 94, 255, 0.11);
        color: #1E5EFF;
    }
    .landing-bottom-nav a.cta-tab i {
        background: #1E5EFF;
        color: #FFFFFF;
    }
    .landing-bottom-nav a.cta-tab {
        color: #1E5EFF;
        font-weight: 700;
    }

    /* Footer spacing above bottom nav & floating assistant */
    footer {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .assistant-wrapper {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ── Extra small-screen hardening (loaded last on public pages) ── */
@media (max-width: 768px) {
    .er-hero-grid, .er-hero-grid > * { min-width: 0; }
    .er-hero-btns .er-btn { min-width: 0; max-width: 100%; }
    .er-trust-row { max-width: 100%; }
    .er-trust-item { font-size: 0.85rem; }

    /* Native tab bar: every item is a ≥44px tap target and cannot overflow */
    .landing-bottom-nav a {
        min-width: 0;
        min-height: 48px;
    }
    .landing-bottom-nav a span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 400px) {
    .er-hero { padding: 28px 0 24px !important; }
    .er-hero-title { font-size: clamp(1.5rem, 7vw, 1.85rem) !important; }
    .er-hero-desc { font-size: 0.9rem !important; }
    .er-section { padding: 40px 0 !important; }
    .landing-bottom-nav { padding-left: 4px !important; padding-right: 4px !important; }
    .landing-bottom-nav a { font-size: 0.6rem; gap: 2px; }
    .landing-bottom-nav a i { width: 36px; height: 26px; }
}

@media (max-width: 320px) {
    .landing-bottom-nav a { font-size: 0.55rem; }
    .landing-bottom-nav a i { width: 32px; font-size: 0.95rem; }
    .navbar-brand img { max-width: 120px !important; height: auto !important; }
    .er-hero-btns .er-btn { font-size: 0.85rem !important; }
}
