/* ═══════════════════════════════════════════════════════
   PROJECT DETAIL — Figma-match layout
   ═══════════════════════════════════════════════════════ */

/* ── NAV OVERRIDE (project-detail) ──────────────────── */
body.page-project-detail .nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 100px 775px 0 125px !important;
    gap: 0 !important;
}
body.page-project-detail .nav .nav-hamburger,
body.page-project-detail .nav #menuBtn {
    position: static !important;
    width: 68px !important;
    height: 34px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}
body.page-project-detail .nav .nav-hamburger span,
body.page-project-detail .nav #menuBtn span {
    background: #fff !important;
}
body.page-project-detail .nav .nav-logo {
    margin-left: 70px !important;
}
@media (max-width: 1024px) {
    body.page-project-detail .nav {
        padding: 60px 0 0 48px !important;
        gap: 0 !important;
        justify-content: space-between !important;
    }
    body.page-project-detail .nav .nav-hamburger,
    body.page-project-detail .nav #menuBtn {
        width: 56px !important;
        height: 28px !important;
    }
}
@media (max-width: 768px) {
    body.page-project-detail .nav {
        padding: 44px 24px 0 26px !important;
        align-items: center !important;
    }
    body.page-project-detail .nav .nav-hamburger,
    body.page-project-detail .nav #menuBtn {
        position: static !important;
        width: 30px !important;
        height: 20px !important;
        top: auto !important;
        left: auto !important;
    }
}

/* ── HERO ───────────────────────────────────────────── */
.work-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
}
.work-hero__image-area {
    position: relative;
    flex: 1;
    overflow: hidden;
}
.work-hero__image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
}
.work-hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 35%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 60%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}
.work-hero__bar {
    width: 100%;
    height: 120px;
    background: #120522;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 101px;
}
@media (max-width: 1024px) {
    .work-hero__bar {
        height: 80px;
        padding: 0 40px;
    }
}
@media (max-width: 768px) {
    .work-hero__bar {
        height: 60px;
        padding: 0 24px;
    }
}
.work-hero__play-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    font-size: 24px;
    font-weight: 300;
    color: #D9D9D9;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: color 0.2s;
}
.work-hero__play-btn:hover {
    color: #fff;
}
@media (max-width: 1024px) {
    .work-hero__play-btn { font-size: 20px; }
}
@media (max-width: 768px) {
    .work-hero__play-btn { font-size: 18px; }
}

/* ── VIDEO MODAL ────────────────────────────────────── */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.80);
    align-items: center;
    justify-content: center;
}
.video-modal.open {
    display: flex;
}
.video-modal__inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 452px;
    height: 803px;
    max-height: 90vh;
    max-width: 90vw;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.video-modal__inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-modal__inner video:fullscreen {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    background: #000;
}
.video-modal__inner video:-webkit-full-screen {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    background: #000;
}
.video-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 10;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.video-modal__close:hover {
    color: #fff;
}

/* ── INTRO SECTION ──────────────────────────────────── */
.work-intro {
    background: #fff;
    width: 100%;
}
.work-intro__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 90px 83px;
}
@media (max-width: 1024px) {
    .work-intro__container { padding: 60px 40px; }
}
@media (max-width: 768px) {
    .work-intro__container { padding: 56px 26px 48px; }
}
.work-intro__grid {
    display: grid;
    grid-template-columns: 452px 1fr;
    column-gap: 165px;
    row-gap: 0;
}
@media (max-width: 1200px) {
    .work-intro__grid { grid-template-columns: 380px 1fr; column-gap: 80px; }
}
@media (max-width: 1024px) {
    .work-intro__grid { grid-template-columns: 1fr; gap: 48px 0; }
}

/* Left column */
.work-intro__left {
    display: flex;
    flex-direction: column;
}
.work-intro__title-block {
    display: flex;
    align-items: flex-start;
    gap: 38px;
}
.work-intro__title-line {
    margin-top: 8px;
    width: 2px;
    height: 165px;
    background: #C41027;
    flex-shrink: 0;
}
.work-intro__title {
    font-family: 'Rubik', sans-serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    color: #C41027;
    margin: 0;
    max-width: 280px;
}
@media (max-width: 768px) {
    .work-intro__title { font-size: 36px; }
}
.work-intro__description {
    margin-top: -12px;
    margin-left: 40px;
    max-width: 371px;
    font-family: 'Rubik', sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.19;
    letter-spacing: 0.04em;
    color: #442D84;
}
@media (max-width: 1024px) {
    .work-intro__description { margin-top: 32px; max-width: 100%; }
}
@media (max-width: 768px) {
    .work-intro__description { font-size: 17px; margin-left: 0; margin-top: 24px; }
}

/* Left video */
.work-intro__left-video {
    margin-top: 77px;
    width: 100%;
    max-width: 452px;
    background: #000;
    overflow: hidden;
    position: relative;
}
.work-intro__left-video-inner {
    position: relative;
    width: 100%;
    height: 803px;
}
@media (max-width: 1024px) {
    .work-intro__left-video { max-width: 100%; margin-top: 32px; }
    .work-intro__left-video-inner { height: 520px; }
}
@media (max-width: 768px) {
    .work-intro__left-video { max-width: 220px; margin-top: 32px; margin-left: auto; margin-right: auto; }
    .work-intro__left-video-inner { height: 376px; }
    /* Intro image mobilde gizle — galeri kısmında zaten büyük resim görünüyor */
    .work-intro__right-image { display: none; }
}
.work-intro__left-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right column */
.work-intro__right {
    display: flex;
    flex-direction: column;
    max-width: 664px;
    margin-left: auto;
}
@media (max-width: 1024px) {
    .work-intro__right { max-width: 100%; margin-left: 0; }
}
.work-intro__right-image {
    width: 100%;
    max-width: 664px;
    background: #000;
    overflow: hidden;
    position: relative;
}
.work-intro__right-image-inner {
    position: relative;
    width: 100%;
    height: 718px;
}
@media (max-width: 1024px) {
    .work-intro__right-image-inner { height: 520px; }
}
@media (max-width: 768px) {
    .work-intro__right-image-inner { height: 420px; }
}
.work-intro__right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quote block — grid layout matching reference */
.work-intro__quote {
    margin-top: 68px;
    margin-left: -80px;
}
@media (max-width: 1024px) {
    .work-intro__quote { margin-top: 48px; margin-left: 0; }
}
.work-intro__quote-grid {
    display: grid;
    grid-template-columns: 72px 14px 2px 24px 370px;
    align-items: start;
}
@media (max-width: 1024px) {
    .work-intro__quote-grid {
        grid-template-columns: 60px 10px 2px 16px 1fr;
    }
}
@media (max-width: 768px) {
    .work-intro__quote-grid {
        grid-template-columns: 52px 8px 2px 12px 1fr;
    }
}
.work-intro__quote-date {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.19;
    letter-spacing: 0.04em;
    color: #C41027;
    height: 165px;
    display: flex;
    align-items: center;
}
@media (max-width: 1024px) {
    .work-intro__quote-date { height: auto; min-height: 80px; font-size: 13px; }
}
.work-intro__quote-line {
    width: 2px;
    height: 195px;
    background: #C41027;
}
@media (max-width: 1024px) {
    .work-intro__quote-line { height: 100%; min-height: 80px; }
}
.work-intro__quote-text {
    font-family: 'Rubik', sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: 0.04em;
    color: #442D84;
    width: 370px;
    margin: 0;
}
@media (max-width: 1024px) {
    .work-intro__quote-text { width: 100%; margin-top: 0; font-size: 17px; }
}
@media (max-width: 768px) {
    .work-intro__quote-text { font-size: 15px; }
}

/* Second right image — hidden; gallery thumbs appear instead */
.work-intro__right-image--second {
    display: none;
}

/* ── GALLERY ────────────────────────────────────────── */
.work-gallery {
    background: #fff;
    width: 100%;
}
.work-gallery__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 83px 90px;
}
@media (max-width: 768px) {
    .work-gallery__container { padding: 0 24px 48px; }
}
.work-gallery__grid-wrap {
    display: grid;
    grid-template-columns: 452px 1fr;
    column-gap: 165px;
}
@media (max-width: 1200px) {
    .work-gallery__grid-wrap { grid-template-columns: 380px 1fr; column-gap: 80px; }
}
@media (max-width: 1024px) {
    .work-gallery__grid-wrap { grid-template-columns: 1fr; }
}

/* Left column: spacer to align with intro */
.work-gallery__left {
    display: flex;
    flex-direction: column;
}
@media (max-width: 1024px) {
    .work-gallery__left { display: none; }
}

/* Right column: label + thumbs */
.work-gallery__right {
    display: flex;
    flex-direction: column;
}
@media (max-width: 1024px) {
    .work-gallery__right { padding-left: 0; }
}

.work-gallery__label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 20px;
}
.work-gallery__label-icon {
    width: 14px; height: 14px; flex-shrink: 0;
}
.work-gallery__label-text {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #C41027;
}
.work-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 0;
}
.work-gallery__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 165 / 177;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}
/* Intro image thumb — desktop'ta gizli */
.work-gallery__thumb--intro {
    display: none;
}
@media (max-width: 768px) {
    .work-gallery__thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        grid-auto-flow: dense;
    }
    .work-gallery__thumb {
        aspect-ratio: 1 / 1;
    }
    /* 4th gallery item: küçük, sağ kolonda */
    .work-gallery__thumb:nth-child(4) {
        grid-column: 3 / 4;
        grid-row: 2;
        aspect-ratio: 1 / 1;
    }
    /* Intro image thumb — mobilde göster, her zaman row 2 sol */
    .work-gallery__thumb--intro {
        display: block;
        cursor: default;
        border: none;
        padding: 0;
        grid-column: 1 / 3;
        grid-row: 2;
        aspect-ratio: 205 / 244;
    }
}

.work-gallery__thumb img,
.work-gallery__thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.work-gallery__thumb:hover img,
.work-gallery__thumb:hover video {
    transform: scale(1.04);
}

/* Play icon overlay for video thumbs */
.work-gallery__thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}
.work-gallery__thumb-play svg {
    width: 36px;
    height: 36px;
    fill: rgba(255,255,255,0.85);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ── LIGHTBOX ───────────────────────────────────────── */
.work-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}
.work-lightbox.open {
    display: flex;
}
.work-lightbox__inner {
    position: relative;
    width: 92vw;
    max-width: 1100px;
}
.work-lightbox__media {
    position: relative;
    height: 70vh;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.work-lightbox__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.work-lightbox__media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.work-lightbox__close {
    position: absolute;
    top: -52px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.work-lightbox__close:hover { color: #fff; }
.work-lightbox__prev,
.work-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 28px;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}
.work-lightbox__prev:hover,
.work-lightbox__next:hover { background: rgba(255,255,255,0.2); }
.work-lightbox__prev { left: 8px; }
.work-lightbox__next { right: 8px; }
@media (max-width: 768px) {
    .work-lightbox__prev { left: 4px; }
    .work-lightbox__next { right: 4px; }
}
.work-lightbox__index {
    margin-top: 14px;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.7);
}

/* ── RELATED WORKS ──────────────────────────────────── */
.related-section {
    background: #fff;
    padding: 160px 0 120px;
}
@media (max-width: 1024px) {
    .related-section { padding: 80px 0 60px; }
}
@media (max-width: 768px) {
    .related-section { padding: 60px 0 48px; }
}
.related-section__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 83px;
}
@media (max-width: 768px) {
    .related-section__container { padding: 0 24px; }
}
.related-header {
    display: flex;
    align-items: flex-end;
    gap: 13px;
    margin-bottom: 72px;
}
@media (max-width: 768px) {
    .related-header { margin-bottom: 36px; }
}
.related-title {
    font-family: 'Rubik', sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.06em;
    color: #C41027;
    margin: 0;
}
@media (max-width: 768px) {
    .related-title { font-size: 28px; }
}
.related-arrow {
    display: block;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    margin-bottom: 6px;
}
.related-grid {
    display: grid;
    grid-template-columns: 494fr 321fr 384fr;
    gap: 37px;
    align-items: start;
}
@media (max-width: 1024px) {
    .related-grid { gap: 20px; }
}
@media (max-width: 768px) {
    .related-section { padding: 60px 0 48px; }
    .related-section__container { padding: 0; }
    .related-header { padding: 0 24px; margin-bottom: 36px; }
    .related-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 0 24px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .related-grid::-webkit-scrollbar { display: none; }
}
.related-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #000;
}
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.related-card:hover img { transform: scale(1.04); }
.related-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    pointer-events: none;
}
/* Image wrap — fills the card on desktop, gets aspect-ratio on mobile */
.related-card__image-wrap {
    position: absolute;
    inset: 0;
}
.related-card__info { display: none; }

.related-card__label {
    position: absolute;
    bottom: 20px;
    left: 22px;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
    padding-bottom: 3px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.related-card:hover .related-card__label {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.85);
}
/* Card height variants — matches Figma: 494×314, 321×204, 384×492 */
.related-card--large  { aspect-ratio: 494 / 314; }
.related-card--small  { aspect-ratio: 321 / 204; }
.related-card--tall   { aspect-ratio: 384 / 492; }

/* Mobile card overrides — MUST come after base styles */
@media (max-width: 768px) {
    .related-card {
        flex: 0 0 34vw;
        scroll-snap-align: center;
        overflow: visible;
        display: flex;
        flex-direction: column;
        background: transparent;
        transition: flex-basis 0.35s ease;
    }
    .related-card__image-wrap {
        position: relative;
        inset: auto;
        aspect-ratio: 129 / 132;
        overflow: hidden;
        flex-shrink: 0;
        width: 100%;
        transition: aspect-ratio 0.35s ease;
    }
    /* Aktif (ortadaki) kart daha büyük */
    .related-card.is-active {
        flex: 0 0 40vw;
    }
    .related-card.is-active .related-card__image-wrap {
        aspect-ratio: 149 / 173;
    }
    .related-card::after { display: none; }
    .related-card__label { display: none; }
    .related-card__info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 8px 0 0;
    }
    .related-card__info-title {
        font-family: 'Rubik', sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: #111;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .related-card__info-cat {
        font-family: 'Rubik', sans-serif;
        font-size: 11px;
        font-weight: 300;
        color: rgba(0,0,0,0.55);
    }
    .related-card--large,
    .related-card--small,
    .related-card--tall { aspect-ratio: unset !important; }
}

/* ── BOTTOM SHOWCASE ───────────────────────────────── */
.work-bottom-showcase {
    background: #0a0a0a;
    padding: 60px 0 80px;
    overflow: hidden;
}
.work-bottom-showcase__grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
}
.work-bottom-showcase__item {
    width: calc(33.333% - 16px);
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #111;
}
@media (max-width: 768px) {
    .work-bottom-showcase__item { width: calc(50% - 12px); }
}
.work-bottom-showcase__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
