/* ============================================================
   /data/css/pages/galleria.css
   - Gallery page styles
   ============================================================ */

.page-hero-section {
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.gallery-section {
    margin-bottom: 4rem;
}

.gallery-card {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-open-btn {
    appearance: none;
    cursor: pointer;
    text-align: left;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bw-shadow-lg);
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ============================================================
   Gallery lightbox
   ============================================================ */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(8px);
}

.gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    padding: 24px 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    touch-action: pan-y;
}

.gallery-lightbox.is-open .gallery-lightbox-image-wrap {
    transform: scale(1);
    opacity: 1;
}

.gallery-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: var(--bw-shadow);
    background: #000000;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: fixed;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.04);
}

.gallery-lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 28px;
    line-height: 1;
}

.gallery-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-nav:hover {
    transform: translateY(-50%) scale(1.04);
}

.gallery-lightbox-prev {
    left: 16px;
}

.gallery-lightbox-next {
    right: 16px;
}

@media (max-width: 767.98px) {
    .gallery-lightbox-dialog {
        padding: 20px 56px;
    }

    .gallery-lightbox-close,
    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }

    .gallery-lightbox-image {
        max-height: calc(100vh - 40px);
    }
}