@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* --- 1. Variablen & Globales Setup --- */
:root {
    --primary-blue: #2563eb;
    /* Hauptfarbe (Blau) */
    --dark-blue: #1e3a8a;
    /* Dunkles Blau (Hero/Footer) */
    --spanish-orange: #ea580c;
    /* Akzentfarbe Spanien */
    --text-color: #1f2937;
    /* Dunkelgrau fuer Text */
    --light-bg: #f9fafb;
    /* Sehr helles Grau fuer Hintergruende */
    --white: #ffffff;
    --border-color: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Sorgt dafuer, dass der Footer unten bleibt */
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- 2. Navbar (Desktop) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    padding: 1rem 2rem;
    position: sticky;
    /* Menue bleibt beim Scrollen oben */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

#schuliconheader {
    font-size: 1.8rem;
    color: var(--dark-blue);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.navbar-links ul {
    display: flex;
    gap: 2rem;
}

.navbar-links a {
    font-weight: 500;
    color: #374151;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.navbar-links a:hover {
    color: var(--primary-blue);
    background-color: #f3f4f6;
}

/* --- 3. Burger Button (Grundstyle) --- */
/* Wird auf Desktop ausgeblendet, auf Mobile eingeblendet */
.toggle-button {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    /* Liegt ueber dem ausgefahrenen Menue */
}

.toggle-button .bar {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    /* Sprunghafte Animation */
    transform-origin: center;
}

/* Animation zum X (wenn JS die Klasse 'active' hinzufuegt) */
.toggle-button.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--primary-blue);
}

.toggle-button.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
    /* Fliegt nach links weg */
}

.toggle-button.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--primary-blue);
}

/* --- 4. Hero Section --- */
.hero {
    position: relative;
    height: 420px;
    background-image: url("../Bilder/schule.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    text-align: center;
}

/* Blaues Overlay fuer bessere Lesbarkeit */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 64, 175, 0.85);
    /* Transparentes Blau */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding-left: 5%;
    padding-right: 20px;
}

.hero-content h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* --- 5. Allgemeine Section Styles --- */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title-container h2 {
    font-size: 2.2rem;
    color: #111;
    margin-bottom: 0.5rem;
}

.section-title-container .subtitle {
    color: #666;
}

/* --- 6. Zertifikate --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    text-align: left;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.cert-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.5rem;
}

.cert-card h3 {
    margin-top: 0.75rem;
    font-size: 1.1rem;
}

.cert-card .cert-cta {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.cert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

/* --- 7. Modal --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 2rem;
    z-index: 2000;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    padding: 1.5rem 1.75rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-content h3 {
    margin-bottom: 0.75rem;
}

.modal-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.modal-body img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    right: 14px;
    top: 12px;
    border: none;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
}

/* --- 8. Footer --- */
.footer {
    background-color: #111827;
    /* Fast Schwarz */
    color: #9ca3af;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.footer-copyright {
    font-size: 0.9rem;
}

/* --- 9. Responsive Design --- */
@media (max-width: 768px) {

    /* Burger Button sichtbar machen */
    .toggle-button {
        display: flex;
    }

    /* Navbar Container Animation */
    .navbar-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        /* Standard: Geschlossen */
        overflow: hidden;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);

        /* Die eigentliche Slide-Animation */
        transition: max-height 0.5s ease-in-out, padding 0.5s ease;
        padding: 0;
    }

    /* Zustand wenn geoeffnet (wird via JS 'active' gesetzt) */
    .navbar-links.active {
        max-height: 500px;
        /* Genug Platz fuer Inhalt */
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
    }

    .navbar-links ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1.5rem;
    }

    /* Animation der einzelnen Listenpunkte (Staggered Effect) */
    .navbar-links ul li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    /* Wenn Menue offen ist, Punkte einblenden */
    .navbar-links.active ul li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Verzoegerung fuer Kaskaden-Effekt */
    .navbar-links.active ul li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .navbar-links.active ul li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .navbar-links.active ul li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .navbar-links.active ul li:nth-child(4) {
        transition-delay: 0.4s;
    }

    /* Layout Anpassungen fuer Mobile */
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-body img {
        width: 100%;
        height: 180px;
    }
}

.quellenlink,
.footerzertifikat {
    transition-duration: 0.3s;
}

.quellenlink:hover,
.footerzertifikat:hover {
    color: white;
    transition-duration: 0.3s;
}
