/* Farb-Variablen für den Tag-Modus (Standard) */
:root {
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --bg-header: #003399; /* Offizielles EU-Blau */
    --bg-footer: #003399; /* Offizielles EU-Blau */
    --text-main: #333333;
    --text-muted: #718096;
    --text-footer: #ffffff;
    --shadow: rgba(0, 0, 0, 0.08);
    --header-polit: #000000; /* Polit im Kopf schwarz */
    --content-polit: #000000; /* Polit im Inhalt schwarz */
    --footer-polit: #000000; /* Polit im Fuss schwarz */
    --logo-box-bg: rgba(255, 255, 255, 0.95);
    --logo-box-border: rgba(255, 255, 255, 0.4);
    --content-box-bg: rgba(255, 255, 255, 0.95); /* Weißer Rahmen jetzt überall Standard */
    --content-box-border: rgba(255, 255, 255, 0.4);
    --footer-box-bg: rgba(255, 255, 255, 0.95);
    --footer-link: #ffcc00;
}

/* Farb-Variablen für den Nacht-Modus */
[data-theme="dark"] {
    --bg-body: #000000; /* Mittelfeld wird tiefschwarz */
    --bg-card: #1a202c;
    --bg-header: #003399; /* Oben bleibt offizielles EU-Blau */
    --bg-footer: #003399; /* Unten bleibt offizielles EU-Blau */
    --text-main: #f7fafc;
    --text-muted: #a0aec0;
    --text-footer: #ffffff;
    --shadow: rgba(0, 0, 0, 0.5);
    --header-polit: #000000;
    --content-polit: #000000; 
    --footer-polit: #000000;
    --logo-box-bg: rgba(255, 255, 255, 0.95);
    --logo-box-border: rgba(255, 255, 255, 0.4);
    --content-box-bg: rgba(255, 255, 255, 0.95); 
    --content-box-border: rgba(255, 255, 255, 0.4);
    --footer-box-bg: rgba(255, 255, 255, 0.95);
    --footer-link: #ffcc00;
}

* { box-sizing: border-box; margin: 0; padding: 0; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }

/* FIX FÜR STICKY-LAYOUT: Verhindert, dass der gesamte Bildschirm scrollt */
html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* --- HEADER BEREICH (Zwei-Button-Grid) --- */
header { 
    background-color: var(--bg-header); 
    box-shadow: 0 2px 10px var(--shadow); 
    padding: 0;
    flex-shrink: 0; /* Verhindert, dass der Kopf zusammengedrückt wird */
    z-index: 10;
}

.meta-navigation {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 6px 20px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.freeze-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.freeze-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.meta-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-links a:hover {
    color: #ffffff;
}

.meta-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    user-select: none;
}

.header-main {
    padding: 15px 20px; 
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
}

header .center-wrapper { grid-column: 2; }

header .theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}
header .theme-toggle:hover { background: rgba(255, 255, 255, 0.25); }

header .left-btn {
    grid-column: 1;
    justify-self: start;
}

header .right-btn {
    grid-column: 3;
    justify-self: end;
}

/* --- HAUPTNAVIGATION (Unter dem Kopfbereich) --- */
.main-navigation {
    background-color: var(--bg-header);
    box-shadow: 0 4px 6px var(--shadow);
    padding: 0 20px 12px 20px;
    display: flex;
    justify-content: center;
    flex-shrink: 0; /* Bleibt starr */
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s, transform 0.1s;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.main-navigation a.active {
    background-color: var(--logo-box-bg);
    color: #000000;
    border-color: var(--logo-box-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- PROPORTIONALE WEISSE RAHMENBOXEN --- */
.logo-box, .content-box, .footer-box {
    border-radius: 4px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
    background-color: var(--logo-box-bg);
    border: 1.5px solid var(--logo-box-border);
    padding: 0.12em 0.35em; 
}

/* --- DIGITALE MARKENFONTS & FORMATE --- */
.brand-polit { color: var(--content-polit) !important; font-weight: 900 !important; }
.brand-otto { color: #dd0000 !important; font-weight: 900 !important; }

.brand-de { 
    color: #ffcc00 !important; 
    font-weight: 900 !important; 
    font-size: 0.55em !important; 
    font-variant: normal !important; 
    text-transform: none !important;
    margin-left: 0.1em;
}

header .brand-polit { color: var(--header-polit) !important; }
footer .brand-polit { color: var(--footer-polit) !important; }

.caps-text { font-variant: small-caps !important; text-transform: lowercase !important; }
.big-letter { font-size: 1.35em !important; font-weight: 900 !important; line-height: 1 !important; text-transform: uppercase !important; }

/* --- 1. STUFE: MITTELGROSS IM KOPF --- */
header .logo-box { font-size: 1.55rem; }
header .logo { font-size: 1em; letter-spacing: -0.5px; display: flex; align-items: baseline; justify-content: center; line-height: 1; }

/* --- 2. STUFE: MAXIMAL GROSS IM HAUPTTEIL (MIT SCROLL-ZONE) --- */
main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 20px 5px; 
    text-align: center; 
    /* DIESE ZWEI ZEILEN AKTIVIEREN DAS SCROLLEN NUR IM MITTELTEIL */
    overflow-y: auto; 
    width: 100%;
}

.hero-section {
    flex-shrink: 0; /* Die obere Titel-Box darf beim Scrollen nicht schrumpfen */
    height: 33.3vh; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center;
    padding-bottom: 20px;
    width: 100%;
}

.hero-section .content-box {
    width: 96%;
    max-width: 650px;
    font-size: 8.8vw; 
}

h1 { 
    font-size: 1em; 
    letter-spacing: -1px; 
    display: flex; 
    align-items: baseline; 
    justify-content: center; 
    line-height: 1.0; 
    width: 100%;
    margin: 0;
}

@media (min-width: 600px) {
    .hero-section .content-box { font-size: 4.5rem; }
}

.subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; font-weight: 400; margin-top: 15px; }

.content-section {
    margin-top: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.card { background: var(--bg-card); padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px var(--shadow); max-width: 500px; width: 100%; text-align: center; }

/* --- 3. STUFE: SEHR KLEIN IM FUSS --- */
footer { 
    background-color: var(--bg-footer); 
    color: var(--text-footer); 
    padding: 10px 4px; 
    font-size: 0.68rem; 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px; 
    flex-wrap: nowrap; 
    box-shadow: 0 -2px 10px var(--shadow);
    width: 100%;
    white-space: nowrap; 
    flex-shrink: 0; /* Zwingt den Fuß, immer sichtbar am unteren Rand zu bleiben */
    z-index: 10;
}

footer a { color: var(--footer-link); text-decoration: none; font-weight: 500; }
footer a:hover { text-decoration: underline; }

footer .footer-box { font-size: 0.65rem; }

footer .footer-logo { 
    font-size: 1em; 
    letter-spacing: -0.2px; 
    display: flex; 
    align-items: baseline; 
    justify-content: center; 
    line-height: 1; 
}

/* --- DYNAMISCHER SCHRIFTARTEN-WECHSEL & KERNING (MEGA-BOGEN) --- */
[data-font-mode="politotto"] span:nth-child(1) .big-letter,
[data-font-mode="politotto-dark"] span:nth-child(1) .big-letter {
    font-size: 1.85em !important; 
    position: relative;
    top: 0.05em; 
    margin-right: -0.32em !important; 
    display: inline-block;
    z-index: 2;
}

.font-polit-style {
    font-family: 'Playfair Display', serif !important;
}

[data-font-mode="politotto"] span:nth-child(1) .caps-text {
    position: relative;
    left: -0.05em; 
    z-index: 1;
}

.font-totto-style {
    font-family: 'Rubik Mono One', sans-serif !important;
    letter-spacing: -0.05em !important;
}

.font-totto-style span:nth-child(6) .big-letter,
.font-totto-style .brand-otto .big-letter {
    font-size: 1.55em !important;
    margin-right: -0.15em !important; 
    display: inline-block;
}
