/* ===== NAVIGATION STYLES ===== */

/* Navigation-specific CSS Variables */
:root {
    --nav-mobile-overlay: rgba(169, 135, 67, 0.98);
    --nav-shadow: 0 5px 15px rgba(0,0,0,0.3);
    --nav-border-radius: 5px;
    --nav-z: 1000;
    --nav-dropdown-z: calc(var(--nav-z) + 1);
    --nav-hamburger-z: calc(var(--nav-z) + 2);
    --nav-transition: all 0.3s ease;
    --nav-transition-fast: 0.2s ease;
}

.header-title {
    margin: 0;
    padding: 0;
}

/* ===== MAIN NAVIGATION ===== */
.nav-container {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: var(--nav-z);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 95%;
    margin: 0 auto;
    position: relative;
}

/* ===== LOGO ===== */
.logo {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--nav-transition);
}

.logo:hover {
    color: var(--accent-color);
}

.logo img {
    width: 50px;
    height: auto;
    vertical-align: middle;
    transition: var(--nav-transition);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

.logo:hover img {
    transform: scale(1.08);
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5));
}

/* ===== NAVIGATION LINKS ===== */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--nav-transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

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

.dropdown .dropdown-toggle {
    cursor: pointer;
}

.dropdown .dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7em;
    display: inline-block;
    transition: transform var(--nav-transition-fast);
}

.dropdown.open .dropdown-toggle::after,
.dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--secondary-color);
    list-style: none;
    padding: 10px 0;
    margin-top: 0;
    min-width: 150px;
    box-shadow: var(--nav-shadow);
    border-radius: var(--nav-border-radius);
    z-index: var(--nav-dropdown-z);
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 8px 15px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--primary-color);
    color: white !important;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: var(--nav-hamburger-z);
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    left: 0;
    transition: var(--nav-transition);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* ===== BODY STATE MANAGEMENT ===== */
body.menu-open {
    overflow: hidden;
}

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 1023px) {
    .nav-links.active {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--nav-mobile-overlay);
        padding: 80px 20px 20px;
        flex-direction: column;
        gap: 1em;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInDown 0.3s ease forwards;
    }

    .nav-links li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links li:nth-child(5) { animation-delay: 0.5s; }
    .nav-links li:nth-child(6) { animation-delay: 0.6s; }
    .nav-links li:nth-child(7) { animation-delay: 0.7s; }
    .nav-links li:nth-child(8) { animation-delay: 0.8s; }
    .nav-links li:nth-child(9) { animation-delay: 0.9s; }

    .nav-links a {
        display: block;
        padding: 5px 0;
        font-size: 1.2rem;
        text-align: left;
    }

    .nav-links a:hover {
        color: #4299E1;
    }

    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 10px 0;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.2);
        width: 100%;
        text-align: center;
        display: none;
    }

    .dropdown.open .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .dropdown-toggle::after {
        float: right;
        margin-right: 20px;
    }

    .hamburger {
        display: block;
    }

    .logo img {
        width: 35px;
    }
}