/*
Theme Name: Pilates mit Silvia Pro
Author: Florian Prey
Description: One-Page Theme mit exaktem Flyer-Schwung und Customizer-Hero
Version: 3.0
*/

/* 1. Schriftstärken definieren */

/* Regular */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap; /* Verhindert, dass Text beim Laden unsichtbar bleibt */
    src: url('fonts/SpaceGrotesk-VariableFont_wght.ttf') format('ttf');
}

/* Medium */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/static/SpaceGrotesk-Regular.ttf') format('ttf');
}

/* Bold */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/static/SpaceGrotesk-Medium.ttf') format('ttf');
}

/* ==========================================================================
   SCHRIFTART ZUWEISEN
   ========================================================================== */

:root {
    /* Wir legen die Schrift als CSS-Variable fest, falls du sie öfter brauchst */
    --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --primary-color: #cd1719;
    --secondary-color: #ffec99;
    --text-color: #333;
}


html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-main);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #fff;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Der neue SVG-Schwung */
.side-decoration {
    position: fixed; /* Wächst mit dem Inhalt der Seite mit */
    top: 0;
    left: 0;
    width: 200px; /* Deine gewünschte Breite */
    height: 100%; /* WICHTIG: Nimmt die volle Höhe des gesamten Dokuments ein */
    z-index: 1; /* Hinter dem Text */
    pointer-events: none; /* Man kann durch das SVG klicken (wichtig für Links) */
}

.side-decoration svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Der Wrapper der restlichen Seite muss position: relative haben, damit absolute funktioniert */
.page-wrapper {
    position: relative;
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0; 
    width: 100%;
    z-index: 9999;
    padding: 30px 0; /* Etwas mehr Padding oben */
    background: var(--primary-color); /* Initial transparent */
    box-shadow: none;
    transition: all 0.4s ease-in-out; /* Weicher Übergang */
    border-bottom: 2px solid var(--secondary-color);
}

/* Wenn gescrollt wird */
header.scrolled {
    padding: 20px 0; /* Header wird beim Scrollen etwas schmaler */
    background: var(--primary-color); /* Leicht transparentes Weiß */
    backdrop-filter: blur(8px); /* Moderner Glass-Effekt */
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--secondary-color);
}

/* Menü-Links anpassen */
header a {
    text-decoration: none;
    color: white; /* Schwarz, wenn über dem Hero-Bild */
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Links werden dunkel, wenn der Header weiß wird */
header.scrolled a {
    color: white;
}

header a:hover, 
header.scrolled a:hover {
    color: var(--secondary-color);
}
header ul { list-style: none; display: flex; justify-content: center; gap: 30px; margin: 0; }

/* --- MOBILES HAMBURGER MENÜ --- */

/* Der Burger-Button (Standardmäßig auf Desktop unsichtbar) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
}

/* Wenn der Header über dem Hero-Bild transparent ist, soll der Burger weiß sein */
header a { /* bestehende Regel erweitern */ }
.menu-toggle { color: #fff; transition: color 0.3s ease; }
header.scrolled .menu-toggle { color: white; }

/* Mobile CSS via Media Query */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Zeige den Button auf Mobile */
        border: 1px solid white;
        border-radius: 8px;
    }

    /* Wir stylen das Nav-Menü als ausklappbare Box */
    header nav {
        position: absolute;
        top: 100%; /* Startet direkt unter dem Header */
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        max-height: 0; /* Initial unsichtbar/eingeklappt */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    /* Das eigentliche Menü (ul) untereinander anordnen */
    header nav ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
    }

    header nav a {
        color: var(--text-color) !important; /* Auf hellem mobilen Hintergrund immer dunkel */
        display: block;
        padding: 10px;
        width: 100%;
        text-align: center;
    }

    .slider-track-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .native-slider-context .slider-arrow.prev { left: 10px; }
    .native-slider-context .slider-arrow.next { right: 10px; }

    /* Diese Klasse wird per JS hinzugefügt, wenn das Menü offen ist */
    header.mobile-menu-open nav {
        max-height: 400px; /* Genug Platz für alle Menüpunkte */
    }
    .hero {
        height: auto; /* Hebt die starre Höhenbegrenzung auf */
        min-height: 50vh; /* Mindesthöhe für Mobilgeräte */
        background-attachment: scroll !important; /* Wichtig für iOS/Android Support */
        padding: 120px 20px 60px 20px; /* Gibt Inhalt Platz (auch wegen dem fixierten Header) */
    }
    .hero-overlay {
        padding: 30px 20px; /* Macht die Box auf Mobile etwas schlanker, damit mehr vom Bild sichtbar bleibt */
    }
}

.page-wrapper { position: relative; overflow: hidden; }

/* Hero Section Fix */
.hero {
    height: 85vh;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-overlay {
    background: rgba(255, 255, 255, 0.85);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

main {
    position: relative;
    z-index: 2;
    margin-left: 250px;
    background: white;
}

/* Responsive */
@media (max-width: 1100px) {
    .side-decoration { display: none; }
    main { margin-left: 0; }
}

/* Wrapper für den Bereich mit der Seiten-Deko */
.page-wrapper {
    position: relative;
    min-height: 100vh;
}

.hero-content img { max-width: 300px; height: auto; border-radius: 20px; }
.hero-content h1 { font-size: 48px; color: var(--primary-color); margin: 10px 0; }
.hero-content p { font-size: 20px; }

section { padding: 50px 40px; max-width: 100%; }

.section-image {
    border-radius: 25px;
}

h2 { color: var(--primary-color); text-transform: uppercase; border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; }

/* Flyer-Stil Boxen */
.flyer-box { border-right: 6px solid var(--primary-color); padding: 10px 25px; margin: 30px 0; background: #fdfdfd; }
.check-list { list-style: none; padding: 0; }
.check-list li { margin-bottom: 12px; position: relative; padding-left: 25px; }
.check-list li::before { content: "•"; color: var(--primary-color); font-size: 25px; position: absolute; left: 0; top: -5px; }

/* --- MULTI-SLIDE KARUSSELL MIT PEAK & FADE-OUT --- */

.native-slider-context {
    position: relative !important;
    width: 100% !important;
    max-width: 1200px; /* Breiter machen, da wir jetzt mehr Bilder zeigen */
    margin: 0 auto !important;
    overflow: hidden !important;
    border-radius: 12px;
    padding: 20px 0 !important; /* Etwas Luft für den Schatten */
    
    /* Der magische Fade-Out Effekt an den Rändern via CSS-Maske */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.slider-track-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    padding: 0 !important;
    margin: 0 !important;
}

/* Jedes Bild nimmt jetzt genau 50% des sichtbaren Platzes ein */
.native-slide {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    margin: 0 !important;
    padding: 0 10px !important; /* Abstand zwischen den Bildern */
    box-sizing: border-box !important;
}

/* --- MULTI-SLIDE KARUSSELL (Höhe angepasst für Querformat) --- */

.native-slide img {
    width: 100% !important;
    
    /* NEUE REDUZIERTE HÖHE FÜR QUERFORMAT */
    height: 300px !important; /* Vorher 450px */
    
    object-fit: cover !important; /* Sorgt dafür, dass das Bild den Container füllt, ohne verzerrt zu werden */
    display: block !important;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease; /* Kleiner Hover-Effekt */
}

/* Optional: Ein kleiner Effekt beim Drüberfahren, damit man weiß, dass es klickbar ist */
.native-slide img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    /* Auf Smartphones machen wir es noch etwas flacher */
    .native-slide img { 
        height: 220px !important; /* Vorher 320px */
    }
}

.img-ueber-mich img {
    border-radius: 25px;
}

/* Pfeile leicht nach außen rücken, damit sie nicht mitten auf dem Fade-Effekt liegen */
.native-slider-context .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.native-slider-context .slider-arrow.prev { left: 5%; }
.native-slider-context .slider-arrow.next { right: 5%; }

@media (max-width: 768px) {
    /* Auf Smartphones zeigen wir lieber nur 1 Bild voll an, sonst wird es zu quetschen */
    .native-slide {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .native-slide img { height: 300px !important; }
    -webkit-mask-image: none; /* Auf Mobile deaktivieren für mehr Platz */
    mask-image: none;
}
/* Footer - Hier hört die Deko auf */
footer {
    background: #222;
    color: #fff;
    padding: 60px 40px;
    position: relative;
    z-index: 10;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-col { flex: 1; }

/* Linke Spalte: Kontakt & Socials */
.footer-col h4 { color: var(--secondary-color); margin-bottom: 15px; text-transform: uppercase; }
.footer-contact p { margin: 5px 0; font-size: 14px; }
.social-icons { margin-top: 20px; display: flex; gap: 15px; }
.social-icons a { color: #fff; font-size: 20px; text-decoration: none; transition: color 0.3s; }
.social-icons a:hover { color: var(--secondary-color); }

/* Mittlere Spalte: Logo */
.footer-logo { text-align: center; }
.footer-logo img { max-width: 150px; height: auto; border-radius: 75px; } /* Logo weiß machen für dunklen Hintergrund */

/* Rechte Spalte: Menü */
.footer-nav { text-align: end; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: #ccc; text-decoration: none; font-size: 14px; text-transform: uppercase; }
.footer-nav a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Kontakt-Bereich im Footer */
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 15px; /* Abstand zwischen Icon und Text */
    margin: 10px 0;
}

/* Icons spezifisch stylen */
.footer-contact i {
    color: var(--secondary-color); /* Icons in deinem Pilates-Rot */
    width: 20px;
    text-align: center;
    font-size: 1.2rem;
}

/* Social Media Liste untereinander */
.social-links-vertical {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-links-vertical a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #eee;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-links-vertical a:hover {
    color: var(--secondary-color); /* Gold-Beige beim Hover */
    transform: translateX(5px); /* Kleiner Bewegungseffekt */
}

.social-links-vertical i {
    font-size: 1.4rem;
}

@media (max-width: 768px) {
    .footer-container { flex-direction: column; text-align: center; align-items: center; }
    .social-icons { justify-content: center; }
}

/* --- DYNAMISCHE SCROLL-ANIMATIONEN --- */

main section h2,
main section .entry-content, 
main section form {
    /* Hardware-Beschleunigung aktivieren */
    will-change: transform, opacity; 
    
    /* Übergang korrigiert auf cubic-bezier */
    transition: transform 0.3s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.3s ease-out;
}

/* --- RESPONSIVES KURS GRID & BOXEN MIT BUTTON --- */

.kurs-grid-container {
    display: grid !important;
    /* Erzwingt 2-3 Boxen nebeneinander auf Desktop (min. 300px breit), bricht automatisch um */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    margin: 40px 0 !important;
    width: 100% !important;
}

.kurs-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.kurs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.kurs-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.kurs-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kurs-card:hover .kurs-image img {
    transform: scale(1.05);
}

/* ==========================================================================
   KURS HEADER (Mit dynamischem Farbverlauf)
   ========================================================================== */
.kurs-header {
    /* Erzeugt den Verlauf von oben links nach unten rechts */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.kurs-header h3 {
    margin: 0;
    font-size: 20px;
    color: #ffffff; /* Weißer Text für perfekten Kontrast auf der dunklen Startfarbe */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Macht die Schrift auf dem helleren Verlaufsteil extrem gut lesbar */
}

.kurs-level {
    display: inline-block;
    /* Da der Hintergrund nun rot ist, machen wir das Abzeichen teiltransparent weiß (Glassmorphismus) */
    background: rgba(255, 255, 255, 0.2); 
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3px);
}

.kurs-body {
    padding: 25px;
    flex-grow: 1;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.kurs-footer {
    padding: 20px 25px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Abstand zwischen Uhrzeit und Button */
}

.kurs-time {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    white-space: nowrap; /* Verhindert hässliche Zeilenumbrüche bei der Uhrzeit */
}

.kurs-time i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* NEU: Das Styling für den konfigurierbaren Button */
.kurs-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.kurs-btn:hover {
    background: var(--text-color); /* Wechselt die Farbe beim Drüberfahren */
    transform: scale(1.03);
}

@media (max-width: 768px) {
    /* Auf Tablets/großen Handys max. 2 nebeneinander */
    .kurs-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    /* Auf Smartphones sauber untereinander */
    .kurs-grid-container {
        grid-template-columns: 1fr !important;
    }
    .kurs-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .kurs-btn {
        width: 100%;
    }
}

/* ==========================================================================
   TABLET & MOBILE LAYOUT (Gilt für alles unter 1100px Bildschirmbreite)
   ========================================================================== */
@media (max-width: 1100px) {
    /* Bestehende Regeln für die Deko */
    .side-decoration { 
        display: none; 
    }
    main { 
        margin-left: 0; 
    }

    /* NEU & OPTIMIERT: Hero-Bereich für alle Tablets und Smartphones */
    .hero {
        height: auto !important; /* Hebt die starre 85vh-Höhe auf */
        min-height: 55vh;        /* Garantiert ein schönes Seitenverhältnis */
        background-attachment: scroll !important; /* Schaltet das fehleranfällige 'fixed' auf Touch-Geräten aus */
        background-position: center center;
        padding: 140px 20px 80px 20px; /* Gibt dem Inhalt Luft (wichtig wegen dem fixierten Header) */
    }

    .hero-overlay {
        padding: 40px 20px; /* Macht die Box schlanker, damit mehr vom Hintergrundbild glänzen kann */
        max-width: 90%;
        margin: 0 auto;
    }
}

/* --- IMPRESSUM MODAL OVERLAY --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dunkler, semitransparenter Hintergrund */
    backdrop-filter: blur(5px); /* Macht den One-Pager im Hintergrund edel unscharf */
    z-index: 99999; /* Über absolut allem anderen */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Wenn das Modal geöffnet wird */
.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Die eigentliche weiße Textbox im Modal */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh; /* Maximal 80% der Bildschirmhöhe */
    border-radius: 12px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Erlaubt Scrollen, falls das Impressum lang ist */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.is-open .modal-content {
    transform: translateY(0);
}

/* Der Schließen-Button (X) oben rechts */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--primary-color); /* Wechselt zu deinem Pilates-Rot beim Drüberfahren */
}

.modal-body-text {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 20px;
}

.modal-body-text p {
    margin-bottom: 15px;
}

@media (min-width: 1200px) and (pointer: fine) {
    .hero {
        background-attachment: fixed !important;
    }
}