/* Mobile Menu Fixes - Unified for all views */

/* Prevent body scroll when mobile menu is open */
html.no-scroll,
html.no-scroll body {
    overflow: hidden !important;
    height: 100%;
    position: fixed;
    width: 100%;
}

/* Mobile Menu Base Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--primary-blue, #0a2463);
    z-index: 99999;
    transition: left 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    left: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-header h2 {
    color: white;
    font-weight: 700;
    margin: 0;
}

.mobile-close {
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu List */
.mobile-menu-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    transition: color 0.3s;
}

.mobile-menu-list a:hover {
    color: var(--gold, #ffd700);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
    z-index: 99990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--primary-blue, #0a2463);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Show mobile menu button on small screens */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none !important;
    }
}

/* Accessibility focus ring */
.mobile-menu-btn:focus,
.mobile-close:focus,
.mobile-menu-list a:focus {
    outline: 3px solid rgba(255, 215, 0, 0.5);
    outline-offset: 3px;
}

/* Ensure proper z-index stacking */
.mobile-menu-btn,
.mobile-close {
    z-index: 100001;
}

/* Fix for plantilla view - ensure mobile menu works properly */
html.plantilla-scope .mobile-menu {
    background: var(--primary-blue, #0a2463);
}

html.plantilla-scope .mobile-menu-btn {
    color: var(--primary-blue, #0a2463);
}

/* Ensure overlay is behind menu but above content */
html.plantilla-scope .mobile-menu-overlay {
    z-index: 99990;
}

html.plantilla-scope .mobile-menu {
    z-index: 99999;
}
