:root {
    --primary-color: #2D3E50;
    --secondary-color: #F39C12;
    --text-light: #ECF0F1;
    --text-dark: #34495E;
    --header-height-desktop: 70px;
    --header-height-mobile-top: 60px;
    --mobile-buttons-height: 60px;
    --total-mobile-header-height: calc(var(--header-height-mobile-top) + 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-dark);
    background-color: #F8F9FA;
    padding-top: var(--header-height-desktop); /* Default padding for desktop */
}

/* General Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
}

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

.btn-primary:hover {
    background-color: #E67E22; /* A slightly darker orange */
    color: var(--text-light);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #34495E; /* A slightly darker primary */
    color: var(--secondary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

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

.header-main-row {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    min-height: var(--header-height-mobile-top); /* Mobile top row height */
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #E67E22;
}

.main-nav {
    flex-grow: 1; /* Desktop: takes up middle space */
}

.main-nav ul {
    list-style: none;
    display: flex; /* Desktop: horizontal */
    gap: 25px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

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

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

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

.main-nav a:hover, .main-nav a.active {
    color: var(--secondary-color);
}

.desktop-action-buttons {
    display: flex;
    gap: 15px;
}

.hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002; /* Above overlay */
}

.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 state (X icon) */
.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);
}

.header-spacer {
    display: none; /* Only for mobile */
}

.mobile-action-buttons {
    display: none; /* Hidden by default, shown on mobile */
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(45, 62, 80, 0.95); /* Slightly transparent to show header below, but solid enough */
    gap: 15px;
    z-index: 999; /* Below mobile menu and hamburger */
    min-height: var(--mobile-buttons-height);
    width: 100%;
}

.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: 1000;
    transition: opacity 0.3s ease;
    opacity: 0;
}

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

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 20px 20px;
    margin-top: 50px;
}

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

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

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

.footer-column p {
    font-size: 0.9em;
    line-height: 1.8;
}

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

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

.footer-column ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(243, 156, 18, 0.3);
    font-size: 0.8em;
    color: rgba(236, 240, 241, 0.7);
}

/* Desktop Layout (min-width: 769px) */
@media (min-width: 769px) {
    .site-header {
        flex-direction: row; /* Overrides column for desktop */
        align-items: center;
        justify-content: space-between;
        padding: 0 30px;
        min-height: var(--header-height-desktop);
    }

    .header-main-row {
        width: 100%; /* Occupy full width for flex distribution */
        padding: 0; /* No extra padding here as it's on .site-header */
        justify-content: space-between; /* Logo left, nav center, buttons right */
        min-height: auto;
    }

    .hamburger-menu {
        display: none;
    }

    .header-spacer {
        display: none;
    }

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

    .main-nav {
        order: 2;
        display: flex;
        justify-content: center;
        flex-grow: 1;
    }

    .main-nav ul {
        flex-direction: row;
    }

    .main-nav ul li {
        margin: 0;
    }

    .desktop-action-buttons {
        order: 3;
        display: flex; /* Show desktop buttons */
        margin-left: auto; /* Push to right */
    }

    .mobile-action-buttons {
        display: none; /* Hide mobile buttons on desktop */
    }

    .mobile-menu-overlay {
        display: none;
    }
}

/* Mobile Layout (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding-top: var(--total-mobile-header-height); /* Adjust padding for fixed header + mobile buttons */
    }

    .site-header {
        flex-direction: column;
        min-height: auto; /* Allow header to shrink/grow based on content */
    }

    .header-main-row {
        justify-content: space-between;
        padding: 10px 20px;
        background-color: var(--primary-color);
    }

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

    .logo {
        order: 2;
        flex-grow: 1;
        text-align: center;
        padding: 5px 0;
    }

    .header-spacer {
        display: block;
        order: 3;
        width: 45px; /* Match hamburger width for centering */
        height: 1px; /* Visual trick for spacing */
    }

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

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Off-screen by default */
        width: 75%;
        max-width: 300px; /* Limit width for larger tablets */
        height: 100vh;
        background-color: var(--primary-color);
        padding-top: calc(var(--header-height-mobile-top) + 20px); /* Space for header-main-row */
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease-in-out;
        z-index: 1001; /* Above overlay */
        overflow-y: auto;
    }

    .main-nav.open {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column; /* Vertical menu items */
        align-items: flex-start;
        padding: 20px;
        gap: 15px;
    }

    .main-nav a {
        font-size: 1.1em;
        padding: 10px 0;
        width: 100%;
    }

    .main-nav a::after {
        bottom: 0;
    }

    .mobile-action-buttons {
        display: flex; /* Show mobile buttons */
        position: sticky;
        top: var(--header-height-mobile-top); /* Position below the top header row */
        background-color: var(--primary-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 998; /* Below mobile menu and overlay */
    }

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

    .footer-column {
        margin-bottom: 30px;
        width: 100%;
        max-width: 300px; /* Prevent too wide columns on tablets */
    }
    .footer-column ul {
        align-items: center;
    }
    .footer-column ul li a {
        display: block;
    }
}
