/* =========================================
   JM ORIGINAL – GALLERY
   SCHWARZ / GOLD
   (wird nach style.css geladen)
========================================= */

/* GRUNDLAGE */

:root {
    --gallery-gold: #d4af37;
    --gallery-gold-soft: rgba(212, 175, 55, 0.35);
    --gallery-black: #080808;
    --gallery-panel: #111111;
    --gallery-text: #f1f1f1;
    --gallery-muted: #aaaaaa;
}

body {
    background-color: var(--gallery-black);
}

/* Hintergrund der Seite scrollt nicht, solange die Lightbox offen ist */
body.lightbox-open {
    overflow: hidden;
}

.gallery-wrap {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

/* HERO-BEREICH */

.gallery-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 90px 0 50px;
}

.gallery-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 650px;
    height: 450px;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse,
        rgba(212, 175, 55, 0.15) 0%,
        rgba(212, 175, 55, 0.05) 40%,
        transparent 72%
    );
    pointer-events: none;
}

.gallery-eyebrow {
    margin-bottom: 14px;
    color: var(--gallery-gold);
    font-family: Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
}

.gallery-hero h1 {
    margin-bottom: 22px;
    color: var(--gallery-gold);
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: 400;
    line-height: 1.05;
}

.gallery-bar {
    width: 96px;
    height: 5px;
    margin-bottom: 26px;
    border-radius: 999px;
    background: var(--gallery-gold);
}

.gallery-lead {
    max-width: 34em;
    color: var(--gallery-muted);
    font-size: 1.25rem;
}

/* HINWEIS */

.gallery-warning {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 60px;
    padding: 22px 26px;
    border: 1px solid var(--gallery-gold-soft);
    border-left: 3px solid var(--gallery-gold);
    border-radius: 5px;
    background: rgba(212, 175, 55, 0.06);
    color: var(--gallery-text);
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

.warning-mark {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gallery-gold);
    border-radius: 50%;
    color: var(--gallery-gold);
    font-weight: bold;
}

.gallery-warning h2 {
    margin-bottom: 6px;
    color: var(--gallery-gold);
    font-family: "Contrail One", sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
}

/* EINLEITUNG */

.gallery-intro {
    margin-bottom: 55px;
}

.gallery-intro p {
    margin-bottom: 10px;
    color: var(--gallery-gold);
    font-family: Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
}

.gallery-intro h2 {
    margin-bottom: 10px;
    color: var(--gallery-text);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
}

.gallery-intro span {
    display: block;
    color: var(--gallery-muted);
    font-family: Arial, sans-serif;
    font-size: 15px;
}

/* ALLGEMEINE ABSCHNITTE */

.photo-section {
    margin-bottom: 75px;
}

.photo-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.photo-kicker {
    margin: 0 0 6px;
    color: var(--gallery-muted);
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
}

.photo-heading h2 {
    margin: 0;
    color: var(--gallery-gold);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 400;
}

.photo-heading > span {
    color: var(--gallery-muted);
    font-family: Arial, sans-serif;
    font-size: 14px;
    white-space: nowrap;
}

/* GALERIE-VORSCHAU
   Nur das erste Bild jeder Kategorie wird angezeigt.
   Die übrigen Bilder werden erst in der Lightbox geladen.
*/

.gallery-grid {
    width: 100%;
    margin-top: 20px;
}

.gallery-grid .gallery-item {
    display: none;
}

.gallery-grid .gallery-item:first-child {
    display: block;
    position: relative;
    width: 100%;
    height: 390px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--gallery-gold-soft);
    border-radius: 12px;
    background: var(--gallery-panel);
    cursor: pointer;
    text-align: left;
}

.gallery-grid .gallery-item:first-child img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease, filter 0.5s ease;
}

/* BESCHRIFTUNG AUF DER VORSCHAU */

.gallery-grid .gallery-item:first-child::after {
    content: "GALERIE ANSEHEN  →";
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 2;
    padding: 12px 18px;
    border: 1px solid rgba(212, 175, 55, 0.7);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78);
    color: var(--gallery-gold);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    transition: background 0.3s ease, color 0.3s ease;
}

.gallery-grid .gallery-item:first-child:focus-visible::after {
    background: var(--gallery-gold);
    color: #000;
}

@media (hover: hover) {
    .gallery-grid .gallery-item:first-child:hover img {
        transform: scale(1.035);
        filter: brightness(0.72);
    }

    .gallery-grid .gallery-item:first-child:hover::after {
        background: var(--gallery-gold);
        color: #000;
    }
}

/* LIGHTBOX – HINTERGRUND */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 55px 90px;
    background: rgba(0, 0, 0, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* BILD */

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1250px;
    max-height: 90vh;
    margin: 0;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 5px;
    user-select: none;
    -webkit-user-drag: none;
}

/* BILDBESCHRIFTUNG */

.lightbox-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    gap: 20px;
    margin-top: 18px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.lightbox-title {
    color: var(--gallery-gold);
}

.lightbox-counter {
    color: var(--gallery-muted);
    white-space: nowrap;
}

/* SCHLIESSEN-BUTTON */

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 5;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--gallery-gold-soft);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--gallery-gold);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lightbox-close:hover {
    background: var(--gallery-gold);
    color: #000;
}

/* VOR / ZURÜCK */

.lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid var(--gallery-gold-soft);
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.9);
    color: var(--gallery-gold);
    font-size: 22px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lightbox-arrow:hover:not(:disabled) {
    background: var(--gallery-gold);
    color: #000;
}

.lightbox-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

/* FOKUS FÜR TASTATURNUTZUNG */

.gallery-item:focus-visible,
.lightbox button:focus-visible {
    outline: 2px solid var(--gallery-gold);
    outline-offset: 4px;
}

/* TABLET */

@media (max-width: 900px) {
    .gallery-grid .gallery-item:first-child {
        height: 320px;
    }

    .lightbox {
        padding: 50px 65px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* SMARTPHONE */

@media (max-width: 600px) {
    .gallery-hero {
        padding: 60px 0 35px;
    }

    .gallery-warning {
        padding: 18px;
        margin-bottom: 45px;
    }

    .gallery-intro {
        margin-bottom: 40px;
    }

    .photo-section {
        margin-bottom: 55px;
    }

    .photo-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .photo-heading h2 {
        font-size: 25px;
    }

    .gallery-grid .gallery-item:first-child {
        height: 240px;
    }

    .gallery-grid .gallery-item:first-child::after {
        left: 12px;
        bottom: 12px;
        padding: 10px 13px;
        font-size: 10px;
    }

    .lightbox {
        padding: 55px 12px 85px;
    }

    .lightbox-figure {
        max-height: 80vh;
    }

    .lightbox-image {
        max-width: 100%;
        max-height: 70vh;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }

    .lightbox-arrow {
        top: auto;
        bottom: 17px;
        width: 43px;
        height: 43px;
        transform: none;
    }

    .lightbox-prev {
        left: 30%;
    }

    .lightbox-next {
        right: 30%;
    }

    .lightbox-caption {
        font-size: 12px;
        margin-top: 12px;
    }
}