/* ==========================================================================
   1. VARIABLEN & RESET
   ========================================================================== */
:root {
    --primary-color: #333;
    --bg-color: #fff;
    --bg-light: #f4f4f4;
    --text-color: #444;
    --nav-bg: rgba(255, 255, 255, 0.64);
    --accent-color: #888;
    --main-radius: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

html body {
    font-family: "Roboto", 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 200;
    font-variation-settings: "wdth" 75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden !important;
    width: 100%;
    background-color: var(--bg-color); /* Body bleibt weiß */
}

/* ==========================================================================
   2. BASICS & TYPOGRAFIE
   ========================================================================== */
h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 300;
    font-variation-settings: "wdth" 75;
}

.section {
    padding: 120px 5% 60px;
    min-height: 100vh;
    position: relative;
    background-color: var(--bg-color);
    z-index: 1;
}

@media (max-width: 768px) {
    .section {
        padding: 80px 5% 40px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--bg-light);
}

#home.bg-light {
    background-color: transparent;
    padding-top: 20px;
}

/* Haupt-Seitentitel für Info- & Rechtstexte (Impressum, Datenschutz) */
.page-title {
    font-size: 2rem;
    font-weight: 300;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    padding-bottom: 60px;
}

/* 1. Strich unter Buttons ausschließen (für .back-box-btn UND .back-button-link) */
.legal-content a.back-box-btn,
.legal-content a.back-button-link {
    text-decoration: none !important;
}

/* 2. Nur Fließtext-Links unterstreichen */
.legal-content p a {
    color: inherit;
    text-decoration: underline;
}

/* 3. Abstände wie im Original-Layout */
.legal-content .gallery-header {
    margin-bottom: 30px; /* Abstand nach der Trennlinie zum Text */
}

.legal-content h1 {
    margin-bottom: 0;
    padding-bottom: 10px;
}

.legal-content h2:first-of-type {
    margin-top: 0; /* Holt "VERANTWORTLICHER" wieder nah an die Linie */
}

.legal-content h2 {
    font-size: 1.2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-content p {
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

.legal-notice {
    font-size: 0.8rem;
    color: #999;
    margin-top: 50px;
}

/* --------------------------------------------------------------------------
   KATEGORIE- & SECTION-ÜBERSCHRIFTEN (Zentral aufgeräumt)
   -------------------------------------------------------------------------- */

/* 1. Basis-Styling für ALLE Kategorie-Überschriften */
.gallery-title,
.category-title,
.archive-section-title {
    font-size: 1.30rem;
    font-weight: 250;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 25px;
}

/* 2. Standardmäßig mit Unterstrich (z. B. Werkgruppen & Galerieseiten) */
.gallery-title,
.category-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* 3. Archiv-Besonderheit: KEIN Unterstrich */
.archive-section-title {
    border-bottom: none;
    padding-bottom: 0;
}

h1.main-title {
    font-weight: 300;        
    font-size: 1rem;         
    color: var(--primary-color);            
    margin: 80px 0 35px 5%;              
    letter-spacing: 0.02em;    
    -webkit-font-smoothing: antialiased; 
    text-align: left;
}

@media (max-width: 768px) {
    h1.main-title {
        margin: 75px 0 25px 0;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.header {
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #ddd;
    position: fixed; 
    width: 100%;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    grid-column: 1; 
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item { margin-left: 2rem; }

.nav-link {
    font-size: 1rem;
    color: var(--text-color);
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 1em 1.5em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link::before, .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    transition: 0.4s ease;
}

.nav-link::before { height: 2px; width: 0; background-color: var(--primary-color); }
.nav-link::after { height: 0; width: 100%; background-color: var(--primary-color); z-index: -1; }

.nav-link:hover { color: white; }
.nav-link:hover::before { width: 100%; }
.nav-link:hover::after { height: 100%; }

.hamburger {
    grid-column: 3;
    justify-self: end;
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px; height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}

/* ==========================================================================
   4. STARTSEITE (HERO, KATEGORIEN)
   ========================================================================== */
.welcome-image-container { margin-top: 30px; text-align: center; }

.welcome-image-link {
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.welcome-img {
    height: 600px;
    display: block;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    object-position: 27% center;
    border-radius: 0px;
}

@media (max-width: 767px) {
    .welcome-img {
        height: 520px; 
    }
    .welcome-image-link {
        touch-action: pan-y; 
    }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.category-item {
    position: relative;
    overflow: hidden;
    height: 300px;
    border-radius: var(--main-radius);
    display: block;
}

.category-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.category-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.5s ease;
}

.category-overlay span {
    color: white; font-size: 1.4rem; font-weight: bold;
    text-transform: uppercase; letter-spacing: 2px;
}

.category-item:hover img { filter: blur(8px); transform: scale(1.1); }
.category-item:hover .category-overlay { background-color: rgba(0, 0, 0, 0.6); }

/* ==========================================================================
   5. GLOBAL JOMAG-GRID SYSTEM
   ========================================================================== */

/* --- 5.1 GEMEINSAME BASIS --- */
.jomag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    column-gap: 35px;
    row-gap: 5px;
}

.jomag-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.jomag-img-wrapper img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    object-position: center;
    cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.jomag-info { padding: 0; }

.jomag-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #bbb;
    display: block;
    margin-bottom: 8px;
}

.jomag-name {
    font-size: 1.10rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

/* --- 5.2 HAUPTSEITE SPEZIFISCH --- */
.jomag-grid:not(.gallery-page) .jomag-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: transparent;
    margin-bottom: 12px;
    border-radius: 4px;
}

.jomag-grid:not(.gallery-page) .jomag-item:hover .jomag-img-wrapper img {
    transform: scale(1.06);
}

/* --- 5.3 UNTERSEITEN (GALERIEN) BASIS-STYLING --- */
.gallery-page .jomag-img-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    background-color: transparent;
    margin-bottom: 0;
    border-radius: 0;
    display: flex;
}

.gallery-page:not(.gallery-dia-grid) .gallery-img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    aspect-ratio: auto;
}

.gallery-page .jomag-name {
    font-size: 1rem;
    font-weight: normal;
}

/* --- 5.4 SPEZIALFALL: MINIATUR-ANSICHT --- */
.gallery-page .jomag-img-wrapper.miniatur-ansicht img {
    max-width: 80%; 
    max-height: 80%;
}

@media (max-width: 767px) {
    .gallery-page .jomag-img-wrapper.miniatur-ansicht img {
        max-width: 100%;
        max-height: 100%;
    }
}

/* --- 5.5 DIE SPALTEN-LAYOUTS (BAUKASTEN) --- */

/* 1-Spaltig */
.gallery-page.gallery-one-column {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 50px;
}
.gallery-one-column .jomag-img-wrapper {
    justify-content: center;
    align-items: center;
}

/* 2-Spaltig */
.gallery-page.gallery-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 50px;
}
.gallery-two-columns .jomag-img-wrapper {
    justify-content: flex-start;
    align-items: flex-start;
}

/* 3-Spaltige Galerie */
.gallery-page.gallery-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px; 
    row-gap: 20px;    
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
    align-items: center; /* ZENTRIERT die Bilder in ihrer Zeile vertikal */
}

.gallery-page.gallery-three-columns .jomag-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
}

/* Maximale Höhe beschränken & Proportionalität sichern */
.gallery-page.gallery-three-columns.limit-height .jomag-img-wrapper img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
}

/* ==========================================================================
   5.6 DIA-RASTER & SAFARI FIX (Exakt wie Zustand 001, ohne wichtigen Ballast)
   ========================================================================== */
.gallery-page.gallery-dia-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-dia-grid .jomag-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
}

/* Kacheln der Diagalerie: Innen weiß, dezent grauer Rand */
.gallery-dia-grid .jomag-img-wrapper {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    background-color: #ffffff; /* Ganz normal ohne !important */
    border-radius: var(--main-radius);
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease;
    overflow: hidden;
    display: block;
}

.gallery-dia-grid .jomag-item:hover .jomag-img-wrapper {
    border-color: #c4c4c4;
    box-shadow: none;
}

/* Safari-Fix für absolut positionierte Galerie-Bilder (ohne !important) */
.gallery-page.gallery-dia-grid .gallery-img,
.archive-grid .gallery-img {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
    display: block;
}

/* 4-Spaltig Masonry-Raster */
.gallery-page.gallery-masonry-grid {
    column-count: 4;
    column-gap: 25px;
    margin-bottom: 60px;
}

.gallery-masonry-grid .jomag-item {
    break-inside: avoid;
    margin-bottom: 25px;
}

/* Ergänzende Hilfsklassen */
.limit-height .gallery-img {
    max-height: 320px; 
    width: auto;       
    object-fit: contain;
    margin: 0 auto;    
}

.gallery-one-column.limit-height .gallery-img {
    max-height: 70vh;
}

.ratio-4-3 .jomag-img-wrapper {
    aspect-ratio: 4 / 3;
    width: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ratio-4-3 .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

/* --------------------------------------------------------------------------
   LADE-ANIMATION (Bilder weich heranzoomen lassen)
   -------------------------------------------------------------------------- */

/* 1. Grundzustand vor dem Laden: Unsichtbar + leicht verkleinert */
.gallery-img {
    opacity: 0;
    transform: scale(0.2);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* 2. Zustand sobald das Bild vollständig geladen ist */
.gallery-img.is-loaded {
    opacity: 1;
    transform: scale(1);
}

/* 3. Verhindert Überlappen beim Zoomen */
.jomag-img-wrapper {
    overflow: hidden;
}

/* ==========================================================================
   6. ARCHIV-SEITEN LAYOUT (Minimalistisch & sauber)
   ========================================================================== */

/* 1. Basis für alle Archivseiten: Weißer Hintergrund */
.archive-page {
    background-color: #ffffff;
}

/* 2. Spezialfall Dia-Galerie: Der Seitenhintergrund wird grau */
.archive-page:has(.gallery-dia-grid, .archive-grid) {
    background-color: #f7f7f7;
}

/* 3. Container erbt immer transparent die Farbe der Hauptseite */
.archive-container {
    background-color: transparent;
}

.archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

.archive-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
    margin-top: 50px;
}

/* Automatisch für die ERSTE Sektion: Keine Linie & kein oberer Abstand */
.archive-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px; /* Angenehmer Abstand zum Raster darunter */
    padding-right: 10px;
    padding-bottom: 0px;
    border-bottom: none;
}

/* Verhindert, dass der Titel den Header verschiebt und entfernt den Unterstrich */
.gallery-header .category-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Unterstrich & Abstand NUR für das Archiv beibehalten */
.archive-page .gallery-header {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.gallery-header .category-title a {
    color: inherit;
    text-decoration: none;
    cursor: default;
}

/* ==========================================================================
   7. TEXTE-Box & ACCORDION
   ========================================================================== */
.texte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.info-box {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: var(--main-radius);
    padding: 30px;
    box-shadow: 5px 5px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 5px 7px 10px rgba(0,0,0,0.05);
}

.info-box h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

.clean-list { list-style-type: none; }
.clean-list li { margin-bottom: 15px; line-height: 1.6; }

.highlight-text {
    margin-top: 25px;
    font-style: italic;
    color: #555;
}

.accordion-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    position: relative;
}

.ausstellungen-accordion {
    flex: 1 1 calc(50% - 8px);
    min-width: 200px;
}

.ausstellungen-accordion summary {
    list-style: none;
    cursor: pointer;
    width: 100%;
}

.ausstellungen-accordion summary::-webkit-details-marker { display: none; }

.ausstellungen-accordion[open] .accordion-content {
    position: relative;
    width: 200%; 
    left: 0;
    box-sizing: border-box;
}

.ausstellungen-accordion:nth-child(2)[open] .accordion-content {
    transform: translateX(-51.5%); 
}

.accordion-content {
    margin-top: 20px;
    padding: 30px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: var(--main-radius);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.text-liste {
    list-style: none;
    padding: 10px 20px;
    margin: 0;
}

.text-liste-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.text-liste-item:last-child { border-bottom: none; }
.text-info { line-height: 1.4; }
.texte-box { margin: 10px 0; }

.text-info strong {
    display: block;
    font-size: 1rem;
    color: var(--text-color);
}

.text-info small {
    color: #888;
    font-size: 0.85rem;
}

.btn-lesen {
    height: 35px;
    font-size: 0.8rem;
    padding: 0 15px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;  
    margin-right: 10px; 
    align-self: flex-start;
}

/* ==========================================================================
   TEXTE-BOX CONTAINER & TYPOGRAFIE (Exakte Originalwerte)
   ========================================================================== */
.texte-box-container {
    width: 100%;
    margin-top: 30px;
    padding: 40px 0;
}

.text-liste-centered {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-liste-centered .text-liste-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.text-liste-centered .text-liste-item:last-child {
    border-bottom: none;
}

.text-liste-centered .text-info {
    line-height: 1.4;
}

.text-liste-centered .text-info strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 400;
}

.text-liste-centered .text-info small {
    font-size: 1rem;
    color: #777;
}

/* ==========================================================================
   8. KONTAKT & BUTTONS
   ========================================================================== */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.contact-image img {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 47% 50%;
    border-radius: var(--main-radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    height: 35px;
    padding: 0 10px;
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid #ccc;
    border-radius: var(--main-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    min-width: 75px; 
    max-width: 100%; 
}

.contact-btn:hover, .ausstellungen-accordion[open] .contact-btn-state {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px); 
}

.bottom-nav .btn-group .contact-btn {
    min-width: 115px; 
}

.bottom-nav .btn-group .contact-btn:first-child { overflow: hidden; }

.bottom-nav .btn-group .contact-btn:first-child:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.bottom-nav .btn-group .contact-btn:first-child:hover::before {
    display: none !important;
}

.bottom-nav .btn-group {
    display: flex;
    flex-wrap: wrap;       
    gap: 12px;             
    justify-content: center; 
    margin-top: 15px;
}

.address {
    margin-bottom: 25px; /* Erhöht den Abstand nach unten zur E-Mail-Schaltfläche */
}

/* ==========================================================================
   9. LIGHTBOX BASE STYLES
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    width: auto;             
    height: auto;            
    max-width: 90vw;         
    max-height: 80vh;        
    object-fit: contain; 
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close, .close-btn {
    position: absolute;
    top: 20px; right: 30px;
    z-index: 3010; 
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn {
    display: inline-block;
    font-family: "Roboto", sans-serif;
    font-weight: 100;
    font-size: 40px;
    color: rgba(0, 0, 0, 0.4);
    line-height: 1;
    user-select: none;
}

.close-btn:hover {
    color: #000;
    transform: rotate(180deg) scale(1.1); 
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.3); 
    font-size: 4rem; 
    font-weight: 100; 
    font-family: "Roboto", sans-serif; 
    padding: 20px;
    cursor: pointer;
    user-select: none;
    z-index: 3010;
    transition: color 0.3s, transform 0.2s, opacity 0.3s;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover { 
    color: rgba(0, 0, 0, 1); 
    transform: translateY(-50%) scale(1.1);
}

#caption {
    margin-top: 25px;                                                               
    color: #2b2b2b;                                                               
    font-size: 0.90rem;          
    font-weight: 100;                                                               
    letter-spacing: 0.05em;            
    text-align: center;          
    max-width: 80%;
    background: transparent !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   10. FOOTER, BOTTOM-NAV, LIGHTBOX & MODALS
   ========================================================================== */
.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    color: white;
    position: relative;
    z-index: 10;
}

/* Ergänzungen für den Footer */
.footer-credits {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 5px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: white;
    margin-right: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4); /* Feine Linie */
    padding-bottom: 2px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    border-bottom-color: rgba(255, 255, 255, 1); /* Wird beim Hover voll deckend */
}

.footer-links a:last-child {
    margin-right: 0;
}

/* Bottom-Nav (Weitere Kategorien) */
.bottom-nav-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0 20px;
}

.bottom-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-right: 10px;
}

.bottom-nav-title {
    font-weight: 250;
    letter-spacing: 0.05em;
    font-size: 1.2rem;
    margin: 0;
}

/* Lightbox Bildunterschrift */
#caption {
    font-weight: 300;
    line-height: 1.5;
}

/* Text-Modal (Index-Seite) */
#textModal .modal-body {
    background: white;
    padding: 50px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 2px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

#modalTitle {
    font-weight: 300;
    margin-bottom: 10px;
}

#modalAuthor {
    font-style: italic;
    color: #444;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

#modalFullText {
    text-align: justify;
    hyphens: auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #000000;
    font-weight: 300;
}

/* Vorhandene Buttons & Nav-Elemente */
.back-button-link {
    text-decoration: none;
    display: inline-block;
    margin: 20px 0;
}

.uiverse-back-button {
    box-sizing: border-box; 
    background-color: var(--bg-color);
    width: 192px; 
    height: 56px; 
    border-radius: var(--main-radius);
    position: relative;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;    
    justify-content: center; 
    border: 1px solid #e0e0e0; 
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
} 

.green-circle {
    box-sizing: border-box;
    background-color: var(--primary-color); 
    border-radius: var(--main-radius);
    height: 46px; width: 46px;
    display: flex; align-items: center; justify-content: center;
    position: absolute; left: 4px; top: 4px; z-index: 10;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-text {
    margin: 0; padding-left: 24px;
    transition: all 0.5s ease;
    z-index: 5;
    transform: translateY(25%);
}

.uiverse-back-button:hover .green-circle { width: 182px; }
.green-circle svg { flex-shrink: 0; }

#galerie { border-top: 1px solid rgba(0, 0, 0, 0.15); }
#texte { border-top: 1px solid rgba(0, 0, 0, 0.07); }
#kontakt { border-top: 1px solid rgba(0, 0, 0, 0.07); }

.back-box-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 35px;
    background-color: var(--bg-color);
    color: var(--primary-color);            
    border: 1px solid #cccccc;  
    border-radius: var(--main-radius, 4px); 
    text-decoration: none;
    font-size: 2rem;          
    padding-bottom: 5px;       
    transition: all 0.2s ease;
    cursor: pointer;
}

.back-box-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    transform: translateX(3px); 
}

/* ==========================================================================
   11. VITA / CV STRUKTUR
   ========================================================================== */
.vita-container {
    max-width: 800px;       
    margin: 120px auto 60px auto; /* 120px oben, auto links/rechts, 60px unten */
    padding: 0 20px;         
}

.vita-header {
    display: block;           
    margin-bottom: 40px;
    border-bottom: 1px solid #eeeeee; 
    padding-bottom: 20px;
}

.vita-header .gallery-header {
    margin-bottom: 40px; /* Standard war 40px – je höher die Zahl, desto größer der Abstand zur Biografie */
}

.vita-section {
    margin-bottom: 50px;    
}

.section-title {
    font-size: 1.20rem;     
    font-weight: 400;       
    color: var(--text-color);
    border-bottom: 1px solid #eeeeee; 
    padding-bottom: 10px;   
    margin-bottom: 25px;    
    letter-spacing: 0.05em;
}

.vita-grid {
    display: grid;          
    grid-template-columns: 150px 1fr; 
    row-gap: 12px;
    column-gap: 20px;
    margin-bottom: 30px;
}

.vita-year {
    font-weight: 400;       
    color: #555555;
}

.vita-content { font-weight: 300; }
.vita-content em { color: #555555; font-weight: 200; }

.vita-list {
    list-style: none;    
    padding: 0; margin: 0;
}

.vita-list li { margin-bottom: 8px; font-weight: 300; }
.vita-list li:last-child { margin-bottom: 0; }

/* ==========================================================================
   12. MEDIA QUERIES & RESPONSIVE ANPASSUNGEN
   ========================================================================== */

/* --- A. TABLETS & SMARTPHONES (bis 900px Breite) --- */
@media (max-width: 900px) {
    .hamburger { display: block; }

    .nav-menu {
        position: fixed;
        left: auto;              
        right: 0;             
        top: 60px;
        background-color: var(--bg-color);
        width: 100%;
        height: auto;
        padding-bottom: 0;
        transform: translateX(100%); 
        transition: transform 0.3s ease-in-out, visibility 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        visibility: hidden; 
    }

    .nav-menu.active { 
        transform: translateX(0); 
        visibility: visible; 
    }
        
    .nav-list { flex-direction: column; text-align: center; }
        
    .nav-item { 
        margin: 0 auto;                  
        padding: 1.2rem 0;           
        width: 80%;                  
    }

    .nav-item:not(:last-child) {
        border-bottom: 1px solid #e5e5e5; 
    }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .bottom-nav .btn-group .contact-btn {
        min-width: 135px;    
        font-size: 0.85rem;  
        padding: 0 10px;     
    }

    /* Lightbox Mobile Navigation */
    .lightbox .close,
    .lightbox .close-btn {
        top: 15px;                  
        right: 15px;          
        font-size: 28px;            
        padding: 30px;              
        background-color: transparent; 
        width: auto;                
        height: auto;         
        display: flex;              
        align-items: center;   
        justify-content: center; 
        color: var(--primary-color);            
        line-height: 0;        
        z-index: 3100;              
        transform: none;            
    }

    .lightbox .lightbox-content {
        padding-top: 60px;          
        max-height: 65vh;           
        width: 90vw;                
        object-fit: contain;        
        margin-top: 0;              
        transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    }

    .lightbox .prev, 
    .lightbox .next {
        top: auto;
        bottom: 30px;               
        transform: none;
        font-size: 2.2rem;          
        padding: 0px;
        background-color: transparent;        
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        z-index: 3100;
    }

    .lightbox .prev { left: 25%; }  
    .lightbox .next { right: 25%; }

    #caption { 
        margin-top: 15px;
        margin-bottom: 115px;        
        max-width: 85%; 
        font-size: 0.85rem;
    }
}

/* --- B. MOBILE GERÄTE ALLGEMEIN (bis 768px Breite) --- */
@media (max-width: 768px) {
    /* Galerie 1, 2 und 3 Spalten auf 1 Spalte reduzieren */
    .gallery-page.gallery-one-column,
    .gallery-page.gallery-two-columns,
    .gallery-page.gallery-three-columns {
        grid-template-columns: 1fr; 
        row-gap: 15px;              
    }

    .gallery-page:not(.gallery-dia-grid) .jomag-img-wrapper {
        aspect-ratio: auto;            
        height: auto;                
        display: block;                
        background-color: transparent; 
        margin-bottom: 0px;
    }

    .gallery-page:not(.gallery-dia-grid) .jomag-img-wrapper img {
        width: 100%;          
        height: auto;         
        max-width: 100%;
        max-height: none;     
        object-fit: contain;     
    }

    /* Accordion & Gitter Mobile */
    .accordion-group {
        flex-direction: column;
    }
    
    .ausstellungen-accordion {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .ausstellungen-accordion[open] .accordion-content {
        width: 100%;
    }
    
    .ausstellungen-accordion:nth-child(2)[open] .accordion-content {
        transform: none;
    }
    
    .accordion-content {
        grid-column: 1; 
        grid-row: auto;
    }

    .vita-grid {
        grid-template-columns: 1fr; 
        row-gap: 18px;              
    }

    .vita-year {
        margin-bottom: 2px;
        font-weight: 500; 
    }

    .vita-content {
        margin-bottom: 15px;        
    }
}

/* --- C. SEHR KLEINE SMARTPHONES (bis 600px Breite) --- */
@media (max-width: 600px) {
    .gallery-page.gallery-dia-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-dia-grid .jomag-img-wrapper {
        padding: 8px;
    }
    .gallery-page.gallery-dia-grid .gallery-img,
    .archive-grid .gallery-img {
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: calc(100% - 16px) !important;
        height: calc(100% - 16px) !important;
    }
    .gallery-page.gallery-masonry-grid {
        column-count: 2;
        column-gap: 15px;
    }
    .gallery-masonry-grid .jomag-item {
        margin-bottom: 15px;
    }
    .prev, .next { font-size: 35px; padding: 10px; }
    .close-btn { right: 20px; top: 10px; font-size: 35px; }
    .lightbox-content { height: 70vh; }
    .archive-container { padding: 10px 10px 30px; }
}

/* --- ANIMATIONSKLASSEN FÜR SWIPE & LIGHTBOX --- */
.slide-out-right { transform: translateX(100%) scale(0.9); opacity: 0; }
.slide-out-left { transform: translateX(-100%) scale(0.9); opacity: 0; }
.slide-in-right { transform: translateX(100%) scale(0.9); opacity: 0; transition-duration: 0s; }
.slide-in-left { transform: translateX(-100%) scale(0.9); opacity: 0; transition-duration: 0s; }