/* =========================================
   1. RESET & VARIABEL UTAMA
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

:root {
    --primary: #ff6b6b;     /* Merah Salem */
    --secondary: #4ecdc4;   /* Tosca */
    --dark: #2d3436;        /* Hitam Abu */
    --light: #f7f7f7;       /* Abu Terang */
    --white: #ffffff;
    --gradient-btn: linear-gradient(45deg, #2d3436, #636e72); 
    --gradient-hotel: linear-gradient(45deg, #00b894, #00cec9); 
}

/* FIX UTAMA: Mencegah geser kanan di HP & Scroll Bar Horizontal */
html, body {
    overflow-x: hidden; /* Wajib ada */
    width: 100%;
    position: relative;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================
   2. NAVBAR (FINAL: LOGO RAPI + MENU HP JALAN)
   ========================================= */
.navbar {
    background: var(--white);
    padding: 0.8rem 0; /* Ramping & Rapi */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Penting untuk menu HP */
}

/* --- LOGO & TEKS (SEJAJAR) --- */
.logo-wrapper {
    display: flex;       /* Agar gambar & teks sebaris */
    align-items: center; /* Rata tengah vertikal */
    gap: 10px;           /* Jarak gambar ke teks */
    text-decoration: none;
    z-index: 1002;       /* Agar tetap di atas menu saat dibuka */
}

.logo-img {
    height: 40px !important; /* Ukuran Logo Pas */
    width: auto;
    border-radius: 6px;
    display: block;
}

.logo-text {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    text-align: left;
    margin: 0;
}

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

/* --- MENU LINKS (DESKTOP) --- */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

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

.btn-nav {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 50px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.btn-nav:hover {
    background: #ff4757;
    transform: translateY(-2px);
}

/* --- TOMBOL HAMBURGER (GARIS 3) --- */
.menu-toggle {
    display: none; /* Sembunyi di Laptop */
    cursor: pointer;
    z-index: 1002;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--dark);
}

/* --- RESPONSIF KHUSUS HP --- */
@media (max-width: 768px) {
    /* Logo lebih kecil di HP */
    .logo-img { height: 32px !important; }
    .logo-text { font-size: 0.85rem; }

    /* Munculkan Tombol Menu */
    .menu-toggle {
        display: block;
    }

    /* Pengaturan Menu Dropdown */
    .nav-links {
        position: absolute;
        top: 100%;
        left: -100%; /* Sembunyi di kiri */
        width: 100%;
        background: var(--white);
        flex-direction: column; /* Susun ke bawah */
        padding: 30px 0;
        text-align: center;
        transition: 0.4s ease;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        gap: 25px;
    }

    /* Menu Masuk saat Aktif */
    .nav-links.active {
        left: 0;
    }

    /* Animasi Tombol X */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .btn-nav { display: inline-block; margin-top: 10px; }
}
/* =========================================
   3. HERO SECTION (DENGAN SLIDESHOW BACKGROUND)
   ========================================= */
.hero {
    height: 80vh;
    /* background: url(...) HAPUS BARIS INI KARENA SUDAH DIGANTI SLIDESHOW */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden; /* Penting agar gambar tidak keluar jalur */
}

/* --- KONFIGURASI SLIDESHOW --- */
.hero-slideshow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; /* Paling belakang */
}

.slide-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Awalnya tidak terlihat */
    
    /* Animasi bernama 'fadeSlide' berdurasi 24 detik, berulang selamanya */
    animation: fadeSlide 24s linear infinite;
}

/* ATUR WAKTU MUNCUL (DELAY) SETIAP GAMBAR */
/* Total durasi 24s dibagi 4 gambar = 6s per siklus gambar */

.slide-item:nth-child(1) {
    animation-delay: 0s; /* Muncul langsung */
}
.slide-item:nth-child(2) {
    animation-delay: 6s; /* Muncul setelah 6 detik */
}
.slide-item:nth-child(3) {
    animation-delay: 12s; /* Muncul setelah 12 detik */
}
.slide-item:nth-child(4) {
    animation-delay: 18s; /* Muncul setelah 18 detik */
}

/* RUMUS ANIMASI FADE (KEYFRAMES) */
@keyframes fadeSlide {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; } /* Muncul cepat (fade in) */
    25% { opacity: 1; } /* Tetap terlihat selama 1/4 durasi total */
    30% { opacity: 0; transform: scale(1.05); } /* Menghilang pelan (fade out) + Efek Zoom dikit */
    100% { opacity: 0; }
}

/* --- OVERLAY & KONTEN --- */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Lapisan gelap transparan agar teks terbaca jelas */
    background: rgba(0,0,0,0.5); 
    z-index: 1; /* Di atas slideshow */
}

.hero-content {
    position: relative;
    z-index: 2; /* Paling atas (di atas overlay) */
    padding: 20px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* --- TOMBOL CTA HERO --- */
.btn-cta {
    display: inline-block;
    background: var(--primary); /* Warna Merah/Oranye */
    color: var(--white);
    padding: 12px 35px;
    margin-top: 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-cta:hover {
    background: #ff4757;
    transform: translateY(-3px);
    color: var(--white);
}

/* =========================================
   4. FEATURES
   ========================================= */
.features {
    padding: 50px 0;
    background: var(--white);
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* =========================================
   5. PRODUCTS & CARDS (GLOBAL) - UPDATED!
   ========================================= */
.products {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- LOGIKA AGAR TOMBOL RATA --- */
.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
    
    /* Flex Column: Kunci agar tinggi kartu sama & tombol bisa didorong ke bawah */
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    /* Flex Grow: Membuat area konten memanjang mengisi sisa ruang */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tag {
    background: #e1f7f5;
    color: var(--secondary);
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 5px;
    font-weight: 700;
    align-self: flex-start; /* Tag di kiri atas */
    margin-bottom: 10px;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

/* Margin Top Auto: Kunci agar Harga & Tombol selalu di dasar kartu */
.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto; 
    margin-bottom: 15px;
}

/* --- TOMBOL KEREN --- */
.btn-card {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--gradient-btn); /* Gradasi Hitam */
    color: var(--white);
    padding: 12px 0;
    text-decoration: none;
    border-radius: 50px; /* Bentuk Kapsul */
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-card:hover {
    background: linear-gradient(45deg, var(--primary), #ff9f43);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    transform: scale(1.02);
}

/* =========================================
   6. KHUSUS HOTEL (GRID & STYLE)
   ========================================= */
/* Grid 2 Kolom di HP */
.hotel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Paksa 2 kolom */
    gap: 15px;
    margin-top: 20px;
}

/* Style Kartu Hotel di HP agar Muat */
.hotel-card img {
    height: 120px; /* Gambar lebih pendek */
}

.hotel-card .card-content {
    padding: 15px;
}

.hotel-card h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.hotel-card p {
    font-size: 0.75rem;
    line-height: 1.3;
    /* Batasi teks cuma 3 baris lalu titik-titik (...) */
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.hotel-card ul {
    display: none; /* Sembunyikan list fitur di HP */
}

.hotel-card .price {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Tombol Hotel Spesial (Warna Hijau & Lebih Kecil) */
.hotel-card .btn-card {
    padding: 8px 0;
    font-size: 0.8rem;
    background: var(--gradient-hotel);
}

.hotel-card .btn-card:hover {
    background: linear-gradient(45deg, #00b894, #55efc4);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.4);
}

/* Responsive Hotel untuk Laptop/Tablet */
@media (min-width: 768px) {
    .hotel-grid {
        grid-template-columns: repeat(4, 1fr); /* Balik jadi 4 kolom */
        gap: 30px;
    }
    
    .hotel-card img { height: 180px; }
    .hotel-card h3 { font-size: 1.1rem; }
    .hotel-card p { font-size: 0.9rem; -webkit-line-clamp: unset; }
    .hotel-card ul { display: block; margin-bottom: 10px; font-size: 0.85rem; color: #666;}
    .hotel-card .price { font-size: 1.1rem; }
    .hotel-card .btn-card { padding: 12px 0; font-size: 1rem; }
}

/* =========================================
   7. TESTIMONI SLIDER (MARQUEE) & FOOTER
   ========================================= */

.testimonials {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    overflow: hidden; /* Wajib ada agar tidak scroll ke samping */
}

/* --- LOGIKA SLIDER BARU --- */
.slider-area {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    /* Efek pudar di kiri kanan */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.slider-track {
    display: flex;
    width: max-content;
    gap: 20px;
    animation: scroll 40s linear infinite; /* Animasi berjalan */
}

.slider-track:hover {
    animation-play-state: paused; /* Berhenti saat disentuh */
}

.testi-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 25px;
    border-radius: 15px;
    width: 300px; /* Lebar kartu fix */
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: 0.3s;
}

.testi-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.testi-card p {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
    color: #eee;
}

.testi-card .user {
    font-weight: bold;
    color: var(--secondary);
    font-size: 0.95rem;
}

.testi-card .star {
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Animasi Gerak */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsif Slider di HP */
@media (max-width: 768px) {
    .slider-track { animation: scroll 30s linear infinite; }
    .testi-card { width: 250px; padding: 20px; }
}


/* =========================================
   BAGIAN FOOTER BARU (GRID LAYOUT)
   ========================================= */
footer {
    background: var(--white);
    padding: 60px 0 20px;
    color: var(--dark);
    border-top: 5px solid #eee; /* Garis pemisah atas */
}

/* Membuat 3 Kolom Rapi */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left; /* Teks rata kiri agar enak dibaca */
}

.footer-item h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.footer-item h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-item p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Ikon Sosmed */
.social-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--dark);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

/* Responsif di HP (Teks jadi tengah) */
@media (max-width: 768px) {
    .footer-grid {
        text-align: center; /* Di HP rata tengah biar rapi */
        gap: 30px;
    }
    
    .footer-item h4 {
        border-bottom: none; /* Hilangkan garis bawah judul di HP */
        text-decoration: underline;
        text-decoration-color: var(--secondary);
    }

    .social-links {
        justify-content: center; /* Ikon sosmed di tengah */
    }
}

/* =========================================
   SECTION VIDEO GALERI (MODIFIKASI TIKTOK STYLE)
   ========================================= */
.video-grid {
    display: grid;
    /* Kita batasi minmax nya lebih kecil biar di HP muat 2 kolom kalo mau */
    /* Tapi biar aman di 1 kolom dulu untuk HP */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
}

.video-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    /* Opsional: Batasi lebar maksimum kartu agar tidak terlalu raksasa di layar lebar */
    max-width: 350px; 
    margin: 0 auto; /* Tengahin kartu kalau dia sendirian */
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* --- UPDATE PENTING: RASIO VIDEO TEGAK --- */
.video-wrapper {
    position: relative;
    width: 100%;
    /* INI KUNCINYA: Mengubah rasio jadi tegak (9 lebar : 16 tinggi) */
    aspect-ratio: 9 / 16; 
    background: #000; /* Latar belakang hitam jika video loading */
}

.video-wrapper video { 
    width: 100%;
    height: 100%;
    /* Agar video mengisi penuh bingkai tanpa gepeng (mungkin sedikit terpotong pinggirnya) */
    object-fit: cover; 
    display: block;
}

.video-info {
    padding: 20px;
    text-align: center; /* Teks jadi rata tengah biar rapi sama videonya */
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.video-info p {
    font-size: 0.9rem;
    color: #666;
}
/* =========================================
   GALERI FOTO (MODAL POPUP)
   ========================================= */

/* 1. Efek Hover pada Gambar Kartu */
.card-img-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.img-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); /* Gelap transparan */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0; /* Awalnya sembunyi */
    transition: 0.3s;
}

.card-img-wrap:hover .img-overlay {
    opacity: 1; /* Muncul saat disentuh mouse */
}

/* 2. Tampilan Modal (Layar Hitam) */
.gallery-modal {
    display: none; /* Sembunyi default */
    position: fixed;
    z-index: 9999; /* Paling depan */
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); /* Hitam pekat */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Gambar di dalam Modal */
.gallery-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.gallery-content img {
    max-width: 100%;
    max-height: 80vh; /* Maksimal 80% tinggi layar */
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Tombol Close (X) */
.close-btn {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: var(--primary); }

/* Tombol Next/Prev */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next-btn { right: -60px; border-radius: 3px 0 0 3px; }
.prev-btn { left: -60px; border-radius: 0 3px 3px 0; }

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary);
}

.gallery-caption {
    color: #ccc;
    font-size: 1rem;
    padding: 10px;
    text-align: center;
}

/* Responsif HP */
@media (max-width: 768px) {
    .prev-btn { left: -10px; background: rgba(0,0,0,0.5); }
    .next-btn { right: -10px; background: rgba(0,0,0,0.5); }
    .close-btn { top: 10px; right: 20px; font-size: 30px; }
}
