/* Mobile Navigation */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.mobile-menu.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin: 1rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    max-height:80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu-content::-webkit-scrollbar {
    width: 6px;
}
.mobile-menu-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
.mobile-menu-content {
    padding-bottom: 2rem; /* Prevent buttons from being hidden */
}
.mobile-menu-button {
    display: none;
}

/* Mobile menu transitions */
.mobile-menu {
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transition: all 0.3s ease;
}
.mobile-menu-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
}

/* Cross-browser compatibility improvements */
@supports not (backdrop-filter: blur(10px)) {
    .mobile-menu {
        background: rgba(0, 0, 0, 0.98);
    }
}


@media (max-width: 768px) {

    .mobile-menu-button {
        display: block;
    }

/* Mobile navigation improvements */
    .mobile-menu-content a {
        display: block;
        padding: 1rem;
        margin: 0.5rem 0;
        background: #f8f9fa;
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        transition: all 0.3s ease;
    }

    .mobile-menu-content a:hover {
        background: #e9ecef;
        transform: translateX(4px);
    }

    /* Mobile button improvements */
    .mobile-menu-content button {
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        border: none;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .mobile-menu-content .primary-btn {
        background: #233DFF;
        color: white;
    }

    .mobile-menu-content .secondary-btn {
        background: transparent;
        color: #233DFF;
        border: 2px solid #233DFF;
    }
}

@media (max-width: 640px) {
    .img-w-60 {
        width: 60% !important;
    }
    .img-w-70 {
        width: 70% !important;
    }
    .img-w-80 {
        width: 80% !important;
    }
    .img-w-90 {
        width: 90% !important;
    }

    .mobile-menu-content {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    /* Stack mobile menu buttons vertically */
    .mobile-menu-content .mt-6.space-y-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .mobile-menu-content .primary-btn,
    .mobile-menu-content .secondary-btn {
        width: 100% !important;
        display: block !important;
    }

    /* Hide desktop buttons on mobile */
    .desktop-buttons {
        display: none !important;
    }

    /* Show mobile-stacked buttons next to mobile menu button */
    .mobile-header-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-left: 0.5rem !important;
    }

    .mobile-header-buttons button {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        white-space: nowrap !important;
    }
}