/* ============================================================
   KRAXELBANDE – Galerie Page Styles
   ============================================================ */

/* ---- Hero ---- */
.galerie-hero {
    background: #133863;
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.galerie-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--color-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.galerie-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #a4bd1e;
    margin-bottom: 18px;
}

.galerie-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.1;
}

.galerie-title .text-accent {
    color: #a4bd1e;
}

.galerie-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 520px;
    margin: 0 auto;
}

/* ---- Gallery Section ---- */
.galerie-section {
    padding: 60px 0 100px;
    background: var(--color-bg);
}

/* ---- Masonry Grid ---- */
.galerie-grid {
    columns: 3;
    column-gap: 16px;
}

@media (max-width: 900px) {
    .galerie-grid {
        columns: 2;
    }
}

@media (max-width: 550px) {
    .galerie-grid {
        columns: 1;
    }
}

/* ---- Gallery Item ---- */
.galerie-item {
    break-inside: avoid;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition:
        opacity 0.55s var(--ease-out) var(--delay),
        transform 0.55s var(--ease-out) var(--delay);
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.galerie-item.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.galerie-item-inner {
    position: relative;
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.galerie-item-inner img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s var(--ease-out);
}

.galerie-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(19, 56, 99, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.galerie-item:hover .galerie-item-inner img {
    transform: scale(1.06);
}

.galerie-item:hover .galerie-item-overlay {
    opacity: 1;
}

/* ---- Empty State ---- */
.galerie-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
}

.galerie-empty svg {
    margin: 0 auto 20px;
    opacity: 0.4;
}

.galerie-empty code {
    background: var(--color-bg-soft);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 30, 0.92);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 88vw;
    max-height: 82vh;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-img.loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox-counter {
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    z-index: 2;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(6px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.05);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 600px) {
    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }

    .lightbox-prev,
    .lightbox-next,
    .lightbox-close {
        width: 44px;
        height: 44px;
    }

    .galerie-hero {
        padding: 130px 0 60px;
    }
}