/**
 * Mobile Menu Styles
 * Mobile-only menu with edge-to-edge positioning and animated close icon
 */

/* Hide on desktop - only show on mobile */
.mobile-menu-wrapper {
    display: none;
}

.mobile-menu-wrapper.menu-open .mobile-menu-nav {
    padding: 80px 20px 40px;
}

@media screen and (max-width: 992px) {
    .mobile-menu-wrapper {
        display: block;
    }
}

button.mobile-menu-close {
    background-color: transparent !important;
    color: #000 !important;
}

.mobile-menu-toggle:focus {
    background: transparent;
}

/* Hamburger Toggle Button */
.mobile-menu-toggle {
    /*position: fixed;*/
    /*top: 20px;*/
    /*right: 20px;*/
    /*z-index: 9998;*/
    background: transparent;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    top: 50%;
    bottom: auto;
    transform: translate(0, -50%);
}

.mobile-menu-toggle:hover {
    background: transparent;
}

.mobile-menu-toggle:focus {
    outline: 2px solid #D2C2AB;
    outline-offset: 2px;
}

.mobile-menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.mobile-menu-toggle-icon span {
    display: block;
    height: 3px;
    background: #122244;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hide toggle when menu is open */
.mobile-menu-wrapper.menu-open .mobile-menu-toggle {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Menu Overlay - Edge to Edge, Fixed Position */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    overflow-y: auto;
    transform: translateX(107%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-wrapper.menu-open .mobile-menu-overlay {
    transform: translateX(0);
}

/* Close Button with Animation */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
}

.mobile-menu-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mobile-menu-close-icon {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
}

.mobile-menu-close-icon span {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-close-icon span:first-child {
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-close-icon span:last-child {
    transform: translateY(-50%) rotate(-45deg);
}

/* Hover animation for close button */
.mobile-menu-close:hover .mobile-menu-close-icon span:first-child {
    transform: translateY(-50%) rotate(135deg);
}

.mobile-menu-close:hover .mobile-menu-close-icon span:last-child {
    transform: translateY(-50%) rotate(-135deg);
}

/* Menu Navigation */
.mobile-menu-nav {
    /*padding: 80px 20px 40px;*/
    max-width: 100%;
}

/* Menu List */
.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-list li:last-child {
    border-bottom: none;
}

.mobile-menu-list a {
    display: block;
    padding: 15px 10px;
    color: inherit;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list a:focus {
    padding-left: 20px;
    opacity: 0.7;
}

/* Submenu Styles */
.mobile-menu-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-submenu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-submenu a {
    padding-left: 30px;
    font-size: 16px;
    font-weight: 400;
}

.mobile-menu-submenu a:hover,
.mobile-menu-submenu a:focus {
    padding-left: 40px;
}

/* Current menu item */
.mobile-menu-list .current-menu-item > a,
.mobile-menu-list .current-menu-ancestor > a {
    font-weight: 700;
    opacity: 1;
}

/* Accessibility */
.mobile-menu-toggle:focus-visible,
.mobile-menu-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Smooth scrolling for menu */
.mobile-menu-overlay {
    -webkit-overflow-scrolling: touch;
}

/* Animation for menu items */
.mobile-menu-wrapper.menu-open .mobile-menu-list > li {
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(2) {
    animation-delay: 0.15s;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(3) {
    animation-delay: 0.2s;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(4) {
    animation-delay: 0.25s;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(5) {
    animation-delay: 0.3s;
}

.mobile-menu-wrapper.menu-open .mobile-menu-list > li:nth-child(n+6) {
    animation-delay: 0.35s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Language Switcher Styles - Select Dropdown */
.mobile-menu-language-switcher {
    margin-top: 30px;
    padding: 20px 15px 10px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-language-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    opacity: 0.7;
    display: block;
}

/* Custom Select Wrapper */
.mobile-menu-language-select-wrapper {
    position: relative;
    width: 100%;
}

/* Custom Select Styling */
.mobile-menu-language-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: inherit;
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
    outline: none;
}

.mobile-menu-language-select:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

.mobile-menu-language-select:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: currentColor;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Custom Arrow Icon */
.mobile-menu-language-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.mobile-menu-language-select:focus + .mobile-menu-language-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Select Options Styling */
.mobile-menu-language-select option {
    padding: 12px;
    font-size: 16px;
    background: #fff;
    color: #000;
}

/* Animation for language switcher */
.mobile-menu-wrapper.menu-open .mobile-menu-language-switcher {
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support for select */
@media (prefers-color-scheme: dark) {
    .mobile-menu-language-select {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .mobile-menu-language-select:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .mobile-menu-language-select:focus {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 360px) {
    .mobile-menu-language-select {
        font-size: 15px;
        padding: 12px 36px 12px 14px;
    }
}
