/* ==========================================================================
   1. VARIABLEN & GRUNDEINSTELLUNGEN
   ========================================================================== */
:root {
    --primary-color: #5290ca; 
    --accent-color: #0b0b0b;  
    --bg-light: #f8f9fa;      
    --text-dark: #2c3e50;     
}

* {
    box-sizing: border-box; /* Wichtig für korrekte Breitenberechnung */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: white;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    min-height: 100px;
}
/* WhatsApp Bilder kleiner & sauber darstellen */
.static-info-box.box-breit img.wa-img {
    width: 100% !important;
    max-width: 400px !important; /* 🔥 hier Größe einstellen */
    height: auto !important;
    margin: 10px auto;
    display: block;
    border-radius: 8px;
}
/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: var(--primary-color);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    height: auto;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
    }

    .gemeinde-holtgast {
        font-size: 18px;
    }

    .wappen {
        height: 40px;
    }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 0px;
}

.wappen {
    height: 80px;
    width: auto;
}

.gemeinde-holtgast {
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    position: relative;
    display: inline-block;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

nav a.active-link {
    color: #000000;
    background-color: rgba(241, 238, 95, 0.8);
    padding: 5px 12px;
    border-radius: 4px;
}

nav a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 2000;
    list-style: none;
    padding: 10px 0;
    border-radius: 4px;
}

.dropdown li a {
    color: #333 !important;
    padding: 10px 20px;
    display: block;
}

.dropdown li a:hover {
    background-color: #f4f4f4;
    color: var(--primary-color) !important;
}

nav ul li:hover .dropdown {
    display: block;
}

nav ul li:focus-within .dropdown {
    display: block;
}



/* ==========================================================================
   3. SLIDER & INFO-BOXEN (BASIS)
   ========================================================================== */
.hero-slider {
    position: relative;
    min-height: 420px;
    height: min(700px, calc(100vh - 120px));
    border-radius: 8px;
    overflow-x: hidden;
    overflow-y: visible;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.dorfleben-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #4f84b8;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.dorfleben-link:hover {
    background: #3a6e9e;
}

.slide.active { opacity: 1; }

.slide h1 {
    background-color: rgba(0, 68, 136, 0.7);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 2.5rem;
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

/* Allgemeine Info-Box */
.static-info-box {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.94);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    backdrop-filter: blur(8px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.static-info-box img {
    width: 250px;
    height: auto;
}

.static-info-box img.ortsschild-gross {
    width: 250px;
    height: auto;
}
.static-info-box a img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.static-info-box a img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.politik-links {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.politik-links a {
    display: block;
    background: #e8f1f8;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: #004488;
    transition: all 0.2s ease;
}

.politik-links a:hover {
    background: #d4e6f4;
    transform: translateX(5px);
}


.static-info-box h1 { color: var(--primary-color); font-size: 1.8rem; margin-bottom: 10px; }
.static-info-box p { margin: 5px; }
.static-info-box hr { border: 0; border-top: 1px solid #ccc; margin: 15px 0; }

/* Spezifische Box-Varianten */
.box-breit, .box-verein, .box-satzung { max-width: 900px; max-height: 80vh; }
.box-fulkum { max-width: 700px; max-height: 70vh; }
.box-satzung { text-align: left; }
.box-kindergarten {max-width: 500px;;}
.box-img {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 15px auto;
}
.impressum-box {
    text-align: left;
    line-height: 1.6;
}

.legal-hero {
    height: auto;
    min-height: 0;
    overflow: visible;
}

.static-info-box.legal-page {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto;
    max-height: none;
    overflow: visible;
    text-align: left;
}

.legal-page h1,
.legal-page h2 {
    text-align: left;
}

.legal-review-note {
    margin-top: 2rem !important;
    padding: 1rem;
    border-left: 4px solid #b45309;
    background: #fff7ed;
}

.static-info-box.Veranstaltungen img {
    width: 100%;
    max-width: 750px;
    height: auto;
}

.static-info-box.box-breit img {
    width: 100%;
    height: auto;
    max-width: 100%;
}
.static-info-box.galerie img {
    width: 100%;
    height: auto;
    max-width: 100%;
}
/* ==========================================================================
   4. VEREINS-GRID (ZWEI SPALTEN)
   ========================================================================== */
.vereins-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 15px;
    justify-content: flex-start;
    width: 100%;
    margin-top: 20px;
}

.vereins-zeile {
    flex: 0 0 calc(50% - 10px);
    min-width: 250px;
}

.vereins-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    height: 100%;
    transition: all 0.2s ease;
}

.vereins-link:hover {
    background-color: #fff;
    border-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.logo-box {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin-right: 15px;
}

.logo-box img {
    max-height: 50px;
    max-width: 100%;
    width: auto;
    height: auto;
}

.vereins-link p {
    margin: 0;
    font-weight: bold;
    text-align: left;
    font-size: 1rem;
}

/* ==========================================================================
   5. INHALTS-LAYOUT (TABELLEN, TEXTE)
   ========================================================================== */
.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    
}

.side-menu {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}



/* Wahl-Tabelle */
.table-container { margin: 20px 0; overflow-x: auto; }
.wahl-tabelle { width: 100%; border-collapse: collapse; background: white; }
.wahl-tabelle th { background: #004488; color: white; padding: 12px; text-align: left; }
.wahl-tabelle td { padding: 10px; border-bottom: 1px solid #ddd; }
.wahl-tabelle tr:nth-child(even) { background: #f9f9f9; }

/* Satzung */
.p-titel { font-weight: bold; color: #004488; margin-top: 30px; border-bottom: 1px solid #eee; }
.paragraf-block p { padding-left: 20px; margin-bottom: 10px; }

/* ==========================================================================
   6. RESPONSIVE DESIGN (MOBILE)
   ========================================================================== */
/* ==========================================================================
   6. RESPONSIVE DESIGN (MOBILE) - CLEAN FIX
   ========================================================================== */
@media (max-width: 768px) {

    /* Layout umstellen */
    .content-wrapper {
        display: flex;
        flex-direction: column;
        margin: 20px auto;
    }

    /* Reihenfolge fix */
    .main-column {
        order: 1;
    }

    #side-menu-placeholder {
        order: 2;
        width: 100%;
    }

    /* Sidebar sauber */
    .side-menu {
        width: 100%;
        margin-top: 20px;
    }

    .hero-slider {
        position: relative;
        height: auto;
        min-height: 60vh;
    }
        

    /* WICHTIGSTER FIX */
    .static-info-box {
        position: relative;
        top: unset;
        left: unset;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
        padding: 20px;
        margin-top: 1rem;
    }

    /* Header kompakter */
    .header-container {
        height: auto;
        text-align: center;
    }

    nav ul {
        gap: 15px;
    }

}

/* 🔥 sorgt dafür, dass Sidebar IMMER im Content bleibt */
#side-menu-placeholder {
    width: 100%;
}

/* 🔥 verhindert Überlagerung */
.side-menu {
    position: relative;
    z-index: 1;
}

/* 🔥 Header immer oben */
header {
    position: sticky;
    top: 0;
    z-index: 9999;
}
.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    border: 0;
    padding: 6px 10px;
    background: transparent;
    line-height: 1;
}

.menu-toggle:focus-visible,
nav a:focus-visible,
.close-menu button:focus-visible,
a:focus-visible {
    outline: 3px solid #ffeb3b;
    outline-offset: 3px;
}

/* MOBILE */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }


    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        overflow-y: auto;
        background: rgba(82, 144, 202, 0.95); /* 🔥 transparent */
        backdrop-filter: blur(10px);          /* 🔥 Premium Look */
        flex-direction: column;
        padding-top: 10px;
        z-index: 99999;
    }

    nav ul.active {
        display: flex;
    }


    nav ul li {
        text-align: center;
        padding: 8px;
    }
}
@media (max-width: 768px) {
    .dropdown {
        position: static;
        box-shadow: none;
    }

    nav ul li:hover .dropdown {
        display: none;
    }

    nav ul li.active .dropdown {
        display: block;
    }
}
.close-menu {
    display: none;
    position: absolute;   /* 🔥 FIX */
    z-index: 100001;
    top: 10px;            /* 🔥 ganz oben */
    right: 15px;          /* 🔥 rechts */
    padding: 5px 10px;    /* 🔥 kleiner */
    font-size: 20px;
    color: white;
    cursor: pointer;
    border: none;
}
.close-menu button {
    color: inherit;
    font: inherit;
    background: transparent;
    border: 0;
    padding: 5px 10px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .close-menu {
        display: block; /* 🔥 nur auf Handy sichtbar */
    }
}
.close-menu:hover {
    background: rgba(255,255,255,0.1);
}
@media (max-width: 768px) {
    .slide {
        background-size: cover; /* 🔥 Zoom */
        background-position: center;
        background-repeat: no-repeat;
    }
}
@media (max-width: 768px) {

    .side-menu {
        background: rgba(255,255,255,0.6);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 15px;
    }

    .side-menu ul {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 🔥 2 Spalten */
        gap: 10px;
        padding: 0;
    }

    .side-menu li {
        list-style: none;
    }

    .side-menu a {
        display: block;
        text-align: center;
        padding: 12px;
        background: #e8f1f8;
        border-radius: 10px;
        font-weight: 500;
        text-decoration: none;
        color: #004488;
        transition: all 0.2s ease;
    }

    .side-menu a:hover {
        background: #d4e6f4;
        transform: scale(1.03);
    }
}
@media (max-width: 768px) {



    .side-menu ul {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 0 !important;
        justify-content: space-between;
    }

    .side-menu li {
        width: 48% !important; /* 🔥 DAS MACHT DIE 2 SPALTEN */
        list-style: none !important;
    }

    .side-menu a {
        display: block !important;
        text-align: center !important;
        padding: 12px !important;
        background: #e8f1f8 !important;
        border-radius: 10px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        color: #004488 !important;
    }
}

@media (max-width: 768px) {

    .side-menu {
        background: rgba(255,255,255,0.6);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 15px;
    }

    .side-menu ul {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 0 !important;
        justify-content: center;
    }

    .side-menu li {
        list-style: none !important;
        width: auto !important; /* 🔥 wichtig */
    }

    .side-menu a {
        display: inline-block !important;
        padding: 10px 14px !important;
        background: #e8f1f8 !important;
        border-radius: 20px !important; /* 🔥 pill shape */
        font-size: 14px;
        text-decoration: none !important;
        color: #004488 !important;
        white-space: nowrap; /* 🔥 verhindert Umbruch */
        transition: all 0.2s ease;
    }

    .side-menu a:hover {
        background: #d4e6f4 !important;
        transform: scale(1.05);
    }

    .side-menu h3 {
        text-align: center;
        margin-bottom: 10px;
    }
}
@media (max-width: 768px) {

    #side-menu-placeholder {
        position: relative;
        
        z-index: 20;
        display: flex;
        justify-content: center;
    }

    .side-menu {
        background: rgba(255,255,255,0.3);
        backdrop-filter: blur(10px);
        padding: 10px 15px;
        border-radius: 20px;
        width: auto;
        max-width: 90%;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

    .side-menu h3 {
        display: none; /* optional */
    }

    .side-menu ul {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .side-menu li {
        width: auto !important;
    }

    .side-menu a {
        padding: 6px 10px;
        border-radius: 20px;
        background: rgba(255,255,255,0.7);
        font-size: 13px;
    }
}
@media (max-width: 768px) {

    .side-menu {
        background: rgba(255,255,255,0.35);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 10px;
        text-align: center;
    }

    /* 🔥 4 Buttons oben */
    .quick-links {
        display: flex;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 10px;
    }

    .quick-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    font-size: 13px;
    padding: 6px 6px;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    text-decoration: none;
    color: #004488;
    text-align: center;
}

    /* 🔥 Öffnungszeiten nebeneinander */
    .zeiten {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        margin-bottom: 8px;
        color: #333;
    }

    /* 🔥 Telefonnummer unten mittig */
    .telefon {
        font-size: 14px;
        font-weight: bold;
        text-align: center;
    }
}
@media (max-width: 768px) {

    .hero-slider {
        padding-bottom: 100px; /* 🔥 Platz für Quick Links */
    }

}
.gemeinde-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.gemeinde-btn {
    display: block;
    padding: 20px;
    background: #e8f1f8;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #004488;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gemeinde-btn:hover {
    background: #d4e6f4;
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Einleitungstext Startseite */
.intro-section {
    background: #fff;
    margin-top: 20px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    line-height: 1.6;
}
.intro-section h2 { color: var(--primary-color); margin-top: 0; }
.intro-section p { margin: 0 0 12px; }
.intro-section a { color: #004488; }
@media (max-width: 768px) {
    .intro-section { padding: 20px; }
}

/* ==========================================================================
   BILDERGALERIE MIT GROSSANSICHT (Winter 2026)
   ========================================================================== */
.static-info-box.box-galerie { max-width: 1000px; }
.galerie-intro { color: #555; margin-bottom: 20px !important; }

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.galerie-item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    background: #e8f1f8;
}

.static-info-box.box-breit .galerie-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.static-info-box .galerie-item:hover img,
.static-info-box .galerie-item:focus-visible img {
    transform: scale(1.06);
    box-shadow: none;
    filter: brightness(1.05);
}

.galerie-item:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }

@media (max-width: 768px) {
    .galerie-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Großansicht */
body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: rgba(10, 20, 35, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox[hidden] { display: none; }

.lightbox-figure { margin: 0; text-align: center; }
.lightbox-figure img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-figure figcaption { color: #fff; margin-top: 10px; font-size: 0.95rem; }

.lightbox button {
    position: absolute;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255,255,255,0.35); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
    .lightbox-figure img { max-height: 75vh; }
}
