/**
 * WP Fullscreen Glass Menu - CSS
 * Fullscreen modal menu with glass effect styling
 */

/* Reset & Base Styles */
.fullscreen-menu,
.menu-container,
.menu-content,
.menu-items,
.menu-items * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Menu Trigger Button - For any element with .show_mobilemenu class */
.show_mobilemenu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.show_mobilemenu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Fullscreen Menu Overlay */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.2); /* Glass effect base */
    backdrop-filter: blur(15px); /* Glass blur effect */
    -webkit-backdrop-filter: blur(15px); /* For Safari */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Container */
.menu-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    padding: 50px 20px;
}

/* Close Button */
.menu-close {
    position: absolute;
    top: 10px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    transition: transform 0.3s ease;
}

.menu-close .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

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

/* Menu Content */
.menu-content {
    width: 100%;
}

/* Main Menu Items */
.menu-items {
    list-style: none;
    padding: 0;
    width: 100%;
}

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

.menu-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.menu-link {
    display: block;
    text-decoration: none;
    color: #000000;
    font-size: 28px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.menu-link:hover {
    color: #000;
}

/* Menu Item Wrapper for parent items */
.menu-item-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Submenu Toggle Button */
.submenu-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: transform 0.3s ease;
}

.submenu-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.submenu-toggle.active {
    transform: rotate(135deg); /* Turns + into × */
}

/* Submenu */
.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding-left: 20px;
}

.submenu.active {
    max-height: 500px; /* Adjust as needed */
    opacity: 1;
    margin-top: 15px;
    border-left:2px solid #3fde3a;
}

.submenu-item {
    margin: 10px 0;
}

.submenu-link {
    color: #000000;
    text-decoration: none;
    font-size: 22px;
    transition: color 0.3s ease;
    display: block;
}

.submenu-link:hover {
    color: #000;
}

/* Animation for menu items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fullscreen-menu.active .menu-item {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

/* Stagger the animation for each item */
.fullscreen-menu.active .menu-item:nth-child(1) { animation-delay: 0.1s; }
.fullscreen-menu.active .menu-item:nth-child(2) { animation-delay: 0.2s; }
.fullscreen-menu.active .menu-item:nth-child(3) { animation-delay: 0.3s; }
.fullscreen-menu.active .menu-item:nth-child(4) { animation-delay: 0.4s; }
.fullscreen-menu.active .menu-item:nth-child(5) { animation-delay: 0.5s; }
.fullscreen-menu.active .menu-item:nth-child(6) { animation-delay: 0.6s; }
.fullscreen-menu.active .menu-item:nth-child(7) { animation-delay: 0.7s; }
.fullscreen-menu.active .menu-item:nth-child(8) { animation-delay: 0.8s; }

/* WordPress admin bar compatibility */
.admin-bar .fullscreen-menu {
    top: 32px;
    height: calc(100vh - 32px);
}

.fullscreen-menu.active,
.admin-bar .fullscreen-menu{
    background-color: rgba(255, 255, 255, 0.7);
}

@media screen and (max-width: 782px) {
    .admin-bar .fullscreen-menu {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .menu-link {
        font-size: 24px;
    }

    .submenu-link {
        font-size: 18px;
    }

    .menu-container {
        padding: 60px 20px 40px;
    }
}

@media (max-width: 480px) {
    .menu-link {
        font-size: 20px;
    }

    .submenu-link {
        font-size: 16px;
    }

    .menu-container {
        padding: 50px 15px 30px;
    }

    .menu-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
    
    .logo-main img{ width:125px !important; }
    .logo-sub img{ height:40px !important; }
}

:root :where(.wp-block-search .wp-element-button,.wp-block-search .wp-block-button__link){
    margin-left: 0px;
}

/* No-js fallback */
.no-js .submenu {
    max-height: none;
    opacity: 1;
    margin-top: 15px;
}