:root {
    --primary-color: #0A192F;
    --secondary-color: #FFD700;
    --text-color: #E0E0E0;
    --accent-text-color: #0A192F;
    --header-height-desktop: 80px;
    --mobile-top-bar-height: 60px;
    --mobile-button-bar-height: 60px;
    --mobile-total-header-height: calc(var(--mobile-top-bar-height) + var(--mobile-button-bar-height));
}

/* General Body Styles for padding */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #1A2A47; /* A slightly lighter dark background for content */
    padding-top: var(--header-height-desktop); /* Default desktop padding */
}

/* Site Header - Fixed, always visible */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-height: var(--header-height-desktop);
    display: flex; /* For stacking header-top-bar and mobile-button-bar on mobile */
    flex-direction: column; /* Default stack, will change for desktop top bar */
}

/* Header Top Bar - Contains logo, nav, desktop buttons */
.header-top-bar {
    display: flex; /* Desktop default: horizontal layout */
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: var(--header-height-desktop);
    width: 100%;
    box-sizing: border-box;
}

.site-header .logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    white-space: nowrap;
    order: 1; /* Desktop: Logo on left */
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.site-header .hamburger-menu {
    display: none; /* Hidden on desktop */
}

.site-header .main-nav {
    flex: 1; /* Occupy middle space */
    display: flex; /* Desktop default: visible */
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    order: 2; /* Desktop: Menu in middle */
}

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

.site-header .main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    padding: 10px 0;
    transition: color 0.3s ease, transform 0.2s ease;
}

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

.site-header .desktop-nav-buttons {
    display: flex; /* Desktop default: visible */
    gap: 15px;
    margin-left: auto;
    order: 3; /* Desktop: Buttons on right */
}

.site-header .btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.site-header .btn-register,
.site-header .btn-download {
    background: linear-gradient(45deg, var(--secondary-color), #FFC107);
    color: var(--accent-text-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.site-header .btn-register:hover,
.site-header .btn-download:hover {
    background: linear-gradient(45deg, #FFC107, var(--secondary-color));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.site-header .btn-login {
    background: linear-gradient(45deg, #3f51b5, #5c6bc0); /* A different, strong color for login */
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.4);
}

.site-header .btn-login:hover {
    background: linear-gradient(45deg, #5c6bc0, #3f51b5);
    box-shadow: 0 6px 20px rgba(63, 81, 181, 0.6);
    transform: translateY(-2px);
}

.mobile-button-bar {
    display: none; /* Hidden on desktop */
}

.mobile-menu-overlay {
    display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px; /* Provide some space from main content */
}

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

.site-footer .footer-section {
    flex: 1;
    min-width: 200px;
    padding: 10px;
}

.site-footer .footer-section h3 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    display: inline-block;
}

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

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

.site-footer .footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.site-footer .footer-section p a {
    color: var(--secondary-color); /* Link color for contact info */
    text-decoration: underline;
}

.site-footer .footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #A0A0A0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding-top: var(--mobile-total-header-height); /* Override desktop padding */
    }

    .site-header {
        flex-direction: column; /* Stack top bar and buttons vertically */
        min-height: var(--mobile-total-header-height);
    }

    .header-top-bar {
        height: var(--mobile-top-bar-height);
        padding: 0 15px;
        justify-content: space-between;
    }
    
    .site-header .hamburger-menu {
        display: flex; /* Show hamburger */
        background: none;
        border: none;
        color: var(--secondary-color);
        font-size: 30px;
        cursor: pointer;
        z-index: 1002;
        position: relative;
        width: 30px;
        height: 30px;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        order: 1; /* Mobile: Hamburger on left */
    }
    .site-header .hamburger-menu span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--secondary-color);
        transition: all 0.3s ease;
    }
    .site-header .hamburger-menu.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    .site-header .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .site-header .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .site-header .logo {
        flex-grow: 1;
        text-align: center;
        font-size: 20px;
        padding: 0;
        order: 2; /* Mobile: Logo centered */
    }
    
    .header-top-bar::after { /* Spacer to balance hamburger and center logo */
        content: '';
        width: 30px; /* Same width as hamburger */
        height: 30px;
        order: 3; /* Mobile: Spacer on right */
    }

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

    .mobile-button-bar {
        display: flex; /* Show mobile buttons */
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 998; /* Below main nav overlay */
        height: var(--mobile-button-bar-height);
        box-sizing: border-box;
    }

    .site-header .main-nav { /* Mobile menu, hidden by default */
        display: none; /* CRITICAL: Default hidden */
        position: fixed;
        top: var(--mobile-total-header-height); /* Below fixed header + buttons */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px; /* Limit mobile menu width */
        height: calc(100vh - var(--mobile-total-header-height)); /* Full height below header */
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px;
        transform: translateX(-100%); /* Off-screen to the left */
        transition: transform 0.3s ease-out;
        z-index: 1001; /* Above overlay */
        overflow-y: auto;
        box-sizing: border-box;
    }

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

    .site-header .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .site-header .main-nav li:last-child {
        border-bottom: none;
    }

    .site-header .main-nav a {
        display: block;
        padding: 15px 0;
        width: 100%;
        font-size: 18px;
        color: var(--text-color);
    }

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

    .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.5);
        z-index: 999;
    }
    .mobile-menu-overlay.active {
        display: block;
    }

    body.no-scroll {
        overflow: hidden;
    }

    /* Footer adjustments for mobile */
    .site-footer .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    .site-footer .footer-section {
        min-width: unset;
        width: 100%;
    }
    .site-footer .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
    }
}