/* ============================================================
   EIGHTERS BASEBALL CLUB - Galerie/Alben + Lightbox
   ============================================================ */

/* ---------------- ALBUM-GRID ---------------- */

.album-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 600px) {
    .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

@media (min-width: 960px) {
    .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
}

.album-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
    .album-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 28px var(--color-blue-25);
    }
}

.album-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    cursor: pointer;
}

.album-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-bg-secondary);
    overflow: hidden;
}

.album-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.album-card:hover .album-card__thumb { transform: scale(1.05); }

.album-card__count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
}

.album-card__info {
    padding: 0.9rem 1rem 1rem;
}

.album-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    min-height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.album-card__date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.gallery-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-card);
    color: var(--color-text-muted);
}

.gallery-placeholder code {
    font-family: monospace;
    font-size: 0.9rem;
}

/* ---------------- LIGHTBOX ---------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 29, 73, 0.94); /* Clubblau als Abdunkelung */
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.lightbox[hidden] { display: none; }

.lightbox__stage {
    max-width: min(1100px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.lightbox__img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius-card);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    color: var(--color-white-90);
    font-size: 0.95rem;
}

.lightbox__title { font-weight: 700; }
.lightbox__counter { color: var(--color-gold-light); }

/* Steuerung */
.lightbox__close,
.lightbox__nav {
    position: fixed;
    background: var(--color-gold);
    color: var(--color-blue);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: var(--color-gold-light);
    transform: scale(1.08);
}

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox__nav--prev:hover,
.lightbox__nav--next:hover {
    transform: translateY(-50%) scale(1.08);
}

/* Mobil: Buttons kleiner, unterm Bild anordnen */
@media (max-width: 600px) {
    .lightbox { padding: 0.5rem; align-items: flex-start; padding-top: 3rem; }
    .lightbox__img { max-height: 70vh; }
    .lightbox__close,
    .lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
    .lightbox__caption { flex-direction: column; gap: 0.15rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .album-card, .album-card__thumb,
    .lightbox__close, .lightbox__nav { transition: none; }
}