/* ============================================================
   TOP NAV — FINAL UKSOR GLOSSY CARBON VERSION
============================================================ */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    background:
        linear-gradient(45deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 40%),
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%) 0 0,
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%) 0 0,
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%) 0 0,
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%) 0 0;
    background-size: 20px 20px;
    background-color: #0d0d0d;
    background-blend-mode: overlay;
    border-bottom: 3px solid var(--uksor-red);
    height: 42px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow:
        inset 0 2px 6px rgba(255,255,255,0.15),
        inset 0 -2px 6px rgba(0,0,0,0.6),
        0 2px 6px rgba(0,0,0,0.6);
}

.top-nav .nav-left,
.top-nav .nav-right,
.top-nav .logged-out-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.top-nav a {
    color: var(--uksor-light-grey);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 4px 0;
    transition: 0.2s ease;
}

.top-nav a:hover {
    color: var(--uksor-yellow);
}

.top-nav .user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}

.top-nav .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--uksor-yellow);
}

.top-nav .user-name {
    color: var(--uksor-light-grey);
    font-weight: 600;
}

.top-nav .user-arrow {
    font-size: 12px;
    color: #ccc;
}

.top-nav .user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #111;
    border: 2px solid var(--uksor-yellow);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    display: none;
    z-index: 9999;
}

.top-nav .user-menu.open .user-dropdown {
    display: block;
}

.top-nav .user-dropdown li a {
    display: block;
    padding: 10px 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
}

.top-nav .user-dropdown li a:hover {
    background-color: #111;
    color: var(--uksor-yellow);
    box-shadow: inset 0 0 0 2px var(--uksor-yellow);
}

.site-header {
    background:
        linear-gradient(
            to right,
            #002b8a 0%,
            #002b8a 38%,
            rgba(0, 43, 138, 0.97) 46%,
            rgba(0, 43, 138, 0.82) 56%,
            rgba(0, 43, 138, 0.55) 66%,
            rgba(0, 43, 138, 0.22) 78%,
            rgba(0, 43, 138, 0.05) 88%,
            rgba(0, 43, 138, 0) 100%
        ),
        url('/wp-content/themes/uksor/images/uksor-header-test.png') right 62% / cover no-repeat;

    border-bottom: 3px solid var(--uksor-red);
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   UKSOR HEADER LOGO OVERLAP
============================================================ */

.site-header,
.header-container {
    overflow: visible;
}

.site-branding {
    position: relative;
    z-index: 50;
}

.site-branding .custom-logo-link {
    display: block;
}

.site-branding .custom-logo {
    width: 175px;
    height: auto;
    display: block;

    /*
     * Pull slightly upward while allowing the bottom
     * of the crest to overlap the formula navigation.
     */
    margin-top: -8px;
    margin-bottom: -42px;

    position: relative;
    z-index: 50;

    /* Gives the overlapping crest a little separation */
    filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.35));
}

/* ============================================================
   HEADER STATUS WIDGET — LOWER POSITION
============================================================ */

.header-right {
    align-self: flex-end;
    margin-bottom: -32px;
}

/* ============================================================
   HEADER SERVER STATUS — ROUNDED TOP CORNERS
============================================================ */

.header-right .uksor-server-status {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* ============================================================
   FORMULA NAV — CLEARANCE FOR OVERLAPPING LOGO
============================================================ */

.main-nav {
    position: relative;
    z-index: 10;
}

.nav-menu {
    /*
     * Reserve the logo area on desktop so F2 Stockcars
     * cannot disappear behind the crest.
     */
    padding-left: 210px;
    padding-right: 20px;

    justify-content: center;
}

/* ============================================================
   MAIN NAV
============================================================ */

.main-nav {
    background: #002b8a;
    border-bottom: 3px solid var(--uksor-red);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    justify-content: center;
}

.nav-menu a {
    padding: 12px 0;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.nav-menu a:hover {
    color: var(--uksor-yellow);
}

.nav-menu .current-menu-item > a {
    color: var(--uksor-yellow);
    border-bottom: 3px solid var(--uksor-yellow);
}

.uksor-discord-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;

    color: #b9b9b9 !important;
    background: transparent;
    border: none;
    border-radius: 50%;

    text-decoration: none !important;
    transition: 0.2s ease;
}

.uksor-discord-link i {
    font-size: 19px;
}

.uksor-discord-link span {
    display: none;
}

.uksor-discord-link:hover {
    color: #5865F2 !important;
    background: rgba(255,255,255,0.08);
}

/* Mobile — save space and just show the Discord icon */
@media (max-width: 768px) {
    .uksor-discord-link {
        width: 32px;
        padding: 0;
        justify-content: center;
        margin-right: 6px;
    }

    .uksor-discord-link span {
        display: none;
    }
}