/**
 * ENTERPRISE MOBILE MENU UI
 * Premium design with glassmorphism, animations, and modern interactions
 */

@media (max-width: 768px) {
    .navbar-wrapper {
        height: 60px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 10002;
    }

    /* Hide desktop menu on mobile */
    .navbar-menu-desktop {
        display: none !important;
    }

    /* ============================
       OVERLAY - PREMIUM BACKDROP
       ============================ */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    /* ============================
       MOBILE MENU - ENTERPRISE DESIGN
       ============================ */
    .navbar-menu-mobile {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 380px;
        height: 100%;
        background: linear-gradient(165deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 251, 252, 0.98) 100%);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        box-shadow:
            4px 0 24px rgba(0, 0, 0, 0.12),
            8px 0 48px rgba(0, 0, 0, 0.08),
            12px 0 72px rgba(0, 0, 0, 0.04);
        border-right: 1px solid rgba(255, 255, 255, 0.5);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-menu-mobile.is-open {
        transform: translateX(0);
    }

    /* ============================
       MENU CONTENT - NAVIGATION
       ============================ */
    .mobile-menu-content {
        flex: 1;
        padding: 32px 24px 24px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .navbar-menu-mobile .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .navbar-menu-mobile .nav-item {
        width: 100%;
    }

    .navbar-menu-mobile .nav-link {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 18px;
        font-size: 1.0625rem;
        font-weight: 500;
        color: var(--color-neutral-700);
        background: transparent;
        border-radius: 14px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .navbar-menu-mobile .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--color-primary-600);
        transform: scaleY(0);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .navbar-menu-mobile .nav-link:hover {
        background: linear-gradient(
            135deg,
            rgba(0, 102, 204, 0.08) 0%,
            rgba(0, 102, 204, 0.04) 100%
        );
        color: var(--color-primary-700);
        transform: translateX(6px);
    }

    .navbar-menu-mobile .nav-link:hover::before {
        transform: scaleY(1);
    }

    .navbar-menu-mobile .nav-link:active {
        transform: translateX(6px) scale(0.98);
    }

    .navbar-menu-mobile .nav-link.active {
        background: linear-gradient(
            135deg,
            rgba(0, 102, 204, 0.12) 0%,
            rgba(0, 102, 204, 0.06) 100%
        );
        color: var(--color-primary-700);
        font-weight: 600;
    }

    .navbar-menu-mobile .nav-link.active::before {
        transform: scaleY(1);
    }

    .nav-icon {
        flex-shrink: 0;
        color: currentColor;
        opacity: 0.7;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .navbar-menu-mobile .nav-link:hover .nav-icon,
    .navbar-menu-mobile .nav-link.active .nav-icon {
        opacity: 1;
        transform: scale(1.1);
    }

    /* ============================
       DIVIDER - ELEGANT SEPARATOR
       ============================ */
    .mobile-menu-divider {
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 102, 204, 0.15) 50%,
            transparent 100%
        );
        margin: 8px 0;
    }

    /* ============================
       CTA BUTTONS - PREMIUM DESIGN
       ============================ */
    .navbar-menu-mobile .navbar-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .navbar-menu-mobile .btn-nav {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .navbar-menu-mobile .btn-nav::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .navbar-menu-mobile .btn-nav:active::before {
        width: 300px;
        height: 300px;
    }

    .navbar-menu-mobile .btn-nav svg {
        flex-shrink: 0;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .navbar-menu-mobile .btn-nav:hover svg {
        transform: translateX(3px);
    }

    .navbar-menu-mobile .btn-nav-secondary {
        background: linear-gradient(
            135deg,
            rgba(0, 102, 204, 0.06) 0%,
            rgba(0, 102, 204, 0.03) 100%
        );
        border: 1.5px solid rgba(0, 102, 204, 0.2);
        color: var(--color-primary-700);
    }

    .navbar-menu-mobile .btn-nav-secondary:hover {
        background: linear-gradient(
            135deg,
            rgba(0, 102, 204, 0.12) 0%,
            rgba(0, 102, 204, 0.06) 100%
        );
        border-color: rgba(0, 102, 204, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 102, 204, 0.15);
    }

    .navbar-menu-mobile .btn-nav-primary {
        background: linear-gradient(
            135deg,
            #0066CC 0%,
            #0052A3 100%
        );
        border: 1.5px solid rgba(0, 102, 204, 0.3);
        color: white;
        box-shadow:
            0 4px 12px rgba(0, 102, 204, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .navbar-menu-mobile .btn-nav-primary:hover {
        background: linear-gradient(
            135deg,
            #0052A3 0%,
            #004080 100%
        );
        transform: translateY(-2px);
        box-shadow:
            0 8px 20px rgba(0, 102, 204, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    .navbar-menu-mobile .btn-nav:active {
        transform: translateY(0) scale(0.98);
    }

    /* ============================
       MENU FOOTER - TAGLINE
       ============================ */
    .mobile-menu-footer {
        padding: 20px 24px 24px;
        border-top: 1px solid rgba(0, 102, 204, 0.08);
        background: rgba(255, 255, 255, 0.5);
    }

    .mobile-menu-tagline {
        margin: 0;
        font-size: 0.8125rem;
        color: var(--color-neutral-600);
        text-align: center;
        line-height: 1.5;
        font-weight: 500;
        letter-spacing: 0.01em;
    }

    /* ============================
       ANIMATIONS & EFFECTS
       ============================ */
    @keyframes slideInFromLeft {
        from {
            transform: translateX(-100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* Stagger animation for menu items */
    .navbar-menu-mobile.is-open .nav-item {
        animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    }

    .navbar-menu-mobile.is-open .nav-item:nth-child(1) {
        animation-delay: 0.05s;
    }

    .navbar-menu-mobile.is-open .nav-item:nth-child(2) {
        animation-delay: 0.1s;
    }

    .navbar-menu-mobile.is-open .nav-item:nth-child(3) {
        animation-delay: 0.15s;
    }

    .navbar-menu-mobile.is-open .navbar-actions {
        animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
    }
}
