﻿/* =========================================
   FILM GALLERY
   ========================================= */

.film-gallery {
    position: relative;
    height: 250px;
    margin: 8px;
    overflow: hidden;
    border-radius: 20px;
    background: #6f472f;
    box-shadow: 0 8px 24px rgba(60, 35, 20, .22);
    isolation: isolate;
    touch-action: pan-y;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}


/* =========================================
   FILM STRIP
   ========================================= */

.film-strip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient( 90deg, #67412c, #7b5035 50%, #67412c );
}


/* =========================================
   IMAGE TRACK
   ========================================= */

.film-frames {
    position: absolute;
    top: 23px;
    bottom: 23px;
    left: 0;
    /*
       IMPORTANT:
       Allow the track to contain
       ALL images horizontally.
    */
    width: max-content;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 32px;
    z-index: 3;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform .75s cubic-bezier(.4, 0, .2, 1);
}


/* =========================================
   PHOTO FRAME
   ========================================= */

.film-frame {
    flex: 0 0 260px;
    width: 260px;
    height: 188px;
    padding: 5px;
    box-sizing: border-box;
    background: #b98258;
    border: 1px solid rgba(55, 28, 14, .55);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 4px 10px rgba(45,20,10,.25);
}


/* =========================================
   PHOTO
   ========================================= */

.film-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #342117;
    user-select: none;
    -webkit-user-drag: none;
}


    .film-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }


/* =========================================
   FILM HOLES
   ========================================= */

.film-holes {
    position: absolute;
    left: 0;
    right: 0;
    height: 21px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    overflow: hidden;
    background: linear-gradient( 180deg, #71482f, #68402b );
    z-index: 10;
    pointer-events: none;
}


.film-holes-top {
    top: 0;
}


.film-holes-bottom {
    bottom: 0;
}


.film-holes span {
    flex: 0 0 17px;
    width: 17px;
    height: 9px;
    border-radius: 2px;
    background: #321b10;
    box-shadow: inset 0 1px 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.25);
}


/* =========================================
   GALLERY COUNT
   ========================================= */

.gallery-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(55, 31, 19, .88);
    color: white;
    font-size: .85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,.25);
}

@media (max-width: 576px) {

    .film-gallery {
        height: 275px;
        margin: 6px;
        border-radius: 18px;
        touch-action: pan-y;
        overflow: hidden;
    }

    .film-strip {
        height: 100%;
    }

    .film-frames {
        top: 23px;
        bottom: 23px;
        gap: 12px;
        padding: 8px 18px;
        width: max-content;
    }

    .film-frame {
        /*
         * Almost the full card width.
         */
        flex: 0 0 calc(100vw - 52px);
        width: calc(100vw - 52px);
        max-width: 360px;
        height: 215px;
        padding: 5px;
    }

    .film-image {
        width: 100%;
        height: 100%;
    }

        .film-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .film-holes {
        height: 23px;
    }

        .film-holes span {
            width: 14px;
            height: 8px;
            flex-basis: 14px;
        }

    .gallery-badge {
        right: 10px;
        bottom: 11px;
        padding: 8px 12px;
        font-size: .8rem;
    }
}