/* Root Variables */
:root {
    --primary-bg: burlywood;
    --primary-text: #333;
    --hover-bg: #e0c2a2;
    --hover-text: #070b1d;
    --transition-speed: 0.3s;
}

/* Reset body margins to avoid extra space */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Header Styles */
.site-header {
    background-color: var(--primary-bg);
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
    /* No positioning that causes overlap */
}

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

/* Logo Section */
.logo-link img {
    max-height: 40px;
    width: auto;
}

/* Navigation Links (Desktop View) */
.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    /* On desktop, nav is always visible inline */
    /* No extra padding or margins needed here */
}

.nav-link {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color var(--transition-speed) ease;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--hover-text);
    text-decoration: underline;
}

/* User Account Section */
.user-account {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    color: var(--hover-text);
}

#logout-btn {
    background: none;
    border: none;
    color: var(--primary-text);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: color var(--transition-speed) ease;
}

#logout-btn:hover {
    color: var(--hover-bg);
}

/* Hamburger Menu (Hidden by default) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-text);
    transition: color var(--transition-speed) ease;
}

.menu-toggle:hover {
    color: var(--hover-text);
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Show hamburger menu on small screens */
    .menu-toggle {
        display: block;
    }

    /* Hide nav-links by default on mobile to avoid extra space */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        /* Remove padding/border when inactive */
        padding: 0;
        margin: 0;
        border-top: none;
        background-color: var(--primary-bg);
    }

    /* When nav-links are active (menu toggled), show with styling */
    .nav-links.active {
        display: flex;
        justify-content: center;
        padding: 15px;
        border-top: 1px solid #ddd;
    }

    .nav-link {
        text-align: center;
        padding: 10px;
        border-radius: 5px;
        background-color: white;
        color: var(--primary-text);
    }

    .nav-link:hover {
        background-color: var(--hover-bg);
        color: var(--hover-text);
    }

    .user-account {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo-link img {
        max-height: 30px;
    }

    .nav-links {
        gap: 5px;
        /* No extra padding when inactive */
    }

    /* When active, the properties from .nav-links.active will apply */
    /* Avoid duplicating padding or margins here. */

    .nav-link {
        font-size: 14px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    #logout-btn {
        font-size: 14px;
    }
}
