/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    padding-top: 70px; /* Default padding for desktop fixed header (adjust if header height changes) */
}

/* Header Styles */
.site-header {
    background-color: #1A2E47;
    padding: 15px 20px;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: fixed; /* Make header sticky */
    top: 0;
    left: 0;
    width: 100%;
    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;
    flex-wrap: wrap;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #FFD700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    display: block;
}

.main-nav {
    flex-grow: 1;
    text-align: center;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-list li {
    margin: 0 15px;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.btn-login {
    background-color: transparent;
    border: 2px solid #FFD700;
    color: #FFD700;
}

.btn-login:hover {
    background-color: #FFD700;
    color: #1A2E47;
}

.btn-register {
    background-color: #FFD700;
    color: #1A2E47;
    border: 2px solid #FFD700;
}

.btn-register:hover {
    background-color: #e6c200;
    border-color: #e6c200;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFD700;
    margin: 3px 0;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-logo {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.footer-column h3 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.footer-column p,
.footer-column ul {
    margin: 0 0 10px 0;
    padding: 0;
    list-style: none;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #FFD700;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.company-info p {
    line-height: 1.6;
}

/* Desktop: Hide hamburger menu and arrange layout */
@media (min-width: 769px) {
    .header-container {
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .logo {
        order: 1;
        flex-grow: 0;
        flex-shrink: 0;
        margin-right: 30px;
    }
    
    .main-nav {
        order: 2;
        flex-grow: 1;
        display: block;
        text-align: center;
    }
    
    .nav-list {
        display: flex;
        justify-content: center;
    }
    
    .auth-buttons {
        order: 3;
        flex-grow: 0;
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .hamburger-menu {
        display: none !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-top: 130px; /* Adjusted padding for mobile fixed header (approx. header top row + auth buttons height) */
    }

    .header-container {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        position: relative;
    }

    .logo {
        font-size: 2em;
        order: 2;
        flex-grow: 1;
        text-align: center;
        margin: 0;
    }

    .main-nav {
        order: 1;
        position: static;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: auto;
        flex-grow: 0;
    }

    .hamburger-menu {
        display: flex !important;
        order: 1;
        position: static;
        margin: 0;
        padding: 5px;
    }

    .nav-list {
        order: 2;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #1A2E47;
        padding: 10px 0;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        align-items: center;
        width: 100%;
        display: none; /* Hide by default */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
        z-index: 999;
        max-height: 0;
        overflow: hidden;
    }

    .main-nav.active .nav-list {
        display: flex; /* Show when active */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 1000px;
    }

    /* Ensure hamburger menu is visible on mobile */
    .hamburger-menu {
        display: flex !important;
    }

    .nav-list li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-list a {
        padding: 10px 20px;
        border-bottom: none;
    }

    .nav-list a:hover,
    .nav-list a.active {
        border-bottom: none;
        background-color: rgba(255, 215, 0, 0.1);
    }

    .auth-buttons {
        order: 3; /* Auth buttons after logo, on a new line */
        width: 100%; /* Force buttons to take full width and wrap */
        justify-content: center; /* Center buttons within their container */
        margin-top: 10px; /* Space from the logo/top row */
        margin-left: 0; /* Remove auto margin */
        display: flex !important; /* Ensure buttons are always visible on mobile */
        gap: 5px; /* Existing */
    }

    .hamburger-menu {
        display: block;
        order: 1; /* Hamburger menu on the far left */
        position: static;
        /* Removed margin-right: 15px; as flex-grow on logo handles spacing */
    }

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

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

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

    /* Removed the rule hiding auth-buttons on mobile, as they should now always be visible */
    /* .site-header .auth-buttons { display: none; } */

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}