/* ==========================================================================
   Header (Fixed, Shadowed)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    /* Subtle depth */
    z-index: 1000;
    height: 80px;
    /* Standard height */
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 44px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
    position: relative;
}

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

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

.nav-link.active {
    color: var(--color-primary);
}

/* Mobile Menu Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-info p {
    color: #999;
    font-size: 0.85rem;
}

.footer-nav ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Dense links */
    gap: 15px;
}

.footer-nav a {
    color: #aaa;
    font-size: 0.85rem;
}

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

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #666;
    font-size: 0.75rem;
}

/* ==========================================================================
   Sections & Backgrounds
   ========================================================================== */
/* ==========================================================================
   Sections & Backgrounds
   ========================================================================== */
section {
    padding: var(--spacing-lg) 0;
    /* Reduced to 50px */
}

/* Alternating Backgrounds */
.section-bg-light {
    background-color: var(--color-bg-warm);
    /* Warm White */
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.section-bg-gray {
    background-color: var(--color-bg-gray);
    /* Light Gray */
}

.hero {
    height: 65vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: var(--color-bg-warm);
    /* Warm, trusted background */
    padding-top: 80px;
    /* Offset for Fixed Header */
    overflow: hidden;
}

/* Slogan Cycling Typography */
.hero-slogan {
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 30px;
    color: var(--color-text-main);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slogan.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.hero-description {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 750px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-small {
    height: 35vh;
    min-height: 250px;
    padding-top: 120px;
    display: flex;
    align-items: center;
    background-color: var(--color-bg-warm);
    border-bottom: 1px solid var(--color-border);
}

/* ==========================================================================
   Grid System
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Guide Sidebar Layout */
.guide-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .guide-layout {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .guide-layout aside {
        position: static !important;
        /* Disable sticky on mobile */
        border-bottom: 1px solid var(--color-border);
        margin-bottom: 30px;
    }
}

/* Responsive Reordering: Swap order ONLY on desktop (if requested) */
@media (min-width: 901px) {
    .responsive-swap> :first-child {
        order: 2;
    }

    .responsive-swap> :last-child {
        order: 1;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-nav ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 30px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 40px 0;
        /* Reduced from 60px */
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 20px;
        /* Tighter gap */
    }

    .container {
        padding: 0 20px;
        /* Ensure sufficient edge padding */
    }
}