/* ==========================================================================
   Layout & Container Styles
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

/* Section Styles */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
    z-index: 1;
}

.section:first-of-type {
    padding-top: 0;
}

.section-alt {
    background-color: var(--color-card);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-2xl);
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    color: var(--color-accent);
}

.section-title {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.section-description {
    color: var(--color-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Systems */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

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

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

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-2xl) 0;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 var(--space-2xl);
    }
}