/* =========================================================
   VIDEO GALLERY CSS
   ========================================================= */


/* =========================================================
   FILMSTRIP SPEED

   This controls the NORMAL filmstrip speed.

   Current setting:
       3.75 seconds per thumbnail

   With 50 videos:
       50 × 3.75 = 187.5 seconds per complete cycle

   LOWER NUMBER = FASTER
   HIGHER NUMBER = SLOWER

   Examples:

       3.00 = faster
       3.75 = current
       5.00 = slower
   ========================================================= */

:root {
    --seconds-per-thumbnail: 3.75;
}



/* =========================================================
   BODY
   ========================================================= */

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #ddd;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
}



/* =========================================================
   PAGE CONTAINER
   ========================================================= */

.page {
    width: 96%;
    max-width: 2200px;
    margin: 0 auto;
    padding: 25px 0 60px;
}



/* =========================================================
   PAGE TITLE
   ========================================================= */

h1 {
    margin: 10px auto 30px;
    width: 100%;
    font-size: 36px;
    font-weight: normal;
    letter-spacing: 1px;
    color: #eee;
    text-align: center;
}



/* =========================================================
   LARGE FEATURED VIDEO FRAME
   ========================================================= */

.feature-frame {
    display: inline-block;

    width: min(
        2048px,
        calc(100% - 30px)
    );

    padding: 10px;

    box-sizing: border-box;

    background: #101010;

    border: 2px solid #555;

    box-shadow:
        0 0 0 1px #222,
        0 6px 24px rgba(0,0,0,.8);
}



#featuredVideo {
    display: block;

    width: 100%;

    max-width: 2048px;

    max-height: 88vh;

    height: auto;

    background: #000;

    object-fit: contain;
}



/* =========================================================
   FEATURED VIDEO TITLE
   ========================================================= */

#featuredTitle {
    margin: 14px auto 10px;

    color: #ccc;

    font-size: 18px;

    font-style: italic;
}



/* =========================================================
   VIDEO LOOP CONTROL
   ========================================================= */

.video-loop-row {
    margin: 0 auto 35px;
}



.video-loop-button {
    border: none;

    background: none;

    padding: 4px 8px;

    color: #777;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 1px;

    cursor: pointer;

    transition:
        color .2s ease,
        text-shadow .2s ease;
}



.video-loop-button:hover {
    color: #bbb;
}



.video-loop-button.active {
    color: #ff3030;

    text-shadow:
        0 0 5px rgba(255,48,48,.45);
}



/* =========================================================
   DESCRIPTION
   ========================================================= */

.description {
    max-width: 900px;

    margin: 0 auto 55px;

    text-align: left;

    font-size: 18px;

    line-height: 1.7;

    color: #ccc;
}



/* =========================================================
   FILMSTRIP HEADING
   ========================================================= */

h2 {
    margin: 0 0 18px;

    font-size: 26px;

    font-weight: normal;

    color: #ddd;
}



/* =========================================================
   FILMSTRIP WINDOW
   ========================================================= */

.filmstrip-window {
    width: 100%;

    height: 200px;

    overflow: hidden;

    margin: 0 auto;

    background: #080808;

    border-top: 1px solid #333;

    border-bottom: 1px solid #333;

    display: flex;

    align-items: center;
}



/* =========================================================
   MOVING FILMSTRIP TRACK

   Actual animation duration is calculated from:

   VIDEO_COUNT
   ×
   --seconds-per-thumbnail
   ========================================================= */

.filmstrip-track {
    display: flex;

    align-items: center;

    width: max-content;

    animation-name:
        scrollFilmstrip;

    animation-duration:
        75s;

    animation-timing-function:
        linear;

    animation-iteration-count:
        infinite;
}



/* Temporary hover pause */

.filmstrip-window:hover
.filmstrip-track {

    animation-play-state:
        paused;
}



/* Permanent PAUSE */

.filmstrip-track.manual-paused {

    animation-play-state:
        paused !important;
}



/* =========================================================
   FILMSTRIP SET
   ========================================================= */

.filmstrip-set {
    display: flex;

    align-items: center;

    gap: 12px;

    padding-right: 12px;

    flex-shrink: 0;
}



/* =========================================================
   VIDEO THUMBNAILS

   Source JPG:
       640 × 360

   Display:
       320 × 180
   ========================================================= */

.thumbnail {
    height: 180px;

    width: auto;

    aspect-ratio: 16 / 9;

    flex-shrink: 0;

    object-fit: cover;

    cursor: pointer;

    border: 1px solid #333;

    transition:
        opacity .2s ease,
        border-color .2s ease;
}



.thumbnail:hover {
    opacity: .82;

    border-color: #aaa;
}



/* =========================================================
   CONTINUOUS RIGHT-TO-LEFT FILMSTRIP
   ========================================================= */

@keyframes scrollFilmstrip {

    from {

        transform:
            translateX(0);

    }


    to {

        transform:
            translateX(-50%);

    }

}



/* =========================================================
   VIDEO TOOLTIP
   ========================================================= */

#videoTooltip {
    position: fixed;

    display: none;

    z-index: 9999;

    padding: 6px 10px;

    background:
        rgba(15,15,15,.94);

    color: #999;

    border:
        1px solid #555;

    border-radius:
        4px;

    font-size:
        13px;

    white-space:
        nowrap;

    pointer-events:
        none;

    box-shadow:
        0 3px 10px rgba(0,0,0,.7);
}



/* =========================================================
   INSTRUCTIONS + CONTROLS
   ========================================================= */

.gallery-info-row {
    position: relative;

    width: 100%;

    min-height: 28px;

    margin-top: 9px;
}



.gallery-instructions {
    color: #888;

    font-size: 14px;

    letter-spacing: .2px;

    line-height: 28px;
}



/* =========================================================
   PAUSE + TURBO CONTROLS
   ========================================================= */

.gallery-controls {
    position: absolute;

    right: 5px;

    top: 0;

    display: flex;

    gap: 13px;

    align-items: center;
}



.gallery-control {
    border: none;

    background: none;

    padding: 0 4px;

    color: #777;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 1px;

    line-height: 28px;

    cursor: pointer;

    transition:
        color .2s ease,
        text-shadow .2s ease;
}



.gallery-control:hover {
    color: #bbb;
}



.gallery-control.active {
    color: #ff3030;

    text-shadow:
        0 0 5px rgba(255,48,48,.45);
}



/* =========================================================
   HOME LINK
   ========================================================= */

.home-link {
    margin-top: 40px;
}



.home-link a {
    color: #aaa;

    text-decoration: none;

    font-size: 17px;
}



.home-link a:hover {
    color: #fff;
}



/* =========================================================
   COPYRIGHT FOOTER
   ========================================================= */

.copyright-footer {
    max-width: 1100px;

    margin: 55px auto 0;

    padding-top: 18px;

    border-top:
        1px solid #222;

    color: #777;

    font-size: 14px;

    line-height: 1.7;

    text-align: center;
}



/* =========================================================
   SMALL SCREEN ADJUSTMENTS
   ========================================================= */

@media (max-width: 600px) {

    h1 {
        font-size: 29px;
    }


    .description {
        font-size: 16px;
    }


    .filmstrip-window {
        height: 160px;
    }


    .thumbnail {
        height: 140px;
    }


    .gallery-info-row {
        padding-bottom: 30px;
    }


    .gallery-instructions {
        font-size: 12px;
    }


    .gallery-controls {
        top: 27px;

        right: 0;
    }


    .copyright-footer {
        font-size: 13px;

        margin-top: 45px;
    }

}