:root {
	--primary-color: #2d6a4f;
    --secondary-color: #52b788;
    --accent-color: #74c69d;
    --dark-bg: #1b4332;
    --light-bg: #f8f9fa;
    --success: green;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    overflow-x: hidden;
}

.navbar {
    min-height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    margin: 0 0.5rem;
    transition: all 0.3s;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

/* ---------------- Hero Section (Optimiert) ---------------- */
/* Hier haben wir flex-direction hinzugefügt, damit alles sauber mittig bleibt */
.hero-section { 
    position:relative; 
    width:100%; 
    height:450px; 
    display:flex; 
    flex-direction: column; 
    align-items:center; 
    justify-content:center; 
    overflow:hidden; 
    z-index: 1;
}

.hero-image-container, 
.hero-section picture, 
.hero-image-container img,
.hero-bg-img { 
    position:absolute; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    object-fit:cover; 
    object-position:center; 
    z-index: 0;
}

/* Hero Content (Der graue Kasten) */
.hero-content { 
    position:relative; 
    z-index:2; 
    text-align:center; 
    background:rgba(105,105,105,.75); 
    color:#fff; 
    
    /* WICHTIG: Begrenzung der Breite */
    width: -moz-fit-content;
    width: fit-content;  
    max-width: 90%; 
    margin: 0 auto; 
    display: block; /* Stellt sicher, dass margin: auto greift */
    
    /* WICHTIG: Padding reduziert für kompakten Look */
    padding: 10px 25px; 
    border-radius: 15px; 
}

/* Titel: Weniger Abstand nach unten */
.hero-title { 
    font-size:3rem; 
    font-weight:bold; 
    margin-bottom: 0.2rem; 
    line-height: 1.1;
    text-shadow:2px 2px 4px rgba(0,0,0,.3); 
    width: auto;
}

/* Untertitel: Standard-Ränder entfernt */
.hero-subtitle { 
    font-size:1.2rem; 
    opacity:.95; 
    margin: 0; 
    text-shadow:1px 1px 2px rgba(0,0,0,.3); 
}

/* ---------------- Container / Content ---------------- */
.container {
    padding: 0 15px;
    width: 100%;
    max-width: 1200px;
}

.content-wrapper {
    padding: 40px 0;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Weather */
.weather-info { text-align: center; }
.weather-current {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}
.weather-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}
.weather-detail:last-child { border-bottom: none; }
.weather-icon { font-size: 1.5rem; color: var(--secondary-color); }
.loading { text-align: center; color: #999; padding: 20px; }

/* Google Maps Container */
		.map-container {
			margin-top: 40px;
			border-radius: 15px;
			overflow: hidden;
		}

		.map-container iframe{
			width: 100%;
			height: 400px;
			border: none;
		}

/* Chronik */
.chronik-image { text-align:center; margin-bottom: 1rem; }
.chronik-image img { display:inline-block; max-width:100%; height:auto; border-radius:8px; }

/* Events */
.event-item {
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
	padding-right: 70px; /* Platz für die Icons am rechten Rand */
}
/* Hover-Effekt nur auf Geräten mit Maus (Desktop) */
@media (hover: hover) and (pointer: fine) {
    .event-item:hover {
        background: #e9ecef;
        transform: translateX(5px);
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
	/* Desktop Hover: Zeigt beide Icons an */
.event-item:hover .event-pdf-icon,
.event-item:hover .event-add-icon { 
    opacity: 1; 
    visibility: visible; 
}
}
.event-date { font-weight: bold; color: var(--primary-color); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.event-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    /* 1. Die wichtigste Regel: Grammatikalisch korrekte Trennung */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    /* 2. Das Sicherheitsnetz: Nur hart umbrechen, wenn ein Wort 
       BREITER ist als die ganze Zeile (z.B. eine lange URL) */
    overflow-wrap: break-word; 
    
    /* Optional: Für ganz alte Browser als Fallback */
    word-wrap: break-word; 
}
.event-time { font-size: 0.85rem; color: #666; }
/* Icon Styling und Positionierung (PDF und Kalender) */
.event-pdf-icon,
.event-add-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* Kalender-Icon (rechts außen) */
.event-add-icon {
    color: var(--secondary-color);
    right: 15px;
}

/* PDF-Icon (links vom Kalender-Icon) */
.event-pdf-icon {
    color: #dc3545;
    right: 45px;
}

.no-events, .no-results { text-align: center; padding: 30px; color: #999; }
.no-results { padding: 60px 20px; background: white; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.no-results i { font-size: 4rem; color: #ccc; }

/* Main Content */
.main-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}
.content-title { font-size: 2.2rem; font-weight: bold; color: var(--dark-bg); margin-bottom: 1.5rem; }

/* Articles with image */
.article-with-image {
    display: flex;
    align-items: center;/* Vertikale Zentrierung */
    justify-content: center;/* Beide Inhalte zusammen mittig in der Karte */
    gap: 1.5rem;
}
.article-with-image:last-child { border-bottom: none; }
.article-image { height: 180px; width: 250px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.article-image img { width: 180px; height: auto; }
.article-content { text-align: left;}
.article-title { font-size: 1.4rem; font-weight: bold; color: var(--primary-color); margin-bottom: 0.5rem; }
.news-date { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }

/* Gallery */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}
.gallery-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

.gallery-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.gallery-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.15); transform: translateY(-5px); }
.gallery-thumbnail { position: relative; width: 100%; height: 250px; overflow: hidden; }
.gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-card:hover .gallery-thumbnail img { transform: scale(1.1); }
.gallery-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}
.gallery-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.gallery-title { font-size: 1.3rem; font-weight: bold; color: var(--primary-color); margin-bottom: 0.5rem; }
.gallery-meta { color: #666; font-size: 0.9rem; margin-bottom: 1rem; display: flex; gap: 15px; flex-wrap: wrap; }
.gallery-meta span { display: flex; align-items: center; gap: 5px; }
.gallery-description { color: #555; margin-bottom: 1rem; flex: 1; }
.gallery-stats { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #e9ecef; }
.gallery-count { color: var(--secondary-color); font-weight: 600; }

/* ---------------------------------------------------- */
/* NEU EINGEFÜGTER BLOCK FÜR DIE GALLERY-DETAILANSICHT */
/* ---------------------------------------------------- */
.gallery-detail {display: none;}
.gallery-detail.active {display: block;}

.gallery-images-grid {
    /* Wichtig: display: grid; ist jetzt hier global definiert! */
    display: grid; 
    /* Desktop Spalten-Definition */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px; /* Ein bisschen Abstand nach oben */
}

.gallery-image-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-image-item:hover img {
    transform: scale(1.1);
}
/* ---------------------------------------------------- */
/* ENDE NEU EINGEFÜGTER BLOCK */
/* ---------------------------------------------------- */


/* Cards */
.content-card {
    min-height: 160px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    transition: all 0.3s;
}
.content-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.12); transform: translateY(-3px); }
.card-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--accent-color);
	word-break: break-word;/* bricht lange Wörter */
	hyphens: auto;/* Silbentrennung, falls unterstützt */
	white-space: normal;/* sicherstellen, dass Umbruch erlaubt ist */
}
.card-with-image { display: flex; gap: 25px; align-items: center; }
.card-image { flex: 0 0 auto; max-width: 250px; max-height: 1500px; border-radius: 10px; overflow: hidden; }
.card-image img { width: 100%; height: auto; object-fit: cover; transition: transform 0.3s; border-radius: 10px; display: block; }
.card-content { flex: 1; }

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 50px 0 30px;
    margin-top: 60px;
}
.footer-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 1.5rem; }
.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}
.footer-link:hover { color: white; padding-left: 5px; }

/* Lists & Links */
.content-card ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.content-card ul li a, .trouble-list li a, .group-section a {
    text-decoration: none;
    color: var(--dark-bg);
    transition: color 0.3s ease-in-out;
}
.content-card ul li a:hover, .trouble-list li a:hover, .group-section a:hover { color: var(--primary-color); text-decoration: underline; }
.trouble-list li a.text-success { color: var(--success) !important; }
.trouble-list li a.text-success:hover { color: var(--primary-color) !important; text-decoration: underline; }

/* Definitionslist */
.service-list dt { font-weight: bold; margin: 15px 0 5px; border-bottom: 1px dashed #eee; padding-bottom: 2px; }
.service-list dd { margin-left: 15px; margin-bottom: 10px; }

/* Scroll-Box */
.scroll-box { max-height: 735px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Accordion */
.accordion-button { font-size: 1.1rem; color: var(--primary-color); }
.accordion-button:focus { box-shadow: none; border-color: rgba(0,0,0,.125); }
.accordion-button:not(.collapsed) {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
    box-shadow: none !important;
    border-color: var(--secondary-color) !important;
}
.accordion-button:not(.collapsed)::after { filter: none !important; }
.list-group-item-action:hover,
.list-group-item-action:focus { background-color: var(--accent-color); color: var(--dark-bg); }

/* Carousel */
.carousel-inner { padding-bottom: 56.25%; height: 0; position: relative; overflow: hidden; }
.carousel-item { position: absolute !important; top: 0; left: 0; width: 100%; height: 100%; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox */
.lightbox { display: none; position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); opacity: 0; transition: opacity 0.3s ease; }
.lightbox.active { display: flex; align-items: center; justify-content: center; opacity: 1; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; display: flex; justify-content: center; align-items: center;}
.lightbox-content img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 2rem; cursor: pointer; z-index: 10000; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); color: white; font-size: 3.5rem; cursor: pointer; padding: 10px; user-select: none; z-index: 10001; text-shadow: 0 2px 10px rgba(0,0,0,0.7); transition: transform 0.2s ease; background: none; border: none; }
.lightbox-nav:hover {transform: translateY(-50%) scale(1.2); }
.lightbox-prev { left: -25px; }
.lightbox-next { right: -25px; }
.lightbox-caption { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: white; background: rgba(0,0,0,0.7); padding: 10px 20px; border-radius: 5px; text-align: center; }

/* Responsive */
@media (max-width: 991px) {
    .sidebar { position: relative; top: 0; }
    .hero-title { font-size: 2rem; }
    .main-content { padding: 25px; }
    .card-with-image, .article-with-image { flex-direction: column; }
    .card-image, .article-image { width: 80%; max-height: 350px; margin-bottom: 15px; }
  .content-card.card-long-text .card-image {
    width: 80%;
	  max-width:350px;
    margin: 0 auto 15px auto; /* oben/rechts/unten/links: 0 auto 15px auto */
    text-align: center;/* sicherheitshalber */
    display: block;
  }
  .content-card.card-long-text .card-image img {
    display: inline-block;/* damit text-align: center wirkt */
    max-width: 100%;
    height: auto;
  }
    .carousel-inner { padding-bottom: 75%; }
    .filter-buttons { flex-direction: column; }
    /* Mobile/Tablet Grid-Anpassung: Passt jetzt die globale Grid-Definition an */
    .gallery-images-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
	
	    .content-card .article-with-image{
flex-direction:column;
justify-content:center;
align-items:center;
text-align:center;
}

    .content-card .article-image{
width:120px;
max-width:120px;
margin:0;
display:flex;
justify-content:center;
align-items:center;
}
	/* EVENTS */
	.event-pdf-icon,
    .event-add-icon {
opacity: 1; /* Immer anzeigen */
visibility: visible;
		top: 50%;
		transform: translateY(-50%)
    }
     
    /* Positionierung der einzelnen Icons (muss hier wiederholt werden) */
    .event-add-icon {
right: 15px; /* Ganz rechts */
    }

    .event-pdf-icon {
right: 45px; /* Links neben dem Kalender-Icon */
    }
    /* Stellt sicher, dass das event-item auch auf Mobile genügend Platz rechts lässt */
    .event-item {
        padding-right: 70px; 
    }
}

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

@media (max-width: 640px) {
    .hero-section { max-height: 350px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .article-with-image {
		flex-direction: column;/* Bild oben, Text unten */
        text-align: center;
    }

    .article-image img {
        width: 140px;/* kleineres Bild */
        margin-bottom: 0.5rem;
    }

    .article-content {
        text-align: center;
    }
}

/* Desktop long-text cards */
@media (min-width: 992px) {
       .content-card.card-long-text picture.card-image {
float: left;
width: 50%;
max-width: 450px;
margin: 0 20px 15px 0;
display: block;
}

    .content-card.card-long-text .card-content {
width: auto;
}
}

/* Misc / Specials */
.no-round-corners { border-radius: 0 !important; }
.no-round-corners img { border-radius: 0 !important; }
.justify-text { 
    text-align: justify; /* Blocksatz */
    
    /* Silbentrennung global aktivieren (hilft auch bei Blocksatz enorm!) */
    -webkit-hyphens: auto; 
    -ms-hyphens: auto;     
    hyphens: auto;         
    
    /* Sicherheitsnetz */
	overflow-wrap: break-word;}
.feuer-spruch { text-align: center; color: #dc3545; font-weight: bold; font-size: 1.15rem; margin: 20px 0; }

/* --- SH_WLAN FIX (Cache Buster Version) --- */

/* 1. RESET für ALLE Elemente in der Karte */
.article-shwlan,
.article-shwlan .article-image,
.article-shwlan picture,
.article-shwlan img {
box-sizing: border-box !important;
}

/* 2. HANDY (Kleiner als 768px) */
@media (max-width: 767.98px) {
    .article-shwlan {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
text-align: center !important;
gap: 15px !important;
}

    /* Begrenzung des Bildes auf Handys */
    .article-shwlan .article-image {
width: 100% !important;
max-width: 200px !important; /* Nicht zu riesig auf Handy */
margin: 0 auto !important;
}
		.lightbox-nav {
		font-size: 1.5rem;
		transition: none;
	}
	/* Auf kleinen Bildschirmen die Pfeile in das Bild schieben */
	.lightbox-prev {left: 0px;}
	.lightbox-next {right: 0px;}
	.lightbox-caption {
        /* 1. Schrift kleiner machen */
        font-size: 0.85rem;  /* Oder 13px/14px */
        
        /* 2. Box kompakter machen */
        padding: 8px 10px;   /* Weniger "Luft" um den Text */
        bottom: 10px;        /* Näher an den unteren Rand schieben */
        
        /* 3. Platzmanagement */
        width: 90%;          /* Nicht ganz bis zum Rand */
        line-height: 1.3;    /* Zeilenabstand verringern, falls Text mehrzeilig ist */
        
        /* 4. Sicherheit: Falls der Text extrem lang ist, darf er nicht das ganze Bild verdecken */
        max-height: 100px;   /* Maximale Höhe begrenzen */
        overflow-y: auto;    /* Scrollen erlauben, falls Text wirklich zu lang ist */
        
        /* Optional: Hintergrund etwas transparenter machen */
        background: rgba(0,0,0,0.6); 
    }
	.justify-text {text-align: left;}
}

/* 3. AB iPAD HOCHFORMAT (Ab 768px) */
@media (min-width: 768px) {
    .article-shwlan {
display: flex !important;
flex-direction: row !important;/* Nebeneinander */
align-items: center !important;/* WICHTIG: Vertikal mittig! */
justify-content: center !important;/* Horizontal mittig */
text-align: left !important;
gap: 30px !important;/* Abstand zwischen Bild und Text */
}

    /* Der Container um das Bild */
    .article-shwlan .article-image {
width: 180px !important;/* Feste Breite */
min-width: 180px !important;/* Darf nicht kleiner werden */
max-width: 180px !important;/* Darf nicht größer werden */
margin: 0 !important;
flex-shrink: 0 !important;/* Darf nicht gequetscht werden */
display: block !important;
}

    /* Das Picture-Tag muss sich benehmen */
    .article-shwlan picture {
display: block !important;
width: 100% !important;
}

    /* Das Bild selbst */
    .article-shwlan img {
width: 100% !important;/* Füllt die 180px aus */
height: auto !important;
display: block !important;
object-fit: contain !important;
}

    /* Der Textbereich */
    .article-shwlan .article-content {
text-align: left !important;
padding: 0 !important;
flex: 0 1 auto !important; /* Nimmt nur den nötigen Platz */
}
    
    /* Überschrift-Korrektur */
    .article-shwlan .article-title {
margin-top: 0 !important;
margin-bottom: 0.5rem !important;
}
	.lightbox-nav {
		font-size: 2.5rem;
		transition: none;
	}
	/* Auf kleinen Bildschirmen die Pfeile in das Bild schieben */
	.lightbox-prev {left: 0px;}
	.lightbox-next {right: 0px;}
}