.flex-container {
    display: flex;
    position: relative;
    width: 100%;
    align-items: center;
    flex-direction: column;
    padding: 36px 0 52px;
}

.film-title {
    font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: #111;
    display: inline-block;
    text-align: center;
    margin: 0 20px 18px;
}
.film-title span {
    display: block;
    text-align: center;
    width: 100%;
    color: #888;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0;
    margin-top: 4px;
}
.gallery {
    margin: 0 auto;
    display: flex;
    position: relative;
    width: 88%;
    max-width: 1500px;
    height: min(58vh, 600px);
    min-height: 300px;
    align-items: center;
    background-color: #202020;
    border-top: 2px solid #000000;
    border-bottom: 2px solid #000000;
    box-sizing: border-box;
    overflow: hidden;
}

.gallery img {
    cursor: zoom-in;
}

.fullscreen-gallery {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 12, 0.96);
    z-index: 100;
}

.fullscreen-gallery.is-open {
    display: flex;
}

.fullscreen-image {
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
    cursor: default;
}

.fullscreen-close,
.fullscreen-prev,
.fullscreen-next {
    position: absolute;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    z-index: 1;
}

.fullscreen-close {
    top: 18px;
    right: 24px;
    padding: 4px 12px 8px;
    font-size: 38px;
}

.fullscreen-prev,
.fullscreen-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 16px;
}

.fullscreen-prev { left: 24px; }
.fullscreen-next { right: 24px; }
.fullscreen-close:hover,
.fullscreen-prev:hover,
.fullscreen-next:hover { background: rgba(255, 255, 255, 0.18); }

.fullscreen-counter {
    position: absolute;
    bottom: 16px;
    margin: 0;
    color: #aaa;
    font-size: 11px;
}

.fullscreen-open { overflow: hidden; }

.fullscreen-open #nav-button,
.fullscreen-open #responsive-nav {
    visibility: hidden;
    pointer-events: none;
}

.prev, .next {
    cursor: pointer;
    width: 40px;
    height: 48px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    font-weight: 500;
    font-size: 24px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.18s ease;
    border-radius: 0;
    background: transparent;
    border: none;
}

.next {
    margin-left: auto;
}

.fullscreen-trigger {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: #333;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 0;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    transition: color 180ms ease, opacity 180ms ease;
}
.fullscreen-icon {
    position: relative;
    display: block;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
}
.fullscreen-icon::before,
.fullscreen-icon::after {
    content: "";
    position: absolute;
    inset: 2px;
    border: 1px solid currentColor;
}
.fullscreen-icon::after {
    inset: 0;
    border: 0;
    background: linear-gradient(currentColor, currentColor) left top / 7px 1px no-repeat,
        linear-gradient(currentColor, currentColor) left top / 1px 7px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 7px 1px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 1px 7px no-repeat;
}
.fullscreen-label {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    padding: 5px 7px;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}
.fullscreen-trigger:hover,
.fullscreen-trigger:focus-visible {
    color: #fff;
    opacity: 1;
}
.fullscreen-trigger:hover .fullscreen-label,
.fullscreen-trigger:focus-visible .fullscreen-label {
    opacity: 1;
}
.fullscreen-trigger:focus-visible {
    outline: 1px solid #fff;
    outline-offset: 3px;
}

.prev:hover, .next:hover {
    color: #fff;
    opacity: 1;
}

.prev:focus-visible, .next:focus-visible {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.slideshow-items {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: none;
    transition: opacity 1s linear;
    justify-content: center;
    align-items: center;
}
.slideshow-items:first-of-type {
    display: flex;
}

.slideshow-items img{
    height: 100%;
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

#slideshow-controller {
    margin-top: 15px;
    height: 52px;
    max-width: min(750px, 88%);
    cursor: pointer;
    display:flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 9px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#slideshow-controller::-webkit-scrollbar { display: none; }

.slideshow-counter {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 2;
    margin: 0;
    padding: 0;
    color: #fff;
    background: transparent;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}
.swipe-hint { display: none; }

.thumbnail {
    margin: 0;
    padding: 0;
    position: relative;
    transition: opacity 180ms ease;
    object-fit: contain;
    width: auto;
    max-width: none;
    cursor: pointer;
    opacity: .6;
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.is-selected {
    opacity: 1;
}

.thumbnail:focus-visible {
    opacity: 1;
    outline: 1px solid #333;
    outline-offset: 3px;
}

.other-works {
    width: min(750px, 88%);
    margin: 40px auto 0;
    text-align: center;
}
.other-works p {
    margin: 0 0 13px;
    text-align: center;
    font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    color: #333;
    cursor: default;
}

.other-works a {
    display: inline-block;
    text-decoration: none;
    color: #999;
    font-size: 15px;
    line-height: 1.25;
    transition: color 0.18s ease;
    padding: 3px 10px;
}

.other-works a:hover {
    color: #111;
}

.mobile-project-nav { display: none; }

.active {
    color: #000;
}

.film-trailer {
    text-decoration: none;
    color: #999;
    transition: color 0.2s linear;
    padding: 20px;
    font-size: 15px;
}
.film-trailer:hover {
    color: #555;
}

@media screen and (max-width: 768px) {
    .flex-container {
        padding: 30px 0 72px;
    }
    .film-title {
        font-size: 25px;
        line-height: 1.18;
        margin: 0 20px 48px;
    }
    .other-works {
        width: 92%;
        margin-top: 52px;
        text-align: left;
    }
    .other-works p {
        display: none;
    }
    .other-works a {
        font-size: 14px;
        padding: 5px 8px;
    }
    .other-works > a { display: none; }
    .mobile-project-nav {
        display: grid;
        gap: 28px;
        margin-top: 0;
        text-align: left;
    }
    .mobile-project-nav__item {
        position: relative;
        display: grid !important;
        gap: 7px;
        min-height: 44px;
        padding: 0 32px 0 0 !important;
        color: #202020 !important;
    }
    .mobile-project-nav__item span {
        color: #888;
        font-size: 12px;
        font-weight: 400;
        letter-spacing: 0;
        text-transform: none;
        line-height: 1.3;
    }
    .mobile-project-nav__item strong {
        color: #222;
        font-size: 17px;
        font-weight: 400;
        line-height: 1.3;
    }
    .mobile-project-nav__item i {
        position: absolute;
        right: 0;
        top: 50%;
        color: #888;
        font-size: 18px;
        font-style: normal;
        transform: translateY(-50%);
    }
    .mobile-project-nav__item:hover strong,
    .mobile-project-nav__item:focus-visible strong {
        color: #777;
    }
    .mobile-project-nav__item:focus-visible,
    .mobile-project-nav__all:focus-visible {
        outline: 1px solid #202020;
        outline-offset: 6px;
    }
    .mobile-project-nav > div {
        display: grid;
        gap: 5px;
    }
    .mobile-project-nav__all {
        display: block;
        margin-top: 36px;
        padding: 0 !important;
        color: #555 !important;
        font-size: 15px !important;
        font-weight: 400;
        line-height: 1.3;
    }
    .mobile-project-nav__all span {
        margin-left: 6px;
        vertical-align: baseline;
    }
    .gallery {
        width: 100%;
        height: auto;
        min-height: 0;
        display: block;
        padding-bottom: 48px;
    }
    .slideshow-items {
        width: 100%;
        height: auto;
        min-height: 0;
        align-items: center;
        justify-content: center;
    }
    .slideshow-items img {
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 70dvh;
        margin: 0 auto;
        object-fit: contain;
    }
    .fullscreen-trigger {
        right: 8px;
        bottom: 2px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        background: transparent;
    }
    .fullscreen-trigger:hover,
    .fullscreen-trigger:focus-visible {
        width: 44px;
        min-width: 44px;
        padding: 0;
        background: transparent;
    }
    .fullscreen-trigger .fullscreen-label { display: none; }
    .prev, .next {
        position: absolute;
        bottom: 0;
        z-index: 3;
        display: none;
        width: 44px;
        height: 52px;
        font-size: 22px;
    }
    .gallery > .prev,
    .gallery > .next { display: none; }
    .slideshow-counter {
        left: 16px;
        bottom: 18px;
        transform: none;
        z-index: 3;
        font-size: 12px;
    }
    .swipe-hint {
        display: block;
        position: absolute;
        left: 50%;
        bottom: 56px;
        z-index: 3;
        margin: 0;
        color: #d0d0d0;
        font-size: 11px;
        font-weight: 400;
        opacity: 0;
        transform: translate(-50%, 4px);
        pointer-events: none;
        transition: opacity 240ms ease, transform 240ms ease;
    }
    .swipe-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
    #slideshow-controller {
        display: none;
    }
    .fullscreen-image {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 100px);
    }
    .fullscreen-prev { left: 8px; }
    .fullscreen-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .prev, .next, .thumbnail, .fullscreen-trigger, .fullscreen-label, .swipe-hint {
        transition: none;
    }
}
