/* ==========================================================
   Responsives Stylesheet (Mobile-First)
   ========================================================== */

/* 1. Grundlegende Einstellungen & Typografie */
:root {
    --primary-color: #112;
    --bg-color: #fff;
    --text-color: #112;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1200px;
}

* {
    box-sizing: border-box; /* Wichtig für korrekte Breitenberechnung */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    font-size: 16px; /* Gute Basis-Lesbarkeit auf Handys */
}

/* 2. Container zur Zentrierung und Begrenzung */
.container {
    width: 95%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. Bilder und Medien responsiv machen */
img, video, canvas {
    max-width: 100%;
    height: auto;
}

/* 4. Layout-Elemente */
header, nav, main, footer {
    width: 100%;
    padding: 20px 0;
}

/* Flexbox/Grid für flexible Inhalte */
.grid {
    display: grid;
    grid-template-columns: 1fr; /* Standard: 1 Spalte (Handy) */
    gap: 20px;
}

/* 5. Mobile-First Anpassungen (Ab Tablet/Desktop) */
@media (min-width: 768px) {
    body {
        font-size: 18px; /* Größere Schrift auf Desktops */
    }

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

/* 6. Lesbarkeits-Optimierungen */
h1, h2, h3 {
    line-height: 1.2;
    margin-top: 0;
}

p {
    margin-bottom: 1.5em;
}
