/* =============================================================================
   MARIABUCHEN.CSS – Kombiniertes Stylesheet
   https://mariabuchen.de/
   Erstellt: 17.04.2026
   Zusammengefasst aus: design.css, final_layout.css, modern.css,
   modern_struktur.css, modern-gallery.css, galerie-styling.css,
   photogalerie-modern.css, lightbox.css, responsive_tablet.css
   ============================================================================= */


/* =============================================================================
   1. BASIS / RESET / TYPOGRAFIE
   (ehemals: design.css)
   ============================================================================= */

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

/* ==============================================
   GLOBALE OVERFLOW-KORREKTUR
   overflow-x: hidden auf html UND body blockiert iOS Touch-Scrolling!
   Lösung: overflow-x: clip (kein Scroll-Container, kein iOS-Bug)
   scroll-behavior: smooth nur für Desktop (nicht für Touch!)
   ============================================== */
html {
	font-size: 12px;
	max-width: 100%;
}

@media (hover: hover) {
    /* scroll-behavior: smooth nur für Maus-Geräte (nicht iOS/Touch!) */
    html {
        scroll-behavior: smooth;
    }
}

body {
	background: #006400;
	text-align: left;
	font-family: Arial, Tahoma, Verdana, sans-serif;
	color: #000000;
	font-size: 12px;
	/* overflow-x: hidden NICHT gesetzt - blockiert iOS Scroll! */
}

a:link {
    color: #000000;
    text-decoration: none;
    font-family: Times, "Lucida Sans Unicode", sans-serif;
    font-size: 14px;
}
a:visited {
    color: #000000;
    text-decoration: none;
}
a:hover {
    color: #006400;
    text-decoration: underline;
}

p {
	font: 1em Arial, Tahoma, Verdana, sans-serif;
	margin-bottom: 1em;
}

h1 {
	font: 1.67em/0.9em Arial, Tahoma, Verdana, sans-serif;
	margin-top: 0.9em;
	margin-bottom: 0.9em;
}
h2 {
	font: 1.5em/1em Arial, Tahoma, Verdana, sans-serif;
	margin: 1.5em 0 1em 0;
	color: #193452;
}
h3 {
	font: 1em/1.3em Arial, Tahoma, Verdana, sans-serif;
	color: #193452;
	margin-bottom: 1.0em;
}
h4 {
	font: 1.17em/1.29em Arial, Tahoma, Verdana, sans-serif;
	margin-top: 1.29em;
	margin-bottom: 1.29em;
}

#contentgutter ul {
	font: 1em/1.5em Arial, Tahoma, Verdana, sans-serif;
	margin: 1.5em 20px;
}
#contentgutter li {
	list-style-type: square;
}

/* ==============================================
   WRAP
   ============================================== */
#wrap {
	margin-left: auto;
	margin-right: auto;
	background-color: #ffffff;
	width: 1000px;
	max-width: 100%;
	box-sizing: border-box;
}

#meta-information {
	clear: both;
	color: #ffffff;
	height: 150px;
}
#header {
	width: 12em;
	float: left;
	background-color: #ffffff;
}
#meta-information h1 {
	background: #ffffff url(../images/kopf-1100x150.jpg) no-repeat top left;
	font-size: 0;
	height: 150px;
}
#meta-information h1 a {
	display: block;
	height: 1000px;
	width: 1000px;
	border: none;
}
#meta-information h1 span {
	display: none;
}

/* ==============================================
   DESKTOP + TABLET ab 769px: Flexbox-Layout
   ============================================== */
@media screen and (min-width: 769px) {

    #main {
        display: flex;
        gap: 0px;
        align-items: flex-start;
        max-width: 100%;
    }

    #sidebar {
        flex: 0 0 150px;
        width: 150px;
        margin: 15px;
        padding: 5px;
        float: none;
        background-color: #ffffff;
    }

    #content {
        flex: 1;
        min-width: 0;
        margin-left: 0;
        margin-top: 10px;
		margin-left: 20px;
        margin-right: 20px;
        padding: 0;
        float: none;
        background-color: #FBFBFB;
    }
}

.footer {
	margin-top: 14px;
	padding: .0em;
	margin-left: 2em;
	margin-right: 20px;
	min-height: 150px;
	height: auto;
	font-size: 10px;
	clear: left;
	color: #000000;
	border-style: none;
}
#footer a:link {
	color: #000;
	text-decoration: none;
	font-size: 10px;
}
#footer a:visited {
	color: #000;
	text-decoration: none;
	font-size: 10px;
}
#footer a:hover {
	text-decoration: none;
	font-size: 10px;
}

/* ==============================================
   RESPONSIVE / MOBILE - nur Smartphones (max 768px)
   ============================================== */
@media (max-width: 768px) {

    #wrap {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
        overflow-x: clip;
    }

    #meta-information h1 {
        background-size: contain;
        background-position: center;
        height: 80px;
    }

    .footer {
        margin-left: 0;
        margin-right: 20px;
        padding: 0 10px;
        clear: both;
        min-height: 150px;
        height: auto;
        box-sizing: border-box;
    }

    .footer iframe {
        width: 100% !important;
        min-height: 150px;
    }
}


/* =============================================================================
   2. LAYOUT-GRUNDSTRUKTUR / MOBILE MENÜ / KOMPONENTEN
   (ehemals: final_layout.css)
   ============================================================================= */

a:hover { color: #006400; }
.nolink { text-decoration: none; }

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #008000;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    pointer-events: none;
}

.mobile-overlay.active {
    display: block;
    pointer-events: auto;
}

/* Header-Leisten */
.header-leiste {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 760px;
    background-color: #EBF0F3;
    padding: 4px;
    gap: 10px;
    box-sizing: border-box;
}

.nav-leiste {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
    max-width: 760px;
    background-color: #EBF0F3;
    border: 1px solid #ccc;
    padding: 8px;
    gap: 10px;
    box-sizing: border-box;
}

/* Drei-Spalten-Menü */
.menu-drei-spalten {
    display: flex;
    width: 100%;
    max-width: 750px;
    gap: 20px;
    box-sizing: border-box;
}

.menu-spalte { flex: 1; min-width: 0; }
.menu-spalte:first-child { flex: 0 0 40%; }
.menu-spalte:nth-child(2) { flex: 0 0 35%; }
.menu-qr { flex: 0 0 100px; }

.aktuelles-container { width: 100%; max-width: 640px; }
.bild-container { width: 100%; max-width: 640px; }
.bild-container img.hauptbild { width: 100%; max-width: 640px; height: auto; }

/* Komponenten */
.button-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    width: 100%;
    min-height: 30px;
    flex-wrap: wrap;
}

.button-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.button-link span,
.button-link img { vertical-align: middle; }

.gallery-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    width: 100%;
    flex-wrap: wrap;
}

.notice-box,
.notice-box-green,
.notice-box-pink {
    max-width: 700px;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
}

.notice-box { background-color: #FEFFC5; }
.notice-box-green { background-color: #C1FFC1; }
.notice-box-pink { background-color: #FF64FF; }

.retrospective-box {
    background-color: #FFFFB9;
    max-width: 700px;
    padding: 15px;
    margin: 10px 0;
    box-sizing: border-box;
}

.aktuelles-link {
    display: inline-block;
    max-width: 640px;
    text-decoration: none;
    transition: color 0.3s;
}

.aktuelles-link:hover { color: #FF0000; }
.aktuelles-link .big { font-size: 1.5em; }

.easter-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
}

/* Mobile Layout (max-width: 768px) */
@media screen and (max-width: 768px) {

    .mobile-menu-toggle {
        display: block !important;
    }

    #wrap {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    #main {
        display: block !important;
        width: 100% !important;
        overflow-x: clip !important;
    }

    /* Sidebar als Slide-In Menü */
    #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 80% !important;
        max-width: 300px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        transition: left 0.3s ease !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3) !important;
        padding: 10px !important;
        float: none !important;
        flex: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #sidebar.open {
        left: 0 !important;
    }

    #sidebar iframe {
        width: 100% !important;
        height: 800px !important;
        min-height: 800px !important;
    }

    #content {
        width: 100% !important;
        margin: 0 !important;
        margin-top: 60px !important;
        padding: 10px !important;
        float: none !important;
        flex: none !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    .content-wrapper {
        padding: 0 5px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #meta-information h1 {
        background-size: contain !important;
        background-position: center !important;
        width: 100% !important;
        height: 80px !important;
    }

    #content img {
        max-width: 100% !important;
        height: auto !important;
    }

    img[src*="pfeil.gif"],
    img[src*="pfeil-links.gif"],
    img[src*="bullets/"],
    img[src*="button_trans.gif"],
    img[src*="symbol_foto.gif"],
    img[src*="pdficon.gif"],
    img[src*="down_ani.gif"],
    img.icon-klein {
        max-width: none !important;
        width: auto !important;
        height: auto !important;
    }

    .menu-drei-spalten {
        display: block !important;
        width: 100% !important;
    }

    .menu-spalte {
        display: block !important;
        width: 100% !important;
        margin-bottom: 15px !important;
        flex: none !important;
    }

    .menu-spalte:first-child,
    .menu-spalte:nth-child(2) { flex: none !important; }

    .menu-qr {
        flex: none !important;
        text-align: center !important;
    }

    .header-leiste,
    .nav-leiste {
        display: block !important;
        width: 100% !important;
        padding: 8px !important;
        box-sizing: border-box !important;
    }

    .aktuelles-container,
    .bild-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .notice-box,
    .notice-box-green,
    .notice-box-pink,
    .retrospective-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .footer {
        margin-left: 0 !important;
        margin-right: 20px !important;
        padding: 0 10px !important;
        min-height: 150px !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .footer iframe,
    #footer iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 150px !important;
    }
}

/* Desktop + Tablet ab 769px */
@media screen and (min-width: 769px) {
    .mobile-menu-toggle { display: none !important; }
    .mobile-overlay { display: none !important; }
    .content-wrapper { padding-left: 0 !important; }
    #sidebar { margin-right: 15px !important; }
    #content { padding: 0 !important; margin-left: 0 !important; }
}


/* =============================================================================
   3. TOOLTIPS / BACK-BUTTON / RESPONSIVE TABELLEN
   (ehemals: modern.css)
   ============================================================================= */

.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-container .tooltip {
    visibility: hidden;
    background-color: #fffff0;
    color: black;
    text-align: center;
    padding: 5px;
    border-radius: 3px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    margin-left: -65px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #ccc;
    font-size: 12px;
    width: 130px;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

a:hover {
    color: #ff0000;
}

/* Responsive Verbesserungen */
.responsive-table {
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #e9ecef;
}


/* =============================================================================
   4. ACCESSIBILITY / HEADER-STRUKTUR / NAVIGATION
   (ehemals: modern_struktur.css)
   ============================================================================= */

/* Skip Link für Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

/* Modernisierte Header-Struktur */
.page-header {
    background-color: #ebf0f3;
    padding: 16px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    width: 750px;
}

.header-content h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #2c3e50;
    font-weight: 600;
}

.external-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.external-link a {
    color: #0066cc;
    text-decoration: none;
}

.external-link a:hover {
    text-decoration: underline;
}

/* Header-Bild */
.header-image {
    margin: 20px 0;
}

.header-image img {
    display: block;
    height: auto;
}

/* Navigation */
.breadcrumb-nav {
    margin: 20px 0;
}

/* Artikel-Bereich */
.main-article {
    max-width: 800px;
    margin: 0 auto;
}

.content-editable {
    line-height: 1.6;
    font-size: 1rem;
}

.responsive-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
}

/* Back to Top */
.back-to-top {
    text-align: left;
    margin: 40px 0 20px;
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
}

.smooth-scroll {
    color: #0066cc;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: background-color 0.3s;
}

.smooth-scroll:hover {
    background-color: #e9ecef;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .external-link {
        flex-direction: column;
        gap: 4px;
    }

    #main {
        flex-direction: column;
    }

    #sidebar {
        order: 2;
    }

    #content {
        order: 1;
    }
}


/* =============================================================================
   5. ZOOM-GALERIE / MODAL / ANIMATIONEN
   (ehemals: modern-gallery.css)
   ============================================================================= */

/* Basis zoom-fähige Bilder */
.zoomable {
    cursor: zoom-in;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zoomable:hover {
    transform: scale(1.02) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.zoomable:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Modal Container */
.zoom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: Arial, sans-serif;
}

.zoom-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    animation: modalFadeIn 0.3s ease-out;
}

.zoom-modal img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: imageZoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    user-select: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

.nav-btn span {
    font-size: 30px;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bild-Counter */
.image-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10002;
    backdrop-filter: blur(10px);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    user-select: none;
}

/* Schließen-Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10003;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
    padding: 8px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    color: #ff6b6b;
}

.close-btn:active {
    transform: scale(0.9);
}

/* Info-Text */
.zoom-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    animation: infoFadeIn 0.5s ease 2s forwards;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.mobile-hint { display: none; }

/* Tablet */
@media (max-width: 1024px) {
    .zoom-modal img { max-width: 90%; max-height: 80%; }
    .nav-btn { width: 50px; height: 50px; font-size: 20px; }
    .nav-btn span { font-size: 24px; }
    .prev-btn { left: 20px; }
    .next-btn { right: 20px; }
    .close-btn { top: 15px; right: 20px; font-size: 35px; width: 50px; height: 50px; }
    .image-counter { top: 20px; font-size: 13px; padding: 6px 12px; }
}

/* Mobile */
@media (max-width: 768px) {
    .zoomable:hover { transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); filter: none; }
    .zoom-modal img { max-width: 95%; max-height: 75%; border-radius: 4px; }
    .nav-btn { width: 45px; height: 45px; font-size: 18px; padding: 5px; }
    .nav-btn span { font-size: 20px; }
    .prev-btn { left: 15px; }
    .next-btn { right: 15px; }
    .close-btn { top: 10px; right: 15px; font-size: 30px; width: 45px; height: 45px; }
    .image-counter { top: 15px; font-size: 12px; padding: 5px 10px; }
    .desktop-hint { display: none; }
    .mobile-hint { display: inline; }
    .zoom-info { bottom: 20px; font-size: 12px; padding: 6px 12px; }
}

/* Extra klein */
@media (max-width: 480px) {
    .zoom-modal img { max-width: 98%; max-height: 70%; border-radius: 0; }
    .nav-btn { width: 40px; height: 40px; font-size: 16px; }
    .nav-btn span { font-size: 18px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .close-btn { top: 5px; right: 10px; font-size: 25px; width: 40px; height: 40px; }
    .image-counter { top: 10px; font-size: 11px; padding: 4px 8px; }
}

/* Landscape Mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .zoom-modal img { max-height: 80%; }
    .zoom-info { bottom: 10px; font-size: 11px; padding: 4px 8px; }
    .image-counter { top: 10px; }
    .nav-btn { width: 35px; height: 35px; }
    .close-btn { width: 35px; height: 35px; font-size: 20px; }
}

/* Animationen */
@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(5px); }
}

@keyframes imageZoomIn {
    from { opacity: 0; transform: scale(0.7) rotate(5deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes infoFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes buttonPulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

.nav-btn:hover { animation: buttonPulse 0.6s ease infinite; }

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
    .zoomable, .zoom-modal, .zoom-modal img, .nav-btn, .close-btn {
        transition: none; animation: none;
    }
    .zoom-modal.active { animation: none; }
    .nav-btn:hover { animation: none; transform: translateY(-50%) scale(1.05); }
}

@media (prefers-contrast: high) {
    .zoom-modal { background-color: black; }
    .nav-btn, .close-btn { background-color: white; color: black; border: 2px solid black; }
    .image-counter, .zoom-info { background-color: white; color: black; border: 1px solid black; }
}

@media (prefers-color-scheme: dark) {
    .zoomable { box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1); }
    .zoomable:hover { box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15); }
}

.zoomable:focus { outline: 3px solid #007cba; outline-offset: 2px; }
.nav-btn:focus, .close-btn:focus { outline: 3px solid white; outline-offset: 2px; }

/* Galerie-Container */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery .zoomable { width: 100%; height: auto; border-radius: 8px; }

.gallery-thumbnail { position: relative; }
.gallery-thumbnail::after {
    content: "";
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.gallery-thumbnail:hover::after { opacity: 1; }

@keyframes loading {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

@media print {
    .zoom-modal { display: none !important; }
    .zoomable { cursor: default; }
    .zoomable:hover { transform: none; box-shadow: none; filter: none; }
    .gallery-thumbnail::after { display: none; }
}

.hauptinhalt .zoomable { margin: 10px 0; }
table .zoomable { max-width: 100%; height: auto; }
.zoomable[width], .zoomable[height] { max-width: 100%; height: auto; }


/* =============================================================================
   6. GALERIE-GRID-LAYOUT
   (ehemals: galerie-styling.css)
   ============================================================================= */

#content {
    padding: 20px;
}

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

.galerie img {
    width: 100%;
    height: auto;
    max-width: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .galerie img { max-width: 180px; }
}

@media (max-width: 768px) {
    .galerie img { max-width: 160px; }
}

@media (max-width: 480px) {
    #content { padding: 10px; box-sizing: border-box; }
    .galerie { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .galerie img { max-width: 100%; }
}


/* =============================================================================
   7. PHOTOSWIPE – OVERLAY-GALERIE
   (ehemals: photogalerie-modern.css)
   ============================================================================= */

.pswp {
    --pswp-bg: #000;
    --pswp-placeholder-bg: #222;
    --pswp-root-z-index: 100000;
    --pswp-preloader-color: rgba(79, 79, 79, 0.4);
    --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9);
    --pswp-icon-color: #fff;
    --pswp-icon-color-secondary: #4f4f4f;
    --pswp-icon-stroke-color: #4f4f4f;
    --pswp-icon-stroke-width: 2px;
    --pswp-error-text-color: var(--pswp-icon-color);
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--pswp-root-z-index);
    display: none;
    touch-action: none;
    outline: 0;
    opacity: .003;
    contain: layout style size;
    -webkit-tap-highlight-color: transparent;
}

.pswp--open { display: block; }
.pswp:focus { outline: 0; }
.pswp * { box-sizing: border-box; }
.pswp img { max-width: none; }
.pswp, .pswp__bg { transform: translateZ(0); will-change: opacity; }
.pswp__bg { opacity: .005; background: var(--pswp-bg); }
.pswp, .pswp__scroll-wrap { overflow: hidden; }

.pswp__bg,
.pswp__container,
.pswp__content,
.pswp__img,
.pswp__item,
.pswp__scroll-wrap,
.pswp__zoom-wrap {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.pswp__img, .pswp__zoom-wrap { width: auto; height: auto; }
.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img { cursor: zoom-in; }
.pswp--click-to-zoom.pswp--zoomed-in .pswp__img { cursor: grab; }
.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active { cursor: grabbing; }
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,
.pswp__img { cursor: zoom-out; }

.pswp__button, .pswp__container, .pswp__counter, .pswp__img { user-select: none; }
.pswp__item { z-index: 1; overflow: hidden; }
.pswp__hidden { display: none !important; }
.pswp__content { pointer-events: none; }
.pswp__content > * { pointer-events: auto; }
.pswp__error-msg-container { display: grid; }
.pswp__error-msg { margin: auto; font-size: 1em; line-height: 1; color: var(--pswp-error-text-color); }

.pswp__top-bar {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    z-index: 10;
    pointer-events: none !important;
}
.pswp__top-bar > * { pointer-events: auto; will-change: opacity; }

.pswp__button {
    position: relative;
    display: block;
    width: 50px; height: 60px;
    padding: 0; margin: 0;
    overflow: hidden;
    cursor: pointer;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: .85;
    -webkit-appearance: none;
    -webkit-touch-callout: none;
}
.pswp__button:hover { opacity: 1; }
.pswp__button:disabled { opacity: .3; cursor: auto; }

.pswp__icn {
    fill: var(--pswp-icon-color);
    color: var(--pswp-icon-color-secondary);
    position: absolute;
    top: 14px; left: 9px;
    width: 32px; height: 32px;
    pointer-events: none;
}

.pswp__button--arrow {
    position: absolute;
    top: 50%;
    width: 75px; height: 100px;
    margin-top: -50px;
}
.pswp__button--arrow .pswp__icn { top: 50%; margin-top: -30px; width: 60px; height: 60px; }
.pswp__button--arrow--prev { left: 0; }
.pswp__button--arrow--next { right: 0; }

.pswp__counter {
    height: 30px;
    margin-top: 15px;
    margin-inline-start: 20px;
    font-size: 14px;
    line-height: 30px;
    color: var(--pswp-icon-color);
    text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
    opacity: .85;
}

/* Galerie-Vorschaubilder */
.galerie {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2em;
}

.galerie img {
    width: 22%;
    height: auto;
    max-width: 100%;
    cursor: pointer;
    border: 2px solid #ccc;
}

@media screen and (max-width: 1024px) {
    .pswp__button--arrow { width: 50px; height: 80px; }
    .pswp__top-bar { flex-wrap: wrap; height: auto; }
    .pswp { max-width: 100vw; max-height: 100vh; overflow: hidden; }
    .galerie img { width: 30%; }
}

@media screen and (max-width: 600px) {
    .galerie img { width: 45%; }
}

.pswp__button--arrow--next .pswp__icn { transform: scaleX(-1); }


/* =============================================================================
   8. LIGHTBOX / FORMULAR-VALIDIERUNG / E-MAIL-SCHUTZ
   (ehemals: lightbox.css)
   ============================================================================= */

.modern-lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-lightbox-overlay.active { opacity: 1; }

.lightbox-container {
    position: relative;
    max-width: 90%; max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-controls {
    position: absolute;
    top: 20px; right: 20px;
    display: flex;
    gap: 10px;
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-controls button:hover { background: rgba(255, 255, 255, 0.3); }

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5) !important;
    width: 50px !important; height: 50px !important;
    font-size: 24px !important;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.field-error { border: 2px solid #dc3545 !important; background-color: #fff5f5; }
.field-valid { border: 2px solid #28a745 !important; background-color: #f0fff4; }

.field-feedback {
    font-size: 0.875rem;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
}

.field-feedback.error { color: #dc3545; background-color: #f8d7da; border: 1px solid #f5c6cb; }

.email-revealed { color: #007bff; text-decoration: none; transition: color 0.3s ease; }
.email-revealed:hover { color: #0056b3; text-decoration: underline; }

@media (max-width: 768px) {
    .lightbox-controls { top: 10px; right: 10px; }
    .lightbox-prev, .lightbox-next { width: 40px !important; height: 40px !important; font-size: 18px !important; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}


/* =============================================================================
   9. RESPONSIVE – COOKIE-BANNER / MODAL
   (ehemals: responsive_tablet.css)
   ============================================================================= */

@media (max-width: 768px) {
    .ddsmoothmenu ul li ul li a {
        padding: 3px 10px !important;
        min-height: 26px !important;
        font-size: 12px !important;
    }

    .cookie-banner {
        padding: 15px 10px;
        width: 100%; max-width: 100%;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        padding: 0 10px;
        gap: 10px;
    }

    .cookie-text { min-width: 100%; margin-bottom: 10px; }

    .cookie-buttons { width: 100%; justify-content: center; }

    .cookie-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1;
        min-width: 80px;
    }

    .modal-content { padding: 20px; max-height: 90vh; }
    .modal-header h2 { font-size: 18px; }
    .cookie-category { padding: 10px; margin: 15px 0; }
}

@media (max-width: 480px) {
    .cookie-banner { padding: 10px 5px; }
    .cookie-content { padding: 0 5px; }
    .cookie-text { font-size: 12px; line-height: 1.4; }
    .cookie-buttons { flex-direction: column; width: 100%; }
    .cookie-btn { width: 100%; margin: 2px 0; }
    .modal-content { padding: 15px; width: 100%; border-radius: 0; max-height: 100vh; height: 100%; }
    .category-header { flex-wrap: wrap; }
    .category-header h3 { font-size: 14px; flex: 1; }
}

@media (max-width: 360px) {
    .cookie-buttons { flex-direction: column; width: 100%; }
    .cookie-btn { width: 100%; margin: 3px 0; }
}

@media (max-width: 320px) {
    .cookie-text { font-size: 12px; }
    .cookie-btn { padding: 6px 12px; font-size: 12px; }
    .modal-header h2 { font-size: 16px; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .cookie-banner { padding: 10px; max-height: 50vh; overflow-y: auto; }
    .cookie-content { flex-direction: row; }
    .cookie-buttons { flex-direction: row; }
}
