/* Base Styles */
:root {
    --primary-color: #1A202C;
    --accent-color: #E53E3E;
    --text-light: #f7fafc;
    --text-dark: #cbd5e0;
    --header-height-desktop: 70px;
    --header-height-mobile-top: 60px;
    --mobile-button-area-height: 60px; /* Adjusted for buttons */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f7fafc;
    padding-top: var(--header-height-desktop); /* Default for desktop */
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.desktop-only { display: flex; }
.mobile-only { display: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

.btn-primary:hover {
    background-color: #c53030; /* Darker red */
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background-color: #2D3748; /* Slightly lighter primary */
    border-color: #c53030;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-height: var(--header-height-desktop); /* Ensures content fits */
    display: flex;
    flex-direction: column; /* Default to column for mobile first approach */
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    min-height: var(--header-height-desktop);
}

.site-header .logo {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex; /* For better alignment */
    align-items: center;
    height: 100%;
}

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

.main-nav a {
    color: var(--text-light);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

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

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1003; /* Above mobile nav */
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

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

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

/* Mobile Navigation */
.mobile-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: -100%; /* Off-screen */
    width: 70%;
    max-width: 300px; /* Limit mobile menu width */
    height: 100vh;
    background-color: var(--primary-color);
    padding-top: calc(var(--header-height-mobile-top) + var(--mobile-button-area-height) + 20px); /* Adjust padding */
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease-in-out;
    z-index: 1002;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0 20px;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.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: 1001;
}

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

/* Mobile Button Area */
.mobile-button-area {
    display: none; /* Hidden on desktop */
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: var(--mobile-button-area-height);
    align-items: center;
    z-index: 999; /* Below mobile menu and overlay */
}

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

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

.footer-section {
    flex: 1; /* Allow sections to grow */
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-dark);
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

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

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

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

/* Media Queries for Responsive Design */
@media (min-width: 769px) {
    .site-header {
        flex-direction: row;
        min-height: var(--header-height-desktop);
    }

    .header-top {
        flex: 1;
        justify-content: flex-start;
        gap: 30px;
        min-height: var(--header-height-desktop);
    }

    .site-header .logo {
        margin-right: 30px;
        font-size: 2rem;
    }

    .main-nav {
        flex: 1;
    }

    .desktop-nav-buttons {
        margin-left: auto;
        gap: 15px;
    }

    .hamburger-menu,
    .mobile-only,
    .mobile-nav,
    .mobile-menu-overlay {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }

    .header-spacer { display: none; }

    body {
        padding-top: var(--header-height-desktop);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-height-mobile-top) + var(--mobile-button-area-height));
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important; /* Adjust as needed for blocks */
    }

    .site-header {
        flex-direction: column; /* Stack top area and button area */
        min-height: auto; /* Allow height to be dynamic */
    }

    .header-top {
        min-height: var(--header-height-mobile-top);
        padding: 0 15px;
        justify-content: space-between;
        background-color: var(--primary-color);
    }

    .hamburger-menu {
        display: block;
        order: 1;
    }

    .site-header .logo {
        order: 2;
        flex-grow: 1;
        text-align: center;
        font-size: 1.5rem;
    }

    .header-spacer {
        order: 3;
        width: 45px; /* Match hamburger width for centering */
        flex-shrink: 0;
    }

    .mobile-button-area {
        display: flex !important;
        padding: 10px 15px;
        min-height: var(--mobile-button-area-height);
    }

    .mobile-button-area .btn {
        flex: 1;
        font-size: 0.9rem;
        padding: 8px 15px;
    }

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

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

    .footer-section ul {
        padding-left: 0;
    }
}
