/* Basic reset/base styles for header/footer context */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Header Styles */
.site-header {
    background-color: #1A202C; /* Primary color */
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-header .logo {
    font-size: 2.2em;
    font-weight: bold;
    color: #E0B400; /* Secondary color */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.site-header .logo:hover {
    color: #fff;
}

.main-nav .nav-list {
    display: flex;
    gap: 25px;
}

.main-nav .nav-list a {
    color: #fff;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav .nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #E0B400; /* Secondary color */
    transition: width 0.3s ease;
}

.main-nav .nav-list a:hover::after,
.main-nav .nav-list a.active::after {
    width: 100%;
}

.main-nav .nav-list a:hover,
.main-nav .nav-list a.active {
    color: #E0B400; /* Secondary color */
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.auth-buttons .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-buttons .btn-login {
    background-color: transparent;
    border: 2px solid #E0B400; /* Secondary color */
    color: #E0B400; /* Secondary color */
}

.auth-buttons .btn-login:hover {
    background-color: #E0B400; /* Secondary color */
    color: #1A202C; /* Primary color */
}

.auth-buttons .btn-register {
    background-color: #E0B400; /* Secondary color */
    border: 2px solid #E0B400; /* Secondary color */
    color: #1A202C; /* Primary color */
}

.auth-buttons .btn-register:hover {
    background-color: transparent;
    color: #E0B400; /* Secondary color */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #E0B400; /* Secondary color */
    transition: all 0.3s ease;
}

/* Footer Styles */
.site-footer {
    background-color: #1A202C; /* Primary color */
    color: #fff;
    padding: 40px 0 20px;
    font-size: 0.95em;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-col h3 {
    color: #E0B400; /* Secondary color */
    font-size: 1.3em;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(224, 180, 0, 0.3);
    padding-bottom: 10px;
}

.footer-col p, .footer-col ul li {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-col a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #E0B400; /* Secondary color */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #E0B400; /* Secondary color */
    color: #1A202C; /* Primary color */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}


/* Responsive Styles */
@media (max-width: 992px) {
    .main-nav .nav-list {
        gap: 15px;
    }
    .auth-buttons {
        gap: 10px;
    }
    .auth-buttons .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }

    .site-header .logo {
        flex-grow: 0;
        /* width: 100%; */ /* REMOVED: No longer takes full width */
        /* text-align: center; */ /* REMOVED: No longer centered on its own line */
        /* margin-bottom: 15px; */ /* REMOVED: No longer needs bottom margin here */
        order: 1; /* Keep logo as the first item */
        font-size: 2em;
    }

    .hamburger-menu {
        display: flex;
        /* position: absolute; */ /* REMOVED: No longer absolutely positioned */
        /* right: 20px; */ /* REMOVED */
        /* top: 50%; */ /* REMOVED */
        /* transform: translateY(-50%); */ /* REMOVED */
        /* z-index: 1001; */ /* REMOVED: z-index not effective on static position */
        order: 2; /* Place hamburger menu after the logo */
    }

    .main-nav {
        display: none; /* Hide main nav by default */
        flex-direction: column;
        width: 100%;
        background-color: #2a3342; /* Slightly lighter than primary */
        position: absolute;
        top: 100%; /* Position below the entire header-container content (logo + auth buttons) */
        left: 0;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        z-index: 990;
        order: 4; /* Logical order, though absolute positioning overrides this */
    }

    .main-nav.nav-open {
        display: flex; /* Show when open */
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .main-nav .nav-list a {
        padding: 10px 0;
        width: fit-content;
    }

    .auth-buttons {
        display: flex; /* Always visible on mobile */
        flex-direction: row; /* Buttons side-by-side */
        justify-content: center; /* Center the buttons horizontally */
        width: 100%; /* Take full width within container padding */
        gap: 15px;
        padding: 10px 0;
        background-color: transparent;
        border-top: none;
        position: static;
        margin-bottom: 15px;
        order: 3; /* Place auth buttons after logo (order 1) and hamburger (order 2) */
    }
    /* The .auth-buttons.nav-open rule is no longer needed as auth-buttons are always visible */

    /* Hamburger menu animation */
    .hamburger-menu.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

    .footer-col h3 {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .site-header .logo {
        font-size: 1.8em;
    }
    .auth-buttons .btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}