/* Global Reset & Base */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f4f4f4; /* Light background for main content */
}

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

/* Variables */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --header-top-bg: #6B0000; /* Darker Red for header top */
    --main-nav-bg: #FFD700; /* Gold for main navigation */
    --text-light: #FFFFFF;
    --text-dark: #333333;
    --btn-primary-bg: #FFD700;
    --btn-primary-text: #333333;
    --btn-secondary-bg: #8B0000;
    --btn-secondary-text: #FFFFFF;
    --fixed-header-height-mobile-top: 60px; /* height of header-top on mobile */
    --fixed-header-height-mobile-buttons: 50px; /* height of mobile-buttons-area on mobile */
}

/* Site Header (Desktop First) */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-height: auto; /* Adapts to content height */
    display: flex;
    flex-direction: column; /* Stacks header-top and main-nav */
    background-color: transparent; /* Base for fixed header, actual color comes from sub-elements */
}

/* Header Top Area */
.header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    color: var(--text-light);
    min-height: 40px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* Desktop padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px; /* Min height for header-top content */
}

.logo {
    font-family: 'Impact', sans-serif; /* Example bold font */
    font-size: 2.2em;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap;
}

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

/* Main Navigation Area */
.main-nav {
    background-color: var(--main-nav-bg);
    padding: 10px 0;
    color: var(--text-dark);
    display: flex; /* Desktop: visible, flex row */
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Desktop padding */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px; /* Spacing between nav links */
    flex-wrap: wrap; /* Allow wrapping on smaller desktop screens */
}

.nav-link {
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none; /* Remove underline */
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover {
    background-color: #E6C200; /* Slightly darker gold */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-secondary:hover {
    background-color: #7A0000; /* Slightly darker red */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001; /* Above mobile buttons */
}

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

/* Mobile specific elements (hidden on desktop) */
.mobile-buttons-area,
.mobile-top-spacer,
.mobile-menu-overlay {
    display: none;
}

/* Footer */
.site-footer {
    background-color: #222222;
    color: #CCCCCC;
    padding: 40px 20px 20px;
    font-size: 0.9em;
    border-top: 5px solid var(--primary-color);
}

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

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-column h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
    white-space: nowrap;
}

.footer-column p, .footer-column a {
    color: #CCCCCC;
    margin-bottom: 8px;
    display: block;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-nav a {
    padding: 5px 0;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        /* padding-top will be calculated by JS to account for fixed header + mobile buttons */
        padding-top: 0; /* Reset for JS calculation */
    }

    .site-header {
        min-height: auto; /* Auto height for mobile */
    }

    /* Header Top */
    .header-top {
        padding: 0; /* No vertical padding, let inner content define height */
        height: var(--fixed-header-height-mobile-top);
        display: flex;
        align-items: center;
    }

    .header-container {
        width: 100%;
        max-width: none; /* CRITICAL: No max-width on mobile */
        padding: 0 15px; /* Mobile padding */
        justify-content: space-between;
        min-height: var(--fixed-header-height-mobile-top);
    }

    .hamburger-menu {
        display: flex; /* Visible on mobile */
        order: 1; /* Leftmost */
    }

    .logo {
        order: 2; /* Middle */
        flex: 1; /* Takes remaining space to help center */
        text-align: center;
        font-size: 1.8em; /* Smaller logo on mobile */
        color: var(--primary-color); /* Ensure visibility */
        padding: 0;
    }

    .desktop-nav-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    .mobile-top-spacer {
        display: block; /* Visible on mobile */
        order: 3; /* Rightmost */
        width: 40px; /* Equal width to hamburger menu to center logo */
        height: 1px; /* Minimal height */
        visibility: hidden; /* Invisible but takes space */
    }

    /* Mobile Buttons Area (Below header-top, fixed) */
    .mobile-buttons-area {
        display: flex; /* Visible on mobile, as flex container */
        background-color: #333333; /* Dark background for buttons */
        width: 100%;
        position: fixed;
        top: var(--fixed-header-height-mobile-top); /* Position below header-top */
        z-index: 999; /* Below main nav overlay, above main content */
        padding: 10px 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        height: var(--fixed-header-height-mobile-buttons);
        align-items: center;
        justify-content: center; /* Center buttons horizontally */
    }
    .mobile-buttons-area .header-container { /* Reusing header-container for styling */
        justify-content: center;
        gap: 10px;
        padding: 0 15px;
        flex-wrap: wrap;
        min-height: auto;
    }
    .btn-mobile {
        padding: 8px 15px;
        font-size: 0.9em;
        border-radius: 20px;
    }
    .btn-mobile.btn-tertiary {
        background-color: transparent;
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
        box-shadow: none;
    }
    .btn-mobile.btn-tertiary:hover {
        background-color: var(--primary-color);
        color: var(--text-dark);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* Main Navigation (Mobile Off-canvas) */
    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0; /* Start from top of screen */
        left: 0;
        width: 280px; /* Width of the off-canvas menu */
        height: 100%;
        background-color: #2a2a2a; /* Dark background for mobile menu */
        color: var(--text-light);
        flex-direction: column; /* Vertical alignment */
        transform: translateX(-100%); /* Start off-screen to the left */
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        z-index: 1000; /* Below hamburger, above overlay */
        padding-top: calc(var(--fixed-header-height-mobile-top) + var(--fixed-header-height-mobile-buttons) + 20px); /* Push content down past fixed header/buttons */
        overflow-y: auto; /* Allow scrolling if many links */
    }

    .main-nav.active {
        display: flex; /* CRITICAL: Must be flex/block to be visible */
        transform: translateX(0); /* Slide into view */
    }

    .nav-container {
        width: 100%;
        max-width: none; /* CRITICAL: No max-width on mobile */
        padding: 0 15px;
        flex-direction: column; /* Vertical links */
        align-items: flex-start; /* Align links to the left */
        gap: 0; /* Remove gap */
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-light);
        text-align: left;
    }

    .nav-link:hover, .nav-link.active {
        background-color: rgba(255, 215, 0, 0.2); /* Goldish hover */
        color: var(--primary-color);
    }

    /* Hamburger Menu Active State (X icon) */
    .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 Menu Overlay */
    .mobile-menu-overlay {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark overlay */
        z-index: 990; /* Below main nav */
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .mobile-menu-overlay.active {
        display: block; /* CRITICAL: Must be block to be visible */
        opacity: 1;
    }

    /* Footer Mobile */
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }

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

/* Scroll lock for body when menu is open */
body.no-scroll {
    overflow: hidden;
}
