
/* =========================================================
   Advantal Custom Mega Menu
   Uses the markup rendered by mega-menu.php.
   Add this file only after the custom menu is integrated.
   ========================================================= */

.adv-custom-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 1000;
    font-family: inherit;
}

.adv-main-menu,
.adv-main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.adv-main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 12px;
    border: 1px solid #00C2FF;
    border-radius: 100px;
    background: rgb(0 194 255 / 13%);
}

.adv-main-menu-item {
    display: flex;
    align-items: center;
    position: static;
    margin: 0;
    padding: 0;
}

.adv-main-menu-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    color: #E0E0E0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.adv-main-menu-link:hover,
.adv-main-menu-link:focus-visible,
.adv-main-menu-item.is-open > .adv-main-menu-link {
    color: #00C2FF;
}

.adv-main-menu-link:focus-visible,
.adv-main-menu-toggle:focus-visible,
.adv-mega-category-button:focus-visible,
.adv-mega-link:focus-visible {
    outline: 2px solid #00C2FF;
    outline-offset: 3px;
}

.adv-main-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 38px;
    margin: 0 7px 0 -8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #E0E0E0;
    cursor: pointer;
}

.adv-main-menu-toggle span {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease, color .2s ease;
}

.adv-main-menu-item.is-open > .adv-main-menu-toggle span {
    color: #00C2FF;
    transform: rotate(225deg) translate(-1px, -1px);
}

/* Mega panel */
.adv-mega-panel {
    position: absolute;
    top: calc(100% + 17px);
    left: 50%;
    width: min(1180px, calc(100vw - 48px));
    max-height: min(78vh, 760px);
    overflow: auto;
    padding: 30px;
    border: 1px solid rgb(0 194 255 / 24%);
    border-radius: 18px;
    background: #10232C;
    box-shadow: 0 24px 70px rgb(0 0 0 / 42%), 0 8px 30px rgb(0 194 255 / 10%);
    opacity: 0;
    visibility: hidden;
    /* pointer-events: none; */
    transform: translate(-50%, 12px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 1001;
}

.adv-main-menu-item.is-open > .adv-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.adv-mega-panel-inner {
    width: 100%;
}

.adv-mega-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgb(224 224 224 / 12%);
}

.adv-mega-panel-heading-copy {
    min-width: 0;
}

.adv-mega-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #00C2FF;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    line-height: 1.4;
}

.adv-mega-panel-heading h2 {
    margin: 0 0 7px;
    color: #FFFFFF;
    font-size: clamp(23px, 2vw, 30px);
    font-weight: 600;
    line-height: 1.2;
}

.adv-mega-panel-heading p {
    margin: 0;
    color: #B0B0B0;
    font-size: 14px;
    line-height: 1.5;
}

.adv-mega-panel-content {
    display: grid;
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
    gap: 26px;
    padding-top: 24px;
}

.adv-mega-category-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgb(0 194 255 / 12%);
    border-radius: 12px;
    background: #0A303B;
}

.adv-mega-category-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #B0B0B0;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.adv-mega-category-button:hover {
    background: rgb(0 194 255 / 7%);
    color: #FFFFFF;
}

.adv-mega-category-button.is-active {
    border-color: rgb(0 194 255 / 28%);
    background: rgb(0 194 255 / 13%);
    color: #00C2FF;
    font-weight: 600;
}

.adv-mega-category-arrow {
    flex: 0 0 auto;
    color: #00C2FF;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s ease, transform .2s ease;
}

.adv-mega-category-button.is-active .adv-mega-category-arrow,
.adv-mega-category-button:hover .adv-mega-category-arrow {
    opacity: 1;
    transform: translateX(0);
}

.adv-mega-category-panels {
    min-width: 0;
    padding: 8px 2px;
}

.adv-mega-category-panel h3 {
    margin: 0 0 17px;
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

.adv-mega-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.adv-mega-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 13px 15px;
    border: 1px solid rgb(224 224 224 / 8%);
    border-radius: 9px;
    background: rgb(255 255 255 / 3%);
    color: #B0B0B0;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.adv-mega-link:hover {
    transform: translateY(-2px);
    border-color: rgb(0 194 255 / 40%);
    background: rgb(0 194 255 / 8%);
    color: #FFFFFF;
}

.adv-mega-link-label {
    min-width: 0;
}

.adv-mega-link-arrow {
    flex: 0 0 auto;
    color: #00C2FF;
    opacity: .7;
    transition: opacity .2s ease, transform .2s ease;
}

.adv-mega-link:hover .adv-mega-link-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* Mobile toggle is hidden on desktop */
.adv-custom-mobile-toggle {
    display: none;
}

/* Hide mobile menu accessibility text visually */
.adv-custom-mobile-toggle .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Laptop/tablet */
@media (max-width: 1199px) {
    .adv-custom-nav {
        justify-content: flex-end;
    }

    .adv-custom-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgb(0 194 255 / 55%);
        border-radius: 9px;
        background: rgb(0 194 255 / 10%);
        cursor: pointer;
    }

    .adv-custom-mobile-toggle-lines,
    .adv-custom-mobile-toggle-lines::before,
    .adv-custom-mobile-toggle-lines::after {
        display: block;
        width: 22px;
        height: 1px;
        border-radius: 2px;
        background: #FFFFFF;
        transition: transform .2s ease, top .2s ease, opacity .2s ease;
    }

    .adv-custom-mobile-toggle-lines {
        position: relative;
    }

    .adv-custom-mobile-toggle-lines::before,
    .adv-custom-mobile-toggle-lines::after {
        position: absolute;
        left: 0;
        content: "";
    }

    .adv-custom-mobile-toggle-lines::before {
        top: -7px;
    }

    .adv-custom-mobile-toggle-lines::after {
        top: 7px;
    }

    .adv-custom-nav.is-mobile-open .adv-custom-mobile-toggle-lines {
        background: transparent;
    }

    .adv-custom-nav.is-mobile-open .adv-custom-mobile-toggle-lines::before {
        top: 0;
        transform: rotate(45deg);
    }

    .adv-custom-nav.is-mobile-open .adv-custom-mobile-toggle-lines::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .adv-main-menu {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: auto;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        width: min(676px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        overflow: auto;
        padding: 0 12px;
        border: 1px solid rgb(0 194 255 / 28%);
        border-radius: 14px;
        background: #07141B;
        box-shadow: 0 20px 45px rgb(0 0 0 / 45%);
    }

    .adv-custom-nav.is-mobile-open .adv-main-menu {
        display: flex;
    }

    .adv-main-menu-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        border-bottom: 1px solid rgb(224 224 224 / 10%);
    }

    .adv-main-menu-item:last-child {
        border-bottom: 0;
    }

    .adv-main-menu-link {
        min-height: 48px;
        padding: 8px 10px;
        white-space: normal;
    }

    .adv-main-menu-toggle {
        width: 42px;
        height: 48px;
        margin: 0;
    }

    .adv-mega-panel {
        position: static;
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        max-height: none;
        overflow: visible;
        padding: 18px;
        border: 0;
        border-top: 1px solid rgb(0 194 255 / 18%);
        border-radius: 0;
        background: #10232C;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
    }

    .adv-main-menu-item.is-open > .adv-mega-panel {
        display: block;
        transform: none;
    }

    .adv-mega-panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding-bottom: 17px;
        display: none;
    }

    .adv-mega-panel-content {
        grid-template-columns: 1fr;
        gap: 17px;
        padding-top: 0px;
    }

    .adv-mega-category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adv-mega-category-button {
        min-height: 44px;
        font-size: 13px;
    }

    .adv-mega-category-panel h3 {
        margin-bottom: 12px;
        font-size: 17px;
    }
}

/* Small mobile */
@media (max-width: 575px) {
    .adv-main-menu {
        left: auto;
        right: -10px;
        width: min(460px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }

    .adv-mega-panel {
        padding: 15px 12px;
    }

    .adv-mega-eyebrow {
        font-size: 10px;
    }

    .adv-mega-panel-heading h2 {
        font-size: 22px;
    }

    .adv-mega-panel-heading p {
        font-size: 13px;
    }

    .adv-mega-category-list {
        grid-template-columns: 1fr;
    }

    .adv-mega-link-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .adv-mega-link {
        min-height: 50px;
        padding: 11px 12px;
        font-size: 13px;
    }
    .adv-custom-mobile-toggle{
        width: 32px;
        height: 32px;
    }
    .adv-custom-mobile-toggle-lines, .adv-custom-mobile-toggle-lines::before, .adv-custom-mobile-toggle-lines::after{
        width: 18px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .adv-main-menu-link,
    .adv-main-menu-toggle span,
    .adv-mega-panel,
    .adv-mega-category-button,
    .adv-mega-category-arrow,
    .adv-mega-link,
    .adv-mega-link-arrow {
        transition: none !important;
    }
}
