/* =========================================================
   POTENSI
========================================================= */

.potensi {
    padding: 100px 0;
}


/* =========================================================
   TOOLBAR
========================================================= */

.potensi-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 24px;
}

.potensi-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
}

.potensi-filter-btn {
    min-height: 34px;

    padding: 7px 12px;

    border: 1px solid var(--garis);
    border-radius: 0;

    background: var(--putih);
    color: rgba(35, 41, 31, 0.62);

    font-family: "Inter", sans-serif;
    font-size: 11px;
    line-height: 1;

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.potensi-filter-btn:hover {
    border-color: rgba(200, 155, 60, 0.55);
    color: var(--hijau-tua);
}

.potensi-filter-btn.active {
    border-color: var(--hijau-tua);
    background: var(--hijau-tua);
    color: var(--krem);
}

.potensi-filter-btn:active {
    transform: translateY(1px);
}


/* =========================================================
   COUNT
========================================================= */

.potensi-count {
    display: flex;
    align-items: baseline;
    gap: 6px;

    flex: 0 0 auto;

    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;

    text-transform: uppercase;
    letter-spacing: .06em;

    color: rgba(35, 41, 31, 0.45);
}

.potensi-count span:first-child {
    font-size: 18px;
    color: var(--hijau-tua);
}


/* =========================================================
   GRID
========================================================= */

.potensi-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   CARD
========================================================= */

.potensi-card {
    overflow: hidden;

    background: var(--putih);

    border: 1px solid var(--garis);
    border-radius: 0;

    box-shadow:
        0 10px 28px rgba(23, 59, 47, 0.045);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;

    animation: potensiCardIn .35s ease both;
}

.potensi-card:hover {
    transform: translateY(-4px);

    border-color:
        rgba(200, 155, 60, 0.42);

    box-shadow:
        0 16px 35px rgba(23, 59, 47, 0.09);
}

@keyframes potensiCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   IMAGE
========================================================= */

.potensi-card-image {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #e8e7dc;
}

.potensi-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .35s ease,
        opacity .25s ease;
}

.potensi-card:hover
.potensi-card-image img {
    transform: scale(1.025);
}


/* =========================================================
   IMAGE PLACEHOLDER
========================================================= */

.potensi-image-placeholder {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #dad9ce 0%,
            #efefe3 50%,
            #d4d2c5 100%
        );

    color:
        rgba(20, 35, 28, 0.28);

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 10px;

    letter-spacing: .12em;
}


/* =========================================================
   CATEGORY
========================================================= */

.potensi-category {
    position: absolute;

    left: 14px;
    bottom: 14px;

    padding: 6px 9px;

    background:
        rgba(23, 59, 47, 0.92);

    color: var(--krem);

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 9px;

    line-height: 1;

    text-transform: uppercase;
    letter-spacing: .07em;
}


/* =========================================================
   CARD BODY
========================================================= */

.potensi-card-body {
    padding: 20px;
}

.potensi-number {
    display: block;

    margin-bottom: 7px;

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 10px;

    color: var(--emas);
}

.potensi-card h3 {
    margin: 0 0 8px;

    font-family:
        "Fraunces",
        serif;

    font-size: 22px;
    font-weight: 600;

    line-height: 1.2;

    color: var(--tinta);
}

.potensi-card p {
    margin: 0;

    min-height: 68px;

    font-size: 12px;
    line-height: 1.75;

    color:
        rgba(35, 41, 31, 0.58);
}


/* =========================================================
   META
========================================================= */

.potensi-meta {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    margin-top: 18px;

    border: 1px solid var(--garis);

    background: var(--garis);
}

.potensi-meta > div {
    min-width: 0;

    padding: 11px;

    background: var(--putih);
}

.potensi-meta span {
    display: block;

    margin-bottom: 4px;

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 8px;

    line-height: 1.3;

    text-transform: uppercase;
    letter-spacing: .07em;

    color:
        rgba(35, 41, 31, 0.42);
}

.potensi-meta strong {
    display: block;

    overflow: hidden;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: var(--hijau-tua);
}


/* =========================================================
   DETAIL BUTTON
========================================================= */

.potensi-detail-btn {
    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin-top: 16px;
    padding: 10px 0;

    border: 0;
    border-top: 1px solid var(--garis);

    background: transparent;

    color: var(--hijau-tua);

    font-family:
        "Inter",
        sans-serif;

    font-size: 11px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition:
        color .2s ease;
}

.potensi-detail-btn span {
    font-size: 16px;

    transition:
        transform .2s ease;
}

.potensi-detail-btn:hover {
    color: var(--emas);
}

.potensi-detail-btn:hover span {
    transform: translateX(4px);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.potensi-empty {
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;

    gap: 7px;

    margin-top: 2px;

    padding: 30px 24px;

    border:
        1px dashed var(--garis);

    border-radius: 0;

    background:
        rgba(247, 244, 236, 0.6);
}

.potensi-empty strong {
    font-size: 14px;
    font-weight: 600;

    color: var(--tinta);
}

.potensi-empty span {
    font-size: 12px;
    line-height: 1.6;

    color:
        rgba(35, 41, 31, 0.55);
}


/* =========================================================
   MODAL
========================================================= */

.potensi-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.potensi-modal[hidden] {
    display: none !important;
}


/* =========================================================
   MODAL OVERLAY
========================================================= */

.potensi-modal-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(12, 28, 22, 0.68);

    backdrop-filter:
        blur(4px);

    -webkit-backdrop-filter:
        blur(4px);

    opacity: 0;

    transition:
        opacity .22s ease;
}

.potensi-modal.show
.potensi-modal-overlay {
    opacity: 1;
}


/* =========================================================
   MODAL BOX
========================================================= */

.potensi-modal-box {
    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        minmax(280px, 42%)
        minmax(0, 1fr);

    width: min(900px, 100%);

    max-height: min(720px, 90vh);

    overflow: hidden;

    background: var(--putih);

    border:
        1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 30px 80px rgba(10, 28, 21, 0.24);

    opacity: 0;

    transform:
        translateY(18px)
        scale(.985);

    transition:
        opacity .22s ease,
        transform .22s ease;
}

.potensi-modal.show
.potensi-modal-box {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   MODAL IMAGE
========================================================= */

.potensi-modal-image {
    position: relative;

    min-height: 100%;

    background:
        #e8e7dc;

    overflow: hidden;
}

.potensi-modal-image img {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 420px;

    object-fit: cover;
}

.potensi-modal-placeholder {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #dad9ce 0%,
            #efefe3 50%,
            #d4d2c5 100%
        );

    color:
        rgba(20, 35, 28, 0.28);

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 10px;

    letter-spacing: .12em;
}


/* =========================================================
   MODAL BODY
========================================================= */

.potensi-modal-body {
    position: relative;

    overflow-y: auto;

    padding: 42px 36px 36px;
}

.potensi-modal-category {
    display: inline-block;

    margin-bottom: 10px;
    padding: 6px 9px;

    background:
        var(--hijau-tua);

    color:
        var(--krem);

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 9px;

    line-height: 1;

    text-transform: uppercase;
    letter-spacing: .07em;
}

.potensi-modal-body h3 {
    margin: 0;

    font-family:
        "Fraunces",
        serif;

    font-size: clamp(28px, 4vw, 42px);

    font-weight: 600;

    line-height: 1.12;

    color: var(--hijau-tua);
}


/* =========================================================
   MODAL META
========================================================= */

.potensi-modal-meta {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    margin-top: 24px;

    border:
        1px solid var(--garis);

    background: var(--garis);
}

.potensi-modal-meta > div {
    padding: 12px;

    background:
        var(--putih);
}

.potensi-modal-meta span {
    display: block;

    margin-bottom: 5px;

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 8px;

    text-transform: uppercase;
    letter-spacing: .07em;

    color:
        rgba(35, 41, 31, 0.42);
}

.potensi-modal-meta strong {
    display: block;

    font-size: 11px;
    font-weight: 600;

    color:
        var(--hijau-tua);
}


/* =========================================================
   MODAL SECTION
========================================================= */

.potensi-modal-section {
    margin-top: 24px;
}

.potensi-modal-section > span {
    display: block;

    margin-bottom: 7px;

    font-family:
        "IBM Plex Mono",
        monospace;

    font-size: 9px;

    text-transform: uppercase;
    letter-spacing: .08em;

    color:
        var(--emas);
}

.potensi-modal-section p {
    margin: 0;

    font-size: 13px;

    line-height: 1.8;

    color:
        rgba(35, 41, 31, 0.65);

    white-space: pre-line;
}


/* =========================================================
   MODAL CLOSE
========================================================= */

.potensi-modal-close {
    position: absolute;

    top: 14px;
    right: 14px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 1px solid var(--garis);

    border-radius: 0;

    background:
        rgba(255, 255, 255, 0.94);

    color:
        var(--hijau-tua);

    font-family:
        "Inter",
        sans-serif;

    font-size: 20px;
    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.potensi-modal-close:hover {
    border-color:
        var(--hijau-tua);

    background:
        var(--hijau-tua);

    color:
        var(--krem);
}


/* =========================================================
   BODY LOCK
========================================================= */

body.potensi-modal-open {
    overflow: hidden;
}


/* =========================================================
   SCROLLBAR MODAL
========================================================= */

.potensi-modal-body::-webkit-scrollbar {
    width: 7px;
}

.potensi-modal-body::-webkit-scrollbar-track {
    background:
        rgba(35, 41, 31, 0.04);
}

.potensi-modal-body::-webkit-scrollbar-thumb {
    background:
        rgba(31, 78, 61, 0.22);
}

.potensi-modal-body::-webkit-scrollbar-thumb:hover {
    background:
        rgba(31, 78, 61, 0.38);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .potensi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .potensi-modal-box {
        grid-template-columns:
            minmax(250px, 40%)
            minmax(0, 1fr);
    }

    .potensi-modal-body {
        padding: 36px 28px 30px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 680px) {

    .potensi {
        padding: 75px 0;
    }

    .potensi-toolbar {
        align-items: flex-start;

        flex-direction: column;

        gap: 14px;
    }

    .potensi-filter {
        width: 100%;
    }

    .potensi-filter-btn {
        min-height: 32px;
    }

    .potensi-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .potensi-card-body {
        padding: 18px;
    }

    .potensi-card h3 {
        font-size: 21px;
    }

    .potensi-card p {
        min-height: auto;
    }

    .potensi-modal {
        align-items: flex-end;

        padding: 0;
    }

    .potensi-modal-box {
        display: block;

        width: 100%;

        max-height: 92vh;

        overflow-y: auto;

        transform:
            translateY(25px)
            scale(1);

        transition:
            opacity .22s ease,
            transform .22s ease;
    }

    .potensi-modal.show
    .potensi-modal-box {
        transform:
            translateY(0)
            scale(1);
    }

    .potensi-modal-image {
        height: 230px;

        min-height: 0;
    }

    .potensi-modal-image img {
        min-height: 0;
    }

    .potensi-modal-body {
        overflow: visible;

        padding: 28px 20px 24px;
    }

    .potensi-modal-body h3 {
        font-size: 30px;
    }

    .potensi-modal-meta {
        grid-template-columns: 1fr;
    }

    .potensi-modal-section {
        margin-top: 20px;
    }

}


/* =========================================================
   EXTRA SMALL
========================================================= */

@media (max-width: 400px) {

    .potensi-filter {
        gap: 5px;
    }

    .potensi-filter-btn {
        padding: 6px 9px;

        font-size: 10px;
    }

    .potensi-meta {
        grid-template-columns: 1fr;
    }

    .potensi-modal-body h3 {
        font-size: 27px;
    }

    .potensi-modal-close {
        top: 10px;
        right: 10px;
    }

}