/* ==========================================================================
   STYLE.CSS - TV SCHÜTZINGEN 1908
   Version: 3.1 (Spacing Fix)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLEN & RESET
   -------------------------------------------------------------------------- */
:root {
    --c-bg: #ffffff;
    --c-text: #111111; 
    --c-grey-light: #f4f4f4;
    
    --c-yellow: #FFD700;    
    --c-yellow-hi: #FFFF01; 
    
    --c-red: #D50419;       
    --c-red-dark: #b00315; 

    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

html {
    font-size: 100%; 
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*, *:before, *:after { box-sizing: inherit; }

body {
    font-family: var(--font-body);
    background-color: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    letter-spacing: 0.3px;
    margin: 0;
    padding-top: 80px; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --------------------------------------------------------------------------
   2. TYPOGRAFIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0.8em; 
    color: black;
}

h1 { font-size: 2.8rem; letter-spacing: -1px; } 
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.25rem; }

p, li { margin-bottom: 1rem; }
strong { font-weight: 700; color: black; }

.highlight {
    background: var(--c-yellow-hi);
    padding: 0 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* --------------------------------------------------------------------------
   3. LAYOUT & CONTAINER
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem; 
}

.page-content {
    padding: 3rem 0;
    flex: 1; 
}

.grid-system {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
/* --- FILTER BUTTONS --- */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--c-yellow);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
    border-radius: 30px; /* Pillen-Form */
}

.filter-btn:hover, .filter-btn.active {
    background: var(--c-yellow);
    color: black;
}
/* --------------------------------------------------------------------------
   4. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid #eee;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}

.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 1100px; padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 1.6rem;      
    letter-spacing: 0.5px; 
    text-transform: uppercase;
    color: black;
    white-space: nowrap; 
    display: flex; align-items: center; gap: 15px;           
}
.logo span { color: var(--c-red); }
.logo img { height: 50px; width: auto; display: block; }

.burger {
    cursor: pointer; width: 30px; height: 20px; position: relative; z-index: 1002;
}
.burger span {
    display: block; width: 100%; height: 3px; background: var(--c-red);
    margin-bottom: 5px; transition: 0.3s;
}

.nav-overlay {
    position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
    background: var(--c-yellow); padding: 100px 40px;
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1001; box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.nav-overlay.active { right: 0; }
.nav-list { list-style: none; padding: 0; }
.nav-list li { margin-bottom: 1.5rem; }
.nav-list a {
    font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: black;
}
.nav-list a:hover { color: var(--c-red); }

/* --------------------------------------------------------------------------
   5. LANDINGPAGE (HERO & FEATURES)
   -------------------------------------------------------------------------- */
/* FIX 1: Hero Abstand verkleinert */
.hero-wrapper {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    gap: 4rem; 
    margin-bottom: 1rem; /* War vorher riesig, jetzt klein zum Pfeil */
    padding-top: 1rem;
    position: relative;
    min-height: auto; /* Keine erzwungene Höhe mehr */
}

.hero-text { flex: 1; position: relative; z-index: 1; }

.hero-text::before {
    content: ""; position: absolute; top: -40px; left: -40px; width: 150px; height: 150px;
    background: var(--c-yellow); opacity: 0.2; border-radius: 50%; z-index: -1;
}

.hero-image-container { flex: 1; position: relative; }

.hero-image {
    width: 100%; height: auto;
    border-radius: 20px 0 20px 0; 
    box-shadow: 20px 20px 0 var(--c-yellow);
    object-fit: cover; max-height: 500px;
    filter: grayscale(100%); 
    transition: 0.5s;
}

.hero-subline { font-size: 1.2rem; margin-bottom: 2rem; color: #444; }

/* FIX 2: Scroll Pfeil mittig positioniert (Symmetrie) */
.scroll-down-wrapper {
    width: 100%; display: flex; justify-content: center;
    padding: 2rem 0 3rem 0; /* Oben 2rem Luft, unten 3rem Luft */
    position: relative; z-index: 10;
}
.scroll-link {
    display: flex; flex-direction: column; align-items: center; text-decoration: none;
    cursor: pointer; color: #999; font-weight: 600; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; transition: 0.3s;
}
.scroll-link:hover { color: var(--c-red); }
.scroll-arrow {
    font-size: 2rem; color: var(--c-red); margin-top: 5px; animation: bounce 2s infinite;
}

/* FIX 3: Features Abstand sauber */
.features-section {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 5rem;
    padding: 0 1rem;
}

.feature-box {
    background: #fff; padding: 2.5rem 2rem; 
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    text-align: center; transition: all 0.3s ease;
    position: relative; overflow: hidden;
    border: 1px solid #f0f0f0; 
}
.feature-box:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }

.feature-icon {
    font-size: 2rem; color: black; margin-bottom: 1.5rem;
    background: var(--c-yellow); width: 80px; height: 80px; 
    line-height: 80px; border-radius: 50%; display: inline-block;
}
.feature-box h3 { margin-bottom: 1rem; font-size: 1.4rem; }

/* News Section Wrapper */
.news-section-wrapper {
    background: var(--c-grey-light); 
    padding: 4rem 0 5rem 0; /* Padding oben/unten */
    margin-bottom: 0; /* Kein Margin nach unten, damit CTA anschließt */
    width: 100vw; position: relative; left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
}
.news-section-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}

/* --- UPDATE: SPORTLICHER NEWS TICKER --- */
.news-ticker {
    width: 100%;
    background: var(--c-yellow);
    border-top: 4px solid black;
    border-bottom: 4px solid black;
    padding: 1rem 0;
    margin-bottom: 4rem; 
    overflow: hidden; 
    position: relative;
    transform: skewY(-2deg); 
    margin-top: -2rem; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.ticker-track {
    display: flex; white-space: nowrap; 
    animation: scroll-ticker 20s linear infinite; width: max-content; 
}
.ticker-item {
    font-family: var(--font-head); font-weight: 900; font-size: 3.5rem; 
    text-transform: uppercase; display: flex; align-items: center; padding-right: 2rem;
}
.text-filled { color: black; }
.text-outline { color: transparent; -webkit-text-stroke: 2px black; text-stroke: 2px black; }
@keyframes scroll-ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   6. KOMPONENTEN & NEWS FEED
   -------------------------------------------------------------------------- */
.btn, .btn-outline {
    display: inline-block; font-family: var(--font-head); font-weight: 700;
    text-transform: uppercase; font-size: 0.9rem; border: none; cursor: pointer;
    transition: transform 0.2s, background 0.2s; text-align: center;
    padding: 0.8em 1.6em;
}
.btn { background: var(--c-red); color: white; }
.btn:hover { background: var(--c-red-dark); transform: translateY(-2px); }

.btn-outline { background: transparent; border: 2px solid var(--c-red); color: var(--c-red); }
.btn-outline:hover { background: var(--c-red); color: white; }

.feed-card {
    background: white;
    padding: 2.5rem; 
    margin-bottom: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border: none;
    transition: transform 0.3s ease;
}
.feed-card:hover { transform: translateY(-5px); }

.feed-img {
    display: block; width: 100%; height: 100%; 
    object-fit: cover; object-position: top; 
    border-radius: 8px; margin: 1.5rem 0; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.report-card { 
    background: white; margin-bottom: 3rem; padding: 2rem; 
    border: 1px solid #eee; border-left: 4px solid var(--c-red); 
}

.meta-tag, .report-meta {
    display: inline-block; background: var(--c-yellow);
    font-weight: 700; font-size: 0.8rem; padding: 4px 8px; margin-bottom: 10px; color: black;
}
.report-meta { background: transparent; color: #666; padding: 0; }

/* FIX 4: CTA Banner Abstand repariert */
.cta-banner {
    background: var(--c-yellow); padding: 4rem 0; text-align: center;
    /* Hier war der Fehler: */
    margin-top: 0;      /* Schließt direkt an den grauen Bereich an */
    margin-bottom: 0;   /* Schließt an den Footer an */
    
    border-top: 5px solid black; border-bottom: 5px solid black;
    display: block; 
}
.cta-banner h3 { font-size: 2.2rem; margin-bottom: 1rem; color: black; }
.cta-banner p { max-width: 600px; margin: 0 auto 2rem auto; font-size: 1.1rem; color: #111; }
.cta-banner .btn {
    background: black; color: var(--c-yellow); box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: inline-flex; align-items: center; justify-content: center; min-width: 250px;
}

/* --------------------------------------------------------------------------
   7. ABTEILUNGEN & TABELLEN
   -------------------------------------------------------------------------- */
.dept-card {
    border: 1px solid #eee; padding: 2rem; transition: 0.3s;
    background: #fff; display: flex; flex-direction: column; height: 100%;
    scroll-margin-top: 100px; 
}
.dept-card:hover { border-color: var(--c-yellow); box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.dept-card h4 {
    font-size: 1.15rem; margin-bottom: 0.5rem;
    overflow-wrap: break-word; word-wrap: break-word; hyphens: auto;
}
.dept-card p:last-child { margin-top: auto; }

.schedule-container {
    margin-bottom: 4rem; background: #fff; border: 1px solid #eee; 
}
.schedule-header {
    display: flex; background-color: var(--c-yellow); font-family: var(--font-head); font-weight: 700; padding: 12px 15px;
}
.col-day { width: 130px; font-weight: 800; font-family: var(--font-head); text-transform: uppercase; color: var(--c-red); }
.col-time { width: 140px; font-weight: 600; }
.col-group { width: 280px; font-weight: 700; }
.col-info { flex: 1; color: #666; font-size: 0.95rem; }
.col-group a { border-bottom: 2px solid transparent; }
.col-group a:hover { border-bottom-color: var(--c-red); color: var(--c-red); }

.day-card { display: flex; border-bottom: 1px solid #eee; }
.day-card:last-child { border-bottom: none; }
.day-label { width: 130px; padding: 12px 15px; flex-shrink: 0; border-right: 1px solid #eee; }
.day-content { flex: 1; }
.course-row { display: flex; padding: 12px 15px; border-bottom: 1px solid #eee; align-items: center; }
.course-row:last-child { border-bottom: none; }

/* Termine Seite (Rahmen) */
.event-row {
    display: flex; flex-wrap: wrap; background: #ffffff; border: 1px solid #e0e0e0;
    border-left: 5px solid var(--c-yellow); border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    margin-bottom: 1.5rem; padding: 1.5rem; gap: 2rem; align-items: flex-start; transition: all 0.2s ease;
}
.event-row:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: var(--c-yellow); }
.event-date {
    flex: 0 0 70px; font-family: var(--font-head); font-weight: 800; color: var(--c-red);
    font-size: 1.1rem; line-height: 1.2; text-transform: uppercase; text-align: center;
    border-right: 1px solid #f0f0f0; padding-right: 2rem; margin-right: -1rem; 
}
.event-info { flex: 1; }
.event-info h4 { margin-bottom: 0.5rem; }
.event-info p { margin-bottom: 0.5rem; font-size: 0.95rem; color: #555; }

/* --------------------------------------------------------------------------
   8. FOOTER & EXTRAS
   -------------------------------------------------------------------------- */
footer {
    background: #1a1a1a; color: #e0e0e0; padding: 4rem 0; margin-top: auto;
    border-top: 5px solid var(--c-yellow);
}
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: center;
}
footer a:hover { color: var(--c-yellow); }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.pulse-btn { animation: pulse 2s infinite; box-shadow: 0 0 0 0 rgba(213, 4, 25, 0.7); }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(213, 4, 25, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(213, 4, 25, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(213, 4, 25, 0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

.social-bar { display: flex; gap: 15px; margin-top: 1rem; }
.social-icon {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: 0.3s; color: white;
}
.social-icon:hover { background: var(--c-yellow); color: black; transform: scale(1.1); }

/* --------------------------------------------------------------------------
   9. MOBILE OPTIMIERUNG (MEDIA QUERIES)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* Hero stacked */
    .hero-wrapper { flex-direction: column-reverse; gap: 3rem; text-align: center; margin-bottom: 2rem; }
    .hero-wrapper .btn, .hero-wrapper .btn-outline { width: 100%; justify-content: center; }
    .hero-image { box-shadow: 10px 10px 0 var(--c-yellow); max-height: 300px; }
}

/* =========================================
   9. MOBILE OPTIMIERUNG (KORRIGIERT)
   ========================================= */

@media (max-width: 768px) {
    /* Layout Basics */
    .container, .header-inner { padding: 0 1.2rem; }
    header { height: 60px; }
    body { padding-top: 60px; }
    
    /* FIX: Abstand nach unten für ALLE Seiten wiederherstellen */
    .page-content { 
        padding-top: 2rem; 
        padding-bottom: 3rem; /* Das hat gefehlt! */
    }

    /* Typo */
    .logo { font-size: 1.25rem; gap: 10px; }
    .logo img { height: 40px; }
    h1 { font-size: 1.8rem; line-height: 1.2; } 
    h2 { font-size: 1.5rem; }
    .hero-subline { font-size: 1rem; }
    .nav-list a { font-size: 1.5rem; font-weight: 700; }
    .ticker-item { font-size: 2rem; }
    .news-ticker { transform: skewY(-2deg); margin-top: 0; }

    /* Feed & Karten */
    .feed-card { padding: 1.5rem; }
    .feed-img { height: 200px; margin: 1rem 0; }

    /* Wochenplan Mobil */
    .desktop-only { display: none !important; }
    .schedule-container { border: none; background: transparent; }
    .day-card { display: block; background: white; margin-bottom: 1.5rem; border: 1px solid #eee; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-left: 5px solid var(--c-yellow); overflow: hidden; }
    .day-label { width: 100%; background: var(--c-grey-light); border-right: none; border-bottom: 1px solid #eee; font-size: 1.1rem; letter-spacing: 1px; }
    .day-content { display: block; }
    .course-row { flex-wrap: wrap; padding: 1rem; position: relative; }
    .col-time { width: 100%; margin-bottom: 0.2rem; font-size: 0.9rem; color: #555; }
    .col-group { width: 100%; font-size: 1.1rem; margin-bottom: 0.3rem; }
    .col-info { width: 100%; font-size: 0.9rem; font-style: italic; }
    .col-group a::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

    /* Komponenten Stack */
    .btn, .btn-outline { width: 100%; display: block; margin-bottom: 10px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Termine Mobil */
    .event-row { gap: 1rem; flex-direction: column; padding: 1.2rem; }
    .event-date { 
        flex-direction: row; gap: 10px; align-items: baseline; text-align: left;
        border-right: none; padding-right: 0; margin-right: 0;
        border-bottom: 1px solid #eee; padding-bottom: 0.8rem; width: 100%; margin-bottom: 0.5rem;
    }

    /* --- SPEZIAL FIX FÜR STARTSEITE --- */
    /* Da .page-content jetzt unten 3rem Platz hat, würde auf der Startseite 
       eine Lücke zum gelben Banner entstehen. Das gleichen wir hier aus. */
    
    .news-section-wrapper {
        padding-top: 2rem;    
        padding-bottom: 0;    
        margin-bottom: -3rem; /* Zieht das gelbe Banner um den Padding-Wert hoch */
    }

    .cta-banner {
        padding-top: 3rem;    
        padding-bottom: 3rem;
    }
    
    .news-section-inner {
        padding-bottom: 2rem; 
    }
}