/* =========================================================
   PROJECT PAGE
========================================================= */

.single-project-item {
    padding-top: 40px;
    padding-bottom: 100px;
}


/* =========================================================
   PROJECT HEADER
========================================================= */

.project-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.project-eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.55;
}

.project-page-title {
    margin: 0;
    max-width: 800px;
    font-size: clamp(20px, 5vw, 30px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.project-back-link {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;

    text-decoration: none;
}


/* =========================================================
   DESKTOP LAYOUT
========================================================= */
.project-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 400px;
    gap: clamp(20px, 5vw, 50px);
    align-items: start;
    padding-top: 30px;
}

/* =========================================================
   PROJECT CONTENT
========================================================= */

.project-item-content {
    min-width: 0;

    max-width: 900px;
}

.project-item-header {
    display: flex;
    align-items: baseline;

    gap: 12px;

    margin-bottom: 20px;
}

.project-item-header h2 {
    margin: 0;
    font-size: clamp(20px, 4vw, 25px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}


/* =========================================================
   FEATURED IMAGE
========================================================= */

.project-item-thumbnail {
    margin: 0 0 45px;

    overflow: hidden;
}

.project-item-thumbnail img {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 4px;
}


/* =========================================================
   CONTENT BODY
========================================================= */

.project-item-body {
    max-width: 780px;

    font-size: 17px;
    line-height: 1.8;
}

.project-item-body>*:first-child {
    margin-top: 0;
}

.project-item-body>*:last-child {
    margin-bottom: 0;
}

.project-item-body img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   SIDEBAR
========================================================= */

.project-sidebar {
    position: sticky;
    top: 50px;
    height: fit-content;
}

.project-sidebar-inner {
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
}

.project-sidebar-label {
    margin: 0;

    padding: 22px 22px 7px;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.12em;

    opacity: 0.5;
}

.project-sidebar-title {
    margin: 0;
    background: var(--sidebar-title-bg, #f9fafb);
    padding: 0 22px 22px;
    font-size: 18px;
    line-height: 1.3;
}

.project-sidebar-title a {
    text-decoration: none;
}


/* =========================================================
   ITEM LIST
========================================================= */

.project-item-list {
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.project-item-link {
    position: relative;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 2px;
    padding: 12px 18px;
    color: inherit;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        padding-left 0.2s ease;
}

.project-item-link:hover {
    padding-left: 27px;

    background: rgba(0, 0, 0, 0.035);
}

.project-item-name {
    font-size: 13px;
    line-height: 1.35;
}


/* =========================================================
   ACTIVE ITEM
========================================================= */

.project-item-link.is-active {
    font-weight: 700;

    background: rgba(0, 0, 0, 0.055);
}

.project-item-link.is-active::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 3px;

    background: currentColor;
}

.project-item-link.is-active .project-item-number {
    opacity: 1;
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.project-item-navigation {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 30px;

    margin-top: 70px;
    padding-top: 30px;

    border-top: 1px solid var(--border-color, #e5e7eb);
}

.project-nav-link {
    display: flex;
    flex-direction: column;

    gap: 7px;

    color: inherit;

    text-decoration: none;
}

.project-nav-next {
    text-align: right;
}

.project-nav-label {
    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    opacity: 0.5;
}

.project-nav-link strong {
    font-size: 15px;

    line-height: 1.4;
}


/* =========================================================
   MOBILE NAV
========================================================= */

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


@media (max-width: 1199.98px) {

    .project-layout {
        grid-template-columns:
            minmax(0, 1fr) 270px;

        gap: 20px;
    }

}


@media (max-width: 991.98px) {

    .single-project-item {
        padding-top: 15px;
        padding-bottom: 70px;
    }


    /* =====================================================
       HEADER
    ===================================================== */

    .project-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 20px 0 20px;
    }

    .project-page-title {
        font-size: clamp(36px, 11vw, 58px);
    }

    .project-back-link {
        font-size: 13px;
    }


    /* =====================================================
       HORIZONTAL PROJECT NAV
    ===================================================== */

    .project-mobile-nav {
        display: block;

        margin: 0 -15px;

        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .project-mobile-nav-scroll {
        display: flex;

        overflow-x: auto;

        padding: 0 15px;

        scrollbar-width: none;

        overscroll-behavior-x: contain;

        -webkit-overflow-scrolling: touch;
    }

    .project-mobile-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    .project-mobile-nav-item {
        position: relative;

        display: flex;
        align-items: center;

        flex-shrink: 0;

        gap: 8px;

        min-height: 52px;

        padding: 0 14px;

        color: inherit;

        font-size: 13px;

        text-decoration: none;
    }

    .project-mobile-nav-item:first-child {
        padding-left: 15px;
    }

    .project-mobile-nav-item span {
        font-size: 10px;

        font-weight: 700;

        opacity: 0.45;
    }

    .project-mobile-nav-item strong {
        font-weight: 500;

        white-space: nowrap;
    }


    /* =====================================================
       ACTIVE MOBILE ITEM
    ===================================================== */

    .project-mobile-nav-item.is-active {
        font-weight: 700;
    }

    .project-mobile-nav-item.is-active::after {
        content: "";

        position: absolute;

        left: 14px;
        right: 14px;
        bottom: -1px;

        height: 3px;

        background: currentColor;
    }

    .project-mobile-nav-item.is-active strong {
        font-weight: 700;
    }


    /* =====================================================
       MAIN LAYOUT
    ===================================================== */

    .project-layout {
        display: block;

        padding-top: 45px;
    }


    /* =====================================================
       HIDE DESKTOP SIDEBAR
    ===================================================== */

    .project-sidebar {
        display: none;
    }


    /* =====================================================
       CONTENT
    ===================================================== */

    .project-item-content {
        max-width: none;
    }

    .project-item-header {
        gap: 6px;

        margin-bottom: 20px;
    }

    .project-item-header h2 {
        font-size: clamp(18px, 8vw, 25px);
    }

    .project-item-number {
        font-size: 12px;
    }


    /* =====================================================
       IMAGE
    ===================================================== */

    .project-item-thumbnail {
        margin-bottom: 30px;

        margin-left: -15px;
        margin-right: -15px;
    }

    .project-item-thumbnail img {
        width: 100%;

        border-radius: 0;
    }


    /* =====================================================
       BODY
    ===================================================== */

    .project-item-body {
        font-size: 16px;

        line-height: 1.75;
    }


    /* =====================================================
       PREVIOUS / NEXT
    ===================================================== */

    .project-item-navigation {
        gap: 15px;

        margin-top: 55px;
        padding-top: 25px;
    }

    .project-nav-link {
        padding: 12px 0;
    }

    .project-nav-link strong {
        font-size: 14px;
    }

}


@media (max-width: 575.98px) {

    .project-page-header {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .project-eyebrow {
        margin-bottom: 10px;
    }

    .project-page-title {
        font-size: 30px;
    }

    .project-mobile-nav-item {
        min-height: 48px;

        padding-left: 11px;
        padding-right: 11px;

        font-size: 12px;
    }

    .project-mobile-nav-item:first-child {
        padding-left: 15px;
    }

    .project-mobile-nav-item.is-active::after {
        left: 11px;
        right: 11px;
    }

    .project-layout {
        padding-top: 35px;
    }

    .project-item-header {
        align-items: flex-start;
    }

    .project-item-header h2 {
        font-size: 20px;
    }

    .project-item-body {
        font-size: 15.5px;
    }

    .project-item-navigation {
        grid-template-columns: 1fr;
    }

    .project-nav-next {
        text-align: left;
    }

}

/* =========================================
   CODE BLOCK
   ========================================= */

.wp-block-code {
    margin: 20px 0;
    padding: 21px 23px;
    background: #e5e6e7;
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wp-block-code code {
    display: block;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #000000;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 12px;
    line-height: 1.4;
    white-space: pre;
}


.project-item-header {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 50px;
}


/*
 * Nomor dalam lingkaran
 */
.project-item-number {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d5d9de;
    border-radius: 50%;

    font-size: 14px;
    font-weight: 600;

    color: #666b72;

    flex-shrink: 0;
}

/*
 * Judul + tanggal
 */
.project-item-heading {
    min-width: 0;
}


.project-item-header h2 {
    margin: 0;
    font-size: clamp(18px, 3vw, 28px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #20242a;
}

/*
 * Tanggal
 */
.project-item-date {
    display: block;

    margin-top: 8px;

    font-size: 13px;
    line-height: 1.4;

    color: #737a83;
}


/* =========================================================
   PROJECT SIDEBAR
   Kembalikan nomor sidebar ke tampilan awal
   ========================================================= */

.project-sidebar .project-item-link {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}


.project-sidebar .project-item-number {
    width: auto;
    height: auto;

    display: block;

    border: 0;
    border-radius: 0;

    padding: 0;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;

    color: #626872;

    text-align: left;
}


.project-sidebar .project-item-name {
    font-size: 13px;
    line-height: 1.35;
}


.project-description {
    max-width: 800px;

    margin-top: 18px;

    font-size: 16px;
    line-height: 1.7;

    color: #626872;
}

.project-description p {
    margin: 0 0 16px;
}

.project-description p:last-child {
    margin-bottom: 0;
}

.project-description img {
    max-width: 100%;
    height: auto;
}