/* Base Resets & Layout Core */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 
   THE FOOTER FIX: 
   This wrapper acts as a vertical flex column that occupies 100% of the viewport.
*/
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation Styles */
.site-header {
    background-color: #1a1a1a;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 100%; /* Allows content to extend across the entire width of large monitors */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 1rem 1.6rem; /* Reduced from 2rem to 1rem to slide the logo far-left and hamburger far-right */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: #e53935;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu a {
    color: #ccc;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #e53935;
}

/* Mobile Toggle Hamburger Button - Optimized & Cleaned */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    height: 40px;
    width: 40px;
    position: relative;
    z-index: 1001;
}

/* Vertical centering alignment inside the button box */
.hamburger {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 2px;
    background: #fff;
    transition: background 0.2s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: transform 0.2s ease, top 0.2s ease;
}

/* Balanced spacing for lines */
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Perfect X transformation when clicked */
.nav-toggle.open .hamburger {
    background: transparent;
}
.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.nav-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* 
   THE MAIN MAGIC RULE:
   flex-grow: 1 expands this content area to ingest all remaining vertical space, 
   cleanly pressing the footer down to the very edge.
*/
.main-content {
    flex-grow: 1;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* UI Content Styling */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('https://unsplash.com') no-repeat center center/cover;
    color: #fff;
    padding: 6rem 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: #ddd;
}

.btn {
    display: inline-block;
    background-color: #e53935;
    color: #fff;
    padding: 0.8rem 2.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
}

/* Footer Assembly */
.site-footer {
    background-color: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    margin-top: auto; /* Forces footer to sit at the absolute bottom of the viewport */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Adaptive Screen Setup (Mobile & Tablets) */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #1a1a1a;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    /* JavaScript toggles this class dynamically */
    .nav-menu.open {
        max-height: 300px;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
    }

    .nav-menu li {
        margin: 0.75rem 0;
    }
}