/* ==========================================================================
   1. GLOBALE EINSTELLUNGEN & VARIABLEN
   ========================================================================== */
:root {
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --color-text: #2d3748;
    --color-text-muted: #718096;
    --color-primary: #e50914; /* Akzentfarbe (Kino-Rot) */
    --color-primary-hover: #b80710;
    --color-bg-alt: #f7fafc;
    --color-border: #e2e8f0;
    --radius: 8px;
    --transition: all 0.2s ease-in-out;
}

* {
    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: #ffffff;
    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;
}

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

.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2d3748;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-logo:hover {
    color: var(--color-primary);
}

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

.site-nav .button {   
    display: inline-block;
    font-size: 0.85rem; 
    font-weight: 600;   
    text-align: center;
    color: #555;
    background-color: transparent;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition);
} 

.site-nav .button:hover {
    color: #111;
    border-color: #111;
    background-color: var(--color-bg-alt);
}

.site-nav .button.aktuell {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #ffffff;
}

/* ==========================================================================
   3. INTRO-BEREICH & NAHTLOSER AUFKLAPP-TEXT
   ========================================================================== */
.intro-section,
.page-intro {
    padding: 2rem 0.5rem 1rem 0.5rem;
    text-align: center; /* Stellt sicher, dass auf Mobile alles zentriert ist */
}

/* Fluid Typography: Skaliert auf Mobile perfekt ab 1.75rem bis 2.5rem auf Desktop */
.page-title,
.site-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw + 1rem, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    color: #111;
    line-height: 1.2;
}

/* Zentrierter Textbereich mit idealer Zeilenlänge */
.intro-text-wrapper {
    max-width: 680px;
    margin: 0 auto 1.5rem auto;
    text-align: center;
}

.site-intro-lead {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

/* Nahtloses <details> Element */
.aufklapp-sektion {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.button-toggle {
    display: inline-block;
    cursor: pointer;
    color: inherit;
    background-color: transparent;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0.5rem 0;
    list-style: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    user-select: none;
}

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

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

.einblenden-content {
    text-align: center;
    padding: 0;
    background: transparent;
}

.einblenden-content p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-top: 0.75rem;
}

/* Unter-Navigation (Sub-Navi) */
.sub-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    list-style: none;
    margin-top: 1.25rem;
}

.sub-nav .button {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-muted);
}

.sub-nav .button:hover {
    color: #111;
    border-color: #111;
}

/* ==========================================================================
   4. HAUPTLAYOUT & FILME-GRID (Ohne extra Wrapper-Div)
   ========================================================================== */

/* Das vorhandene <main>-Tag richtet die Kategorien automatisch aus */
main {
    display: grid;
    grid-template-columns: 1fr; /* Mobil: 1 Kategorie pro Zeile */
    gap: 2.5rem 1.5rem;
    align-items: start;
}

/* Intro-Bereich & Text-Sektionen sollen immer über die volle Breite gehen */
.intro-section,
.page-intro,
.category-section {
    grid-column: 1 / -1;
}

/* Jede Kategorie-Sektion */
.movie-section {
    width: 100%;
    min-width: 0;
}

.movie-section h2 {
    font-size: clamp(0.95rem, 1.5vw + 0.5rem, 1.35rem);
    margin-bottom: 0.8rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.4rem;
    color: #111;
    font-weight: 700;
    
    /* Text kürzen, falls er nicht in eine Zeile passt */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Feines Chevron hinter dem Text */
.movie-section h2 a::after {
    content: " ›";
    font-weight: 300; /* Sehr dünn und elegant */
    opacity: 0.5;    /* Zurückhaltend im Ruhezustand */
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.movie-section h2 a:hover::after {
    opacity: 1;
    color: var(--color-primary); /* Wird beim Hover rot */
    transform: translateX(3px);  /* Wandert 3px nach rechts */
}

/* Innerhalb jeder Kategorie: Immer genau 3 Filme nebeneinander */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 0.4rem;
}

.movie-grid .plakat,
.movie-grid .filmplakat {
    width: 100%;
    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 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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



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



.movie-grid .filmtitel {
    font-size: 0.8rem; 
    font-weight: 700;
    margin: 0.2rem 0;
    line-height: 1.25;
    min-height: 2.5em; /* <-- Hier "min-" davor setzen */
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; 
}
.movie-grid .genre, 
.movie-grid .kategorie {
    margin: 0;
    font-size: 0.65rem;
    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.4rem; 
}

.movie-grid .button-vod {
    display: block;
    padding: 0.25rem 0.1rem;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: var(--transition);
}

.movie-grid .button-vod:hover {
    background-color: #4a5568;
    color: #fff;
    border-color: #4a5568;
}

.movie-grid .plakat > a {
    display: block;
    width: 100%;
}

/* 1. Verhindert, dass das Poster bei viel Text gestaucht wird */
.movie-grid .plakat > a,
.movie-grid .plakat img {
    display: block;
    width: 100%;
    flex-shrink: 0;
}

/* 2. Textbox nimmt nur so viel Höhe wie nötig, statt das Bild zu quetschen */
.movie-grid .filmplakat {
    height: auto;
}

/* ==========================================================================
   RESPONSIVE MEHRSPALTIGKEIT (Sobald genug Platz da ist)
   ========================================================================== */
@media (min-width: 820px) {
    main {
        /* Nutzt den verfügbaren Platz: 2, 3 oder mehr Kategorien nebeneinander */
grid-template-columns: repeat(2, 1fr);

}

    .movie-section h2 {
        font-size: 1.35rem;
    }

    .movie-grid {
        gap: 0.6rem;
    }

    .movie-grid .filmtitel {
        font-size: 0.85rem;
    }

    .movie-grid .button-vod {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   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
   ========================================================================== */
#site-footer {
    margin-top: 5rem;
    padding: 3rem 0 4rem 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: var(--transition);
}

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

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

@media (min-width: 768px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1.5rem 0;
    }

    .site-title { 
        font-size: 2.75rem; 
    }

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

    .movie-section h2 a:hover {
        color: #000000;
        border-bottom-color: #111111;
    }

    .movie-section h2 a:hover::after {
        color: #111111;
        transform: translateX(4px);
    }

    .movie-grid .filmtitel {
        font-size: 1rem;
    }

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

    .movie-grid .button-vod {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* NACHHER (Bereinigt): */
@media (min-width: 1024px) {
    .link-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }

    .movie-grid {
        gap: 1.2rem;
    }
}

/* 1. Wandelt Absatz und Details-Element in Fließtext um */
.intro-text-wrapper .site-intro-lead,
.intro-text-wrapper .aufklapp-sektion {
    display: inline;
}

/* 2. Entfernt das Button-Design und macht "Mehr" zum Textlink */
.intro-text-wrapper .aufklapp-sektion summary {
    display: inline;
    cursor: pointer;
    /* Hebelt bisherige Button-Styles aus */
    background: none;
    border: none;
    padding: 0;
    margin-left: 0.3em;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-decoration: underline;
    list-style: none;
}

/* Ändert den Link beim Aufklappen von "(Mehr)" zu "(Weniger)" */
.intro-text-wrapper .aufklapp-sektion[open] summary {
    display: inline;
    font-size: 0; /* Versteckt den ursprünglichen Text "Mehr" */
}

.intro-text-wrapper .aufklapp-sektion[open] summary::before {
    content: "(Weniger)";
    font-size: 1rem; /* Wieder normale Schriftgröße für den neuen Text */
}

.intro-text-wrapper .aufklapp-sektion[open] summary::after {
    content: ""; /* Entfernt die zusätzliche Klammer */
}

/* ==========================================================================
   Rechtliche Seiten (Impressum & Datenschutz)
   ========================================================================== */

/* Zentriertes Intro (z.B. für Datenschutz) */
.intro-section.centered-intro,
.intro-section.centered-intro .intro-text-wrapper {
    text-align: center;
}

.intro-section.centered-intro .site-intro-lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

/* Container für Rechtstexte */
.legal-content {
    line-height: 1.6;
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content ul {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.35rem;
}

/* Trennlinien innerhalb von Rechtstexten */
.legal-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid currentColor;
    opacity: 0.2;
}

/* ==========================================================================
   Rechtliche Seiten (Impressum & Datenschutz) - Zentrierung
   ========================================================================== */

/* Zentriertes Intro & Inhalte inklusive Überschriften */
.intro-section.centered-intro,
.intro-section.centered-intro .intro-text-wrapper,
.legal-content.centered-content,
.legal-section.centered-section,
.legal-content.centered-content h2,
.legal-content.centered-content h3 {
    text-align: center;
}

.intro-section.centered-intro .site-intro-lead,
.legal-content.centered-content {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px; /* Begrenzt die Breite für optimale Lesbarkeit */
}

/* Container für Rechtstexte */
.legal-content {
    line-height: 1.6;
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content ul {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    padding-left: 0;
    list-style-position: inside; /* Zentriert Aufzählungspunkte sauber mit */
}

.legal-content li {
    margin-bottom: 0.35rem;
}

/* Trennlinien innerhalb von Rechtstexten */
.legal-content hr {
    margin: 2rem auto;
    max-width: 200px; /* Schöne kurze Trennlinie bei Zentrierung */
    border: 0;
    border-top: 1px solid currentColor;
    opacity: 0.2;
}