/* =========================================================
   DETAIL FACILITY - RESPONSIVE V3
   Desktop: show 3 related facility cards + arrows
   Mobile: touch swipe + mouse/touch drag + arrows
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
}

/* =========================================================
   RELATED FACILITIES - DESKTOP
   ========================================================= */

/* NOTE: styling untuk .facility-related-* (related facility cards)
   sekarang sepenuhnya dikelola di dalam <style> pada detail-facility.php
   (desain "2 card besar"). Sengaja tidak didefinisikan lagi di sini
   supaya tidak bentrok/tarik-menarik dengan aturan di sana, yang
   sebelumnya menyebabkan card ke-3 muncul terpotong setengah di HP. */

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    body {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Hero */
    .detail-hero {
        width: 100%;
        height: 36vh !important;
        min-height: 230px;
        max-height: 360px;
        background-attachment: scroll !important;
        background-position: center center !important;
    }

    /* Main content */
    #isi {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #isi > .mt-3 > h1 {
        margin: 0;
        padding: 0;
        font-size: clamp(1.7rem, 8vw, 2.2rem) !important;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    #isi > .mt-3 > p {
        margin: 8px auto 0;
        padding: 0 2px;
        font-size: 0.84rem !important;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    /* Feature / Hours / Specs -> 1 column */
    #isi .row.d-flex.justify-content-center {
        --bs-gutter-x: 0;
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }

    #isi .row.d-flex.justify-content-center > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #isi .section-title {
        margin-top: 1.4rem !important;
        margin-bottom: 0.65rem !important;
        font-size: 1.25rem !important;
    }

    #isi .list-item {
        font-size: 0.9rem !important;
        line-height: 1.55;
    }

    #isi .hours-item {
        margin-bottom: 0.45rem;
    }

    #isi .hours-item i {
        flex: 0 0 26px;
        width: 26px;
        font-size: 1.2rem;
        margin-right: 10px;
    }

    #isi .hours-item span {
        font-size: 0.9rem !important;
        min-width: 0;
    }

    .sentani-hours {
        flex-direction: column !important;
        gap: 0.9rem !important;
    }

    .sentani-hour-group h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.55rem;
    }

    #isi .spec-table {
        width: 100% !important;
        table-layout: fixed;
        font-size: 0.88rem;
    }

    #isi .spec-table td {
        padding: 4px 0 !important;
    }

    /* Gallery images stack */
    #isi > .d-flex.justify-content-center.mt-3 > .row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0.7rem !important;
        min-height: 0 !important;
    }

    #isi > .d-flex.justify-content-center.mt-3 img.position-absolute {
        position: relative !important;
        inset: auto !important;
        display: block;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    #isi > .d-flex.justify-content-center.mt-3 .position-relative {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* NOTE: styling untuk .facility-related-* (related facility cards) di
       mobile sengaja tidak didefinisikan di sini lagi — sudah dikelola
       penuh di dalam <style> pada detail-facility.php, supaya tidak ada
       dua sistem CSS yang saling tarik-menarik (penyebab card ke-3
       muncul terpotong setengah). */
    #kaki {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
        padding: 28px 14px !important;
    }

    #kaki .row {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }

    #kaki .row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 22px;
        text-align: center;
    }

    #kaki img {
        width: 115px !important;
        height: auto;
    }

    #kaki p,
    #kaki a,
    #kaki li {
        font-size: 0.82rem !important;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    #kaki h4 {
        font-size: 1.05rem !important;
        margin-bottom: 10px;
    }

    #kaki .list-inline-item {
        margin-left: 0.55rem !important;
        margin-right: 0.55rem !important;
    }
}

@media (max-width: 380px) {

    #isi {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #isi > .mt-3 > h1 {
        font-size: 1.65rem !important;
    }

    #isi > .mt-3 > p {
        font-size: 0.8rem !important;
    }
}