/* ═══════════════════════════════════════════════════════════════
   ZOAN Portfolio Gallery — erikalmas.com-inspired design
   ═══════════════════════════════════════════════════════════════ */

:root {
    color-scheme: dark;
    --bg-color: #1d1e20;
    --menu-bg: rgba(29, 30, 32, 0.7);
    --surface-color: #26272a;
    --card-bg: #2c2d30;
    --shimmer-highlight: #383a3e;
    --text-color: #e6e6e6;
    --ui-color: #9a9a9a;
    --ui-hover: #fff;
    --panel-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-focus-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.12);
    --placeholder-color: rgba(255, 255, 255, 0.4);
    --btn-bg: #e6e6e6;
    --btn-text: #1d1e20;
    --btn-hover-bg: #fff;
    --gap: 18px;
    --side-margin: 28px;
    --col-count: 3;
    --vignette-intensity: 0.35;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-color: #e8e8e8;
    --menu-bg: rgba(232, 232, 232, 0.7);
    --surface-color: #e8e8e8;
    --card-bg: #d0d0d0;
    --shimmer-highlight: #dcdcdc;
    --text-color: #333333;
    --ui-color: #555555;
    --ui-hover: #333333;
    --panel-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(255, 255, 255, 0.3);
    --input-focus-bg: rgba(255, 255, 255, 0.6);
    --input-border: rgba(0, 0, 0, 0.08);
    --placeholder-color: rgba(0, 0, 0, 0.45);
    --btn-bg: #333333;
    --btn-text: #fff;
    --btn-hover-bg: #333333;
    --vignette-intensity: 0.15;
}

/* ── Reset ─────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Fixed Vignette Overlay (erikalmas signature) ──────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, var(--vignette-intensity));
}

/* ── Fixed UI Elements ─────────────────────────────────────── */
.fixed-ui {
    position: fixed;
    z-index: 200;
    mix-blend-mode: normal;
}

/* Logo — top left */
.logo {
    top: 14px;
    left: var(--side-margin);
    padding-left: var(--gap);
}

.logo a {
    display: block;
    text-decoration: none;
    line-height: 1;
    background: transparent;
    padding: 10px 0;
    border-radius: 4px;
    transition: opacity 0.3s ease;
    opacity: 0.85;
}

.logo img {
    height: 58px;
    /* 20% larger than 48px */
    width: auto;
    display: block;
}

.logo a:hover {
    opacity: 1;
}

/* Hamburger Menu — top right circle */
.menu-toggle {
    z-index: 95;
    top: 22px;
    right: var(--side-margin);
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 14px 11px;
    background-color: var(--menu-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.25s ease, background-color 0.25s ease;
}

.menu-toggle:hover {
    opacity: 0.75;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Top Horizontal Menu — visible at top when space allows */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.top-nav.is-hidden,
.top-nav.no-space {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.top-nav.is-hidden .top-nav-links,
.top-nav.no-space .top-nav-links {
    pointer-events: none;
}

.top-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    pointer-events: auto;
}

.top-nav-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background-color: var(--ui-color);
    opacity: 0.45;
    user-select: none;
    margin: 0 6px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.top-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.top-nav-link {
    color: var(--ui-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 6px 1px;
    transition: color 0.3s ease;
}

.top-nav-link:hover,
.top-nav-link.active,
.top-nav-link.has-active-child {
    color: var(--ui-hover);
}

.portfolio-caret {
    display: none;
    margin-left: 4px;
    font-size: 0.62rem;
    transition: transform 0.25s ease;
}

/* ── Top Nav Portfolio & Subcategories Cluster ──────────────── */
.top-nav-portfolio-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
}

.flat-subcategories {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.flat-cat-connector {
    color: var(--ui-color);
    opacity: 0.35;
    font-size: 0.7rem;
    font-weight: 400;
    user-select: none;
}

.flat-cat-dot {
    color: var(--ui-color);
    opacity: 0.55;
    font-size: 0.7rem;
    font-weight: 500;
    font-style: normal !important;
    user-select: none;
    line-height: 1;
}

/* Subcategories: Normal font styling (clean non-italic) */
.flat-cat-link,
.top-nav-dropdown a,
.sub-menu a {
    font-style: normal;
}

.top-nav.compact-portfolio .top-nav-portfolio-group {
    background: transparent;
    border-color: transparent;
    padding: 0;
    gap: 0;
}

.top-nav.compact-portfolio .flat-subcategories,
.top-nav.compact-portfolio .flat-cat-link {
    display: none !important;
}

.top-nav.compact-portfolio .portfolio-caret {
    display: inline-block;
}

.top-nav.compact-portfolio .top-nav-item.has-dropdown:hover .portfolio-caret,
.top-nav.compact-portfolio .top-nav-item.has-dropdown:focus-within .portfolio-caret,
.top-nav.compact-portfolio .top-nav-item.has-dropdown.is-open .portfolio-caret {
    transform: rotate(180deg);
}

.top-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 230px;
    background: var(--surface-color);
    border: 1px solid var(--panel-border);
    padding: 10px 0;
    display: none;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 210;
}

.top-nav.compact-portfolio .top-nav-dropdown {
    display: flex;
}

.top-nav.compact-portfolio .top-nav-item.has-dropdown:hover .top-nav-dropdown,
.top-nav.compact-portfolio .top-nav-item.has-dropdown:focus-within .top-nav-dropdown,
.top-nav.compact-portfolio .top-nav-item.has-dropdown.is-open .top-nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.top-nav-dropdown a {
    color: var(--ui-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 9px 20px;
    white-space: nowrap;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.top-nav-dropdown a.sub-sub-link {
    padding-left: 30px;
    font-size: 0.61rem;
    opacity: 0.85;
}

.top-nav-dropdown a:hover,
.top-nav-dropdown a.active {
    color: var(--ui-hover);
    background-color: var(--input-bg);
}

/* Social Icons — bottom right */
.social-icons {
    bottom: 24px;
    right: var(--side-margin);
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-icons a {
    color: var(--ui-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.social-icons a:hover {
    color: var(--ui-hover);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
}

/* Theme Toggle — bottom left */
.theme-toggle {
    bottom: 24px;
    left: var(--side-margin);
    background: none;
    border: none;
    color: var(--ui-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    color: var(--ui-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ── Hero Section (Editorial Category / Page Meta Header) ──── */
.hero-section {
    width: 100%;
    max-width: 1200px;
    margin: 12px auto 38px;
    padding: 0 var(--side-margin);
    text-align: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.hero-section[hidden] {
    display: none !important;
}

.hero-section h1 {
    font-size: 0.80rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ui-color);
    opacity: 0.88;
    margin-bottom: 5px;
    line-height: 1.45;
}

.hero-subtitle {
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ui-color);
    opacity: 0.70;
    line-height: 1.4;
}

/* Fixed whisper mode on tall galleries before user scrolls down */
.hero-section.is-fixed {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 180;
    max-width: calc(100vw - 220px);
    padding: 0 16px;
    margin: 0;
    pointer-events: none;
    will-change: opacity, transform;
}

.hero-section.is-fixed h1,
.hero-section.is-fixed .hero-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Back to Top Button (Below Gallery) ───────────────────── */
.back-to-top-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 14px auto 38px;
    padding: 0 var(--side-margin);
    position: relative;
    z-index: 10;
}

.back-to-top-wrap[hidden] {
    display: none !important;
}

.back-to-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--ui-color);
    opacity: 0.72;
    border: 1px solid var(--panel-border);
    padding: 8px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: opacity 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, transform 0.22s ease, color 0.22s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.back-to-top-btn:hover {
    opacity: 1;
    color: var(--ui-hover);
    border-color: var(--ui-color);
    background: rgba(128, 128, 128, 0.08);
    transform: translateY(-2px);
}

.back-to-top-btn:active {
    transform: translateY(0);
}

.back-to-top-icon {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.back-to-top-btn:hover .back-to-top-icon {
    transform: translateY(-2px);
}

/* ── Portfolio Tag Filter Bar ──────────────────────────────── */
.portfolio-tags-bar {
    padding: 86px var(--side-margin) 0;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.portfolio-tags-bar[hidden] {
    display: none !important;
}

.portfolio-tags-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
}

.portfolio-tag-chip {
    background: transparent;
    color: var(--ui-color);
    opacity: 0.68;
    border: none;
    border-radius: 2px;
    padding: 3px 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.52rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.portfolio-tag-chip:hover {
    opacity: 0.95;
    color: var(--ui-hover);
    background: rgba(128, 128, 128, 0.08);
}

.portfolio-tag-chip.active {
    background: #6a6a6a;
    color: #ffffff;
    border: none;
    opacity: 0.92;
    font-weight: 400;
    border-radius: 2px;
}

/* ── Masonry Gallery Container ─────────────────────────────── */
.gallery-container {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    padding: 100px var(--side-margin) 60px;
    width: 100%;
    margin: 0;
}

.gallery-column {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.gallery-container.has-tags-bar {
    padding-top: var(--gap);
}

.gallery-empty-state {
    width: 100%;
    padding: 80px 20px;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ui-color);
}

/* ── Individual Gallery Items ──────────────────────────────── */
.gallery-item {
    position: relative;
    overflow: hidden;
    background-color: var(--card-bg);
    cursor: pointer;
    border-radius: 0;
    margin-bottom: 0;
    display: block;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Shimmer animation for loading state */
@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.gallery-item.loading {
    background: linear-gradient(to right,
            var(--card-bg) 4%,
            var(--shimmer-highlight) 25%,
            var(--card-bg) 36%);
    background-size: 1200px 100%;
    animation: shimmer 1.8s infinite linear;
}

/* ── Image Styling ─────────────────────────────────────────── */
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.gallery-item.loaded img {
    opacity: 1;
}

/* Minimal hover — erikalmas uses NO visible hover effect on thumbnails.
   We add an extremely subtle brightness lift for a polished feel. */
.gallery-item:hover img {
    filter: brightness(1.04);
}

/* ── Full-Screen Lightbox ──────────────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    z-index: 501;
    pointer-events: none;
    /* Let clicks pass through to zones */
}

.lightbox-overlay.active img {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Interactive Click Zones */
.lightbox-zones {
    position: absolute;
    inset: 0;
    z-index: 505;
    /* Above image, below UI */
    display: flex;
}

.lb-zone {
    flex: 1;
    height: 100%;
}

.lb-zone.lb-prev {
    cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBvbHlsaW5lIHBvaW50cz0iMjAgMjQgMTIgMTYgMjAgOCIvPjwvc3ZnPg==') 16 16, w-resize;
}

.lb-zone.lb-close {
    cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJ3aGl0ZSI+PHJlY3QgeD0iNiIgeT0iNiIgd2lkdGg9IjUiIGhlaWdodD0iNSIvPjxyZWN0IHg9IjEzLjUiIHk9IjYiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiLz48cmVjdCB4PSIyMSIgeT0iNiIgd2lkdGg9IjUiIGhlaWdodD0iNSIvPjxyZWN0IHg9IjYiIHk9IjEzLjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiLz48cmVjdCB4PSIxMy41IiB5PSIxMy41IiB3aWR0aD0iNSIgaGVpZ2h0PSI1Ii8+PHJlY3QgeD0iMjEiIHk9IjEzLjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiLz48cmVjdCB4PSI2IiB5PSIyMSIgd2lkdGg9IjUiIGhlaWdodD0iNSIvPjxyZWN0IHg9IjEzLjUiIHk9IjIxIiB3aWR0aD0iNSIgaGVpZ2h0PSI1Ii8+PHJlY3QgeD0iMjEiIHk9IjIxIiB3aWR0aD0iNSIgaGVpZ2h0PSI1Ii8+PC9zdmc+') 16 16, zoom-out;
}

.lb-zone.lb-next {
    cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBvbHlsaW5lIHBvaW50cz0iMTIgMjQgMjAgMTYgMTIgOCIvPjwvc3ZnPg==') 16 16, e-resize;
}

/* Lightbox navigation */
.lightbox-nav {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 40px;
    z-index: 510;
}

.lightbox-nav button,
.lightbox-nav a {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.lightbox-nav button:hover,
.lightbox-nav a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.lightbox-nav .arrow-btn {
    font-size: 1.3rem;
    letter-spacing: 0;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 510;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.lightbox-close:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* ── Responsive Breakpoints ────────────────────────────────── */

/* Large & Ultrawide Screens */
@media (min-width: 1600px) {
    :root {
        --col-count: 4;
    }
}

@media (min-width: 2200px) {
    :root {
        --col-count: 5;
    }
}

@media (min-width: 2800px) {
    :root {
        --col-count: 6;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --col-count: 2;
        --side-margin: 20px;
        --gap: 14px;
    }

    .gallery-container {
        padding-top: 90px;
    }

    .portfolio-tags-bar {
        padding-top: 90px;
    }

    .gallery-container.has-tags-bar {
        padding-top: var(--gap);
    }

    .top-nav {
        height: 90px;
    }

    .top-nav-links {
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .top-nav {
        display: none;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --col-count: 1;
        --side-margin: 12px;
        --gap: 10px;
    }

    html,
    body {
        overflow-x: hidden;
    }

    .hero-section {
        margin: 14px auto 26px;
        padding: 0 14px;
    }

    .back-to-top-wrap {
        margin: 12px auto 32px;
        padding: 0 14px;
    }

    .hero-section h1 {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
        white-space: normal;
    }

    .hero-subtitle {
        font-size: 0.60rem;
        letter-spacing: 0.10em;
        white-space: normal;
    }

    .hero-section.is-fixed {
        bottom: 16px;
        max-width: calc(100vw - 140px);
        margin: 0;
    }

    .portfolio-tags-bar {
        padding: 76px 12px 0;
    }

    .gallery-container {
        display: flex;
        flex-direction: column;
        column-count: unset;
        align-items: stretch;
        padding: 76px 12px 76px;
        gap: 10px;
    }

    /* Jedna kolona preko cijele širine (inače se skupi na 0px i slike nestanu) */
    .gallery-column {
        width: 100%;
        flex: 0 0 auto;
    }

    .gallery-container.has-tags-bar {
        padding-top: 10px;
    }

    .gallery-item {
        display: block;
        width: 100%;
        margin-bottom: 0;
    }

    .logo {
        top: 10px;
        left: 14px;
        padding-left: 0;
    }

    .logo a {
        padding: 6px 0;
    }

    .logo img {
        height: 40px;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        padding: 11px 9px;
        top: 14px;
        right: 14px;
    }

    .menu-panel {
        width: 100%;
        max-width: 100vw;
        padding: 76px 24px 40px;
    }

    .menu-panel nav {
        gap: 22px;
        margin-bottom: 36px;
    }

    .social-icons {
        bottom: 16px;
        right: 16px;
        gap: 14px;
    }

    .theme-toggle {
        bottom: 16px;
        left: 16px;
    }

    .about-section {
        padding: 84px 16px 80px;
    }

    .about-content h1,
    .about-content h2 {
        font-size: 1.5rem;
    }

    .about-bts-grid {
        padding: 26px 14px 36px;
    }

    .about-bts-item.polaroid-card {
        width: 156px;
        margin: -12px -10px;
        padding: 7px 7px 26px;
    }

    .lightbox-nav {
        bottom: 18px;
        gap: 24px;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
    }
}
        gap: 20px;
    }

    .lightbox-nav button,
    .lightbox-nav a {
        font-size: 0.65rem;
    }
}

/* ── Menu Overlay ──────────────────────────────────────────── */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: var(--surface-color);
    border-left: 1px solid var(--panel-border);
    z-index: 310;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 100px 40px 60px;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s ease;
    overflow-y: auto;
}

.menu-overlay.active .menu-panel {
    transform: translateX(0);
}

.menu-panel nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: right;
    margin-bottom: 60px;
    width: 100%;
}

.menu-item-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sub-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
    padding-right: 0;
}

.menu-panel nav a {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.sub-menu a {
    font-size: 0.65rem !important;
    opacity: 0.8;
    letter-spacing: 0.2em !important;
}

.menu-panel nav a:hover {
    color: var(--ui-hover);
    opacity: 1;
}

.menu-panel nav a.admin-link {
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid var(--panel-border);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    opacity: 0.65;
}

.menu-panel nav a.admin-link:hover {
    opacity: 1;
}

.menu-close {
    position: absolute;
    top: 28px;
    right: 28px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ui-color);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    transition: color 0.3s ease;
}

.menu-close:hover {
    color: var(--ui-hover);
}

/* ── Contact Form in Menu ──────────────────────────────────── */
.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 60px;
    text-align: right;
}

.contact-form h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    color: var(--text-color);
    opacity: 0.7;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
    text-align: right;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--placeholder-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--ui-color);
    background: var(--input-focus-bg);
}

.contact-form textarea {
    min-height: 100px;
    resize: none;
}

.submit-btn {
    align-self: flex-end;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 12px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--btn-hover-bg);
}

/* ── Subcategories & Vertical Menu Tags ────────────────────── */
.sub-menu a.sub-sub-link {
    font-size: 0.6rem !important;
    opacity: 0.55;
    padding-right: 8px;
}

.menu-panel nav a.active {
    opacity: 1;
    color: var(--ui-hover);
}

.menu-tags-wrap {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

@media (orientation: portrait) {
    .menu-tags-wrap {
        display: flex;
    }
}

.menu-tags-title {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.45;
}

.menu-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.menu-tag-btn {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    opacity: 0.65;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.menu-tag-btn:hover,
.menu-tag-btn.active {
    opacity: 1;
    border-color: var(--ui-hover);
    color: var(--ui-hover);
}

/* ── About Me & B&W-to-Color BTS Section ───────────────────── */
.about-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px var(--side-margin) 60px;
}

.about-layout-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.about-content {
    max-width: 100%;
    margin-bottom: 36px;
}

.about-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 14px;
}

.about-content h1,
.about-content h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 300;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.about-lead {
    font-size: 0.88rem;
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.8;
}

.about-lead + .about-lead {
    margin-top: 14px;
}

.about-bts-wrap {
    border-top: none;
    padding-top: 0;
}

.about-clients-wrap {
    border-top: 1px solid var(--panel-border);
    padding-top: 36px;
    margin-bottom: 20px;
}

.about-section-title,
.about-bts-title {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 24px;
}

.about-clients-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.about-clients-header .about-section-title {
    margin-bottom: 0;
}

.about-clients-meta {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ui-color);
    opacity: 0.7;
}

.about-clients-roster {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--panel-border);
}

.about-client-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px 40px;
    padding: 24px 0;
    border-bottom: 1px solid var(--panel-border);
    align-items: start;
    transition: border-color 0.25s ease;
}

.about-client-row:hover {
    border-bottom-color: var(--input-border);
}

.about-client-label {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding-top: 4px;
}

.about-client-index {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--ui-color);
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.about-client-row:hover .about-client-index {
    opacity: 1;
    color: var(--ui-hover);
}

.about-client-category {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ui-color);
    line-height: 1.5;
    transition: color 0.25s ease;
}

.about-client-row:hover .about-client-category {
    color: var(--text-color);
}

.about-client-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-client-desc {
    font-size: 0.84rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.72;
}

.about-client-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
}

.client-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.78;
    transform-origin: center;
    transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
    cursor: default;
}

.client-pill:not(:last-child)::after {
    content: '\00B7';
    color: var(--ui-color);
    opacity: 0.45;
    pointer-events: none;
    transition: none;
}

.client-pill:hover {
    opacity: 1;
    color: var(--ui-hover);
    transform: scale(1.06);
}

.about-clients-more {
    margin-top: 26px;
    font-size: 0.8rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--ui-color);
    opacity: 0.75;
    text-align: right;
}

.about-polaroids-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px var(--side-margin) 90px;
    border-top: 1px solid var(--panel-border);
    text-align: center;
}

.about-polaroids-section .about-bts-wrap {
    border-top: none;
    padding-top: 0;
}

.about-polaroids-section .about-bts-title {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 28px;
    text-align: center;
}

@media (max-width: 960px) {
    .about-polaroids-section {
        padding: 30px var(--side-margin) 70px;
    }

    .about-bts-item.polaroid-card {
        width: 170px;
    }
}

@media (max-width: 760px) {
    .about-client-row {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px 0;
    }

    .about-clients-more {
        text-align: left;
    }
}

.about-bts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px 10px 40px;
}

.about-bts-item.polaroid-card {
    position: relative;
    width: clamp(170px, 14vw, 205px);
    margin: -14px -12px;
    padding: 8px 8px 30px;
    background: #e5e5e5;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 1px;
    box-shadow: none;
    cursor: pointer;
    transform: translate(var(--polaroid-tx, 0px), var(--polaroid-ty, 0px)) rotate(var(--polaroid-rot, 0deg));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, z-index 0s;
    z-index: var(--polaroid-z, 1);
    user-select: none;
}

[data-theme="light"] .about-bts-item.polaroid-card {
    background: #f2f2f2;
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: none;
}

.about-bts-item.polaroid-card:hover {
    transform: translate(0px, -6px) rotate(0deg) scale(1.07);
    border-color: rgba(0, 0, 0, 0.38);
    box-shadow: none;
    z-index: 30;
}

.polaroid-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #1a1a1a;
}

.about-bts-item .polaroid-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.06);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.about-bts-item.polaroid-card:hover .polaroid-frame img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.03);
}

/* ── Studio Footer: Contact CTA & SEO FAQ ──────────────────── */
.studio-footer-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px var(--side-margin) 90px;
    border-top: 1px solid var(--panel-border);
}

.studio-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 70px;
    align-items: start;
}

.contact-cta-wrap {
    border-top: none;
    padding: 0;
    max-width: 100%;
}

.contact-cta-wrap .about-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    margin-bottom: 10px;
}

.cta-heading {
    font-size: clamp(1.12rem, 1.7vw, 1.42rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
    line-height: 1.3;
}

.cta-copy {
    font-size: 0.84rem;
    line-height: 1.7;
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 20px;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.cta-primary-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.cta-primary-btn:hover {
    background: var(--btn-hover-bg);
    transform: translateY(-1px);
}

.cta-secondary-link {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ui-color);
    text-decoration: none;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 2px;
    transition: color 0.25s ease, border-bottom-color 0.25s ease;
}

.cta-secondary-link:hover {
    color: var(--ui-hover);
    border-bottom-color: var(--ui-hover);
}

/* ── Page Contact Form (Below CTA) ─────────────────────────── */
.page-contact-form-wrap {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
}

.page-contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.page-contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.page-contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.page-contact-form .form-label {
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-color);
    opacity: 0.65;
}

.page-contact-form input,
.page-contact-form textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 12px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--text-color);
    outline: none;
    border-radius: 2px;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    text-align: left;
    box-sizing: border-box;
}

.page-contact-form input::placeholder,
.page-contact-form textarea::placeholder {
    color: var(--placeholder-color);
    font-weight: 300;
}

.page-contact-form input:focus,
.page-contact-form textarea:focus {
    border-color: var(--ui-color);
    background: var(--input-focus-bg);
}

.page-contact-form textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.page-contact-form .form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 6px;
}

.page-contact-form .form-submit-btn {
    padding: 12px 28px;
}

.form-status-msg {
    margin-top: 10px;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--ui-color);
}

.form-status-msg.is-success {
    color: var(--ui-color);
}

.form-status-msg.is-error {
    color: #d9534f;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.submit-btn:disabled,
.form-submit-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.faq-wrap {
    border-top: none;
    padding-top: 0;
    width: 100%;
}

.faq-wrap .about-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    margin-bottom: 10px;
}

.faq-wrap .about-section-title {
    font-size: clamp(1.12rem, 1.7vw, 1.42rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.3;
}

.faq-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--panel-border);
}

.faq-item {
    border-bottom: 1px solid var(--panel-border);
    padding: 14px 0;
}

@media (max-width: 960px) {
    .studio-footer-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .faq-wrap {
        border-top: 1px solid var(--panel-border);
        padding-top: 36px;
    }
}

.faq-question {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-color);
    line-height: 1.4;
    cursor: default;
}

.faq-answer {
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--text-color);
    opacity: 0.76;
    max-width: 720px;
}

@media (max-width: 600px) {
    .studio-footer-section {
        padding: 20px 14px 64px;
    }

    .contact-cta-wrap {
        padding: 28px 0 32px;
    }
}

/* ── Video Production Masonry Layout ──────────────────────── */
/* Videos use the unified masonry grid (same as photography categories) so that
   portrait (9:16) and landscape (16:9) videos preserve their full native aspect ratio
   without cropping or horizontal row gaps. */
.gallery-container.is-video-section {
    /* Retains default masonry column-count & column-gap from .gallery-container */
}

.gallery-item.is-video-item {
    border-radius: 0;
    user-select: none;
}

.gallery-item.is-video-item.is-ambient-video {
    cursor: default;
    pointer-events: none;
}

.ambient-loop-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

html.has-video-fullscreen,
body.has-video-fullscreen {
    overflow: hidden !important;
}

.gallery-item.is-video-item.is-browser-fullscreen,
.gallery-item.is-video-item:fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    background: #000 !important;
    transform: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.video-still-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    transition: opacity 0.25s ease;
}

.gallery-item.is-video-item.is-playing .video-still-stage {
    opacity: 0;
}

.gallery-item.is-video-item .video-frame-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.8s ease-in-out, filter 0.35s ease;
    pointer-events: none;
}

.gallery-item.is-video-item.loaded .video-frame-layer.is-active {
    opacity: 1;
}

.gallery-item.is-video-item:not(.is-playing):hover .video-frame-layer.is-active {
    filter: brightness(1.04);
}

.video-idle-ui {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.12) 22%, transparent 45%);
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-item.is-video-item.is-playing .video-idle-ui {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-play-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(18, 19, 21, 0.28);
    backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.video-play-ring svg {
    width: 17px;
    height: 17px;
    margin-left: 2px;
}

.gallery-item.is-video-item:hover .video-play-ring,
.video-play-ring:focus-visible {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(18, 19, 21, 0.52);
    border-color: rgba(255, 255, 255, 0.92);
    outline: none;
}

.video-idle-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.38) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.gallery-item.is-video-item:hover .video-idle-meta,
.gallery-item.is-video-item:focus-within .video-idle-meta {
    opacity: 1;
}

.video-idle-meta-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    transform: translateY(6px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.is-video-item:hover .video-idle-meta-left,
.gallery-item.is-video-item:focus-within .video-idle-meta-left {
    transform: translateY(0);
}

.video-title-hint {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.96);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.video-hover-details {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    line-height: 1.35;
    max-width: 100%;
}

.video-frame-ticks {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-frame-tick {
    width: 12px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.34);
    transition: background-color 0.22s ease, width 0.22s ease;
}

.video-frame-tick.is-active {
    width: 18px;
    background: rgba(255, 255, 255, 0.94);
}

.video-duration-badge {
    display: none !important;
}

.video-badge-dot {
    font-size: 0.44rem;
    opacity: 0.85;
}

.video-player-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    background: #000;
    transition: opacity 0.22s ease;
}

.gallery-item.is-video-item.is-playing .video-player-layer {
    opacity: 1;
    pointer-events: auto;
}

.video-player-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item.is-video-item.is-browser-fullscreen .video-player-layer,
.gallery-item.is-video-item:fullscreen .video-player-layer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}

.gallery-item.is-video-item.is-browser-fullscreen .video-player-layer video,
.gallery-item.is-video-item:fullscreen .video-player-layer video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    display: block !important;
}

.gallery-item.is-video-item.is-browser-fullscreen .video-controls,
.gallery-item.is-video-item:fullscreen .video-controls {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    z-index: 100000 !important;
    padding: 36px 28px 18px !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.52) 65%, transparent 100%) !important;
}

.video-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 26px 12px 10px;
    background: linear-gradient(to top, rgba(12, 13, 15, 0.84) 0%, rgba(12, 13, 15, 0.44) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-item.is-video-item.is-playing.is-controls-visible .video-controls,
.gallery-item.is-video-item.is-playing.is-paused .video-controls,
.gallery-item.is-video-item.is-playing:hover .video-controls,
.gallery-item.is-video-item.is-playing:focus-within .video-controls {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (hover: none) {
    .gallery-item.is-video-item.is-playing .video-controls {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.video-progress {
    padding: 6px 0;
    cursor: pointer;
    touch-action: none;
}

.video-progress-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.28);
    position: relative;
    transition: height 0.15s ease;
}

.video-progress:hover .video-progress-track {
    height: 3px;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.94);
    transition: width 0.08s linear;
}

.video-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.video-controls-left,
.video-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-ctrl-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.82);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.video-ctrl-btn:hover,
.video-ctrl-btn:focus-visible {
    color: #fff;
    outline: none;
}

.video-ctrl-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.video-time-readout {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.84);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item.is-video-item .video-frame-layer,
    .video-play-ring,
    .video-title-hint,
    .video-frame-tick {
        transition: none;
    }
}

/* Freeze all animations and hover motion on other tiles while a video plays */
.gallery-container.has-playing-video .gallery-item:not(.is-playing) .video-frame-layer,
.gallery-container.has-playing-video .gallery-item:not(.is-playing) .video-frame-tick,
.gallery-container.has-playing-video .gallery-item:not(.is-playing) .video-play-ring,
.gallery-container.has-playing-video .gallery-item:not(.is-playing) .video-title-hint,
.gallery-container.has-playing-video .gallery-item:not(.is-playing) img {
    transition: none !important;
    animation: none !important;
}

.gallery-container.has-playing-video .gallery-item:not(.is-playing):hover .video-frame-layer.is-active,
.gallery-container.has-playing-video .gallery-item:not(.is-playing):hover img {
    filter: none;
}

.gallery-container.has-playing-video .gallery-item:not(.is-playing):hover .video-play-ring {
    transform: translate(-50%, -50%) scale(1);
    background: rgba(18, 19, 21, 0.28);
    border-color: rgba(255, 255, 255, 0.62);
}

.gallery-container.has-playing-video .gallery-item:not(.is-playing):hover .video-title-hint {
    opacity: 0.92;
    transform: none;
}

.gallery-container.has-playing-video .gallery-item:not(.is-playing):hover .video-hover-details {
    opacity: 0;
    max-height: 0;
    transform: translateY(4px);
}
