/* 1. Jost Regular einbinden */
@font-face {
    font-family: 'Jost';
    src: url('fonts/Jost-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 2. Federo Regular einbinden */
@font-face {
    font-family: 'Federo';
    src: url('fonts/Federo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


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

body {
    /* Vintage Hintergrundbild kacheln */
    background-image: url('img/vintage_background.jpg');
    background-repeat: repeat;
    background-position: center top;
    background-color: #d1c5a9;
    font-family: 'Jost', sans-serif;
    font-size: 1.15rem;
    color: #2b2621;
    line-height: 1.6;
    padding: 20px 10px;
}

/* Haupt-Container (Zentrierte 'Karte' über dem Hintergrund) */
.site-wrapper {
    max-width: 960px;
    width: 92%; /* Lässt auf jeder Seite standardmäßig ca. 4% Rand */
    margin: 30px auto;
    background-color: rgba(253, 250, 242, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(120, 90, 40, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

/* Header Banner */
.site-header {
    width: 100%;
    text-align: center;
    border-bottom: 2px solid #8c734b;
    background-color: #cbb998;
}

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

/* Navigation - Korrigiert für bündiges Hover und vertikale Zentrierung */
.main-navigation {
    background-color: #3d3126;
    border-bottom: 1px solid #63503d;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: flex;
    align-items: center; /* Zentriert den Text vertikal exakt in voller Höhe */
    justify-content: center;
    height: 48px; /* Feste Gesamthöhe der Navigationsleiste */
    padding: 0 24px; /* Seitlicher Innenabstand */
    color: #e3d5c1;
    text-decoration: none;
    font-family: 'Federo', serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
    background-color: #594738;
    color: #ffffff;
}

/* Inhaltsbereich */
.content-area {
    padding: 40px 30px;
}

.content-section {
    margin-bottom: 40px;
}

.content-section-datenschutz {
    margin-bottom: 40px;
    text-align: left;
}

/* Stellt sicher, dass auch alle Unterelemente (Absätze, Überschriften, Listen) linksbündig stehen */

.content-section-datenschutz h3,
.content-section-datenschutz p,
.content-section-datenschutz ul {
    text-align: left;
}

/* Bündigt Aufzählungszeichen sauber mit dem Fließtext ein */
.content-section-datenschutz ul {
    padding-left: 20px;
    margin-left: 0;
}

h2 {
    font-family: 'Federo', serif;
    color: #4a3828;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Stilelement für Trennlinien */
.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #8c734b, transparent);
    margin: 10px auto 25px auto;
    width: 60%;
}

p {
    font-size: 0.9rem; /* Um exakt 10% gegenüber dem Ausgangswert (1rem) verkleinert */
    text-align: center;
    max-width: 750px;
    margin: 0 auto 15px auto;
}

/* Styling für normale Hyperlinks im Fließtext */
p a {
    color: #8c734b; /* Edler Gold-/Bronze-Ton passend zu den Akzenten */
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.3s ease, background-color 0.3s ease, text-decoration-thickness 0.3s ease;
}

p a:hover {
    color: #4a3828; /* Dunklerer Braunton der Überschriften beim Hover */
    background-color: rgba(140, 115, 75, 0.1); /* Dezent hinterlegt */
    text-decoration-thickness: 2px;
}

p a:active {
    color: #2b2118;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    background-color: #2b2118;
    color: #a89a88;
    font-size: 0.9rem;
    border-top: 1px solid #423427;
}

.site-footer a {
    color: #c9b088;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}


.responsive-img {
  max-width: 100%;
  height: auto;
  display: block; /* Verhindert unerwünschte Baseline-Abstände unter dem Bild */
  margin: 0 auto; /* Optional: Zentriert das Bild innerhalb der Area */
}


/* Wischbarer Container für die Textkacheln */
.tile-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 5px 20px 5px;
    margin-top: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
}

/* Scrollbalken-Design für Desktop */
.tile-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.tile-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
.tile-scroll-container::-webkit-scrollbar-thumb {
    background: #8c734b;
    border-radius: 4px;
}

/* Einzelne Text-Kachel (Standard für Desktop) */
.text-tile {
    flex: 0 0 280px; 
    width: 280px;
    height: 280px; 
    aspect-ratio: 1 / 1; 
    background-color: #fcf9f2;
    border: 1px solid #d4c5a9;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; 
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.text-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* Kleine Überschrift in der Kachel */
.text-tile h3 {
    font-family: 'Federo', cursive, sans-serif;
    font-size: 1.1rem;
    color: #4a3828;
    margin-bottom: 10px;
    text-align: center;
}

/* Text in der Kachel skaliert */
.text-tile p {
    font-size: 75%;
    text-align: left;
    margin: 0;
    color: #3d3126;
    line-height: 1.5;
}


/* Grafischer Verblass-Effekt am unteren Rand */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: linear-gradient(to bottom, rgba(252, 249, 242, 0), rgba(252, 249, 242, 0.95));
    pointer-events: none;
}


/* Zusätzliche Absicherung für schmalere Smartphones */
@media (max-width: 600px) {
    .site-wrapper {
        width: 88%; 
        margin: 15px auto;
    }
}


/* Smartphone-Anpassung: Strikte Einpassung in den Container mit flex-shrink und prozentualer Begrenzung */
@media (max-width: 600px) {
    .text-tile {
        /* Erlaubt dem Element zu schrumpfen und passt sich dem Container an, 
           wobei die Boxen quadratisch bleiben und nicht überstehen */
        flex: 0 0 220px; 
        width: 220px;
        height: 220px;
        aspect-ratio: 1 / 1; 
        justify-content: flex-start;
        box-sizing: border-box;
    }
}

/* --- OPTIMIERTES POPUP / MODAL DESIGN --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 33, 24, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 15px; 
    backdrop-filter: blur(3px);
    box-sizing: border-box;
}

.modal-content {
    background-color: #fdfaf2;
    border: 2px solid #8c734b;
    border-radius: 8px;
    padding: 35px 20px 20px 20px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh; 
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: modalPop 0.3s ease;
    box-sizing: border-box;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #4a3828;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    color: #8c734b;
}

#modalBody {
    overflow-y: auto;
    max-height: calc(85vh - 60px); 
    padding-right: 5px;
}

#modalBody h3 {
    font-family: 'Federo', cursive, sans-serif;
    font-size: 1.4rem;
    color: #4a3828;
    margin-bottom: 15px;
    text-align: center;
}

#modalBody p {
    font-size: 1rem; 
    color: #3d3126;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

/* Hauptcontainer für die kompakte Leiste */
.h-timeline-scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 5px 20px 5px;
    margin-top: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.h-timeline-scroll-container::-webkit-scrollbar {
    height: 6px;
}
.h-timeline-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 3px;
}
.h-timeline-scroll-container::-webkit-scrollbar-thumb {
    background: #8c734b;
    border-radius: 3px;
}

.h-timeline-item {
    flex: 0 0 160px; 
    width: 160px;
    background-color: #fcf9f2;
    border: 1px solid #d4c5a9;
    border-radius: 5px;
    padding: 10px 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.h-timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.h-timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 2px;
    background-color: #8c734b;
    border-radius: 0 0 2px 2px;
}

.h-timeline-year {
    flex: 0 0 auto;
    font-family: 'Federo', cursive, sans-serif;
    font-size: 0.9rem;
    color: #8c734b;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
    text-align: center;
}

.h-timeline-desc {
    font-size: 0.8rem;
    color: #3d3126;
    line-height: 1.3;
    text-align: left;
    margin: 0;
    white-space: normal;         
    overflow-wrap: break-word;   
    word-break: break-word;
}

/* Responsiver Video-Container im 16:9 Format */
.video-container {
    position: relative;
    width: 100%;
    max-width: 700px; 
    margin: 0 auto;   
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #d4c5a9; 
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Anpassungen für Mobilgeräte */
@media (max-width: 600px) {
    .main-navigation ul {
        flex-direction: column;
    }

    .main-navigation a {
        height: auto;
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .content-area {
        padding: 25px 15px;
    }

    h2 {
        font-size: 1.5rem;
    }
}