/* ==========================================================================
   1. DESIGN-VARIABLEN & FARBSCHEMA (Weinrot #8b263e & Schützengrün #2d6a4f)
   ========================================================================== */
:root {
    --primary: #8b263e;           /* Vereinsfarbe Weinrot */
    --primary-dark: #651a2c;      /* Dunkles Weinrot für Verläufe/Hover */
    --accent: #d99b26;            /* Goldgelb für Akzente & Buttons */
    --accent-green: #2d6a4f;      /* Schützengrün für Partnerbox & Frankreich-Chronik */
    --accent-green-dark: #1b4332; 
    --text-main: #2d3748;         /* Haupttextfarbe (Anthrazit) */
    --text-muted: #526071;        /* Abgedunkeltes Grau für optimalen Kontrast (WCAG AA) */
    --bg-body: #f7f9fc;           /* Seitenhintergrund */
    --bg-card: #ffffff;           /* Kartenhintergrund */
    --bg-subtle: #fafbfc;         /* Dezenter Kasten-Hintergrund */
    --border-light: #edf2f7;      /* Dezente Rahmenlinie */
    --max-width: 1200px;
    --radius: 10px;
    --transition: all 0.25s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

/* Verhindert, dass angesprungene Überschriften (#impressum, #gruendung etc.) 
   unter dem fixierten Header und dem Logo-Medaillon verschwinden */
[id] {
    scroll-margin-top: 115px;
}

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;
}

/* ==========================================================================
   3. HEADER, LOGO-MEDAILLON & 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 */
.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 (barrierefrei & per Tastatur fokussierbar) */
.menu-checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.menu-toggle-label {
    display: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    user-select: none;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Sichtbarer Rahmen bei Tastatur-Navigation (Tab-Taste) */
.menu-checkbox:focus-visible + .menu-toggle-label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.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%;
}

/* ==========================================================================
   4. 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;
}

/* Einspaltiges Layout (z. B. für Datenschutzerklärung & 404-Seite) */
.container-single {
    grid-template-columns: 1fr;
    max-width: 900px;
}

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

/* ==========================================================================
   5. KARTEN, HERO-BEREICH & INHALTS-TYPOGRAFIE
   ========================================================================== */
.hero-card {
    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;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 380px;
}

.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);
    max-width: 900px;
}

.hero-card p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 800px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.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 var(--border-light);
    padding-bottom: 0.4rem;
}

.content-card p + p {
    margin-top: 1rem;
}

/* Spezielle Überschriften- und Text-Helferklassen (ersetzen frühere Inline-Styles) */
.section-heading {
    margin-top: 2.5rem !important;
}

.section-divider {
    margin-top: 4rem !important;
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.subsection-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.lead-text {
    font-size: 1.1rem;
}

.text-small {
    font-size: 0.9rem;
}

.text-semibold {
    font-weight: 600;
}

.mt-sm {
    margin-top: 1rem;
}

.mt-md {
    margin-top: 1.5rem;
}

.mb-sm {
    margin-bottom: 1rem;
}

.mb-md {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   6. HERVORGEHOBENE INFOBOXEN, KONTAKTKARTE & LINKS
   ========================================================================== */
.highlight-box {
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

.highlight-box-accent {
    background-color: var(--bg-subtle);
    border-left: 4px solid var(--accent);
}

.highlight-box-primary {
    background-color: #f0f4f8;
    border-left: 4px solid var(--primary);
}

.highlight-title {
    color: var(--primary);
    font-size: 1.15rem;
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Kontakt-Box auf kontakt.html */
.contact-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
}

.contact-role {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 0.3rem;
}

.contact-item {
    margin-top: 0.6rem;
}

.contact-item-tight {
    margin-top: 0.3rem;
}

/* Klickbare Telefon- und E-Mail-Links */
.link-phone {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-phone:hover {
    color: var(--primary);
    text-decoration: underline;
}

.link-mail {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.link-mail:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. BUTTONS (MIT BARRIEREFREIEM KONTRAST)
   ========================================================================== */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #1a202c; /* Dunkle Schrift auf Goldgelb für hohen Kontrast (8,4:1) */
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(217, 155, 38, 0.25);
}

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

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 38, 62, 0.25);
}

.btn-secondary {
    background-color: #4a5568;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.25);
}

.btn-block {
    display: block;
    text-align: center;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}

.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* ==========================================================================
   8. SIDEBAR-WIDGETS & SOCIAL-MEDIA-BUTTONS
   ========================================================================== */
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;
}

.widget-text {
    font-size: 0.9rem;
    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-Media-Buttons */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.btn-social:last-child {
    margin-bottom: 0;
}

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

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

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

/* ==========================================================================
   9. SPRUNGMARKEN, AKKORDEONS & BILDER (Chronik)
   ========================================================================== */
.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.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 var(--border-light);
    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;
    position: relative;
    background-color: var(--bg-subtle);
    transition: background-color 0.2s ease;
}

summary::-webkit-details-marker {
    display: none;
}

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

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 var(--border-light);
}

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

/* Bilder & Bildunterschriften (Figure / Figcaption) */
.chronik-figure {
    margin: 2rem 0;
}

.figure-bottom {
    margin: 2.5rem 0 0 0;
}

.figure-vorstand {
    margin: 1.5rem 0 3rem 0;
}

.chronik-bild {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chronik-figure .chronik-bild {
    margin: 0 auto 0.8rem auto;
}

.chronik-caption {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    padding: 0 1rem;
}

/* ==========================================================================
   10. 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;
}

.event-de {
    border-left: 4px solid var(--primary);
    background-color: rgba(139, 38, 62, 0.04);
}

.event-fr {
    border-left: 4px solid var(--accent-green);
    background-color: rgba(45, 106, 79, 0.04);
}

.event-neutral {
    border-left: 4px solid #cbd5e0;
    background-color: #f8fafc;
    color: var(--text-muted);
}

/* ==========================================================================
   11. BILDERGALERIE (Impressionen)
   ========================================================================== */
.gallery-grid {
    display: grid;
    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: #000000;
    aspect-ratio: 4 / 3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.9;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    opacity: 1;
}

.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;
}

/* ==========================================================================
   12. 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 var(--border-light);
    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;
}

.event-date {
    flex-shrink: 0;
    width: 75px;
    text-align: center;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-light);
    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 {
    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;
}

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

footer p {
    font-size: 0.9rem;
}

footer a {
    color: #cbd5e0;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   14. RESPONSIVES DESIGN (TABLET & SMARTPHONE)
   ========================================================================== */
@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 var(--border-light);
        z-index: 10000;
    }

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

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

    .nav-links li:last-child {
        border-bottom: none;
    }
}

@media (max-width: 600px) {
    .content-card {
        padding: 1.5rem;
    }

    .hero-card {
        padding: 2.5rem 1.5rem;
        min-height: 300px;
    }

    .hero-card h1 {
        font-size: 1.8rem;
    }

    .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.85);
        padding: 0;
        font-size: 1rem;
    }
}