/* Galerien und Lightbox. Farben, Abstaende und Radien stammen aus den Variablen in base.css. */

/* ----------------------------------------------------------------
   Galerien
---------------------------------------------------------------- */

.gallery-page {
    max-width: 1180px;
}

.gallery-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.gallery-person-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.gallery-person-head h1 {
    margin-bottom: 4px;
}

.gallery-person-head .lead {
    margin-bottom: 0;
}

.gallery-filters {
    padding: 18px 20px;
    margin-bottom: 16px;
}

.gallery-filter-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.gallery-filter-row .field {
    min-width: 220px;
    margin-bottom: 0;
}

.gallery-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.gallery-summary {
    margin: 0 0 16px;
    font-size: 13.5px;
    font-weight: 600;
}

.gallery-summary .muted {
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.gallery-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease), transform var(--ease);
}

.gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-image-link {
    display: block;
    background: var(--surface-sunken);
}

.gallery-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface-sunken);
}

.gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 300ms ease;
}

.gallery-image-link:hover .gallery-image {
    transform: scale(1.025);
}

.gallery-card-meta {
    padding: 12px 14px 14px;
}

.gallery-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gallery-date {
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.gallery-card .tag {
    display: inline-block;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-caption {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.gallery-privacy,
.gallery-public {
    margin-top: 10px;
}

.gallery-public {
    border-color: var(--ok-line);
    background: var(--ok-bg);
    color: var(--ok);
}

.gallery-empty {
    padding: 48px 24px;
    border-style: dashed;
    box-shadow: none;
    text-align: center;
}

.gallery-empty p {
    margin: 6px 0 0;
}

/* Lightbox fuer Eintrags- und Galerie-Fotos */

.lightbox {
    width: min(94vw, 1080px);
    max-width: none;
    max-height: 94vh;
    padding: 20px;
    border: none;
    border-radius: var(--radius);
    background: #070807;
    border: 1px solid var(--border);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.lightbox::backdrop {
    background: rgba(15, 20, 22, 0.78);
    backdrop-filter: blur(4px);
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: min(70vh, 820px);
    margin: 0;
}

.lightbox-figure img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.lightbox-figure figcaption {
    max-width: 90%;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 1;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 400;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 24px;
    line-height: 1;
}

.lightbox-nav {
    top: 50%;
    width: 44px;
    height: 56px;
    border-radius: var(--radius);
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.lightbox-nav:active {
    transform: translateY(-50%);
}
