@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 für Text */
    --light-bg: #f9fafb;           /* Sehr helles Grau für Hintergründe */
    --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 dafür, 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; /* Menü 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;
}

/* Navbar Guide Button */
.guide-nav-item {
    display: flex;
    align-items: center;
}

.guide-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background-color: var(--primary-blue);
    color: var(--white);
    font-family: inherit;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.guide-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.guide-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.guide-button i {
    font-size: 1rem;
}

/* --- 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 über dem ausgefahrenen Menü */
}

.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' hinzufügt) */
.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: 500px; /* Höhe des Headers */
    /* Pfad zum Bild anpassen */
    background-image: url("../bilder/schule.jpg"); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
}

/* Blaues Overlay für 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.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

.btn-primary {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 0.8rem 2rem;
    border-radius: 999px; /* Pillen-Form */
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #dbeafe;
    transform: translateY(-2px);
}

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

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

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

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

/* --- 6. Über uns (About) Section --- */
.about-content-wrapper {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: block;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #111;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

/* Statistik Kacheln */
.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    color: #111;
    margin-bottom: 0.2rem;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 7. Schwerpunkte Section --- */
.focus-section {
    background-color: var(--white);
}

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

.focus-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease;
    background-color: #fff;
}

.focus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.focus-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* --- 8. Schulvergleich Section --- */
.comparison-section {
    background-color: #f8fafc; /* Leichtes Grau-Blau als Hintergrund */
    border-radius: 20px;
    margin-bottom: 4rem;
}

/* Vergleichskarten (DE vs ES) */
.comparison-cards {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
}

.school-card {
    flex: 1;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.school-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f0f5ff; /* Header Farbe DE */
}

.spanish-style .school-header {
    background-color: #fff7ed; /* Header Farbe ES */
}

.badge {
    color: white;
    padding: 5px 10px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.badge-de { background-color: var(--primary-blue); }
.badge-es { background-color: var(--spanish-orange); }

.school-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.check-list {
    padding: 1.5rem;
}

.check-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4b5563;
}

.check-list i {
    color: var(--primary-blue);
}

.check-list.orange-check i {
    color: var(--spanish-orange);
}

/* Tabelle */
.detailed-comparison {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.detailed-comparison h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.comparison-table th, 
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    font-weight: 600;
}

.text-blue { color: var(--primary-blue); }
.text-orange { color: var(--spanish-orange); }

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Text Vergleich Listen */
.comparison-lists {
    display: flex;
    gap: 2rem;
    background-color: #eff6ff;
    padding: 2rem;
    border-radius: 12px;
}

.list-column {
    flex: 1;
}

.list-column h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.list-column ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.list-column ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #6b7280;
    font-weight: bold;
}

/* --- Guide Panel --- */
.guide-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(360px, 92vw);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    padding: 1.2rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.guide-panel.is-open {
    opacity: 1;
    transform: translateY(0);
}

.guide-panel[hidden] {
    display: none;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.guide-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #111;
}

.guide-close {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 0.2rem;
}

.guide-close:hover {
    color: #111;
}

.guide-status {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

.guide-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.guide-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-blue), #60a5fa);
    transition: width 0.3s ease;
}

.guide-progress-text {
    font-size: 0.8rem;
    color: #6b7280;
    min-width: 48px;
    text-align: right;
}

.guide-transcript {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.85rem;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.5;
    max-height: 160px;
    overflow-y: auto;
}

.guide-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.guide-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #374151;
    font-weight: 600;
}

.guide-select select {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--white);
    min-width: 180px;
}

.guide-controls {
    display: grid;
    gap: 0.6rem;
}

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

.guide-control {
    border: 1px solid var(--border-color);
    background: var(--white);
    color: #111;
    font-family: inherit;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-control:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.guide-control.primary {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.guide-control:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.guide-toggles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.guide-details {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.guide-details > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.guide-details > summary::after {
    content: "+";
    font-weight: 700;
    color: #6b7280;
}

.guide-details[open] > summary::after {
    content: "-";
}

.guide-details > summary::-webkit-details-marker {
    display: none;
}

.guide-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

.guide-highlight {
    outline: 3px solid rgba(37, 99, 235, 0.6);
    outline-offset: 4px;
    border-radius: 12px;
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12);
}

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

/* --- 10. Responsive Design (Mobile & Animation) --- */
@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 geöffnet (wird via JS 'active' gesetzt) */
    .navbar-links.active {
        max-height: 500px; /* Genug Platz für 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 Menü offen ist, Punkte einblenden */
    .navbar-links.active ul li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Verzögerung für 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; }
    .navbar-links.active ul li:nth-child(5) { transition-delay: 0.5s; }

    /* Layout Anpassungen für Mobile */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

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

    .guide-panel {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .guide-nav-item {
        width: 100%;
        justify-content: center;
    }

    .guide-button {
        width: 100%;
        justify-content: center;
    }

    .guide-options {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-select {
        width: 100%;
        justify-content: space-between;
    }

    .guide-select select {
        width: 100%;
        min-width: 0;
    }

    .guide-controls-grid,
    .guide-toggles {
        grid-template-columns: 1fr;
    }
}

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

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

/* --- 11. Iframe Responsive --- */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Verhältnis */
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .iframe-container {
        padding-bottom: 56.25%; /* Bleibt gleich */
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .iframe-container {
        padding-bottom: 56.25%;
        margin-bottom: 1rem;
    }
}