body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #f4f7f6;
    padding-top: 65px; /* Default padding for fixed header on desktop */
}

body.nav-open {
    overflow: hidden;
}

.site-header {
    background-color: #0A192F;
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed; /* Make header sticky */
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

.site-header .logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

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

.main-nav .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav .nav-list li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

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

.main-nav .nav-list li a:hover,
.main-nav .nav-list li a.active {
    color: #FFD700;
}

.auth-buttons {
    display: flex; /* Display buttons side-by-side */
    gap: 10px;
    margin-left: 20px; /* Space from main navigation */
}

.auth-buttons .btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping inside buttons */
}

.auth-buttons .btn-register {
    background-color: #FFD700;
    color: #0A192F;
    border: 1px solid #FFD700;
}

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

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

.auth-buttons .btn-login:hover {
    background-color: #FFD700;
    color: #0A192F;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFD700;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu .bar:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    background-color: #0A192F;
    color: #e0e0e0;
    padding: 40px 20px 20px;
    font-size: 14px;
}

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

.site-footer h3 {
    color: #FFD700;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 8px;
}

.site-footer p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.site-footer ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer ul li a:hover {
    color: #FFD700;
}

.site-footer .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
}

@media (max-width: 992px) {
    .main-nav .nav-list {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 121px; /* Adjusted padding for fixed header with buttons on mobile */
    }

    .site-header .header-content {
        flex-wrap: wrap; /* Allow items to wrap to next line */
        /* justify-content: space-between; align-items: center; remain */
        padding: 0 15px; /* Existing padding */
    }

    .site-header .logo {
        order: 2; /* Position logo in the middle of the first row */
        flex-grow: 1; /* Allow logo to take available space */
        text-align: center; /* Center the logo text */
        margin: 0; /* Reset any default margins */
    }

    .hamburger-menu {
        display: block; /* Ensure hamburger is visible */
        order: 1; /* Position hamburger on the left of the first row */
    }

    .auth-buttons {
        order: 3; /* Position buttons below the logo/hamburger row */
        flex-basis: 100%; /* Take full width */
        justify-content: center; /* Center buttons horizontally */
        margin-top: 15px; /* Space from the row above */
        margin-left: 0; /* Reset margin for mobile */
        padding-bottom: 10px; /* Add some padding below buttons */
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Separator line */
    }

    .main-nav {
        order: 4; /* Position nav below auth buttons */
        position: fixed; /* Change to fixed for sticky header */
        top: 121px; /* Calculated header height on mobile (logo row + buttons row) */
        left: 0;
        width: 100%;
        background-color: #0A192F;
        flex-direction: column;
        height: 0;
        max-height: calc(100vh - 121px); /* Fill remaining viewport height */
        overflow-y: auto;
        transition: height 0.3s ease-in-out;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    .main-nav.active {
        height: auto;
        /* max-height: 300px; is replaced by calc(100vh - headerHeight) */
    }

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

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

    .main-nav .nav-list li a {
        padding: 10px 0;
        display: block;
        font-size: 18px;
    }
    
    .main-nav .nav-list li a::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

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

@media (max-width: 480px) {
    body {
        padding-top: 107px; /* Adjusted padding for smaller mobile screens */
    }
    .site-header .logo {
        font-size: 24px;
    }
    .site-header {
        padding: 10px 15px;
    }
    .main-nav {
        top: 107px; /* Adjusted header height for smaller mobile screens */
        max-height: calc(100vh - 107px);
    }
    .site-footer {
        padding: 30px 15px 15px;
    }
}