/* Base Styles & Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    /* Desktop: Padding for fixed header */
    padding-top: 80px; /* Adjust based on site-header height */
}

/* Common Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: linear-gradient(90deg, #ffc107, #e0a800);
    color: #333;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #e0a800, #ffc107);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.6);
    transform: translateY(-2px);
}

.btn-tertiary {
    background: linear-gradient(90deg, #28a745, #1e7e34);
    color: #fff;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.btn-tertiary:hover {
    background: linear-gradient(90deg, #1e7e34, #28a745);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.6);
    transform: translateY(-2px);
}

.btn-subscribe {
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 0.9em;
}

.btn-subscribe:hover {
    background-color: #0056b3;
}

/* Header Styles - Desktop First */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-height: 60px; /* Ensure content adaptation */
    display: flex;
    flex-direction: column; /* Allows stacking of header-wrapper and mobile-buttons-area on mobile */
    justify-content: center;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 2.2em;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 1px;
    display: block; /* Ensure logo is always visible */
}

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

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Desktop: horizontal */
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 8px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #007bff;
}

.header-buttons.desktop-buttons {
    display: flex; /* Desktop: visible */
    gap: 10px;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002; /* Above mobile menu */
}

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

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

.mobile-buttons-area {
    display: none; /* Hidden on desktop */
}

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

/* Footer Styles */
.site-footer {
    background-color: #333;
    color: #f4f4f4;
    padding: 40px 20px 20px;
    font-size: 0.9em;
}

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

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-column p {
    margin-bottom: 10px;
}

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

.footer-nav a {
    text-decoration: none;
    color: #f4f4f4;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffc107;
}

.footer-newsletter input[type="email"] {
    width: calc(100% - 80px);
    padding: 8px;
    border: 1px solid #555;
    background-color: #444;
    color: #f4f4f4;
    border-radius: 3px;
    margin-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    margin-top: 20px;
}

/* Mobile Styles - Overrides for screens up to 768px */
@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Adjust for header-wrapper (60px) + mobile-buttons-area (80px) */
    }

    .site-header {
        flex-direction: column; /* Stack header-wrapper and mobile-buttons-area */
        align-items: center;
        min-height: auto;
    }

    .header-wrapper {
        padding: 10px 15px;
        justify-content: space-between;
        width: 100%;
        min-height: 60px; /* Consistent height for top bar */
    }

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

    .logo {
        order: 2;
        flex-grow: 1;
        text-align: center;
        font-size: 1.8em;
    }

    .header-buttons.desktop-buttons {
        display: none; /* Hidden on mobile */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0; /* Will be adjusted by JS to be below header if needed, but CSS fixed for full height overlay */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #222;
        flex-direction: column;
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
        padding-top: 60px; /* Space for fixed header content if menu starts from top */
    }

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

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

    .main-nav li {
        margin: 0;
        border-bottom: 1px solid #444;
    }

    .main-nav a {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .mobile-buttons-area {
        display: flex; /* Visible on mobile */
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #1a1a1a; /* Slightly darker than header */
        width: 100%;
        z-index: 999; /* Below hamburger menu, above content */
        min-height: 80px; /* Ensure buttons fit */
    }

    .mobile-buttons-area .btn {
        flex: 1;
        max-width: 120px;
        font-size: 0.9em;
        padding: 8px 10px;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        display: none; /* Hidden by default */
    }

    .mobile-menu-overlay.active {
        display: block; /* Show when active */
    }

    .footer-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .footer-column {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    
    .footer-newsletter input[type="email"] {
        width: calc(100% - 100px); /* Adjust for button width */
    }
}
