/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-top: 120px; /* Default for desktop header + button area */
    background-color: #f4f7f6;
    color: #333;
}

/* Header styles - Desktop First & Fixed */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    min-height: 60px;
    background-color: #2c3e50; /* Solid dark background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column; /* Default to column, overridden for desktop */
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.logo {
    color: #FFD700; /* Auxiliary color */
    font-size: 2.2em;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure logo is always visible */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Default to flex for desktop */
    flex-direction: row; /* Default to row for desktop */
}

.main-nav li a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s ease, background-color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: #FFD700;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
}

.header-buttons-container {
    display: flex; /* Default to flex for desktop */
    gap: 10px;
    padding: 10px 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-image: linear-gradient(45deg, #007BFF, #0056b3);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
}

.btn-primary:hover {
    background-image: linear-gradient(45deg, #0056b3, #007BFF);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-image: linear-gradient(45deg, #FFD700, #c0a100);
    color: #2c3e50;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.btn-secondary:hover {
    background-image: linear-gradient(45deg, #c0a100, #FFD700);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ecf0f1;
    margin: 5px 0;
    transition: 0.4s;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Desktop specific styles */
@media (min-width: 769px) {
    .site-header {
        flex-direction: row; /* Horizontal layout for desktop */
        justify-content: space-between;
        align-items: center;
        padding: 10px 30px;
        min-height: 80px;
    }

    .header-top-bar {
        display: contents; /* Allows logo to flow directly into header */
    }

    .logo {
        order: 1;
        margin-right: 20px;
    }

    .main-nav {
        order: 2;
        flex: 1;
        justify-content: center;
        margin-left: auto; /* Push menu to center */
        margin-right: auto; /* Push menu to center */
    }

    .header-buttons-container {
        order: 3;
        margin-left: auto; /* Push buttons to the right */
    }

    .mobile-spacer {
        display: none;
    }

    body {
        padding-top: 80px; /* Adjust for fixed desktop header height */
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column; /* Stack elements vertically */
        align-items: stretch;
        padding: 0;
        min-height: auto;
    }

    .header-top-bar {
        padding: 10px 20px;
        background-color: #2c3e50;
        position: relative;
        z-index: 1001; /* Ensure top bar is above menu */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: 1;
    }

    .logo {
        order: 2;
        flex-grow: 1; /* Allow logo to take available space */
        text-align: center;
        margin: 0; /* Remove desktop margin */
        font-size: 2em;
    }

    .mobile-spacer {
        order: 3;
        width: 45px; /* Match hamburger width for centering */
        height: 1px;
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #34495e; /* Darker background for mobile menu */
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease-out;
        z-index: 999;
        padding-top: 80px; /* Space for fixed header-top-bar */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

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

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

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

    .main-nav li a {
        padding: 15px 20px;
        width: calc(100% - 40px); /* Adjust padding */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .header-buttons-container {
        display: flex; /* Always visible button area */
        justify-content: center;
        gap: 15px;
        padding: 10px 20px;
        background-color: #34495e; /* Match mobile menu background */
        width: 100%;
        box-sizing: border-box;
        z-index: 999; /* Ensure buttons are above main content, below menu */
    }

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

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

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

    body.no-scroll {
        overflow: hidden;
    }

    body {
        padding-top: 135px; /* Adjust for fixed mobile header (top-bar + buttons) */
    }
}

/* Footer styles */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 20px 20px;
    margin-top: 50px;
    font-size: 0.9em;
}

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

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

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

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007BFF;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

    .footer-section h3 {
        text-align: center;
    }

    .footer-section ul {
        align-items: center;
    }
}
