/* Explain: Styling for the custom commission photo gallery and background video. */
.gallery-tile-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.gallery-tile-zoom {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(13, 16, 20, 0.78);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--gold-color);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.gallery-tile-btn:hover .gallery-tile-zoom,
.gallery-tile-btn:focus-visible .gallery-tile-zoom {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (hover: none) {
    .gallery-tile-zoom {
        opacity: 1;
        transform: none;
    }
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(7, 9, 12, 0.95);
    backdrop-filter: blur(6px);
}

.gallery-lb-body {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
}

.gallery-lb-body img {
    max-width: min(1100px, 92vw);
    max-height: 74vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--gold-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.gallery-lb-body figcaption {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-color);
}

.gallery-lb-close,
.gallery-lb-nav {
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.gallery-lb-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.1rem;
}

.gallery-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-color);
}

.gallery-lb-close:hover,
.gallery-lb-nav:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.gallery-lb-prev { left: 1rem; }
.gallery-lb-next { right: 1rem; }

@media (max-width: 640px) {
    .gallery-lb-nav {
        top: auto;
        bottom: 1.25rem;
        transform: none;
    }

    .gallery-lb-prev { left: calc(50% - 3.4rem); }
    .gallery-lb-next { right: calc(50% - 3.4rem); }

    .gallery-lb-body img { max-height: 66vh; }
}

.gallery-section {
    position: relative;
    overflow: hidden;
}

.gallery-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    pointer-events: none;
}

.gallery-video-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(13, 16, 20, 0.86) 0%, rgba(13, 16, 20, 0.78) 45%, rgba(13, 16, 20, 0.92) 100%);
    pointer-events: none;
}

.gallery-section-inner {
    position: relative;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .gallery-video-bg {
        display: none;
    }
}