/* ========================================
   Layout - Grid, Containers, Sections
   ======================================== */

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

.container--narrow {
    max-width: var(--max-width-narrow);
}

/* Sections */
.section {
    padding: var(--space-4xl) 0;
}

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

.section--dark {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
    color: var(--color-white);
}

.section--gold {
    background: var(--color-gold-gradient);
}

.section--gold h2,
.section--gold h3,
.section--gold p {
    color: var(--color-text);
}

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

.section__header h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-md);
}

.section__header p {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.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(280px, 1fr));
}

/* Two-column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.two-col--reverse {
    direction: rtl;
}

.two-col--reverse > * {
    direction: ltr;
}

/* Text alignment */
.text-center { text-align: center; }

/* Visibility */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

    .two-col {
        gap: var(--space-xl);
    }

    .section {
        padding: var(--space-3xl) 0;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }

    .section__header {
        margin-bottom: var(--space-xl);
    }

    .section__header h2 {
        font-size: var(--font-size-2xl);
    }

    .section__header p {
        font-size: var(--font-size-base);
    }

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

    .grid {
        gap: var(--space-lg);
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .two-col--reverse {
        direction: ltr;
    }

    .container {
        padding: 0 var(--space-sm);
    }
}

/* Responsive - Small phones */
@media (max-width: 480px) {
    .section {
        padding: var(--space-xl) 0;
    }

    .section__header h2 {
        font-size: var(--font-size-xl);
    }
}
