/* AVS gallery: album cards, photo grid, breadcrumb, pagination, lightbox */

.wsc-gallery {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.wsc-gallery__breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #666;
}

.wsc-gallery__breadcrumb a {
    color: var(--avs-blue, #1c3f6e);
    text-decoration: none;
}

.wsc-gallery__breadcrumb a:hover {
    text-decoration: underline;
}

.wsc-gallery__breadcrumb-sep {
    margin: 0 0.35rem;
}

.wsc-gallery__header h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--avs-blue, #1c3f6e);
}

.wsc-gallery__description {
    margin: 0 0 0.35rem;
    color: #444;
}

.wsc-gallery__date {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* Album cards */
.wsc-gallery__albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.wsc-album-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(16, 34, 60, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wsc-album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(16, 34, 60, 0.18);
}

.wsc-album-card__media {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--avs-sky, #7fb2e5), var(--avs-blue, #1c3f6e));
    display: block;
    overflow: hidden;
}

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

.wsc-album-card__body {
    padding: 0.75rem 1rem 0.9rem;
    display: block;
}

.wsc-album-card__title {
    display: block;
    font-weight: 600;
    color: var(--avs-blue, #1c3f6e);
}

.wsc-album-card__meta {
    display: block;
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.15rem;
}

/* Photo grid */
.wsc-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.wsc-photo {
    margin: 0;
}

.wsc-photo__link {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #eef2f7;
}

.wsc-photo__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.wsc-photo__link:hover img {
    transform: scale(1.04);
}

/* Video tiles: square placeholder with a centered play badge (visual language
   of .wsc-video-poster__play in main.css, scoped to the gallery grid). */
.wsc-photo__link--video {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--avs-blue, #1c3f6e), #122b4d);
}

.wsc-photo__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    transition: background 0.15s ease, transform 0.15s ease;
}

.wsc-photo__video-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 0.55rem 0 0.55rem 0.9rem;
    border-color: transparent transparent transparent #fff;
}

.wsc-photo__link--video:hover .wsc-photo__video-play {
    background: var(--avs-gold, #ac8f53);
    transform: translate(-50%, -50%) scale(1.08);
}

.wsc-photo__video-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.8rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.wsc-photo__caption {
    font-size: 0.85rem;
    color: #444;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wsc-photo__date {
    font-size: 0.75rem;
    color: #999;
}

/* Pagination */
.wsc-gallery__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 2rem;
}

.wsc-gallery__pagination a,
.wsc-gallery__pagination span {
    min-width: 2.25rem;
    padding: 0.4rem 0.6rem;
    text-align: center;
    border-radius: 0.4rem;
    text-decoration: none;
    color: var(--avs-blue, #1c3f6e);
    background: #eef2f7;
}

.wsc-gallery__pagination a:hover {
    background: var(--avs-gold, #ac8f53);
    color: #fff;
}

.wsc-gallery__pagination span[aria-current="page"] {
    background: var(--avs-blue, #1c3f6e);
    color: #fff;
}

/* Lightbox */
.wsc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 18, 30, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsc-lightbox[hidden] {
    display: none;
}

body.wsc-lightbox-open {
    overflow: hidden;
}

.wsc-lightbox__figure {
    margin: 0;
    max-width: min(92vw, 110rem);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wsc-lightbox__img {
    max-width: 92vw;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 0.25rem;
}

.wsc-lightbox__caption {
    color: #d8e2ef;
    font-size: 0.95rem;
    padding: 0.75rem 1rem 0;
    text-align: center;
}

.wsc-lightbox__close,
.wsc-lightbox__nav {
    position: fixed;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsc-lightbox__close:hover,
.wsc-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.wsc-lightbox__close {
    top: 1rem;
    right: 1rem;
}

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

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

@media (max-width: 40rem) {
    .wsc-gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
        gap: 0.6rem;
    }

    .wsc-gallery__albums {
        grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
        gap: 0.85rem;
    }
}
