/* Gallery Album Display Upgrade - cover click fix */

.gallery-album-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.gallery-album-card {
    padding: 0;
    overflow: hidden;
}

.gallery-album-cover-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
}

.gallery-album-cover {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
}

.gallery-album-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    color: var(--muted, #9fb6d8);
}

.gallery-album-cover-link:hover .gallery-album-cover {
    transform: scale(1.035);
    opacity: .86;
    box-shadow: inset 0 0 0 2px var(--accent, #D9B26A);
}

/* Hidden intentionally. The image itself is the link target. */
.gallery-album-open {
    display: none !important;
}

.gallery-album-card-body {
    padding: 18px;
}

.gallery-album-card-body h2 {
    margin-top: 10px;
}

.gallery-album-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.gallery-thumb-card {
    position: relative;
    margin: 0;
    border: 1px solid var(--border, rgba(217,178,106,.18));
    background: rgba(255,255,255,.025);
    overflow: hidden;
}

.gallery-thumb-card img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform .22s ease, opacity .22s ease;
}

.gallery-thumb-card:hover img {
    transform: scale(1.035);
    opacity: .72;
}

.gallery-thumb-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    background: rgba(0,0,0,.82);
    color: #f0e7d5;
    font-size: .82rem;
    line-height: 1.25;
    transform: translateY(100%);
    transition: transform .18s ease;
    pointer-events: none;
}

.gallery-thumb-card:hover figcaption {
    transform: translateY(0);
}

.gallery-meta {
    color: var(--muted, #9fb6d8);
    font-size: .88rem;
}

@media(max-width: 1100px) {
    .gallery-album-index-grid,
    .gallery-album-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width: 700px) {
    .gallery-album-index-grid,
    .gallery-album-detail-grid {
        grid-template-columns: 1fr;
    }

    .gallery-album-cover,
    .gallery-thumb-card img {
        height: 220px;
    }

    .gallery-thumb-card figcaption {
        transform: translateY(0);
    }
}
