/*
|--------------------------------------------------------------------------
| NUNA PROJECT
|--------------------------------------------------------------------------
| Portfolio Detail
|--------------------------------------------------------------------------
| FINAL RESPONSIVE VERSION
|--------------------------------------------------------------------------
*/

.portfolio-detail-page {

    --pd-text: #18231b;
    --pd-muted: #727a74;
    --pd-border: #e5e9e5;
    --pd-accent: #1b4323;
    --pd-soft: #f5f7f5;

    width: 100%;

    color:
        var(--pd-text);

    background:
        #fff;
        

}


/* -----------------------------------------------------------------------
   Container
------------------------------------------------------------------------ */

.portfolio-detail-container {

    width:
        min(
            1240px,
            calc(
                100% - 40px
            )
        );

    margin-inline:
        auto;

    padding:
        50px 0 80px;

}


/* -----------------------------------------------------------------------
   Breadcrumb
------------------------------------------------------------------------ */

.portfolio-detail-breadcrumb {

    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin-bottom:
        35px;

    color:
        var(--pd-muted);

    font-size:
        13px;

}


.portfolio-detail-breadcrumb a {

    color:
        var(--pd-accent);

    text-decoration:
        none;

}


.portfolio-detail-breadcrumb a:hover {

    text-decoration:
        underline;

}


/* -----------------------------------------------------------------------
   HERO COMPOSITION
------------------------------------------------------------------------ */

.portfolio-detail-main {

    display:
        grid;

    grid-template-columns:
        minmax(
            0,
            55fr
        )
        minmax(
            320px,
            45fr
        );

    gap:
        55px;

    align-items:
        center;

}


/* -----------------------------------------------------------------------
   LEFT - IMAGE
------------------------------------------------------------------------ */

.portfolio-detail-visual {

    min-width:
        0;

    /*
    IMPORTANT:
    Tidak lagi menggunakan padding-top besar.
    Ini mencegah hero turun dan membuat
    judul terlihat sejajar dengan hero.
    */

    padding-top:
        0;

}


/* -----------------------------------------------------------------------
   VIEWER
------------------------------------------------------------------------ */

.portfolio-detail-viewer {

    position:
        relative;

    width:
        100%;

}


/* -----------------------------------------------------------------------
   HERO
------------------------------------------------------------------------ */

.portfolio-detail-hero {

    position:
        relative;

    width:
        min(
            100%,
            650px
        );

    margin:
        0 auto;

    overflow:
        hidden;

    aspect-ratio:
        1 / 1;

    border-radius:
        18px;

    background:
        #eef1ee;

}


/* -----------------------------------------------------------------------
   HERO IMAGE
------------------------------------------------------------------------ */

.portfolio-detail-hero-image {

    display:
        block;

    width:
        100%;

    height:
        100%;

    aspect-ratio:
        1 / 1;

    object-fit:
        cover;

    cursor:
        zoom-in;

    transition:
        opacity .2s ease;
        padding-top: 120px;

}


/* -----------------------------------------------------------------------
   Viewer Tools
------------------------------------------------------------------------ */

.portfolio-detail-viewer-tools {

    position:
        absolute;

    top:
        15px;

    right:
        15px;

    z-index:
        5;

    display:
        flex;

    gap:
        8px;

}


.portfolio-detail-tool {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        42px;

    height:
        42px;

    padding:
        0;

    border:
        0;

    border-radius:
        50%;

    color:
        #fff;

    background:
        rgba(
            20,
            30,
            23,
            .72
        );

    cursor:
        pointer;

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    transition:
        background .2s ease,
        transform .2s ease;

}


.portfolio-detail-tool:hover {

    background:
        rgba(
            20,
            30,
            23,
            .94
        );

    transform:
        translateY(-1px);

}


.portfolio-detail-tool svg {

    width:
        18px;

    height:
        18px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        1.8;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

}


/* -----------------------------------------------------------------------
   Navigation
------------------------------------------------------------------------ */

.portfolio-detail-nav {

    position:
        absolute;

    inset:
        0;

    z-index:
        4;

    pointer-events:
        none;

}


.portfolio-detail-nav-button {

    position:
        absolute;

    top:
        50%;

    width:
        44px;

    height:
        44px;

    margin-top:
        -22px;

    padding:
        0;

    border:
        0;

    border-radius:
        50%;

    color:
        #fff;

    background:
        rgba(
            20,
            30,
            23,
            .72
        );

    cursor:
        pointer;

    pointer-events:
        auto;

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    transition:
        background .2s ease;

}


.portfolio-detail-nav-button:hover {

    background:
        rgba(
            20,
            30,
            23,
            .94
        );

}


.portfolio-detail-nav-prev {

    left:
        15px;

}


.portfolio-detail-nav-next {

    right:
        15px;

}


.portfolio-detail-nav-button svg {

    width:
        20px;

    height:
        20px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        2;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

}


/* -----------------------------------------------------------------------
   Counter
------------------------------------------------------------------------ */

.portfolio-detail-counter {

    position:
        absolute;

    left:
        50%;

    bottom:
        15px;

    z-index:
        5;

    transform:
        translateX(
            -50%
        );

    padding:
        7px 11px;

    border-radius:
        999px;

    color:
        #fff;

    background:
        rgba(
            20,
            30,
            23,
            .72
        );

    font-size:
        11px;

    font-weight:
        600;

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

}


/* -----------------------------------------------------------------------
   THUMBNAILS
------------------------------------------------------------------------ */

.portfolio-detail-thumbnails {

    display:
        flex;

    flex-wrap:
        wrap;

    align-items:
        flex-start;

    gap:
        8px;

    width:
        min(
            100%,
            650px
        );

    margin:
        12px auto 0;

}


.portfolio-detail-thumbnail {

    display:
        block;

    flex:
        0 0 70px;

    width:
        70px;

    height:
        54px;

    min-width:
        0;

    padding:
        0;

    overflow:
        hidden;

    border:
        0;

    border-radius:
        9px;

    background:
        var(--pd-soft);

    cursor:
        pointer;

    opacity:
        .68;

    box-shadow:
        0 0 0 0
        transparent;

    transition:
        opacity .2s ease,
        box-shadow .2s ease,
        transform .2s ease;

}


.portfolio-detail-thumbnail:hover {

    opacity:
        1;

    transform:
        translateY(
            -2px
        );

}


.portfolio-detail-thumbnail.active {

    opacity:
        1;

    box-shadow:
        0 0 0 2px
        var(--pd-accent);

}


.portfolio-detail-thumbnail img {

    display:
        block;

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

}


/* -----------------------------------------------------------------------
   RIGHT - INFORMATION
------------------------------------------------------------------------ */

.portfolio-detail-information-panel {

    min-width:
        0;

    padding:
        0 10px 0 0;

}


/* -----------------------------------------------------------------------
   Category
------------------------------------------------------------------------ */

.portfolio-detail-category {

    margin-bottom:
        14px;

    color:
        var(--pd-accent);

    font-size:
        11px;

    font-weight:
        700;

    letter-spacing:
        .14em;

    text-transform:
        uppercase;

}


/* -----------------------------------------------------------------------
   TITLE
------------------------------------------------------------------------ */

.portfolio-detail-title {

    max-width:
        600px;

    margin:
        0;

    color:
        var(--pd-text);

    font-size:
        clamp(
            34px,
            3.5vw,
            54px
        );

    line-height:
        1.08;

    letter-spacing:
        -.035em;

    font-weight:
        600;

    /*
    Pastikan judul tidak tertutup
    atau terdorong terlalu rendah.
    */

    overflow-wrap:
        break-word;

}


/* -----------------------------------------------------------------------
   Description
------------------------------------------------------------------------ */

.portfolio-detail-description {

    max-width:
        560px;

    margin-top:
        22px;

    color:
        #68716a;

    font-size:
        15px;

    line-height:
        1.8;

}


/* -----------------------------------------------------------------------
   META
------------------------------------------------------------------------ */

.portfolio-detail-meta {

    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap:
        20px 35px;

    margin-top:
        32px;

    padding-top:
        25px;

    border-top:
        1px solid
        var(--pd-border);

}


.portfolio-detail-meta-item {

    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;

}


.portfolio-detail-meta-item span {

    color:
        #969d97;

    font-size:
        10px;

    font-weight:
        700;

    letter-spacing:
        .1em;

    text-transform:
        uppercase;

}


.portfolio-detail-meta-item strong {

    color:
        var(--pd-text);

    font-size:
        14px;

    font-weight:
        600;

}


/* -----------------------------------------------------------------------
   SHARE
------------------------------------------------------------------------ */

.portfolio-detail-share {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    min-height:
        42px;

    margin-top:
        28px;

    padding:
        0 18px;

    border:
        1px solid
        var(--pd-accent);

    border-radius:
        999px;

    color:
        #fff;

    background:
        var(--pd-accent);

    font-size:
        12px;

    font-weight:
        600;

    cursor:
        pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;

}


.portfolio-detail-share:hover {

    background:
        #14351b;

    border-color:
        #14351b;

    transform:
        translateY(
            -1px
        );

}


.portfolio-detail-share svg {

    width:
        16px;

    height:
        16px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        1.8;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

}


/* -----------------------------------------------------------------------
   Project Information
------------------------------------------------------------------------ */

.portfolio-detail-about {

    max-width:
        850px;

    margin-top:
        70px;

    padding-top:
        35px;

    border-top:
        1px solid
        var(--pd-border);

}


.portfolio-detail-about h2 {

    margin:
        0 0 18px;

    color:
        var(--pd-text);

    font-size:
        28px;

}


.portfolio-detail-about-text {

    color:
        #59635b;

    font-size:
        16px;

    line-height:
        1.9;

}


/* -----------------------------------------------------------------------
   BACK TO PORTFOLIO
------------------------------------------------------------------------ */

.portfolio-detail-back {

    margin-top:
        45px;

}


.portfolio-detail-back a {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        42px;

    padding:
        0 18px;

    border:
        1px solid
        #d4ded8;

    border-radius:
        999px;

    color:
        var(--pd-accent);

    background:
        #fff;

    font-size:
        12px;

    font-weight:
        600;

    text-decoration:
        none;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;

}


.portfolio-detail-back a:hover {

    background:
        #f1f5f2;

    border-color:
        #b8c9bd;

    transform:
        translateY(
            -1px
        );

}


/* -----------------------------------------------------------------------
   LIGHTBOX
------------------------------------------------------------------------ */

.portfolio-detail-lightbox {

    position:
        fixed;

    inset:
        0;

    z-index:
        99999;

    display:
        none;

    align-items:
        center;

    justify-content:
        center;

    padding:
        30px;

    background:
        rgba(
            8,
            12,
            9,
            .92
        );

}


.portfolio-detail-lightbox.is-open {

    display:
        flex;

}


.portfolio-detail-lightbox-image {

    display:
        block;

    max-width:
        92vw;

    max-height:
        88vh;

    width:
        auto;

    height:
        auto;

    object-fit:
        contain;

    user-select:
        none;

}


.portfolio-detail-lightbox-close,
.portfolio-detail-lightbox-prev,
.portfolio-detail-lightbox-next,
.portfolio-detail-lightbox-share {

    position:
        absolute;

    z-index:
        3;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        44px;

    height:
        44px;

    padding:
        0;

    border:
        0;

    border-radius:
        50%;

    color:
        #fff;

    background:
        rgba(
            255,
            255,
            255,
            .12
        );

    cursor:
        pointer;

}


.portfolio-detail-lightbox-close {

    top:
        20px;

    right:
        20px;

}


.portfolio-detail-lightbox-share {

    top:
        20px;

    right:
        76px;

}


.portfolio-detail-lightbox-prev {

    left:
        20px;

    top:
        50%;

    margin-top:
        -22px;

}


.portfolio-detail-lightbox-next {

    right:
        20px;

    top:
        50%;

    margin-top:
        -22px;

}


.portfolio-detail-lightbox svg {

    width:
        19px;

    height:
        19px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        1.8;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

}


.portfolio-detail-lightbox-counter {

    position:
        absolute;

    bottom:
        20px;

    left:
        50%;

    transform:
        translateX(
            -50%
        );

    color:
        #fff;

    font-size:
        12px;

}


body.portfolio-viewer-open {

    overflow:
        hidden;

}


/* -----------------------------------------------------------------------
   ERROR
------------------------------------------------------------------------ */

.portfolio-detail-error {

    padding:
        100px 20px;

    text-align:
        center;

}


/* =======================================================================
   TABLET
======================================================================= */

@media (
    max-width: 1100px
) and (
    min-width: 601px
) {

    .portfolio-detail-container {

        width:
            min(
                94%,
                1000px
            );

    }


    .portfolio-detail-main {

        grid-template-columns:
            minmax(
                0,
                52fr
            )
            minmax(
                300px,
                48fr
            );

        gap:
            35px;

    }


    .portfolio-detail-hero {

        width:
            min(
                100%,
                540px
            );

    }


    .portfolio-detail-thumbnails {

        width:
            min(
                100%,
                540px
            );

    }


    .portfolio-detail-thumbnail {

        flex-basis:
            64px;

        width:
            64px;

        height:
            50px;

    }


    .portfolio-detail-title {

        font-size:
            clamp(
                32px,
                4vw,
                44px
            );

    }

}


/* =======================================================================
   MOBILE
   Layout tetap sederhana seperti versi sebelumnya
======================================================================= */

@media (
    max-width: 600px
) {

    .portfolio-detail-container {

        width:
            calc(
                100% - 25px
            );

        margin-inline:
            auto;

        padding:
            85px 0 60px;

    }


    .portfolio-detail-breadcrumb {

        margin-bottom:
            25px;

        font-size:
            12px;

    }


    .portfolio-detail-main {

        display:
            block;

    }


    .portfolio-detail-visual {

        padding:
            0;

    }


    .portfolio-detail-viewer {

        width:
            100%;

    }


    /* ============================================================
       MOBILE HERO 1:1
    ============================================================ */

    .portfolio-detail-hero {

        width:
            100%;

        aspect-ratio:
            1 / 1;

        border-radius:
            12px;

    }


    .portfolio-detail-hero-image {

        width:
            100%;

        height:
            100%;

        aspect-ratio:
            1 / 1;

        object-fit:
            cover;

    }


    /* ============================================================
       MOBILE TOOLS
    ============================================================ */

    .portfolio-detail-viewer-tools {

        top:
            10px;

        right:
            10px;

    }


    .portfolio-detail-tool {

        width:
            38px;

        height:
            38px;

    }


    /* ============================================================
       MOBILE NAVIGATION
    ============================================================ */

    .portfolio-detail-nav-button {

        width:
            38px;

        height:
            38px;

        margin-top:
            -19px;

    }


    .portfolio-detail-nav-prev {

        left:
            10px;

    }


    .portfolio-detail-nav-next {

        right:
            10px;

    }


    /* ============================================================
       MOBILE THUMBNAILS
    ============================================================ */

    .portfolio-detail-thumbnails {

        display:
            grid;

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap:
            8px;

        width:
            100%;

        margin-top:
            12px;

    }


    .portfolio-detail-thumbnail {

        width:
            100%;

        height:
            auto;

        aspect-ratio:
            4 / 3;

        border-radius:
            9px;

    }


    /* ============================================================
       MOBILE INFORMATION
    ============================================================ */

    .portfolio-detail-information-panel {

        padding:
            0;

        margin-top:
            28px;

    }


    .portfolio-detail-category {

        margin-bottom:
            10px;

    }


    .portfolio-detail-title {

        max-width:
            100%;

        margin:
            0;

        font-size:
            34px;

        line-height:
            1.08;

        letter-spacing:
            -.035em;

    }


    .portfolio-detail-description {

        max-width:
            100%;

        margin-top:
            16px;

        font-size:
            14px;

        line-height:
            1.75;

    }


    /* ============================================================
       MOBILE META
    ============================================================ */

    .portfolio-detail-meta {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap:
            18px;

        margin-top:
            24px;

        padding-top:
            20px;

    }


    /* ============================================================
       MOBILE SHARE
    ============================================================ */

    .portfolio-detail-share {

        min-height:
            42px;

        margin-top:
            25px;

        padding:
            0 17px;

        border-radius:
            999px;

        font-size:
            12px;

    }


    /* ============================================================
       MOBILE ABOUT
    ============================================================ */

    .portfolio-detail-about {

        margin-top:
            50px;

    }


    .portfolio-detail-about h2 {

        font-size:
            23px;

    }


    .portfolio-detail-about-text {

        font-size:
            14px;

        line-height:
            1.8;

    }


    /* ============================================================
       MOBILE BACK
    ============================================================ */

    .portfolio-detail-back {

        margin-top:
            35px;

    }


    .portfolio-detail-back a {

        min-height:
            42px;

        padding:
            0 17px;

        border-radius:
            999px;

        font-size:
            12px;

    }


    /* ============================================================
       MOBILE LIGHTBOX
    ============================================================ */

    .portfolio-detail-lightbox {

        padding:
            15px;

    }


    .portfolio-detail-lightbox-image {

        max-width:
            96vw;

        max-height:
            82vh;

    }

}


/* -----------------------------------------------------------------------
   Extra Small Mobile
------------------------------------------------------------------------ */

@media (
    max-width: 380px
) {

    .portfolio-detail-container {

        width:
            calc(
                100% - 20px
            );

    }


    .portfolio-detail-title {

        font-size:
            31px;

    }


    .portfolio-detail-thumbnail {

        border-radius:
            8px;

    }

}


/* -----------------------------------------------------------------------
   Reduced Motion
------------------------------------------------------------------------ */

@media (
    prefers-reduced-motion: reduce
) {

    .portfolio-detail-page *,
    .portfolio-detail-page *::before,
    .portfolio-detail-page *::after {

        scroll-behavior:
            auto !important;

        transition-duration:
            .01ms !important;

        animation-duration:
            .01ms !important;

    }

}