:root {
    --primary-color: #1A1A2E;
    --accent-color: #E94560;
    --text-light: #F0F0F0;
    --text-dark: #333333;
    --header-top-min-height: 60px;
    --main-nav-min-height: 50px;
    --mobile-nav-buttons-min-height: 50px;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f4f4f4;
    padding-top: calc(var(--header-top-min-height) + var(--main-nav-min-height)); /* Desktop default padding */
}

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

/* Site Header - Fixed & Floating */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header-top {
    background-color: var(--primary-color); /* Dark background for top section */
    min-height: var(--header-top-min-height);
    display: flex;
    align-items: center;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px; /* Padding for logo and buttons */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block; /* Ensure logo is always visible */
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Remove underline for buttons */
    color: var(--text-light);
    background-color: var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.btn-register {
    background: linear-gradient(45deg, var(--accent-color), #FF7F50);
}

.btn-login {
    background-color: #3CB371; /* A contrasting green */
}

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
}

/* Main Navigation - Desktop */
.main-nav {
    background-color: var(--accent-color); /* Contrasting background for main nav */
    min-height: var(--main-nav-min-height);
    display: flex; /* Desktop default: flex */
    flex-direction: row; /* Desktop default: row */
    align-items: center;
    justify-content: center;
    width: 100%;
    position: static; /* Desktop default: static */
    transition: background-color 0.3s ease;
}

.main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
}

.main-nav .nav-link {
    color: var(--text-light);
    padding: 8px 15px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.main-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 0 20px;
    font-size: 14px;
}

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

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

.site-footer .footer-col h3 {
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.site-footer .footer-col p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .footer-nav {
    list-style: none;
}

.site-footer .footer-nav li a {
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

.site-footer .footer-nav li a:hover {
    color: var(--accent-color);
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-top-min-height) + var(--mobile-nav-buttons-min-height)); /* Mobile override padding */
    }
    body.no-scroll {
        overflow: hidden;
    }

    .header-container {
        padding: 0 15px;
        justify-content: space-between; /* Hamburger left, Logo center, empty right */
    }

    .logo {
        flex-grow: 1;
        text-align: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .desktop-nav-buttons {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001; /* Above logo */
        position: relative;
        left: 0;
        margin-left: 0; /* Ensure it's at the very left */
    }

    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--text-light);
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

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

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

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

    .mobile-nav-buttons {
        display: flex; /* Displayed on mobile */
        background-color: var(--primary-color); /* Same as header-top */
        min-height: var(--mobile-nav-buttons-min-height);
        width: 100%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 999; /* Below hamburger, above main content */
        position: relative; /* Fixed header handles positioning */
    }

    .mobile-nav-buttons .nav-container {
        width: 100%;
        max-width: none; /* No max-width on mobile */
        padding: 0 15px;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        margin: 5px; /* Adjust margin for mobile buttons */
        padding: 8px 10px;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed; /* Mobile: fixed position */
        top: 0; /* Reset top to 0 as it's full screen */
        left: 0;
        width: 70%; /* Slide in from left */
        height: 100vh; /* Full viewport height */
        flex-direction: column; /* Mobile: column layout */
        align-items: flex-start;
        justify-content: flex-start;
        background-color: var(--primary-color); /* Dark background for mobile menu */
        transform: translateX(-100%); /* Hidden off-screen */
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        padding-top: calc(var(--header-top-min-height) + var(--mobile-nav-buttons-min-height) + 20px); /* Padding to clear header and buttons */
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* CRITICAL: Display flex when active */
        transform: translateX(0); /* Slide into view */
    }

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: none; /* No max-width on mobile */
        padding: 0 20px;
    }

    .main-nav .nav-link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 18px;
        color: var(--text-light);
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998; /* Below menu, above content */
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

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

    .site-footer .footer-col {
        text-align: center;
        padding-right: 0;
        min-width: unset;
        width: 100%;
    }
}
