/*
Theme Name: NPT V3.1 - by Amerthanadi Studios
Description: dibuat khusus untuk Nusa Penida Transport dan Guide Nusa Penida
Author: Amerthanadi Studios
Author URI: https://www.amerthanadi.com
Version: 3.1
*/

/* Reset & Base Typography */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    /* KUNCI: Mencegah elemen yang mengintip merusak lebar halaman */
    overflow-x: hidden !important; 
}

/* Deklarasi Variabel Warna Global Dinamis */
:root {
    /* Dikosongkan nilainya agar tidak mengunci secara statis, 
       sehingga warna dinamis dari dashboard admin bisa masuk sempurna */
    --brand-color: inherit; 
}

/* // ========================================================================= */
/* // BAGIAN HEADER */
/* // ========================================================================= */
.site-header {
    background: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.logo img {
    max-height: 50px;
    width: auto;
    display: block;
}
.logo-text {
    font-weight: 800;
    font-size: 1.2rem;
    color: #001D3D;
    letter-spacing: -0.5px;
}

/* Menu Tengah */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #0077b6;
}

/* Tombol Contact Us (Kanan) */
.btn-contact-header {
    background: #001D3D; /* Warna biru gelap sesuai footer */
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-contact-header:hover {
    background: #ffd700; /* Warna kuning saat hover */
    color: #001D3D !important;
    transform: translateY(-2px);
}

/* Menu Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #001D3D;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animasi Tombol saat Aktif */
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* --- Menu Responsive Mobile --- */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        margin-left: 15px;
    }
    
    .btn-contact-header {
        padding: 8px 15px;
        font-size: 12px;
    }

    /* Style Navigasi saat Mobile */
    .main-nav {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 1000;
    }
    
    /* Munculkan saat class active ditambahkan via JS */
    .main-nav.active {
        display: block; 
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
}


/* // ========================================================================= */
/* // TAMPILAN DESAIN KARTU TOUR (GENERAL) */
/* // ========================================================================= */
.tour-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* --- PERBAIKAN BADGE BACKGROUND (SEKARANG MENGIKUTI WARNA UTAMA TEMA & FONT TIDAK DITEBALKAN) --- */
.badge-item {
    background-color: var(--brand-color, #ff5b00) !important; /* Latar belakang badge mengikuti warna utama */
    color: #ffffff !important; /* Teks putih agar kontras dan terbaca jelas */
    display: inline-block !important; /* KUNCI: Agar background & padding muncul sempurna */
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important; /* KUNCI PERBAIKAN: Font di-set sedang/tidak tebal agar manis */
    text-transform: uppercase !important;
    line-height: 1 !important;
    margin-bottom: 5px;
    vertical-align: middle;
}

/* Pastikan posisi badge di dalam gambar tetap melayang (jika ada) */
.tour-badge-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

/* --- SLIDER GAMBAR DI DALAM KARTU --- */
.tour-card .swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.4 !important;
    width: 15px !important;
    height: 9px !important;
    margin: 0 4px !important;
    border-radius: 30% !important;
    transition: all 0.3s ease !important;
}

.tour-card .swiper-pagination-bullet-active {
    background: #FFD700 !important; 
    opacity: 1 !important;
}

/* Card Content */
.tour-content {
    padding: 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tour-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: #001D3D;
    font-weight: 700;
    line-height: 1.3;
}

.tour-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* KUNCI: Menghilangkan link teks "View Details ➔" bawaan */
.tour-excerpt a.view-detail-link {
    display: none !important;
}

/* Fasilitas dengan Ikon Centang (DIKEMBANGKAN LEBIH RAPAT SESUAI REFERENSI) */
.tour-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.tour-features li {
    margin-bottom: 5px !important; /* Dirapatkan agar tidak terlalu renggang */
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.3 !important; /* Rapat vertikal */
}

.tour-features .dashicons {
    color: #2ecc71; 
    margin-right: 8px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Footer (Harga & Tombol) */
.tour-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* KUNCI: Garis pembatas (border-top) mengikuti warna tombol kustom secara dinamis */
    border-top: 1px solid var(--brand-color, #ff5b00) !important; 
    padding-top: 20px;
    position: relative; /* Kunci penempatan absolut lencana */
}

/* --- KUSTOMISASI BARU: DESAIN LENCANA "Need help?" AKTIF SEBAGAI LINK WHATSAPP --- */
.npd-view-details-btn {
    text-decoration: none !important;
    font-family: 'Inter', sans-serif;
    position: absolute;
    top: 0px; /* Diatur ke nol pixel */
    transform: translateY(-50%); /* KUNCI: Menyamakan dan mengunci lencana pas di tengah-tengah garis */
    right: 15px; /* Mengambang di atas tombol booking sebelah kanan */
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-color, #ff5b00) !important; /* KUNCI: Teks mengikuti warna tombol utama tema aktif */
    background: #ffffff; /* Warna latar belakang putih penutup potongan garis */
    
    /* Gunakan flexbox untuk memastikan posisi teks berada tepat di tengah-tengah lencana secara vertikal & horizontal */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 22px !important; /* Tinggi lencana presisi */
    padding: 0 14px !important; /* Padding kanan-kiri lencana */
    box-sizing: border-box !important;

    border: 1px solid var(--brand-color, #ff5b00) !important; /* KUNCI: Garis luar lencana (border) mengikuti warna tombol utama aktif */
    border-radius: 50px; /* Sudut melengkung oval sempurna */
    text-transform: none !important; /* Mencegah lowercase otomatis agar tanda tanya tetap proporsional */
    z-index: 2;
    transition: all 0.2s ease;
}

.npd-view-details-btn:hover {
    opacity: 1;
    background: var(--brand-color, #ff5b00) !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.03);
}

.price-container .price-label {
    font-size: 11px;
    color: #888;
    font-weight: 400;
    text-transform: uppercase;
}

/* Style khusus untuk simbol mata uang Rp. */
.price-container .currency-symbol {
    font-size: 0.8rem;       /* Mengatur ukuran font */
    color: #888;             /* Mengatur warna (misal: abu-abu) */
    font-weight: 400;        /* Mengatur ketebalan font */
    margin-right: 2px;       /* Memberi sedikit jarak ke angka harga */
    vertical-align: middle;  /* Mengatur posisi sejajar secara vertikal */
}

/* KUNCI PERBAIKAN: Angka harga utama mengikuti warna tombol tema aktif */
.price-container .price-amount {
    font-weight: 800 !important;
    font-size: 1.45rem !important;
    color: var(--brand-color, #ff5b00) !important; /* KUNCI: Warna harga utama otomatis mengikuti warna tombol utama aktif */
    display: block;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.price-container .price-sublabel {
    font-size: 10px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* // ========================================================================= */
/* // PERBAIKAN NAVIGASI & LINK (TAMBAHAN BARU) */
/* // ========================================================================= */

/* Agar Slider Gambar bisa di-klik tapi tetap lancar di-swipe (HP) */
.tour-card-link-wrapper {
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Menghilangkan warna biru saat di-tap di HP */
    z-index: 5;
    position: relative;
}

/* Memastikan Swiper pagination (titik-titik) tetap bisa diklik meski ada link */
.tour-card .swiper-pagination {
    z-index: 20 !important;
    pointer-events: auto !important;
}

/* Hover effect pada Judul Paket Tour */
.tour-title a {
    transition: color 0.3s ease;
}

.tour-title a:hover {
    color: #0077b6 !important; /* Warna berubah saat judul diarahkan kursor */
}

/* Efek hover halus pada gambar saat diarahkan kursor */
.tour-image-container {
    overflow: hidden;
}

.tour-card-link-wrapper:hover img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

/* // ========================================================================= */
/* // TOMBOL BOOKING WHATSAPP (SINKRON DENGAN TEMA UTAMA) */
/* // ========================================================================= */

.tour-card .btn-booking, 
.tour-card a.btn-booking {
    /* KUNCI PERBAIKAN: Properti warna background statis hijau dilepas agar inline style PHP */
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.3s ease !important;
}

.tour-card .btn-booking:hover {
    filter: brightness(0.9);
    transform: scale(1.05);
}

/* // ========================================================================= */
/* // FIX TOTAL: 3 KOLOM KOMPUTER & 2 KOLOM TABLET (ANTI BENTROK ELEMENTOR) */
/* // ========================================================================= */

/* Reset Container agar tidak dibatasi oleh lebar kolom Elementor */
.tour-grid-container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 15px !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Memaksa sistem Grid mengabaikan Flexbox bawaan widget */
.tour-grid-layout {
    display: grid !important;
    grid-template-columns: 1fr !important; /* Default HP */
    gap: 30px !important;
    width: 100% !important;
    /* Mencegah kartu 'melebar' keluar container */
    overflow: visible !important; 
}

/* 1. LAYAR LAPTOP / KOMPUTER (MIN 1025px) - 3 KOLOM */
@media screen and (min-width: 1025px) {
    .tour-grid-layout {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-flow: row !important;
    }
}

/* 2. LAYAR TABLET / TAB MINI (641px - 1024px) - 2 KOLOM */
@media screen and (min-width: 641px) and (max-width: 1024px) {
    .tour-grid-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* 3. LAYAR HP (DIBAWAH 640px) - 1 KOLOM */
@media screen and (max-width: 640px) {
    .tour-grid-container {
        padding: 20px 16px !important; /* Memastikan ruang padding di kanan dan kiri container utama seimbang */
    }
    .tour-grid-layout {
        grid-template-columns: 1fr !important;
        justify-content: center !important; /* Memusatkan jalur grid secara horizontal */
        justify-items: center !important;  /* Memusatkan kartu-kartu di dalam kolom grid */
        gap: 25px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    .tour-card-item {
        width: 100% !important;
        max-width: 345px !important; /* Mengurangi sedikit max-width agar pas dan tidak terlalu mepet ke sisi layar */
        margin: 0 auto !important;   /* Menyeimbangkan margin kiri-kanan */
        display: flex !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    /* Posisi lencana mobile "view details" disesuaikan agar pas melayang di atas tombol */
    .tour-footer::before, .npd-view-details-btn {
        right: 15px !important;
    }
}

/* Menstabilkan Lebar Kartu di Semua Browser */
.tour-card-item {
    width: 100% !important;
    min-width: 0 !important; /* Kunci agar grid tidak pecah di Firefox/Safari */
    display: flex !important;
}

.tour-card {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 100% !important;
}

/* Pastikan slider gambar tidak merusak lebar kartu */
.tour-image-container {
    width: 100% !important;
    height: 230px !important;
    position: relative;
}

.tour-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* END- TAMPILAN */

/* --- MODAL STYLING (FIXED) --- */
.npd-custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Menggunakan viewport width */
    height: 100vh; /* Menggunakan viewport height */
    z-index: 999999 !important; /* Tinggi z-index ditingkatkan */
    display: flex; /* Gunakan flex untuk alinyemen */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease;
    pointer-events: none; 
}

/* Saat Modal Aktif */
.npd-custom-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); 
}

.modal-container {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    overflow-y: auto;
    z-index: 1000001;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.npd-custom-modal.is-active .modal-container {
    transform: translateY(0);
}

.modal-content-inner {
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e9ecef;
    color: #ff0000;
}
/* --- MODAL STYLING end --- */

/* --- Awal- SINGLE TOUR PAGE STYLING --- */
/* Slider Style */
.npd-single-slider {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    height: 450px;
}
.npd-single-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fasilitas Layout */
.npd-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
}
.feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.feat-item .dashicons { color: #25d366; }

/* Tombol WA & Sidebar */
.npd-booking-card {
    border: 2px solid #eee !important;
    background: #fff !important;
}
/* Container Utama */
.npd-single-wrapper {
    padding: 60px 20px !important;
    background: #fdfdfd !important;
}

.npd-container {
    max-width: 1140px !important;
    margin: 0 auto !important;
}

/* Grid Layout 2 Kolom */
.npd-main-grid {
    display: grid !important;
    grid-template-columns: 1fr 380px !important; 
    gap: 40px !important;
    margin-top: 30px !important;
}

/* Header Meta */
.npd-entry-title { font-size: 32px !important; color: #001D3D !important; font-weight: 800 !important; }
.npd-breadcrumb { color: #888; font-size: 14px; }

/* Image Style */
.npd-main-image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Sidebar Booking Card */
.npd-booking-card {
    background: #ffffff !important;
    border: 1px solid #eeeeee !important;
    padding: 30px !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05) !important;
    position: sticky !important;
    top: 120px !important;
}

.npd-price-display { display: flex; align-items: baseline; gap: 5px; color: #001D3D; margin-top: 5px; }
.npd-curr { font-size: 18px; font-weight: 700; }
.npd-amount { font-size: 36px; font-weight: 800; }
.npd-sub-text { font-size: 14px; color: #777; margin-bottom: 20px; }

/* Tombol WA */
.npd-btn-wa {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #25d366 !important;
    color: #fff !important;
    padding: 18px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    transition: 0.3s !important;
}
.npd-btn-wa:hover { background: #128c7e !important; transform: scale(1.02); }

/* Responsive untuk HP */
@media (max-width: 991px) {
    .npd-main-grid {
        grid-template-columns: 1fr !important;
    }
    .npd-booking-card {
        position: static !important;
    }
}
/* --- Akhir- SINGLE TOUR PAGE STYLING --- */

/* ========================================================================= */
/* PERBAIKAN FINAL LAYOUT 2 KOLOM SINGLE TOUR */
/* ========================================================================= */

@media (min-width: 992px) {
    /* Memastikan grid kembali menjadi 2 kolom di layar desktop/laptop */
    .npd-main-grid {
        display: grid !important;
        grid-template-columns: 1fr 380px !important; 
        gap: 40px !important;
        align-items: flex-start !important;
    }

    /* Mengatur sisi kiri agar tidak melebar sendirian */
    .npd-content-side {
        width: 100% !important;
    }

    /* Memperbaiki posisi sidebar agar tetap menempel (sticky) */
    .npd-sidebar-side {
        display: block !important;
        position: sticky !important;
        top: 100px !important;
        z-index: 10;
    }
}

/* Penyesuaian khusus untuk elemen Slider agar tidak 'pecah' */
.npd-single-slider {
    height: auto !important; /* Mengikuti rasio 16/9 dari PHP */
    max-height: 500px;
}

.npd-single-slider .swiper-slide img {
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Memperbaiki jarak teks deskripsi */
.npd-description-box {
    margin-top: 30px;
    line-height: 1.8;
}

/* Styling Menu Footer Otomatis */
.menu-footer-quick-links-container ul li {
    margin-bottom: 10px;
}
.menu-footer-quick-links-container ul li a {
    color: #ccc !important;
    text-decoration: none;
}
.menu-footer-quick-links-container ul li a:hover {
    color: <?php echo esc_attr($btn_color); ?> !important;
}