/* ==========================================================================
   DESIGN-VARIABLEN & FARBSCHEMA (Weinrot #8b263e & Schützengrün #2d6a4f)
   ========================================================================== */
:root {
    --primary: #8b263e;       
    --primary-dark: #651a2c;  
    --accent: #d99b26;        
    --accent-green: #2d6a4f;      /* Schützengrün für Partnerbox */
    --accent-green-dark: #1b4332; 
    --text-main: #2d3748;     
    --text-muted: #718096;    
    --bg-body: #f7f9fc;       
    --bg-card: #ffffff;       
    --max-width: 1200px;
    --radius: 10px;
    --transition: all 0.25s ease-in-out;
}

/* ==========================================================================
   GLOBALER RESET & BASIS
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.7;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    text-decoration: none;
    position: relative;
    z-index: 1001;
}

/* Logo-Medaillon (Perfekt austariert ohne Abschneiden) */
.brand img {
    height: 112px;
    width: 112px;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 50%;
    padding: 10px 14px 12px 14px;
    border: 1.5px solid #ffffff;
    outline: 2px solid var(--primary);
    outline-offset: -1px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(139, 38, 62, 0.28);
    margin-top: -26px;
    margin-bottom: -26px;
    display: block;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease-in-out;
}

.brand:hover img {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24), 0 4px 10px rgba(139, 38, 62, 0.38);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Checkbox-Menüsteuerung */
.menu-checkbox {
    display: none;
}

.menu-toggle-label {
    display: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 100%;
}

/* ==========================================================================
   LAYOUT GRID & CONTAINER
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2.5rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   KARTEN, HERO (mit Hintergrundbild) & INHALTE
   ========================================================================== */
.hero-card {
    /* Halbtransparenter weinroter Verlauf kombiniert mit dem Hero-Image */
    background: linear-gradient(135deg, rgba(139, 38, 62, 0.5), rgba(101, 26, 44, 0.7)), url('I hero 2022.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 4rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(139, 38, 62, 0.3);
    text-align: center;                           /* Zentrierter Text für moderne Hero-Optik */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 380px;                            /* Mindesthöhe, damit das Bild wirkt */
}

.hero-card h1 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);    /* Leichter Schatten für maximalen Kontrast */
    max-width: 900px;
}

.hero-card p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 800px;                             /* Verhindert, dass der Text zu breit läuft */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(217, 155, 38, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.content-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.content-card h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.content-card h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.4rem;
}

.intro-text {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   BILD-PLATZHALTER & TABELLEN
   ========================================================================== */
.image-placeholder {
    background: #edf2f7;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.image-placeholder span {
    display: block;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.history-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #edf2f7;
    vertical-align: top;
}

.history-table td.year {
    font-weight: 700;
    color: var(--primary);
    width: 70px;
}

/* ==========================================================================
   SIDEBAR WIDGETS
   ========================================================================== */
aside {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--bg-card);
    padding: 1.8rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--primary);
}

.widget h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

/* Grüner Farbakzent für die Schützenbruderschaft */
.widget.widget-green {
    border-top: 4px solid var(--accent-green);
}

.text-green {
    color: var(--accent-green) !important;
}

.widget.widget-green ul li a:hover {
    color: var(--accent-green);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.6rem;
}

.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget ul li a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    display: block;
}

.widget ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Social Buttons */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.btn-social:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-facebook {
    background-color: #1877f2;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.btn-partner {
    background-color: var(--primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: #1a202c;
    color: #a0aec0;
    text-align: center;
    padding: 3rem 1.5rem;
    margin-top: 5rem;
}

footer p {
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVES DESIGN & HAMBURGER-MENÜ
   ========================================================================== */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .brand img {
        height: 80px;
        width: 80px;
        padding: 7px 10px 8px 10px;
        margin-top: -12px;
        margin-bottom: -12px;
    }

    .menu-toggle-label {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 1.5rem 2rem;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        border-top: 1px solid #edf2f7;
        z-index: 10000;
    }

    .menu-checkbox:checked ~ .nav-links {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        padding: 0.6rem 0;
        border-bottom: 1px solid #edf2f7;
        text-align: left;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }
} /* <--- HIER FEHLTE DIE SCHLIESSENDE KLAMMER FÜR DEN MEDIA-BLOCK */

/* ==========================================================================
   SPRUNGMARKEN & AKKORDEONS (Chronik)
   ========================================================================== */
/* Weiches Scrollen für die ganze Seite */
html {
    scroll-behavior: smooth;
}

/* Inhaltsverzeichnis (Mini-Navigation) */
.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #edf2f7;
}

.page-nav a {
    background-color: #f0f4f8;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.page-nav a:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Aufklappbare Boxen (HTML5 details) */
details {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    overflow: hidden;
}

summary {
    padding: 1.2rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none; /* Versteckt den Standard-Pfeil in den meisten Browsern */
    position: relative;
    background-color: #fafbfc;
    transition: background-color 0.2s ease;
}

summary::-webkit-details-marker {
    display: none; /* Versteckt den Standard-Pfeil in Safari */
}

summary:hover {
    background-color: #f0f4f8;
}

/* Eigenes Plus/Minus Icon per CSS */
summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 300;
}

details[open] summary::after {
    content: '−';
}

details[open] summary {
    border-bottom: 1px solid #edf2f7;
}

.details-content {
    padding: 1.5rem;
    background: #ffffff;
}

/* Bilder in der Chronik responsiv und zentriert einbinden */
.chronik-bild {
    display: block;
    max-width: 100%;      /* Verhindert, dass das Bild über den Container hinausragt */
    height: auto;         /* Erhält die korrekten Proportionen des Bildes */
    border-radius: 6px;
    margin: 1.5rem auto;  /* Zentriert das Bild automatisch und hält Abstand zum Text */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   FREUNDSCHAFTS-CHRONIK (TIMELINE Lailly-en-Val)
   ========================================================================== */
.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-list li {
    padding: 0.75rem 1.2rem;
    margin-bottom: 0.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.timeline-list li strong {
    display: inline-block;
    width: 55px; /* Hält die Jahreszahlen sauber in einer Flucht */
}

/* Deutschland (Weinrot - Spielmannszug Amelsbüren) */
.event-de {
    border-left: 4px solid var(--primary);
    background-color: rgba(139, 38, 62, 0.04);
}

/* Frankreich (Schützengrün - Lailly-en-Val) */
.event-fr {
    border-left: 4px solid var(--accent-green);
    background-color: rgba(45, 106, 79, 0.04);
}

/* Ausfälle / Neutral */
.event-neutral {
    border-left: 4px solid #cbd5e0;
    background-color: #f8fafc;
    color: var(--text-muted);
}

/* ==========================================================================
   BILDERGALERIE (Impressionen)
   ========================================================================== */
.gallery-grid {
    display: grid;
    /* Erzeugt automatisch so viele Spalten wie Platz ist, mindestens 220px breit */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #000;
    aspect-ratio: 4 / 3; /* Zwingt alle Bilder in ein einheitliches Format */
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Schneidet das Bild dynamisch passend zu, ohne es zu verzerren */
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.9;
}

/* Eleganter Zoom-Effekt beim Darüberfahren */
.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    opacity: 1;
}

/* Bildunterschrift im Bild */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #ffffff;
    padding: 1.5rem 1rem 1rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    pointer-events: none; /* Verhindert, dass der Text Klicks blockiert */
}

/* ==========================================================================
   TERMINE & VERANSTALTUNGEN (Event-Karten)
   ========================================================================== */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.event-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: var(--transition);
    gap: 1.5rem;
}

.event-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-color: #e2e8f0;
}

/* Datumskachel (Kalender-Optik) */
.event-date {
    flex-shrink: 0;
    width: 75px;
    text-align: center;
    background-color: #fafbfc;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-month {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.3rem 0;
    letter-spacing: 1px;
}

.event-day {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 0.2rem 0;
    line-height: 1;
}

.event-weekday {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-bottom: 0.4rem;
    font-weight: 600;
}

/* Event-Details */
.event-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.event-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.event-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.event-notes {
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #f8fafc;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    display: inline-block;
    align-self: flex-start;
}

/* Mobile Anpassung für schmale Bildschirme */
@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .event-date {
        flex-direction: row;
        width: auto;
        align-items: baseline;
        gap: 0.5rem;
        padding: 0.4rem 0.8rem;
        background-color: var(--primary);
        color: #ffffff;
        border: none;
    }
    
    .event-month {
        background: none;
        padding: 0;
        font-size: 1rem;
    }
    
    .event-day {
        color: #ffffff;
        font-size: 1.2rem;
        padding: 0;
    }
    
    .event-weekday {
        color: rgba(255,255,255,0.8);
        padding: 0;
        font-size: 1rem;
    }
}
/* ==========================================================================
   LAYOUT-HELPER (Datenschutz)
   ========================================================================== */
.container-single {
    grid-template-columns: 1fr;
    max-width: 900px;
}