/* Custom Burger Menu Styles */

/* Burger Toggle Button */
.custom-burger-toggle {
    display: none; /* Hidden by default, shown on mobile */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .custom-burger-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }
}

.burger-line {
    display: block;
    width: 30px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

/* Animated burger lines */
.custom-burger-toggle.is-active .burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.custom-burger-toggle.is-active .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.custom-burger-toggle.is-active .burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Container */
.custom-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: #1a1a1a;
    z-index: 10000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.custom-mobile-menu.is-open {
    right: 0;
}

.custom-mobile-menu-inner {
    padding: 80px 30px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Close Button */
.custom-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

.custom-menu-close:hover {
    transform: rotate(90deg);
}

.custom-menu-close svg {
    width: 30px;
    height: 30px;
}

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

.custom-menu-list li {
    margin-bottom: 10px;
}

.custom-menu-list a {
    display: block;
    padding: 15px 0;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.custom-menu-list a:hover {
    color: #FFEC09;
    padding-left: 10px;
}

/* Submenu */
.custom-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.custom-submenu.is-open {
    max-height: 300px;
}

.custom-submenu li {
    margin: 0;
}

.custom-submenu a {
    padding: 10px 0 10px 20px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.has-submenu > a::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.has-submenu > a.submenu-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Language Switcher */
.custom-language-switcher {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-item {
    color: #999;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.lang-item:hover,
.lang-item.active {
    color: #FFEC09;
}

.lang-separator {
    color: #666;
}

/* Overlay */
.custom-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Body scroll lock */
body.menu-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .custom-mobile-menu {
        max-width: 280px;
    }
    
    .custom-mobile-menu-inner {
        padding: 60px 20px 20px;
    }
    
    .custom-menu-list a {
        font-size: 16px;
        padding: 12px 0;
    }
    
    .custom-submenu a {
        font-size: 14px;
        padding: 8px 0 8px 15px;
    }
}

/* Hide original mobile menu elements */
.jet-mobile-menu--location-wp-nav,
.jet-mobile-menu__toggle,
.jet-mobile-menu__container {
    display: none !important;
}

/* Ensure burger menu is visible above other elements */
.custom-burger-menu-wrapper {
    position: relative;
    z-index: 10001;
}

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

.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(1) { animation-delay: 0.1s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(2) { animation-delay: 0.15s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(3) { animation-delay: 0.2s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(4) { animation-delay: 0.25s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(5) { animation-delay: 0.3s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(6) { animation-delay: 0.35s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(7) { animation-delay: 0.4s; }
.custom-mobile-menu.is-open .custom-menu-list > li:nth-child(8) { animation-delay: 0.45s; }

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