/* =========================================================
   SECONDARY NAVIGATION
   ========================================================= */

.secondary-nav {
    width: 100%;
    position: relative;
    background: var(--panel);
    box-sizing: border-box;
    z-index: 50;
    overflow: visible;
}

.secondary-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;

    list-style: none;

    margin: 0;
    padding: 0;

    width: 100%;
    box-sizing: border-box;
}

.secondary-nav-item {
    position: relative;
    flex: 0 0 auto;
}

.secondary-nav-item > a,
.secondary-nav-item > button {
    display: flex;
    align-items: center;
    justify-content: center;

    height: auto;
    padding: 0;
    margin: 0;

    border: none;
    outline: none;

    background: transparent;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;

    box-sizing: border-box;
}


/* =========================================================
   MEGA MENU — DASAR
   ========================================================= */

.mega-menu {
    display: none;

    position: absolute;

    top: 100%;
    left: 0;

    min-width: 260px;

    padding: 20px;

    background: #fff;
    color: #000;
    border-top: 1px solid rgba(255,255,255,0.08);

    box-shadow: 0 8px 24px rgba(0,0,0,0.25);

    box-sizing: border-box;

    z-index: 100;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .secondary-nav {
        overflow-x: auto;
        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;

        scrollbar-width: thin;
    }

    .secondary-nav-list {
        justify-content: flex-start;
        width: max-content;
        min-width: 100%;
    }

    .secondary-nav-item > a,
    .secondary-nav-item > button {
        height: 44px;
        padding: 0 15px;
        font-size: 13px;
    }
}

/* =====================================================
   SECONDARY NAV - MEGA MENU
   ===================================================== */

.secondary-nav-item.has-mega-menu {
    position: relative;
}

.secondary-nav-item .mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 260px;
    max-width: 420px;

    padding: 12px 0;

    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

    box-sizing: border-box;
    z-index: 9999;
}

/* Link submenu */
.secondary-nav-item .mega-menu a {
    display: grid;

    width: 100%;
    padding: 9px 18px;

    color: #000;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    line-height: 1.4;
    text-align: left;
    text-decoration: none;

    white-space: nowrap;
    box-sizing: border-box;
}

/* Hover submenu */
.secondary-nav-item .mega-menu a:hover {
    color: var(--accent);
    background: #fff;
}