/* ═══════════════════════════════════════════════════════════════
   SECTION SWITCHER DROPDOWN
   Lives inside .main-nav. Replaces the old "Rust Gambling Sites"
   link. Lets users hop between CS2, Rust, and Real Items sections.
   Each option has a colored dot showing which theme it belongs to.
   ═══════════════════════════════════════════════════════════════ */

.section-switcher {
    position: relative;
    display: inline-block;
}

.section-switcher > .nav-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.section-switcher > .nav-link::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
    transition: transform 0.2s;
}

.section-switcher.open > .nav-link::after,
.section-switcher:hover > .nav-link::after {
    transform: rotate(180deg);
    opacity: 1;
}

.section-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 240px;
    background: rgba(15, 19, 28, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 1300;
}

.section-switcher:hover .section-dropdown,
.section-switcher.open .section-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Invisible bridge so the dropdown doesn't close when moving the
   mouse from the trigger to the menu */
.section-switcher::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.section-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    transition: background 0.15s, color 0.15s;
}

.section-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.section-option.current {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: default;
}

.section-option.current::after {
    content: "✓";
    margin-left: auto;
    color: #94a3b8;
    font-size: 12px;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.section-dot.cs2 {
    background: #3b82f6;
    color: #3b82f6;
}

.section-dot.rust {
    background: #cd412b;
    color: #cd412b;
}

.section-dot.irl {
    background: #a855f7;
    color: #a855f7;
}

.section-option-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-option-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.section-option-sub {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.2px;
}

/* MOBILE — turn the dropdown into a stacked accordion */
@media (max-width: 768px) {
    .section-switcher {
        width: 100%;
    }

    .section-switcher > .nav-link {
        width: 100%;
        justify-content: space-between;
    }

    .section-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 8px;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        display: none;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .section-switcher.open .section-dropdown {
        display: block;
        transform: none;
    }

    .section-switcher::before {
        display: none;
    }

    /* Disable the hover-open behavior on mobile — only click/tap opens */
    .section-switcher:hover .section-dropdown {
        display: none;
    }

    .section-switcher.open:hover .section-dropdown,
    .section-switcher.open .section-dropdown {
        display: block;
    }

    .section-option {
        padding: 14px 16px;
        font-size: 15px;
    }
}
