/* =========================================
   1. SCHRIFTARTEN & VARIABLEN
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Farben Maître de Danse */
    --bg-base: #f5f0da;         /* Creme Hintergrund */
    --accent-blue: #00592b;     /* Dunkelgrün */
    --accent-brown: #6f6959;    /* Oliv-Grau (Text/Linien/H5) */
    --accent-rot: #800000;      /* Dunkelrot (Footer/Hover/Datum) */

    /* Das typografische Grundlinien-Raster */
    --grid-base: 1.625rem;       
    --grid-half: 0.8125rem;      
    --grid-double: 3.25rem;      
    --grid-triple: 4.875rem;     
}

/* =========================================
   2. GRUNDSTYLING (Reset)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--accent-brown);
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: 1rem;             
    line-height: var(--grid-base); 
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-wrapper {
    max-width: 926px; 
    margin: 0 auto;   
    padding: 0;
}

a { 
    color: var(--accent-rot); 
    text-decoration: none; 
    transition: color 0.3s ease; 
}

a:hover, a:focus { 
    color: var(--accent-blue); 
}

/* Weicher Umbruch: Bricht auf dem Desktop um, verschwindet auf Mobile */
.br-desktop {
    display: block; 
}

/* =========================================
   3. ÜBERSCHRIFTEN (Versalien via CSS)
   ========================================= */
h1 {
    font-size: 1.667rem;
    color: var(--accent-brown); 
    font-weight: 400;
    text-align: center;
    line-height: var(--grid-base); 
    margin-top: 1rem;
    margin-bottom: var(--grid-half);
    text-transform: uppercase; 
    letter-spacing: 0.4em;
    margin-right: -0.4em;
}

h2 {
    font-size: 1.667rem;
    color: var(--accent-blue); 
    font-weight: 400;
    text-align: center;
    line-height: var(--grid-base); 
    margin-bottom: var(--grid-half);
    text-transform: uppercase; 
    letter-spacing: 0.4em;
    margin-right: -0.4em;
}

h3 {
    font-size: 1.3rem; 
    color: var(--accent-brown); 
    font-weight: 400;
    text-align: center;
    line-height: var(--grid-base);
    margin-bottom: 2px; 
    text-transform: uppercase; 
    letter-spacing: 0.4em;
    margin-right: -0.4em;
}

h4 {
    font-size: 1.3rem;
    color: var(--accent-blue);
    font-weight: 400;
    text-align: center;
    line-height: var(--grid-base);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin-right: -0.4em;
}

h5 {
    font-size: 1rem; 
    color: var(--accent-brown);
    font-weight: 400;
    text-align: center;
    line-height: var(--grid-base);
    margin-top: 0;
    margin-bottom: 0; 
}

hr {
    border: none;
    border-top: 1px solid var(--accent-brown); 
    margin: 0; 
    padding: 0;
    clear: both;
}

/* =========================================
   4. KOPFBEREICH & LOGO
   ========================================= */
.site-header {
    width: 100%;
}

.image-showcase {
    margin: 0;
    padding: 0;
    line-height: 0; 
    display: flex;  
    flex-direction: column; 
    width: 100%;
    position: relative;
    z-index: 1; /* Bleibt brav unter dem Menü */
}

.logo-link {
    display: inline-block;
    position: relative;
    line-height: 0;
    width: 100%;
}

.logo-standard {
    display: block;
    width: 100%;
    transition: opacity 0.3s ease;
}

.logo-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.logo-link:hover .logo-hover { 
    opacity: 1; 
}

/* Main Nav Top - Kugelsicher verankert mit negativer Margin */
.site-header .main-nav {
    display: flex;
    justify-content: space-evenly; 
    align-items: center;
    padding: 0; 
    max-width: 926px;
    margin: 0 auto;
    
    /* Der Trick: Wir ziehen es nach oben ins Bild, ohne es abzuschneiden */
    position: relative;
    margin-top: -38px; 
    margin-bottom: -2px; /* Zieht die horizontale Linie bündig heran */
    height: 40px; 
    z-index: 50; 
    
    pointer-events: none; /* Blockiert die Maus NICHT für das Logo dahinter */
}

.site-header .main-nav a {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 1rem; 
    color: var(--accent-brown);
    white-space: nowrap;
    line-height: 40px; 
    position: relative;
    pointer-events: auto; /* Die Links bleiben voll klickbar */
    transition: color 0.3s ease;
}

.site-header .main-nav a:hover { 
    color: var(--accent-rot); 
}

/* Der präzise Eingriff: NUR Kontakt wird vom Wappen weggeschoben */
.site-header .main-nav a:nth-child(3) {
    margin-left: 70px; 
}

/* =========================================
   5. FLAGGEN (Mit Bildwechsel-Hover)
   ========================================= */
.language-nav {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px; 
    background-color: var(--bg-base); 
    padding: 0; 
    margin: 0;
    line-height: 0; 
}

.flag-link {
    display: block;
    position: relative;
    line-height: 0; 
    width: 40px; /* Feste Breite für stabilen Container */
}

.flag-standard {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.flag-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.flag-link:hover .flag-hover { 
    opacity: 1; 
}

/* =========================================
   6. INHALTS-BLÖCKE
   ========================================= */
.menu-block {
    display: block;
    padding: 8px 0; 
    transition: transform 0.2s ease;
}

.menu-block:hover {
    transform: translateX(3px); 
}

.menu-block h3, .menu-block h5 {
    transition: color 0.3s ease;
}

.menu-block:hover h3, .menu-block:hover h5 {
    color: var(--accent-rot);
}

/* =========================================
   7. ARCHITEKTUR-BÖGEN 
   ========================================= */
.arches-container {
    position: relative;
    width: 100%;
    display: block; 
    margin: 0; 
}

.arches-base {
    width: 100%;
    height: auto;
    display: block;
}

.arches-links {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; 
    z-index: 10;
}

.arch-link {
    flex: 1; 
    height: 100%;
    display: block;
    background-image: url('../images/Epochen-over.webp');
    background-size: 400% 100%; 
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.arch-link:hover { opacity: 1; }
.arch-1 { background-position: 0% 0; }
.arch-2 { background-position: 33.333% 0; }
.arch-3 { background-position: 66.666% 0; }
.arch-4 { background-position: 100% 0; }

/* =========================================
   8. UNSERE HIGHLIGHTS & THUMBNAILS
   ========================================= */
.highlights-spacing {
    height: 4.875rem; 
}

.balls-section {
    margin: 0; 
}

.thumbnails-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0; 
    margin: 0; 
}

.thumbnails-row a {
    display: block;
    flex: 1; 
    line-height: 0;
}

.thumbnails-row img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.thumbnails-row a:hover img {
    transform: scale(1.03);
    z-index: 2;
    position: relative;
}

/* =========================================
   9. TANZKALENDER (Logik für Farben & Hover)
   ========================================= */
.calendar-section {
    margin-bottom: 0; 
    margin-top: 0; 
}

.calendar-title {
    margin-top: 1rem;
    margin-bottom: var(--grid-half);
}

.cal-top-line {
    border-top: 1px solid var(--accent-brown);
    width: 100%;
    margin: 0;
}

.cal-entry {
    display: block;
    text-align: center;
    border-bottom: 1px solid var(--accent-brown);
    padding: 4px 0; 
    color: var(--accent-brown); 
    font-size: 0.95rem; 
    line-height: 1.4;
    transition: background-color 0.3s ease;
}

/* Hover für die gesamte Zeile */
.cal-entry:hover {
    background-color: rgba(111, 105, 89, 0.05); 
    color: var(--accent-brown); 
}

/* Datumsauszeichnung */
.cal-date {
    color: var(--accent-rot); 
    font-weight: 400;
    transition: color 0.3s ease;
}

/* Nur das Datum wird beim Hover über die Zeile grün */
.cal-entry:hover .cal-date {
    color: var(--accent-blue);
}

.cal-entry.crossed-out {
    text-decoration: line-through;
    opacity: 0.6;
}

/* =========================================
   10. GEWANDUNG & BANNER
   ========================================= */
.gewandung-section {
    margin: 0; 
}

.gewandung-section h3 {
    padding: 6px 0; 
    margin: 0;
}

.banner-container {
    width: 100%;
    margin: 0; 
    padding: 0;
    line-height: 0;
}

.responsive-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   11. NEWSLETTER (Mailingliste)
   ========================================= */
.newsletter-section {
    text-align: center;
}

.newsletter-spacer {
    height: 6.5rem; 
}

.newsletter-graphic-container {
    width: 100%;
    max-width: 926px;
    margin: 0 auto;
    line-height: 0;
}

.newsletter-image-link {
    display: block;
    position: relative;
    line-height: 0;
    width: 100%;
}

.newsletter-img-standard {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.newsletter-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-image-link:hover .newsletter-img-hover {
    opacity: 1;
}

.newsletter-link-block {
    display: block;
    margin-top: 10px; 
    transition: transform 0.2s ease;
}

.newsletter-link-block:hover {
    transform: translateX(3px);
}

.newsletter-link-block h5 {
    padding: 10px 0;
    line-height: 1.6;
}

.newsletter-link-block h1 {
    padding: 15px 0;
    margin: 0;
}

.newsletter-link-block:hover h5,
.newsletter-link-block:hover h1 {
    color: var(--accent-rot);
}

/* =========================================
   12. MASSIVER ABSCHLUSSBALKEN (Rot)
   ========================================= */
.massive-footer {
    width: 100%; 
    background-color: var(--accent-rot); 
    margin-top: var(--grid-double);
    padding-top: 0; 
    padding-bottom: 3.5rem; 
}

.footer-bottom-nav {
    max-width: 926px;
    margin: 0 auto;
    padding-top: 0; 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-bottom-nav a, 
.footer-bottom-nav .bull {
    color: var(--bg-base); 
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: color 0.3s ease;
}

.footer-bottom-nav a:hover {
    color: var(--accent-brown); 
}

/* =========================================
   13. MOBIL-WEICHE (SMARTPHONES)
   ========================================= */
@media (max-width: 768px) {
    /* Versteckt den Desktop-Umbruch auf kleinen Bildschirmen, damit der Text fließen kann */
    .br-desktop {
        display: none;
    }

    .site-header .main-nav {
        flex-direction: column;
        height: auto;
        margin-top: 10px;  
        margin-bottom: 15px; 
    }
    
    .site-header .main-nav a {
        line-height: 2rem;
    }
    
    .site-header .main-nav a:nth-child(3) {
        margin-left: 0; 
    }
    
    .thumbnails-row {
        flex-wrap: wrap;
    }
    
    .thumbnails-row a {
        flex: 1 1 50%; 
    }
    
    .footer-bottom-nav {
        flex-direction: column;
        gap: 15px;
        padding-top: 1.5rem; 
    }
    
    .footer-bottom-nav .bull {
        display: none; 
    }
}