/* ==========================================================================
   Photo carousel section — continuously auto-scrolling filmstrip of photos.
   Follows the design language of css/style.css (Poiret One, --primary green,
   white-bordered frames with soft green shadow).
   ========================================================================== */

section.carousel-section {
    flex-direction: column;
    min-height: 0;
    padding: 40px 0;
    background: var(--primary);
    overflow: hidden;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.carousel-viewport.dragging {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    align-items: center;
    gap: 22px;
    width: max-content;
    padding: 0 11px;
    /* Position is driven from js/carousel.js (requestAnimationFrame), not a
       CSS animation, so autoplay and drag can share the same offset. */
    will-change: transform;
}

.carousel-track img {
    height: 340px;
    width: auto;
    max-width: 480px;
    object-fit: cover;
    border-radius: 6px;
    border: 3px solid var(--white);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    display: block;
    cursor: pointer;
    -webkit-user-drag: none;
}

@media (max-width: 900px) {
    .carousel-track img {
        height: 220px;
    }
}

@media (max-width: 600px) {
    .carousel-track img {
        height: 160px;
    }
    .carousel-track {
        gap: 14px;
    }
}

/* ==========================================================================
   Lightbox — nearly full-screen view when a photo is clicked
   ========================================================================== */

.carousel-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease;
}

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

.carousel-lightbox-img {
    max-width: 94vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
}

.carousel-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
}

.carousel-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
