/* Global Styles & Desktop First */
:root {
    --primary-bg-color: #1A202C;
    --accent-color: #FFD700;
    --text-color: #E2E8F0;
    --light-text-color: #CBD5E0;
    --button-register-color: #FF4500; /* OrangeRed */
    --button-download-color: #1E90FF; /* DodgerBlue */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #0F172A; /* Darker background for main content */
    padding-top: 80px; /* Default padding for fixed header on desktop */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 80px; /* Min-height for header */
    background-color: var(--primary-bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.site-header .logo {
    color: var(--accent-color);
    font-size: 2.2em;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    display: block; /* Ensure logo is always visible */
}

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

.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 25px;
}

.main-nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1.05em;
    padding: 8px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
    white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-bg-color);
    background-color: var(--accent-color);
}

.desktop-nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary, .btn-register {
    background: linear-gradient(45deg, var(--button-register-color), #FF6347);
    color: var(--primary-bg-color);
}

.btn-primary:hover, .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 69, 0, 0.4);
}

.btn-secondary, .btn-download {
    background: linear-gradient(45deg, var(--button-download-color), #4169E1);
    color: var(--text-color);
}

.btn-secondary:hover, .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(30, 144, 255, 0.4);
}

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

/* Footer Styles */
.site-footer {
    background-color: var(--primary-bg-color);
    color: var(--light-text-color);
    padding: 40px 20px 20px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.footer-col p,
.footer-col a {
    color: var(--light-text-color);
    text-decoration: none;
    margin-bottom: 8px;
    display: block;
}

.footer-col a:hover {
    color: var(--accent-color);
}

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

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-top: calc(60px + 60px); /* Adjust padding for header + mobile buttons */
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        min-height: unset;
    }

    .header-top-bar {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        min-height: 60px;
        background-color: var(--primary-bg-color);
    }

    .site-header .logo {
        flex: 1;
        text-align: center;
        padding: 10px 0;
        font-size: 2em;
    }

    .header-top-right-placeholder {
        width: 40px; /* Balance hamburger width */
    }

    .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 mobile-button-area */
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: var(--accent-color);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

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

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

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

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

    .mobile-button-area {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #2D3748; /* Slightly lighter than header */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 999; /* Below hamburger menu */
        min-height: 60px;
    }

    .mobile-button-area .btn {
        flex: 1;
        max-width: 150px;
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .main-nav {
        position: fixed;
        top: calc(60px + 60px); /* Header height + mobile button area height */
        left: 0;
        width: 75%;
        height: calc(100vh - (60px + 60px)); /* Remaining viewport height */
        background-color: var(--primary-bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000; /* Same as header, but menu is 'inside' */
        overflow-y: auto;
        display: none; /* Initially hidden */
    }

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

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

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

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

    .main-nav ul li a {
        display: block;
        padding: 15px 10px;
        font-size: 1.1em;
        color: var(--light-text-color);
        border-radius: 0;
    }

    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        background-color: var(--accent-color);
        color: var(--primary-bg-color);
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 990;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
        display: block; /* Ensure it's displayed */
    }

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

    .footer-col {
        margin-bottom: 20px;
        min-width: unset;
        width: 100%;
    }

    .footer-nav ul {
        padding: 0;
    }

    .footer-nav ul li a {
        display: inline-block;
        margin: 0 10px;
    }

    .footer-nav ul li:first-child a {
        margin-left: 0;
    }

    .footer-nav ul li:last-child a {
        margin-right: 0;
    }

    /* Prevent body scroll when menu is active */
    body.no-scroll {
        overflow: hidden;
    }
}