/* ===========================
   MEGA MENU STRUCTURE
   =========================== */

/* Container */
.mega-menu-container {
    display: flex;
    position: fixed;
    top: 0;
    left: -620px; /* Hide both panels by default (300px main + 300px submenu + 20px padding) */
    height: 100%;
    transition: left 0.3s ease;
    z-index: 1050;
}

.mega-menu-container.open { left: 0; }

/* ===========================
   MAIN MENU PANEL
   =========================== */
.mega-menu {
    position: relative;
    left: 0;
    width: 300px;
    height: 100%;
    background-color: var(--primary-red);
    color: white;
    overflow-y: auto;
    font-family: var(--psv-condensed);
    z-index: 1;
}

/* Close Button */
.mega-menu .close-btn {
    position: absolute;
    top: 30px;
    padding: 0 12px;
    height: unset;
    margin-left: 8px;
}
.mega-menu .close-btn:hover { cursor: pointer; }

/* ===========================
   SUBMENU PANEL
   =========================== */
.submenu-panel {
    position: relative;
    width: 300px;
    height: 100%;
    background-color: var(--secondary-red);
    color: white;
    overflow-y: auto;
    font-family: var(--psv-condensed);
    font-size: 1.2rem;
    left: -300px; /* Initially hide the submenu */
    transition: left 0.3s ease;
}

.submenu-panel.active {
    left: 0; /* Show the submenu when active */
}

.submenu-content {
    left: -300px;
    position: absolute;
    transition: left 0.5s ease;
}
.submenu-content.active { left: 0; }

/* Ensure submenu titles are visible */
.submenu-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* ===========================
   MENU ITEMS & NAVIGATION
   =========================== */
/* Menu lists */
.menu-header {
    list-style: none;
    padding-inline-start: unset;
    padding-top: 15vh;
}
/* .submenu-panel .menu-header { padding: calc(25% + 50px) 0 0; } */
.header-item { padding: 8px;}

.submenu-arrow {
    background-image: url(/wp-content/mu-plugins/pdk-mega-menu/assets/icons/chevron-right.svg);
    background-repeat: no-repeat;
    background-size: 23px 13px;
    width: 23px;
    height: 13px;
}

/* Menu links */
.header-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    margin-left: 24px;
    padding-right: 36px;
    font-size: 20px;
    line-height: 1;
}

/* Navigation elements */
.submenu-arrow {
    margin-left: 8px;
    font-size: 1.5rem;
}

.submenu-back-btn {
    cursor: pointer;
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */
@media screen and (max-width: 768px) {
    /* .mega-menu-container { width: 100%; } */
    .mega-menu .submenu-panel { width: 50%; }
}
@media screen and (max-width: 600px) {
    .mega-menu-container { width: 100%; }
    .mega-mega-menu-container .submenu-panel { width: 50%; }
}