/* Basic Reset & Typography */
* {
    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: #CC0000;
    --secondary-color: #FFCC00;
    --text-light: #f4f4f4;
    --text-dark: #333;
    --header-height: 70px;
}

/* Site Header */
.site-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start; /* Changed for desktop layout */
    align-items: center;
    padding: 0 20px;
    height: var(--header-height);
}

.site-header .logo {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    margin-right: 20px; /* Added space to the right of logo on desktop */
}

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

.site-header .main-nav {
    margin-left: auto; /* Pushes nav and subsequent items to the right on desktop */
}

.site-header .main-nav ul {
    display: flex;
    gap: 25px;
}

.site-header .main-nav a {
    color: var(--text-light);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.site-header .main-nav a:hover,
.site-header .main-nav a.active {
    color: var(--secondary-color);
}

.site-header .main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

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

/* New Register/Login Button Styles */
.site-header .btn-register-login {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    margin-left: 20px; /* Space between nav and button on desktop */
    display: block; /* Ensure it's treated as a block/inline-block for layout */
}

.site-header .btn-register-login:hover {
    background-color: #FFF;
    color: var(--primary-color);
}

.site-header .hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.site-header .hamburger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    margin: 6px 0;
    transition: all 0.3s ease;
}

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

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

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

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

.site-footer .footer-col h3 {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

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

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

.site-footer ul.footer-nav a:hover {
    color: var(--secondary-color);
}

.site-footer .contact-info p {
    margin-bottom: 8px;
}

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

.site-footer .contact-info a:hover {
    color: var(--secondary-color);
}

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

.site-footer .copyright {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header .header-container {
        /* Modified to use CSS Grid for mobile layout */
        display: grid;
        grid-template-columns: auto 1fr auto; /* Col1: Hamburger, Col2: Logo, Col3: Spacer */
        grid-template-rows: auto auto; /* Row1: Top bar, Row2: Button row */
        align-items: center;
        padding: 10px 20px;
        height: auto;
        min-height: var(--header-height);
        gap: 0; /* Remove gap between grid items */
        justify-content: unset; /* Reset desktop flex property */
    }

    /* Hamburger menu: far left */
    .site-header .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        grid-column: 1;
        grid-row: 1;
        margin-right: 10px; /* Small space from logo */
    }

    /* Logo: centered */
    .site-header .logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center; /* Center horizontally within its grid cell */
        font-size: 1.8em; /* Adjust font size for mobile */
        margin: 0; /* Remove desktop margin */
    }

    /* Navigation: hidden by default, drops down from header */
    .site-header .main-nav {
        display: none; /* Hide nav by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Drop down from the bottom of the site-header */
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
        padding-bottom: 10px;
        margin-left: 0; /* Reset desktop margin */
        z-index: 999; /* Below hamburger, above content */
    }

    .site-header .main-nav.active {
        display: flex; /* Show nav when active */
    }

    .site-header .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        gap: 0;
    }

    .site-header .main-nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-header .main-nav ul li:last-child {
        border-bottom: none;
    }

    .site-header .main-nav a {
        display: block;
        padding: 15px 20px;
        width: 100%;
    }

    .site-header .main-nav a::after {
        display: none; /* Remove underline animation on mobile */
    }

    /* Register/Login Button: below logo in independent area */
    .site-header .btn-register-login {
        display: block; /* Show the button */
        grid-column: 1 / -1; /* Span all columns */
        grid-row: 2; /* Second row */
        justify-self: center; /* Center horizontally within its grid cell */
        margin: 10px auto 0 auto; /* Top margin and center horizontally */
        width: fit-content; /* Adjust width to content */
        padding: 12px 20px; /* Adjust padding for better look */
    }

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

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

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

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

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

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