/*
 * PWA-style CSS — App-like feel
 * Bottom Navigation, Smooth Transitions, Full-screen hero, etc.
 */

/* ── Global App Feel ─────────────────────── */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: env(safe-area-inset-bottom, 0);
    overscroll-behavior-y: none;        /* Prevent pull-to-refresh bounce */
}

/* ── App Top Bar (navbar) ────────────────── */
.pwa-navbar {
    background: rgba(27, 42, 74, 0.97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(200, 169, 81, 0.15);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    z-index: 1050;
}

.pwa-navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.pwa-navbar .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #C8A951 !important;
    letter-spacing: -0.02em;
}

.pwa-navbar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.25s ease;
    padding: 0.75rem 1rem !important;
}

.pwa-navbar .nav-link:hover,
.pwa-navbar .nav-link.active {
    color: #C8A951 !important;
}

/* ── Offcanvas-lg Responsive Nav ─────────── */
/*
 * wp_nav_menu() + NavWalker → .navbar-nav > .nav-item > .nav-link
 * offcanvas-lg: offcanvas on mobile, inline on desktop.
 */

/* Base offcanvas (applies to mobile state) */
.offcanvas-navy {
    background: #1B2A4A !important;
    border-left: 1px solid rgba(200, 169, 81, 0.2) !important;
    z-index: 1080 !important;
}

.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 1070 !important;
}

.offcanvas-navy .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
    min-height: 64px;
}

.offcanvas-navy .offcanvas-title {
    font-family: 'Playfair Display', serif;
    color: #C8A951;
    font-size: 1.2rem;
}

.offcanvas-navy .offcanvas-body {
    padding: 0.5rem 0;
    overflow-y: auto;
}

/* ─────────────────────────────────────────── */
/* Desktop (≥992px): inline horizontal nav    */
/* ─────────────────────────────────────────── */
@media (min-width: 992px) {
    /* Reset offcanvas: make it inline, no overlay */
    .offcanvas-navy {
        background: transparent !important;
        border-left: none !important;
        z-index: auto !important;
        position: static !important;
        height: auto !important;
        width: auto !important;
        transform: none !important;
        visibility: visible !important;
    }

    .offcanvas-navy .offcanvas-header {
        display: none !important;
    }

    .offcanvas-navy .offcanvas-body {
        padding: 0;
        display: flex;
        align-items: center;
        overflow: visible;
    }

    /* Horizontal nav items with proper spacing */
    .offcanvas-navy .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.15rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .offcanvas-navy .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.9rem;
        border-radius: 6px;
        transition: color 0.25s ease, background 0.25s ease;
    }

    .offcanvas-navy .nav-link:hover {
        background: rgba(200, 169, 81, 0.08);
    }

    .nav-cta-wrap {
        margin-left: 1rem;
        flex-shrink: 0;
    }

    .offcanvas-extra {
        display: none !important;
    }
}

/* ─────────────────────────────────────────── */
/* Mobile (<992px): full-height offcanvas      */
/* ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
    /* Full height so menu items are not cut off */
    .offcanvas-navy {
        height: 100vh !important;
        height: 100dvh !important; /* dynamic viewport height for mobile browsers */
        padding-bottom: 15%;
    }

    .offcanvas-navy .navbar-nav {
        width: 100%;
        padding: 0.5rem 1.25rem;
        list-style: none;
        margin: 0;
        flex-direction: column;
    }

    .offcanvas-navy .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .offcanvas-navy .nav-item:last-child {
        border-bottom: none;
    }

    .offcanvas-navy .nav-link {
        color: rgba(255, 255, 255, 0.85) !important;
        padding: 0.95rem 0.75rem !important;
        font-size: 1.05rem !important;
        font-weight: 500;
        display: block;
        transition: color 0.25s ease, padding-left 0.3s ease, background 0.25s ease;
    }

    .offcanvas-navy .nav-link:hover {
        color: #C8A951 !important;
        padding-left: 1.25rem !important;
        background: rgba(200, 169, 81, 0.06);
    }

    .offcanvas-navy .nav-link.active {
        color: #C8A951 !important;
        border-left: 3px solid #C8A951;
        padding-left: 1.25rem !important;
    }

    .nav-cta-wrap {
        margin: 1.25rem 1.25rem 0;
        padding-top: 0.5rem;
    }

    .nav-cta-wrap .btn {
        width: 100%;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .offcanvas-extra {
        padding: 0 1.25rem 1rem;
    }
}

/* ── Bottom Navigation (Mobile PWA) ─────── */
.pwa-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: rgba(27, 42, 74, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(200, 169, 81, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 8px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.pwa-bottom-nav .nav {
    min-height: 56px;
}

.pwa-bottom-nav .nav-link {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0 !important;
    transition: color 0.25s ease, transform 0.2s ease;
}

.pwa-bottom-nav .nav-link i {
    font-size: 1.3rem;
}

.pwa-bottom-nav .nav-link:hover,
.pwa-bottom-nav .nav-link.active {
    color: #C8A951;
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .pwa-bottom-nav {
        display: block;
    }
    body {
        padding-bottom: 72px;
    }
}

/* ── Page Transition ─────────────────────── */
.pwa-page-content {
    animation: pwaFadeIn 0.4s ease-out;
}

@keyframes pwaFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Pull-down indicator (visual cue) ────── */
.pwa-pull-indicator {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin: 8px auto 0;
    display: none;
}

@media (max-width: 991.98px) {
    .pwa-pull-indicator {
        display: block;
    }
}

/* ── Splash overlay (brief on first load) ── */
.pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #1B2A4A;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

.pwa-splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.pwa-splash h1 {
    font-family: 'Playfair Display', serif;
    color: #C8A951;
    font-size: 1.8rem;
    margin-top: 1rem;
}

.pwa-splash .spinner-border {
    color: #C8A951;
    width: 2rem;
    height: 2rem;
}

/* ── Rounded cards (app-style) ───────────── */
.card-pwa {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(27, 42, 74, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.card-pwa:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(27, 42, 74, 0.14);
}

.card-pwa .card-body {
    padding: 1.5rem;
}

/* ── Glass Card ──────────────────────────── */
.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(27, 42, 74, 0.06);
}

/* ── Badge pill ──────────────────────────── */
.badge-gold {
    background: rgba(200, 169, 81, 0.15);
    color: #C8A951;
    font-weight: 600;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

/* ── Section titles ──────────────────────── */
.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #1A1D26;
    position: relative;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: #4A4F5C;
    font-size: 1.05rem;
    max-width: 600px;
}

.section-subtitle.mx-auto {
    text-align: center;
}

/* ── Install App Banner (optional) ───────── */
.pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    z-index: 1055;
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: pwaFadeIn 0.4s ease-out;
}
