/* ── Mobile Navigation ─────────────────────────────
   Floating card-style mobile nav — shared across all pages.
   ─────────────────────────────────────────────────── */

/* ── Overlay (backdrop) ────────────────────────────── */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Panel (floating card) ─────────────────────────── */
.mobile-menu-panel,
#mobileMenu {
    position: fixed !important;
    top: 0.75rem !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100dvh - 1.5rem);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    background: #141414 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.03) !important;
    padding: 0 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.97);
    transform-origin: top center;
    transition: opacity 0.25s ease,
                transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0.25s !important;
}

.mobile-menu-panel.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1) !important;
    transition: opacity 0.25s ease,
                transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0s !important;
}

/* ── Header row: logo + close ──────────────────────── */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    flex-shrink: 0;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.mobile-menu-logo img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.mobile-menu-logo span {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-close:hover,
.mobile-menu-close:active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Links ─────────────────────────────────────────── */
.mobile-menu-links {
    display: flex !important;
    flex-direction: column !important;
    padding: 0.25rem 0 0.5rem !important;
}

.mobile-menu-link {
    display: block !important;
    width: 100% !important;
    padding: 0.8rem 1.25rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
    color: #ccc !important;
    text-decoration: none !important;
    text-align: left !important;
    border: none !important;
    background: transparent !important;
    transition: color 0.12s ease, background 0.12s ease !important;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* ── Footer area inside menu ───────────────────────── */
.mobile-menu-footer {
    padding: 0.75rem 1.25rem 1.25rem;
    padding-bottom: max(env(safe-area-inset-bottom, 1.25rem), 1.25rem);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.7rem 1.25rem;
    background: #3b82f6;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-cta:hover {
    opacity: 0.88;
}

.mobile-menu-contact {
    display: none;
}

/* ── Hamburger button ──────────────────────────────── */
.mobile-menu-btn,
#mobileMenuBtn {
    display: none;
}

/* ── Desktop: hide everything mobile ───────────────── */
@media (min-width: 769px) {
    .mobile-menu-overlay,
    .mobile-menu-panel,
    #mobileMenu,
    #mobileMenuOverlay {
        display: none !important;
    }
}

/* ── Mobile: show hamburger ────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-btn,
    #mobileMenuBtn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-panel,
    #mobileMenu {
        display: flex;
    }

    .mobile-menu-panel.active,
    #mobileMenu.active {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) scale(1) !important;
        transition: opacity 0.25s ease,
                    transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
                    visibility 0s linear 0s !important;
    }
}

/* ── Reduced motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-panel,
    #mobileMenu {
        transition: none !important;
    }
    .mobile-menu-overlay {
        transition: none;
    }
}
