/* Pure CSS Mobile Menu - No JavaScript Required */

/* Hide the checkbox input */
#mobile-menu-toggle {
    display: none;
}

/* Mobile menu styles - only show on mobile */
@media (max-width: 1024px) {

    /* Style the hamburger icon label */
    .mobile-menu-label {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 30px;
        cursor: pointer;
        z-index: 99999999;
    }

    /* Hamburger icon lines */
    .mobile-menu-label span,
    .mobile-menu-label span::before,
    .mobile-menu-label span::after {
        display: block;
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: #333;
        transition: all 0.3s ease;
    }

    .mobile-menu-label span {
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-menu-label span::before {
        content: '';
        top: -10px;
    }

    .mobile-menu-label span::after {
        content: '';
        top: 10px;
    }

    /* Transform hamburger to X when checked */
    #mobile-menu-toggle:checked + .mobile-menu-label span {
        background-color: transparent;
    }

    #mobile-menu-toggle:checked + .mobile-menu-label span::before {
        top: 0;
        transform: rotate(45deg);
    }

    #mobile-menu-toggle:checked + .mobile-menu-label span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Mobile menu container */
    .mobile-menu-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 99999998;
        overflow-y: auto;
        padding: 80px 20px 20px;
    }

    /* Show menu when checkbox is checked */
    #mobile-menu-toggle:checked ~ .mobile-menu-container {
        right: 0;
    }

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

    #mobile-menu-toggle:checked ~ .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Menu items styling */
    .mobile-menu-container ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-container li {
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-container a {
        display: block;
        padding: 15px 10px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        transition: background-color 0.2s;
    }

    .mobile-menu-container a:hover {
        background-color: #f5f5f5;
    }

    /* Submenu styling */
    .mobile-menu-container .sub-menu {
        padding-left: 20px;
        background-color: #f9f9f9;
    }

    .mobile-menu-container .sub-menu a {
        font-size: 14px;
        padding: 12px 10px;
    }

    /* Hide original Elementor mobile menu */
    .elementor-element-e74a7ef,
    .elementor-element-9ebb79f .elementor-menu-toggle {
        display: none !important;
    }
}

/* Desktop - hide mobile menu completely */
@media (min-width: 1025px) {
    #mobile-menu-toggle,
    .mobile-menu-label,
    .mobile-menu-container,
    .mobile-menu-overlay {
        display: none !important;
    }
}
