/* ==========================================================================
   1. GLOBALE EINSTELLUNGEN & VARIABLEN (Reine System-Schriften, DSGVO-konform)
   ========================================================================== */
:root {
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --color-text: #2d3748;
    --color-text-muted: #718096;
    --color-primary: #0066cc;
    --color-primary-hover: #004499;
    --color-bg-alt: #f7fafc;
    --color-border: #e2e8f0;
    --radius: 8px;
}

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

html {
    font-family: var(--font-main);
    font-size: 100%;
    overflow-y: scroll;
}

body {
    max-width: 1400px;
    width: 95%;
    min-width: 320px;
    margin: 0 auto;
    text-align: left;
    color: var(--color-text);
    background: white;
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: #111;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-text-muted);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

blockquote {
    margin: 1rem 0;
    padding: 0;
}

blockquote cite {
    display: block;
}

/* ==========================================================================
   2. SITE-HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    padding: 1rem 0.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.site-title a {
    color: #111;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem; 
}

.site-nav .button {   
    display: inline-block;
    font-size: 0.85rem; 
    font-weight: 600;   
    text-align: center;
    color: #555;
    background-color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 2px solid #6c6c6c;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
} 

.site-nav .button:hover {
    color: #fff;
    border-color: #bcbcbc;
    background-color: #bcbcbc;
}

/* ==========================================================================
   2b. MAIN-SUBTITLE & INTRO SECTION
   ========================================================================== */
.main-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
    text-align: center;
    margin: 1.5rem 0 0.5rem 0;
}

.intro-section {
    margin: 0 0 2rem 0;
    text-align: center;
}

.mehr-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1rem;
}

/* ==========================================================================
   3. FILME-GRID (Konsequent 3 Filme nebeneinander für maximale Übersicht)
   ========================================================================== */
.movie-section {
    margin: 2rem 0;
    width: 100%;
}

.movie-section h2 {
    font-size: 1.15rem; /* Etwas kompakter für Mobile */
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    color: #111;
}

.movie-grid {
    display: grid;
    /* ERZWINGT IMMER 3 SPALTEN (Auch auf dem Handy für die Übersicht) */
    grid-template-columns: repeat(3, 1fr); 
    gap: 0.35rem; /* Minimaler Abstand auf Mobile, damit es nicht aus dem Bildschirm läuft */
}

.movie-grid .plakat,
.movie-grid .filmplakat {
    width: 100% !important;
    max-width: 100% !important; 
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-grid .plakat img {
    width: 100%;
    aspect-ratio: 300 / 425; 
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.movie-grid .plakat img:hover {
    transform: scale(1.02);
}

.movie-grid .filmplakat {
    padding: 0.4rem 0;
    text-align: center;
    flex-grow: 1;
}

/* 2 Zeilen Platzhalter – Schriftgröße auf Mobile stark verkleinert, damit es passt */
.movie-grid .filmtitel {
    font-size: 0.7rem; 
    font-weight: bold;
    margin: 0.2rem 0;
    line-height: 1.2;
    
    height: 2.4em; 
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; 
}

.movie-grid .genre, 
.movie-grid .kategorie {
    margin: 0;
    font-size: 0.6rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-grid .vod-links {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: auto; 
    padding-top: 0.5rem; 
}

.movie-grid .button-vod {
    display: block;
    padding: 0.2rem 0.1rem;
    background-color: #e0e0e0;
    color: #333;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.movie-grid .button-vod:hover {
    background-color: #bcbcbc;
    color: #fff;
}


/* ==========================================================================
   STREAMING-STYLE ÜBERSCHRIFTEN (Automatisch & Präzise)
   ========================================================================== */

/* 1. Jede normale Überschrift (Reiner Text ohne Link) */
.movie-section h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-border); /* Die graue Trennlinie zur Kategorie */
    padding-bottom: 0.5rem;
    color: #111;
    display: flex;
    align-items: center;
}

/* 2. Wenn die Überschrift ein Link ist (Automatische Erkennung des <a>-Tags) */
.movie-section h2 a {
    color: #111111;
    text-decoration: none; /* Entfernt die hässliche, standardmäßige Browser-Unterstreichung */
    display: inline-flex;
    align-items: center;
    padding-bottom: 2px;
    border-bottom: 2px solid #cbd5e1; /* Edle, kurze Unterlinie NUR unter dem Wort auf Mobile */
    transition: all 0.2s ease-in-out;
}

/* 3. Der kleine, stylische Pfeil – taucht NUR auf, wenn ein <a> in der h2 liegt */
.movie-section h2 a::after {
    content: "\2192"; /* Der standardisierte Pfeil (→) */
    display: inline-block;
    font-size: 1.1rem;
    margin-left: 0.4rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* --------------------------------------------------------------------------
   DESKTOP ANPASSUNGEN (Ab Tablet/PC)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .movie-section h2 {
        font-size: 1.6rem;
    }

    /* Hover-Effekte exklusiv für den Link */
    .movie-section h2 a:hover {
        color: #000000;
        border-bottom-color: #111111; /* Unterlinie wird beim Drüberfahren dunkel */
    }

    .movie-section h2 a:hover::after {
        color: #111111;
        transform: translateX(4px); /* Pfeil rutscht ein Stück nach rechts */
    }
}

/* ==========================================================================
   4. NATIVE AUFKLAPP-SEKTION
   ========================================================================== */
.aufklapp-sektion {
    background-color: transparent;
    border: none;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0.5rem 0 1.5rem 0;
    padding: 0.25rem 0;
}

.button-toggle {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    background-color: transparent; 
    color: #111111;
    padding: 0.8rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0; 
    width: 100%; 
    max-width: 100%;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out;
    list-style: none;
}

.button-toggle::-webkit-details-marker,
.button-toggle::marker {
    display: none;
}

.button-toggle::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid #111111;
    border-bottom: 2px solid #111111;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0.5rem;
}

.aufklapp-sektion[open] .button-toggle::after {
    transform: rotate(-135deg);
}

.button-toggle:hover {
    color: var(--color-text-muted);
    background-color: transparent;
    box-shadow: none;
}

.button-toggle:hover::after {
    border-color: var(--color-text-muted);
}

.aufklapp-sektion[open] .button-toggle {
    background-color: transparent;
    color: #111111;
}

.einblenden-content {
    text-align: left; 
    padding: 0.5rem 0 1rem 0;
    border-top: none;
    background-color: transparent;
}

.einblenden-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1rem;
}

.einblenden-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   5. KATEGORIE-TEXT-GRID
   ========================================================================== */
.category-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.category-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #111;
    font-weight: 700;
}

.link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.grid-column h3 {
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid #333;
    font-weight: 600;
}

.grid-column ul {
    list-style: none;
}

.grid-column ul li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.2rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
}

.grid-column ul li::before {
    content: "›";
    position: absolute;
    left: 0;
    top: 0.4rem;
    color: var(--color-text-muted);
    font-weight: bold;
    font-size: 1.3rem;
}

.grid-column ul li a {
    font-weight: 500;
}

.grid-column a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ==========================================================================
   6. FOOTER (Clean, unaufdringlich und perfekt zentriert)
   ========================================================================== */
#site-footer {
    margin-top: 6rem;
    padding: 3rem 0 5rem 0;
    border-top: 1px solid var(--color-border); 
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

#site-footer p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
}

#site-footer a {
    color: var(--color-text-muted);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

#site-footer a:hover {
    color: #111111;
    border-bottom-color: #111111;
}

#site-footer p.small a {
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
}




/* ==========================================================================
   7. MEDIA QUERIES
   ========================================================================== */
@media (min-width: 640px) {
    .link-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Ab Tablet-Größe: Schriften und Abstände dürfen wieder atmen */
@media (min-width: 768px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 2rem 0;
        text-align: left;
    }

    .site-title { font-size: 2.2rem; }
    .page-subtitle { font-size: 1.05rem; }

    .site-nav ul {
        justify-content: flex-end;
        gap: 0.75rem;
    }
    
    .site-nav .button {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }

    .main-subtitle {
        text-align: left;
        font-size: 1.05rem;
        margin: 2.5rem 0 1rem 0;
    }

    .intro-section {
        text-align: left;
    }

    .mehr-text {
        font-size: 1.6rem;
    }

    .movie-grid {
        gap: 1rem; 
    }
    
    .movie-section h2 {
        font-size: 1.6rem;
    }

    .movie-grid .filmtitel {
        font-size: 1.15rem;
        margin: 0.5rem 0;
        height: 2.4em; 
    }

    .movie-grid .genre, 
    .movie-grid .kategorie {
        font-size: 0.85rem;
    }

    .movie-grid .vod-links {
        flex-direction: row; 
        justify-content: center;
        gap: 0.5rem;
        margin-top: auto; 
    }

    .movie-grid .button-vod {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .button-toggle {
        font-size: 1rem;
        padding: 1rem 0;
    }
}

/* Große Bildschirme (Desktop ab 1024px) */
@media (min-width: 1024px) {
    .link-grid { grid-template-columns: repeat(3, 1fr); }

    /* Wir nutzen Flexbox auf <main>, um NUR die Filmsektionen 
       nebeneinander fließen zu lassen. Alles andere bricht normal um. */
    main {
        display: flex;
        flex-wrap: wrap;
        gap: 3rem 2.5rem; /* 3rem Abstand nach unten, 2.5rem zur Seite */
    }

    /* WICHTIG: Alle Elemente in <main>, die KEINE Filmkategorie sind 
       (z.B. Texte, Überschriften, Teaser), behalten die volle Breite (100%) */
    main > *:not(.movie-section) {
        width: 100%;
    }

    /* NUR die Filmkategorien teilen sich den Platz und stehen zu zweit nebeneinander.
       Die 2.5rem Gap werden in der Berechnung berücksichtigt. */
    .movie-section {
        margin: 0;
        width: calc(50% - 1.25rem); 
    }

    /* Behält das kompakte 3-Spalten-Layout für die Poster innerhalb der Kategorie bei */
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem; 
    }
}