/* Basic Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Variables */
:root {
    --primary-color: #0A2342;
    --accent-color: #FFD700;
    --text-light: #f4f4f4;
    --text-dark: #333;
}

/* Header Styles */
.site-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky; /* "Floating menu" interpretation: sticky header */
    top: 0;
    z-index: 1000; /* Ensure header stays on top */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 20px; /* Added gap for spacing between elements */
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

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

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

.main-nav .nav-list a {
    color: var(--text-light);
    font-weight: bold;
    padding: 0.5rem 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: var(--accent-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: var(--accent-color);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-actions .btn-register,
.header-actions .btn-login {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap; /* Prevent buttons from wrapping text */
}

.header-actions .btn-register {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.header-actions .btn-register:hover {
    background-color: #FFEA8D; /* Lighter accent color on hover */
}

.header-actions .btn-login {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--accent-color);
}

.header-actions .btn-login:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: 0.4s;
}

/* Hamburger menu animation */
.hamburger-menu.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 2rem;
}

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

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-light);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        flex-wrap: wrap; /* Allow items to wrap to next line */
        justify-content: flex-start; /* Align hamburger to the left */
        gap: 0; /* Reset gap for mobile, specific spacing will be applied to elements */
    }

    .hamburger-menu {
        display: block;
        order: 1; /* Hamburger on the far left */
        margin-right: auto; /* Push logo to center by taking up space */
    }

    .logo {
        order: 2; /* Logo in the middle */
        flex-grow: 1; /* Allow logo to take up available space */
        text-align: center; /* Center the logo text */
        margin: 0; /* Reset margins */
    }

    .header-actions {
        order: 3; /* Buttons come after logo */
        width: 100%; /* Take full width */
        display: flex; /* Arrange buttons horizontally */
        justify-content: center; /* Center buttons */
        gap: 15px; /* Spacing between buttons */
        margin-top: 1rem; /* Space below logo */
        padding-bottom: 1rem; /* Space above navigation when it appears */
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        z-index: 999; /* Ensure nav is below sticky header */
        order: 4; /* Main nav comes last */
    }

    .main-nav.active {
        max-height: 500px;
        /* When active, the main-nav should expand to full width below the header-container */
        /* To ensure it's below the entire header-container (including buttons), */
        /* its 'top' should be relative to the site-header or it should be part of the flow. */
        /* Given current 'position: absolute; top: 100%;', it will appear below the header-container's current height. */
        /* This is correct for a 'below logo' mobile menu */
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .main-nav .nav-list li {
        width: 100%;
        text-align: center;
    }

    .main-nav .nav-list a {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav .nav-list li:last-child a {
        border-bottom: none;
    }

    /* Ensure desktop navigation is hidden on mobile */
    .main-nav {
        display: none; /* Hide by default, show with JS toggle */
    }
    .main-nav.active {
        display: block; /* Show when active */
    }

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

    .footer-col {
        min-width: unset;
        width: 100%;
    }
    
    .footer-nav ul {
        align-items: center;
    }
}