/* ================================
   MOBILE HEADER & NAVIGATION ONLY
================================== */

/* Default: Hide mobile header unless mobile view */
.mobile-header {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 60px;
    align-items: center;
    justify-content: space-between;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999; /* Increased z-index to ensure it's above header */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: opacity; /* Optimize for animations */
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    display: block !important;
}

/* Slide-out panel */
.mobile-menu-panel {
    position: fixed;
    right: -100%;
    top: 0;
    width: 90%;
    max-width: 400px;
    height: 100%;
    background: #1a1a1a;
    color: #fff;
    z-index: 10001; /* Ensure panel is above overlay */
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    will-change: right; /* Optimize for animations */
}
.mobile-menu-overlay.active .mobile-menu-panel {
    right: 0;
}

/* Close button */
.mobile-menu-header {
    padding: 1.5rem 1rem 15px;
    background-color: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}
.mobile-menu-close {
    background: none;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    padding: 5px 10px;
    transition: all 0.2s ease;
}
.mobile-menu-close:hover {
    background-color: #333;
}

/* Navigation */
.mobile-nav {
    margin-bottom: 30px;
}
.mobile-nav ul {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}
.mobile-nav li {
    margin-bottom: 15px;
}
.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #2a2a2a;
}
.mobile-nav a:hover {
    background-color: #2a2a2a;
    color: var(--primary);
    padding-left: 1.75rem;
}

/* Social section */
.mobile-social {
    margin-top: auto;
    padding: 1.5rem;
    text-align: center;
    background-color: #121212;
    border-top: 1px solid #2a2a2a;
}
.mobile-social h4 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.1rem;
}
.mobile-social .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.mobile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #8a8a8a;
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.mobile-social a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Language toggle */
.mobile-lang-selector {
    margin-top: 30px;
}
.mobile-lang-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.mobile-lang-dropdown {
    display: none;
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}
.mobile-lang-dropdown.show {
    display: block;
}
.mobile-lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--primary);
    text-decoration: none;
}
.mobile-lang-dropdown a:hover {
    background: #f8f9fa;
}

/* Responsive visibility */
@media (max-width: 991.98px) {
    .desktop-header {
        display: none !important;
    }
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        padding: 15px 20px;
    }
    .mobile-header .logo {
        display: flex !important;
        align-items: center;
        height: 40px;
    }
    .mobile-header .logo img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 24px;
        padding: 8px;
        margin-right: 15px;
        cursor: pointer;
        color: #ffffff;
        z-index: 10010;
    }
}
