/* Seitenbezogene Styles für gallery.html (Albumübersicht) und album.html (Fotos + Großansicht). */

.gallery-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.gallery-hero .container {
    position: relative;
    z-index: 1;
}

.gallery-section {
    background: linear-gradient(135deg, #a8b5ea 0%, #9b8bc2 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.gallery-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-item-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #333;
}

.gallery-item-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.gallery-item-content .btn {
    margin-top: auto;
}

/* Albumkarte ist ein Link (assets/js/gallery.js) */
a.gallery-item {
    color: inherit;
    text-decoration: none;
}

.gallery-count {
    margin-top: auto;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 999px;
    background: #667eea;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---------- Album-Seite ---------- */
.album-hero {
    min-height: 0;
    padding: 150px 0 50px;
}

/* Übersicht: Alben direkt im Kopfbereich, damit sie gleich sichtbar sind */
.gallery-hero-compact {
    min-height: 0;
    padding: 56px 0 48px;   /* body hat schon 70–100px für die fixe Navigation */
}

.gallery-hero-compact .gallery-grid {
    margin: 0 auto;
    max-width: 1080px;
    text-align: left;
}

.gallery-hero-compact .gallery-item img {
    height: 210px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.album-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.album-thumb:hover,
.album-thumb:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    outline: none;
}

.album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-empty {
    text-align: center;
    color: #fff;
    font-size: 1.25rem;
    padding: 40px 0;
}

.album-empty a {
    color: #fff;
}

/* ---------- Großansicht ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.94);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-figure {
    margin: 0;
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 60px);
    text-align: center;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 110px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-figure figcaption {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.lightbox button {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox button:hover,
.lightbox button:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

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

@media (max-width: 576px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .lightbox-figure { max-width: 100vw; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 20px; transform: none; }
}
