/* ==============================================================
   KIWAG.com — Layout (layout.css)
   Container, Grid, Sektionen, responsive Breakpoints
   ============================================================== */

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

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

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

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

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

/* --- Grid-System --- */
.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);
}

/* Asymmetrisch: Inhalt + Sidebar */
.grid-content {
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
}

/* --- Flex-Helfer --- */
.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;
}

.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* --- Abstände --- */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

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

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

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

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

@media (max-width: 480px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* --- Einblend-Animation (für Seiten-Ladung) --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.5s ease both;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
