:root {
    --primary-color: #007bff;
    --secondary-color: #ffc107;
    --dark-bg: #1a1a1a;
    --darker-bg: #2a2a2a;
    --text-color: #ffffff;
    --header-height-desktop: 70px;
    --header-top-bar-height-mobile: 60px;
    --mobile-buttons-height: 60px; /* Includes padding */
    --total-mobile-header-height: calc(var(--header-top-bar-height-mobile) + var(--mobile-buttons-height));
}

/* Global styles & Desktop First */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-height-desktop); /* Space for fixed header on desktop */
    background-color: #f4f4f4;
    color: #333;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--dark-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    min-height: var(--header-height-desktop);
    display: flex;
    flex-direction: column; /* Default for mobile, overridden for desktop */
    justify-content: center;
    align-items: center;
}

.header-main-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    min-height: var(--header-height-desktop);
}

.logo {
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    display: block; /* Ensure logo is always visible */
    order: 1;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row; /* Desktop horizontal */
}

.main-nav li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
}

.main-nav li a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    order: 3;
}

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

.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;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0a800;
}

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

.hamburger-menu::before, .hamburger-menu::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu::before {
    top: 0;
}

.hamburger-menu::after {
    bottom: 0;
}

.hamburger-menu.active::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hamburger-menu span {
    position: absolute;
    top: 9px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: opacity 0.3s ease;
}

.hamburger-menu.active span {
    opacity: 0;
}

.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.7);
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Footer styles */
.site-footer {
    background-color: var(--darker-bg);
    color: #ccc;
    padding: 40px 20px;
    font-size: 14px;
}

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

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

.footer-logo {
    color: var(--text-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-col h3 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-col p a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-col p a:hover {
    text-decoration: underline;
}

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

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Mobile styles */
@media (max-width: 768px) {
    body {
        padding-top: var(--total-mobile-header-height); /* Adjust for mobile fixed header + buttons */
    }

    .site-header {
        flex-direction: column;
        min-height: unset;
    }

    .header-main-desktop {
        min-height: var(--header-top-bar-height-mobile);
        padding: 0 15px;
        background-color: var(--dark-bg);
    }

    .hamburger-menu {
        display: block;
        order: 1;
        margin-right: auto; /* Push logo to center */
    }

    .logo {
        flex-grow: 1;
        text-align: center;
        order: 2;
        font-size: 24px;
    }

    .header-main-desktop .logo {
        margin-left: -30px; /* Offset for hamburger to visually center logo */
    }

    .main-nav,
    .desktop-nav-buttons {
        display: none; /* Hide desktop nav and buttons */
    }

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: var(--darker-bg);
        width: 100%;
        min-height: var(--mobile-buttons-height); /* Set min-height for buttons area */
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset; /* Subtle shadow for separation */
    }

    .main-nav {
        display: none; /* Default hidden state */
        position: fixed;
        top: 0; /* Will be adjusted by JS to be below header if needed, or overlay whole screen */
        left: 0;
        width: 250px;
        height: 100vh; /* Full viewport height */
        background-color: #333;
        flex-direction: column; /* Mobile vertical menu */
        padding-top: 80px; /* Space for logo/close button if added inside nav */
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        z-index: 999;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .main-nav.active {
        display: flex; /* Show menu */
        transform: translateX(0); /* Slide in */
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        text-align: left;
    }

    .main-nav li a {
        padding: 15px 20px;
        width: 100%;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

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

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

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

    .footer-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-nav li {
        margin: 0 10px 10px 10px;
    }
}

/* Ensure no-scroll works */
body.no-scroll {
    overflow: hidden;
}