:root {
    --primary-color: #1A237E;
    --secondary-color: #FFD700;
    --text-color-light: #fff;
    --text-color-dark: #333;
    --bg-color-light: #f4f4f4;
    --header-height-desktop: 70px;
    --mobile-top-row-height: 60px;
    --mobile-buttons-height: 60px; /* Adjust based on button content */
    --total-header-height-mobile: calc(var(--mobile-top-row-height) + var(--mobile-buttons-height));
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--bg-color-light);
    padding-top: var(--header-height-desktop); /* Desktop content padding */
}

body.no-scroll {
    overflow: hidden;
}

/* ==================================================================
   Header Styles (Desktop First) 
   ================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column; /* Default to column for layout flexibility */
    min-height: var(--header-height-desktop);
}

.site-header .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    min-height: var(--header-height-desktop);
    width: 100%;
}

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

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

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

.main-nav a {
    color: var(--text-color-light);
    text-decoration: none;
    padding: 10px 0;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Desktop Buttons */
.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Push buttons to the right */
}

/* Mobile-specific elements (hidden on desktop by default) */
.hamburger-menu,
.mobile-nav-buttons-container,
.mobile-menu-overlay {
    display: none;
}

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

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-accent {
    background-color: #00C853; /* A vibrant green for download */
    color: var(--text-color-light);
    border: 2px solid #00C853;
}

.btn-accent:hover {
    background-color: #00B04A;
    border-color: #00B04A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

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

.site-footer .footer-column {
    flex: 1; /* Allow columns to grow */
    min-width: 200px; /* Minimum width before wrapping */
}

.site-footer .footer-column h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.site-footer .footer-column p {
    line-height: 1.8;
    opacity: 0.8;
}

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

.site-footer .footer-nav a {
    color: var(--text-color-light);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
    opacity: 0.8;
}

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

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

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

    .site-header .header-top-row {
        min-height: var(--mobile-top-row-height);
    }

    .site-header .logo {
        flex: 1; /* Allow logo to take available space */
        text-align: center;
        font-size: 24px;
    }

    /* Hamburger Menu */
    .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: 1002; /* Above mobile menu */
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: var(--secondary-color);
        transition: all 0.3s ease-in-out;
    }

    .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);
    }

    /* Mobile Navigation Menu */
    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0; /* Will be covered by header, but full height */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px;
        height: 100vh; /* Full viewport height */
        background-color: var(--primary-color);
        flex-direction: column;
        padding-top: var(--mobile-top-row-height); /* Offset for header top row */
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
        justify-content: flex-start;
    }

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

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

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

    .main-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
        text-align: left;
    }
    
    .main-nav a:hover, .main-nav a.active {
        background-color: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid var(--secondary-color);
    }

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

    /* Mobile Buttons Container (below header top row) */
    .mobile-nav-buttons-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 10px 20px;
        background-color: var(--primary-color);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 998; /* Below mobile menu, above content */
        min-height: var(--mobile-buttons-height);
    }

    .mobile-nav-buttons-container .btn {
        flex: 1; /* Distribute space evenly */
        padding: 8px 10px;
        font-size: 0.9em;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999; /* Below mobile menu */
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
    }

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

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

    .site-footer .footer-column {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

    .site-footer .footer-nav ul {
        text-align: center;
    }

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