/******** THEME COLORS ********/
:root {
    --bg: #fff;
    --dark: #000;
    --accent1: #d9336f;
    --accent2: #5b3aa8;
}

/******** HEADER ********/
[data-include*="navbar.html"],
#navbar-placeholder {
    position: sticky;
    top: 0;
    z-index: 110;
}

@supports not (position: sticky) {

    [data-include*="navbar.html"],
    #navbar-placeholder {
        position: -webkit-sticky;
    }
}

header {
    background: rgba(255, 255, 255, 0.78);
    padding: 8px 20px 0px;
    position: sticky;
    top: 0;
    z-index: 120;
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/******** BRAND & LOGO ********/
.brand {
    display: flex;
    align-items: center;
    z-index: 200;
}

.logo img {
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/******** NAV NOTICE ********/
.nav-alert {
    background: linear-gradient(90deg, rgba(40, 40, 45, 0.82), rgba(25, 25, 28, 0.82));
    border-bottom: 4px solid #d6333f;
    color: #f8f8f9;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-alert__track {
    display: flex;
    width: max-content;
    animation: nav-alert-marquee 20s linear infinite;
}

.nav-alert:hover .nav-alert__track,
.nav-alert:focus-within .nav-alert__track {
    animation-play-state: paused;
}

.nav-alert__content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.95rem;
    white-space: nowrap;
    flex: 0 0 auto;
    justify-content: center;
    box-sizing: border-box;
}

.nav-alert__content:first-child,
.nav-alert__content+.nav-alert__content {
    padding-left: 0;
    padding-right: 0;
}

.nav-alert__label {
    font-weight: 700;
    color: #ffc7da;
}

.nav-alert__content a {
    color: #ffc7da;
    font-weight: 700;
    text-decoration: underline;
}

.nav-alert__content a:hover,
.nav-alert__content a:focus {
    color: #ffffff;
}

/******** NAVIGATION ********/
nav {
    flex: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

nav ul li {
    display: block;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent1);
}

/******** DROPDOWN ********/
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--accent1);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 50;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
    background: #f2f2f2;
    color: var(--accent1);
}

.dropdown-content a.active {
    background: #f2f2f2;
    color: var(--accent1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/******** ANIMATIONS ********/
@keyframes nav-alert-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/******** HAMBURGER ********/
.mobile-toggle {
    font-size: 26px;
    color: var(--dark);
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 200;
}

.mobile-toggle i {
    transition: transform 0.3s ease;
}

.mobile-toggle.open i::before {
    content: "\f00d";
    /* X icon from FontAwesome */
}

/******** RESPONSIVE STYLES ********/

/* Tablets (up to 1024px) */
@media (max-width: 1024px) {
    nav ul {
        gap: 30px;
    }

    .logo img {
        height: 55px;
    }
}

@media (max-width: 880px) and (min-width: 769px) {
    header {
        padding: 12px 14px 0;
    }

    .nav {
        flex-wrap: nowrap;
        gap: 16px;
    }

    .brand {
        flex: 0 0 auto;
    }

    .logo img {
        height: 46px;
    }

    nav {
        flex: 1;
    }

    nav ul {
        gap: 22px;
        font-size: 0.9rem;
    }

    nav a {
        padding: 4px 0;
    }
}

/* Mobile and small tablets (up to 768px) */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-alert__content {
        padding: 10px 18px;
        font-size: 0.9rem;
        flex: 0 0 auto;
    }

    nav ul {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: var(--bg);
        gap: 25px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 150;
    }

    nav ul.show {
        opacity: 1;
        pointer-events: auto;
    }

    nav ul li {
        font-size: 1.3rem;
        display: block;
    }

    /* Ensure dropdown item is visible on mobile */
    nav ul li.dropdown {
        display: block;
        width: auto;
    }

    /* Mobile dropdown behavior */
    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: var(--accent1);
        margin-top: 8px;
        border-radius: 5px;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
    }

    /* Disable desktop hover on mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }

    /* Show dropdown when open class is added */
    .dropdown.open .dropdown-content {
        display: block;
        max-height: 500px;
        opacity: 1;
    }

    .logo img {
        height: 50px;
    }

    .nav-alert__track {
        animation: nav-alert-marquee 25s linear infinite;
        gap: 1.5rem;
    }
}

/* Extra small screens (up to 480px) */
@media (max-width: 480px) {
    header {
        padding: 12px 15px;
    }

    nav ul li {
        font-size: 1.1rem;
    }

    .logo img {
        height: 45px;
    }

    .dropdown-content a {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: var(--bg);
        gap: 25px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 150;
    }

    nav ul.show {
        opacity: 1;
        pointer-events: auto;
    }

    nav ul li {
        font-size: 1.3rem;
        display: block !important;
    }

    /* Ensure dropdown item is visible on mobile */
    nav ul li.dropdown {
        display: block !important;
        width: auto;
    }

    /* Mobile dropdown behavior */
    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
    }

    .dropdown-content {
        position: static !important;
        box-shadow: none;
        background: var(--accent1);
        margin-top: 8px;
        border-radius: 5px;
        display: none !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
    }

    /* Disable desktop hover on mobile */
    .dropdown:hover .dropdown-content {
        display: none !important;
    }

    /* Show dropdown when open class is added - HIGH SPECIFICITY */
    nav ul li.dropdown.open .dropdown-content {
        display: block !important;
        max-height: 500px !important;
        opacity: 1 !important;
    }

    .logo img {
        height: 50px;
    }
}

/******** DROPDOWN ********/
.dropdown {
    position: relative;

}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    /* Changed from calc(100% + 10px) - eliminates gap */
    left: 0;
    background: var(--accent1);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 50;
    overflow: hidden;
    transition: opacity 0.3s ease;
    margin-top: 0;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
    background: #f2f2f2;
    color: var(--accent1);
}

.dropdown:hover .dropdown-content {
    display: block;
}