/* layout.css – overall page layout, containers, grid, header and footer layout */

/* Global Layout Containers */
.page-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-huge) 0;
    position: relative;
}

.section--tight {
    padding: var(--space-xl) 0;
}

.section--surface {
    background-color: var(--color-surface-tint);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Header Layout */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    transition: all 0.3s ease;
}

.header .page-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 28px;
    width: auto;
}

.nav-desktop {
    display: flex;
    gap: var(--space-xl);
}

/* Mobile Nav Structure */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-light);
    z-index: 999;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    transition: right 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.mobile-nav-overlay.is-open {
    right: 0;
}

/* Footer Layout */
.footer {
    background-color: var(--color-primary);
    color: var(--color-light);
    padding-top: var(--space-huge);
    padding-bottom: var(--space-xl);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Responsive Layout Rules */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Global Hero Section */
.hero {
    padding-top: calc(85px + var(--space-huge));
    padding-bottom: var(--space-huge);
    position: relative;
    width: 100%;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        padding-bottom: var(--space-xl);
    }
}