/* =========================================================
   NIMA ZAHEDI — GALLERY
   ========================================================= */

body.nz-gallery-preview {
    margin: 0;
    background: #15120f;
    color: #f3eee7;
}

body.nz-gallery-lightbox-open {
    overflow: hidden;
}

.nz-gallery-page,
.nz-gallery-page * {
    box-sizing: border-box;
}

.nz-gallery-page {
    --bg: #15120f;
    --surface: #1d1916;
    --surface-hover: #27211d;
    --text: #f3eee7;
    --muted: #a79d92;
    --line: rgba(243, 238, 231, 0.14);
    --accent: #965c4c;
    --accent-hover: #a86a58;

    min-height: 100vh;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 70% 25%,
            rgba(150, 92, 76, 0.08),
            transparent 34%
        ),
        var(--bg);

    color: var(--text);

    font-family: fnum, sans-serif;
}


/* =========================================================
   HEADER
   ========================================================= */

.nz-gallery-header {
    width: min(100% - 48px, 1440px);
    min-height: 104px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--line);
}

.nz-language {
    display: flex;
    align-items: center;
    gap: 10px;

    direction: ltr;

    color: rgba(167, 157, 146, 0.55);

    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.16em;
}

.nz-language span {
    display: block;
}

.nz-language .is-active {
    color: var(--text);
}

.nz-language-line {
    width: 24px;
    height: 1px;

    background: var(--line);
}

.nz-gallery-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    color: var(--text);
    text-decoration: none;

    direction: rtl;
}

.nz-gallery-brand:hover {
    color: var(--text);
}

.nz-gallery-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.nz-gallery-brand-text strong {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.nz-gallery-brand-text small {
    color: var(--muted);

    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.18em;
}

.nz-gallery-logo {
    display: block;

    width: 48px;
    height: 48px;

    object-fit: contain;
}


/* =========================================================
   MAIN
   ========================================================= */

.nz-gallery-main {
    width: min(100% - 48px, 1440px);

    margin: 0 auto;
    padding: 72px 0 80px;
}


/* =========================================================
   INTRO
   ========================================================= */

.nz-gallery-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;

    margin-bottom: 44px;

    direction: rtl;
}

.nz-gallery-intro-copy {
    max-width: 680px;
}

.nz-gallery-eyebrow {
    display: block;

    margin-bottom: 17px;

    color: var(--accent);

    direction: ltr;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
}

.nz-gallery-intro h1 {
    margin: 0 0 13px;

    color: var(--text);

    font-family: fnum, sans-serif;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 400;
    line-height: 1.05;
}

.nz-gallery-intro p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    font-weight: 400;
    line-height: 2;
}

.nz-gallery-archive-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    direction: ltr;
}

.nz-gallery-archive-count span {
    color: var(--text);

    font-family: Arial, sans-serif;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 300;
    line-height: 1;
}

.nz-gallery-archive-count small {
    margin-top: 9px;

    color: var(--muted);

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.22em;
}


/* =========================================================
   FILTERS
   ========================================================= */

.nz-gallery-filters {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0 0 26px;

    direction: rtl;
}

.nz-gallery-filter {
    appearance: none;

    min-height: 38px;
    padding: 8px 17px;

    border: 1px solid rgba(243, 238, 231, 0.12);
    border-radius: 999px;

    background: rgba(243, 238, 231, 0.025);

    color: var(--muted);

    font-family: fnum, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;

    cursor: pointer;

    transition:
        color 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.nz-gallery-filter:hover {
    color: var(--text);

    border-color: rgba(150, 92, 76, 0.55);

    background: rgba(150, 92, 76, 0.08);
}

.nz-gallery-filter:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

.nz-gallery-filter.is-active {
    color: var(--text);

    border-color: rgba(150, 92, 76, 0.8);

    background: rgba(150, 92, 76, 0.16);
}


/* =========================================================
   SHOWCASE
   ========================================================= */

.nz-gallery-showcase {
    position: relative;
}

.nz-gallery-stage {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(260px, 30%);

    min-height: 610px;

    border: 1px solid var(--line);

    background: var(--surface);
}


/* =========================================================
   MAIN IMAGE
   ========================================================= */

.nz-gallery-stage-image {
    position: relative;

    min-width: 0;
    min-height: 610px;

    overflow: hidden;

    background: #0f0d0b;
}

.nz-gallery-stage-image > [data-gallery-slides] {
    position: absolute;
    inset: 0;
}

.nz-gallery-slide {
    position: absolute;
    inset: 0;

    margin: 0;

    opacity: 0;
    visibility: hidden;

    transform: scale(1.015);

    transition:
        opacity 420ms ease,
        visibility 420ms ease,
        transform 900ms cubic-bezier(.2, .7, .2, 1);
}

.nz-gallery-slide.is-active {
    opacity: 1;
    visibility: visible;

    transform: scale(1);
}

.nz-gallery-slide img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    background: #0f0d0b;
}


/* =========================================================
   EXPAND
   ========================================================= */

.nz-gallery-expand {
    position: absolute;
    z-index: 5;
    top: 24px;
    left: 24px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid rgba(243, 238, 231, 0.22);
    border-radius: 50%;

    background: rgba(21, 18, 15, 0.6);
    backdrop-filter: blur(8px);

    color: var(--text);

    cursor: pointer;

    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.nz-gallery-expand:hover {
    border-color: var(--accent);

    background: rgba(150, 92, 76, 0.18);

    transform: scale(1.04);
}

.nz-gallery-expand span {
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
}


/* =========================================================
   SLIDE INDEX
   ========================================================= */

.nz-gallery-slide-index {
    position: absolute;
    z-index: 5;
    right: 25px;
    bottom: 24px;

    display: flex;
    align-items: center;
    gap: 11px;

    direction: ltr;

    color: var(--text);

    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.nz-gallery-slide-index i {
    display: block;

    width: 38px;
    height: 1px;

    background: rgba(243, 238, 231, 0.35);
}


/* =========================================================
   SIDE PANEL
   ========================================================= */

.nz-gallery-stage-panel {
    min-width: 0;

    padding: clamp(30px, 4vw, 56px);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-right: 1px solid var(--line);

    direction: rtl;
}

.nz-gallery-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    direction: ltr;
}

.nz-gallery-panel-label,
.nz-gallery-panel-number {
    color: var(--muted);

    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.18em;
}

.nz-gallery-panel-number {
    color: var(--accent);
}

.nz-gallery-panel-copy {
    margin: auto 0;
    padding: 50px 0;
}

.nz-gallery-panel-copy > span {
    display: block;

    margin-bottom: 22px;

    color: var(--accent);

    direction: ltr;

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
}

.nz-gallery-panel-copy h2 {
    margin: 0 0 26px;

    color: var(--text);

    font-family: fnum, sans-serif;
    font-size: clamp(25px, 2.4vw, 38px);
    font-weight: 400;
    line-height: 1.75;
}

.nz-gallery-panel-copy p {
    max-width: 280px;

    margin: 0;

    color: var(--muted);

    font-size: 12px;
    font-weight: 400;
    line-height: 2.1;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.nz-gallery-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;

    direction: ltr;
}

.nz-gallery-control {
    appearance: none;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--muted);

    cursor: pointer;

    transition: color 180ms ease;
}

.nz-gallery-control:hover {
    color: var(--text);
}

.nz-gallery-control span {
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 1;
}

.nz-gallery-control small {
    font-family: Arial, sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
}

.nz-gallery-control-line {
    flex: 1 1 auto;

    height: 1px;

    margin: 0 18px;

    background: var(--line);
}


/* =========================================================
   FILMSTRIP
   ========================================================= */

.nz-gallery-filmstrip-shell {
    padding-top: 30px;
}

.nz-gallery-filmstrip-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 15px;

    direction: ltr;
}

.nz-gallery-filmstrip-heading span {
    color: var(--accent);

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
}

.nz-gallery-filmstrip-heading small {
    color: var(--muted);

    direction: rtl;

    font-family: fnum, sans-serif;
    font-size: 10px;
    letter-spacing: 0;
}

.nz-gallery-filmstrip {
    display: flex;
    gap: 10px;

    width: 100%;

    padding: 0 0 8px;

    overflow-x: auto;
    overflow-y: hidden;

    direction: ltr;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(150, 92, 76, 0.45)
        transparent;
}

.nz-gallery-filmstrip::-webkit-scrollbar {
    height: 4px;
}

.nz-gallery-filmstrip::-webkit-scrollbar-track {
    background: transparent;
}

.nz-gallery-filmstrip::-webkit-scrollbar-thumb {
    border-radius: 99px;

    background: rgba(150, 92, 76, 0.45);
}

.nz-gallery-thumb {
    position: relative;

    flex: 0 0 122px;

    width: 122px;
    height: 82px;

    padding: 0;

    overflow: hidden;

    border: 1px solid transparent;

    background: #0f0d0b;

    cursor: pointer;

    opacity: 0.48;

    transition:
        opacity 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.nz-gallery-thumb:hover {
    opacity: 0.82;
}

.nz-gallery-thumb.is-active {
    opacity: 1;

    border-color: var(--accent);
}

.nz-gallery-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.nz-gallery-thumb > span {
    position: absolute;
    right: 7px;
    bottom: 5px;

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 8px;

    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.nz-gallery-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px 90px;

    background: rgba(8, 7, 6, 0.96);
    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.nz-gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}

.nz-gallery-lightbox-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: min(100%, 1280px);
    height: calc(100vh - 100px);
}

.nz-gallery-lightbox-image img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}

.nz-gallery-lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid rgba(243, 238, 231, 0.18);
    border-radius: 50%;

    background: transparent;

    color: var(--text);

    cursor: pointer;
}

.nz-gallery-lightbox-close span {
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: 200;
    line-height: 1;
}

.nz-gallery-lightbox-nav {
    position: absolute;
    top: 50%;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    padding: 0;

    border: 1px solid rgba(243, 238, 231, 0.18);
    border-radius: 50%;

    background: transparent;

    color: var(--text);

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        border-color 180ms ease,
        background-color 180ms ease;
}

.nz-gallery-lightbox-nav:hover {
    border-color: var(--accent);

    background: rgba(150, 92, 76, 0.12);
}

.nz-gallery-lightbox-nav.is-prev {
    left: 26px;
}

.nz-gallery-lightbox-nav.is-next {
    right: 26px;
}

.nz-gallery-lightbox-count {
    position: absolute;
    left: 50%;
    bottom: 22px;

    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    direction: ltr;

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.14em;

    transform: translateX(-50%);
}


/* =========================================================
   EMPTY
   ========================================================= */

.nz-gallery-empty {
    min-height: 420px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    text-align: center;
}

.nz-gallery-empty span {
    margin-bottom: 14px;

    color: var(--accent);

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
}

.nz-gallery-empty p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.nz-gallery-footer {
    width: min(100% - 48px, 1440px);

    min-height: 92px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid var(--line);

    color: var(--muted);

    direction: ltr;

    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.08em;
}

.nz-gallery-footer a {
    color: var(--muted);

    direction: rtl;

    font-family: fnum, sans-serif;
    font-size: 11px;
    letter-spacing: 0;

    text-decoration: none;

    transition: color 180ms ease;
}

.nz-gallery-footer a:hover {
    color: var(--accent-hover);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .nz-gallery-main {
        padding-top: 54px;
    }

    .nz-gallery-stage {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(230px, 32%);

        min-height: 520px;
    }

    .nz-gallery-stage-image {
        min-height: 520px;
    }

    .nz-gallery-stage-panel {
        padding: 32px;
    }

    .nz-gallery-panel-copy {
        padding: 36px 0;
    }

    .nz-gallery-panel-copy h2 {
        font-size: 26px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .nz-gallery-header,
    .nz-gallery-main,
    .nz-gallery-footer {
        width: calc(100% - 32px);
    }

    .nz-gallery-header {
        min-height: 82px;
    }

    .nz-language {
        display: none;
    }

    .nz-gallery-brand {
        width: 100%;

        justify-content: flex-start;
    }

    .nz-gallery-logo {
        width: 42px;
        height: 42px;
    }

    .nz-gallery-main {
        padding: 42px 0 54px;
    }

    .nz-gallery-intro {
        align-items: flex-end;
        gap: 20px;

        margin-bottom: 30px;
    }

    .nz-gallery-eyebrow {
        margin-bottom: 12px;

        font-size: 8px;
    }

    .nz-gallery-intro h1 {
        margin-bottom: 10px;

        font-size: 42px;
    }

    .nz-gallery-intro p {
        max-width: 230px;

        font-size: 11px;
        line-height: 1.9;
    }

    .nz-gallery-archive-count span {
        font-size: 30px;
    }

    .nz-gallery-archive-count small {
        font-size: 7px;
    }


    /* Filters */

    .nz-gallery-filters {
        margin-bottom: 18px;

        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .nz-gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .nz-gallery-filter {
        flex: 0 0 auto;

        min-height: 36px;

        padding: 7px 14px;

        font-size: 11px;
    }


    /* Stage */

    .nz-gallery-stage {
        display: block;

        min-height: auto;
    }

    .nz-gallery-stage-image {
        min-height: 0;
        height: clamp(360px, 115vw, 560px);
    }

    .nz-gallery-expand {
        top: 16px;
        left: 16px;

        width: 40px;
        height: 40px;
    }

    .nz-gallery-slide-index {
        right: 16px;
        bottom: 15px;
    }


    /* Panel */

    .nz-gallery-stage-panel {
        min-height: 245px;

        padding: 25px 22px;

        border-top: 1px solid var(--line);
        border-right: 0;
    }

    .nz-gallery-panel-copy {
        padding: 28px 0;
    }

    .nz-gallery-panel-copy > span {
        margin-bottom: 13px;

        font-size: 8px;
    }

    .nz-gallery-panel-copy h2 {
        margin-bottom: 15px;

        font-size: 23px;
        line-height: 1.6;
    }

    .nz-gallery-panel-copy p {
        max-width: 100%;

        font-size: 11px;
        line-height: 1.9;
    }

    .nz-gallery-panel-label,
    .nz-gallery-panel-number {
        font-size: 8px;
    }


    /* Filmstrip */

    .nz-gallery-filmstrip-shell {
        padding-top: 22px;
    }

    .nz-gallery-filmstrip-heading {
        margin-bottom: 12px;
    }

    .nz-gallery-filmstrip-heading small {
        display: none;
    }

    .nz-gallery-thumb {
        flex-basis: 96px;

        width: 96px;
        height: 68px;
    }


    /* Lightbox */

    .nz-gallery-lightbox {
        padding: 70px 18px 55px;
    }

    .nz-gallery-lightbox-image {
        width: 100%;
        height: calc(100vh - 125px);
    }

    .nz-gallery-lightbox-close {
        top: 16px;
        right: 16px;

        width: 40px;
        height: 40px;
    }

    .nz-gallery-lightbox-nav {
        top: auto;
        bottom: 14px;

        width: 40px;
        height: 40px;

        transform: none;
    }

    .nz-gallery-lightbox-nav.is-prev {
        left: 16px;
    }

    .nz-gallery-lightbox-nav.is-next {
        right: 16px;
    }

    .nz-gallery-lightbox-count {
        bottom: 28px;
    }


    /* Footer */

    .nz-gallery-footer {
        min-height: 78px;

        gap: 20px;

        font-size: 8px;
    }

    .nz-gallery-footer a {
        font-size: 10px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .nz-gallery-intro {
        align-items: flex-start;
    }

    .nz-gallery-archive-count {
        padding-top: 31px;
    }

    .nz-gallery-stage-image {
        height: 110vw;
        max-height: 470px;
    }

    .nz-gallery-panel-copy h2 {
        font-size: 21px;
    }

    .nz-gallery-controls {
        margin-top: 8px;
    }

}