:root {
    --bg: #f7f7f7;
    --surface: #ffffff;
    --text: #1b1f26;
    --muted: #5d6675;
    --primary: #0c2340;
    --primary-dark: #08172b;
    --accent: #d4af37;
    --secondary: #D4AF37;
    --success: #22b573;
    --border: rgba(12, 35, 64, 0.08);
    --shadow: 0 15px 45px rgba(12, 35, 64, 0.1);
    --radius: 20px;
    --transition: 0.35s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

img {
    display: block;
    width: 100%;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1100px;
    padding: 0 15px;
    margin: 0 auto;
}

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1.15rem;
}

/* ==============================
   NAVBAR
============================== */
header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:999;
    backdrop-filter:blur(18px);
    background:#0C2340;
    border-bottom:1px solid rgba(255,255,255,.15);
}

.nav-container{
    height:70px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:24px;
    font-weight:700;
    color:#fff;
}

.logo-img{
    width:50px;
    height:50px;
    object-fit:contain;
    border-radius:10px;
}

.logo-text{
    display:flex;
    align-items:center;
    gap:6px;
}

.logo span{
    color:var(--secondary);
}

nav ul{
    display:flex;
    gap:30px;
}

nav a{
    color:#fff;
    font-weight:500;
    font-size: 14px;
    transition:.3s;
    position:relative;
}

nav a::after{
    content:"";
    position:absolute;
    width:0;
    height:2px;
    background:var(--secondary);
    left:0;
    bottom:-6px;
    transition:.3s;
}

nav a:hover::after{
    width:100%;
}

.btn-nav{
    background:var(--secondary);
    color:#fff;
    padding:10px 24px;
    border-radius:50px;
    font-weight:600;
    font-size: 14px;
}

/* ==============================
   HERO CLUSTER
============================== */
.hero-cluster {
    min-height: 40vh;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(12, 35, 64, 0.7), rgba(12, 35, 64, 0.7)), url('images/komplek-perumahan.jpg') center/cover no-repeat;
    color: #fff;
    margin-top: 70px;
}

.hero-copy {
    max-width: 760px;
    padding: 60px 24px;
    text-align: center;
}

.hero-copy small {
    display: inline-block;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-copy h1 {
    font-size: clamp(2rem, 3vw, 3.5rem);
    margin: 12px 0;
    line-height: 1.15;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ==============================
   BUTTON
============================== */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: transform var(--transition), background var(--transition), color var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    box-shadow: 0 10px 25px rgba(12, 35, 64, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px 24px;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: #fff;
}

/* ==============================
   SECTION
============================== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.section-title small {
    display: inline-block;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    font-weight: 700;
}

.section-title h2 {
    margin-top: 12px;
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
}

.section-title p {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ==============================
   CATALOG GRID & SEARCH
============================== */
.catalog .cluster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 24px;
}

.catalog-header {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1 1 360px;
    min-width: 240px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(12, 35, 64, 0.12);
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(12, 35, 64, 0.08);
}

/* ==============================
   CARD CLUSTER
============================== */
.booking-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.booking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(12, 35, 64, 0.12);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Layer blur di belakang, pakai foto yang sama */
.card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit; /* ambil dari inline style di HTML */
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.55);
    transform: scale(1.2); /* biar tepi blur ga keliatan bocor */
    z-index: 0;
}

.card-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain; /* foto asli tetap utuh, tidak terpotong */
    transition: transform 0.5s ease;
}

.booking-card:hover .card-image img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2;
}

.status-available {
    background: var(--success);
}

.status-indent {
    background: #d48806;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-body h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary);
    min-height: 62px;
}

.cluster-details {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    min-height: 125px;
}

.card-price {
    margin-top: auto;
}

.card-price p {
    margin: 0 0 8px;
    color: var(--muted);
}

.card-price h4 {
    color: var(--text);
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
}

.card-body .btn-order {
    width: 100%;
    text-align: center;
    margin-top: 12px;
}

.status-message {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.status-message.error {
    color: #a02929;
}

/* ==============================
   MODAL
============================== */
.modal-overlay,
.modal {
    position: fixed;
    inset: 0;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay {
    background: rgba(12, 35, 64, 0.72);
    backdrop-filter: blur(5px);
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

.modal {
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 999;
}

.modal-card {
    width: min(760px, 100%);
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    box-shadow: 0 35px 90px rgba(12, 35, 64, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--transition);
    padding-bottom: 18px;
}

.modal-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 24px 18px;
}

.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(12, 35, 64, 0.18);
    border-radius: 999px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-header small {
    display: inline-block;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.modal-header h2 {
    margin: 6px 0 0;
    font-size: 1.8rem;
    color: var(--primary);
}

/* ==============================
   MODAL GALLERY (UPDATED)
============================== */
.modal-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0 6px;
    width: 100%;
    
}

.gallery-stack {
    position: relative;
    width: 100%;
    min-height: 320px;
    max-width: 100%;
    touch-action: pan-y;
    cursor: grab;
}

.gallery-stack:active {
    cursor: grabbing;
}

.gallery-card {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(320px, 80%);
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(12, 35, 64, 0.08);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, filter 0.35s ease;
}

.gallery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.55);
    transform: scale(1.2);
    z-index: 0;
}

.gallery-card img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Panah jadi overlay, tidak makan lebar foto */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 36px rgba(12, 35, 64, 0.12);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    z-index: 200;
}

.gallery-arrow:hover {
    transform: translateY(-50%) translateY(-2px);
    background: #fff;
    box-shadow: 0 20px 46px rgba(12, 35, 64, 0.18);
}

.gallery-prev { left: -6px; }
.gallery-next { right: -6px; }

.gallery-counter {
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 4px;
}
/* Petunjuk swipe khusus mobile */
.swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}
.modal-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.modal-body {
    margin-top: 20px;
    display: grid;
    gap: 18px;
}

.modal-row span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.modal-row strong,
.modal-row p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 0 24px 12px 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f1f1;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.modal-close:hover {
    transform: scale(1.05);
    background: rgba(12, 35, 64, 0.1);
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal:not(.hidden) .modal-card {
    transform: translateY(0);
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* ==============================
   FOOTER
============================== */
.footer {
    background: #fff;
    border-top: 1px solid rgba(12, 35, 64, 0.08);
}

.footer-inner {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

/* ==============================
   FACILITY CAROUSEL
============================== */
.facility-section {
    background: #fff;
    padding-top: 20px;
    padding-bottom: 80px;
}

.facility-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
}

.facility-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 20px;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    padding: 12px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.facility-track:focus {
    outline: none;
}

.facility-card {
    scroll-snap-align: center;
    min-width: 280px;
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    border-radius: 24px;
    padding: 28px 26px;
    box-shadow: 0 24px 45px rgba(12, 35, 64, 0.08);
    border: 1px solid rgba(12,35,64,0.06);
    display: grid;
    gap: 16px;
}

.facility-card-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(12, 35, 64, 0.08);
    color: var(--primary);
    font-size: 1.35rem;
}

.facility-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary);
}

.facility-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.facility-control {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(12,35,64,0.1);
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(12, 35, 64, 0.08);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
}

.facility-control:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: #fff;
}

.facility-prev,
.facility-next {
    flex-shrink: 0;
}

.facility-track::-webkit-scrollbar {
    height: 10px;
}

.facility-track::-webkit-scrollbar-thumb {
    background: rgba(12,35,64,0.24);
    border-radius: 999px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: rgba(255,255,255,0.12);
        color: #fff;
        border: none;
        cursor: pointer;
    }

    nav {
        position: absolute;
        top: 80px;
        right: 24px;
        background: rgba(255,255,255,0.98);
        border-radius: 22px;
        box-shadow: 0 24px 45px rgba(12, 35, 64, 0.12);
        padding: 16px 22px;
        display: none;
        min-width: 220px;
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 16px;
    }

    nav a {
        color: var(--primary);
    }

    .catalog .cluster-grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }
}

@media (max-width: 720px) {
    .section {
        padding: 50px 0;
    }

    .hero-copy {
        padding: 40px 18px;
    }

    .modal-card {
        padding: 20px;
    }

    .modal-actions {
        justify-content: center;
    }

    .btn-nav {
        display: none;
    }
    
    .catalog .cluster-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        justify-content: center;
        text-align: center;
    }

    .facility-carousel {
        gap: 12px;
    }

    .facility-control {
        display: none;
    }

    .facility-track {
        padding: 10px 0;
    }

    /* ==== Gallery mobile ==== */
    .gallery-arrow {
        display: none; /* di mobile pakai swipe, bukan tombol */
    }

    .swipe-hint {
        display: flex;
    }

    .gallery-stack {
        min-height: 260px;
    }

    .gallery-card {
        width: min(340px, 100%);
    }

    .modal-scroll {
        padding: 18px 14px 14px;
    }
}

@media (max-width: 520px) {
    .facility-card {
        min-width: 240px;
        padding: 24px;
    }

    .facility-card h3 {
        font-size: 1.1rem;
    }

    .facility-card p {
        font-size: 0.9rem;
    }
}

/* =========================================================
   CLUSTER.CSS (SMART & FLUID RESPONSIVE)
========================================================= */

/* Mengambil semua komponen universal dari style.css agar selaras */
@import url('style.css');

/* ==============================
   HERO CLUSTER SPESIFIK
============================== */
.hero-cluster {
    min-height: clamp(40vh, 50svh, 50vh); 
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(12, 35, 64, 0.75), rgba(12, 35, 64, 0.85)), url('images/komplek-perumahan.jpg') center/cover no-repeat;
    color: #fff;
    margin-top: 70px;
    padding-top: 0; /* Override dari main style */
}

.hero-copy {
    width: 90%;
    max-width: 760px;
    padding: clamp(40px, 6vw, 60px) 0;
    text-align: center;
}

.hero-copy small {
    display: inline-block;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 12px 0;
    line-height: 1.2;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(14px, 2vw, 16px);
    margin-bottom: 24px;
}

/* ==============================
   SEARCH & FILTER BAR
============================== */
.catalog-header {
    margin-bottom: clamp(24px, 4vw, 32px);
    display: flex;
    flex-direction: column; /* Ditumpuk otomatis untuk semua device */
    align-items: center;
    gap: 16px;
    text-align: center;
}

.search-box {
    flex: none; /* Tambahkan baris ini untuk mereset tinggi 360px */
    width: 100%;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 14px 24px;
    border-radius: 50px;
    border: 1px solid rgba(12, 35, 64, 0.12);
    outline: none;
    color: var(--black);
    font-family: inherit;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(12, 35, 64, 0.08);
}

.status-message {
    color: var(--gray);
    font-size: 14px;
}

.status-message.error {
    color: #a02929;
    font-weight: 600;
}

/* ==============================
   FOOTER (Simple Version for Catalog)
============================== */
.footer-catalog {
    background: #ffffff;
    border-top: 1px solid rgba(12, 35, 64, 0.05);
}

.footer-inner {
    padding: 24px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--gray);
    font-size: 13px;
    text-align: center;
}

/* Menyesuaikan jarak teks footer jika layar mengecil */
@media (max-width: 600px) {
    .footer-inner {
        justify-content: center;
        flex-direction: column;
    }
}
