/* --- Reset & Basic Styling --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* ======== NAVBAR STYLES ======== */
nav {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0056b3;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #007bff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.nav-links a:hover{
    color: #007bff;
}

.nav-links a:hover::after{
    transform: scaleX(1);
}

/* --- Hero Section  --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    position: relative; /* untuk positioning video */
    overflow: hidden; /* Mencegah video keluar dari batas */
}

/* Style untuk video background */
#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2; /* Posisikan video di paling belakang */
    object-fit: cover; /* Seperti background-size: cover */
}

/* Lapisan gelap agar teks mudah dibaca */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Atur tingkat kegelapan di sini */
    z-index: -1; /* Posisikan di antara video dan teks */
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* --- Main Content --- */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    /* Memberi jarak dari hero section yang sekarang full-screen */
    margin-top: -100px; 
    position: relative;
    z-index: 10;
}

section {
    margin-bottom: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #0056b3;
}

/* Gaya untuk halaman About */
.content-section p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #555;
    text-align: justify;
}
.content-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #333;
}


/* --- Filter Controls --- */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.select-container {
    display: flex;
    flex-direction: column;
}

.select-container label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    min-width: 250px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- Wisata Results --- */
.wisata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.wisata-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.placeholder {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.1rem;
    color: #777;
    padding: 40px;
}

.wisata-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-enter-animation {
    animation: fadeInSlideUp 0.6s ease-out forwards;
}

.wisata-link:hover .wisata-card {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

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

.wisata-card-content {
    padding: 20px;
}

.wisata-card-content h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #0056b3;
}

.wisata-card-content p {
    font-size: 0.95rem;
    color: #666;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #343a40;
    color: white;
}

/* --- Responsive Design (INI ADALAH SATU-SATUNYA BAGIAN YANG PERLU DIGANTI) --- */
@media (max-width: 768px) {
    /* Mengurangi ukuran font judul di hero section */
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Mengubah filter destinasi menjadi vertikal */
    .filter-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .select-container {
        width: 100%;
        max-width: 350px;
    }
    
    /* Mengubah navbar menjadi vertikal dan lebih rapi */
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-radius: 30px;
        width: 95%;
    }

    .nav-links {
        gap: 25px; /* Mengurangi jarak antar link navbar */
    }

    /* Mengurangi ukuran font semua judul section (h2) */
    section h2 {
        font-size: 1.8rem;
    }

    /* Mengubah layout bagian "Pilih Petualangan" menjadi vertikal */
    .popular-container {
        grid-template-columns: 1fr; /* Membuatnya menjadi 1 kolom */
        text-align: center;
    }

    .popular-text h2 {
        font-size: 2.2rem; /* Mengecilkan judul "Pilih Petualangan Anda" */
    }

    .popular-cards-wrapper {
        margin-top: 30px; /* Memberi jarak antara teks dan kartu */
    }
    
    /* Mengubah layout form kontak menjadi vertikal */
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ======== Language Selector Styles ======== */
.lang-selector {
    position: relative;
}

.lang-selector button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.lang-selector button img {
    width: 24px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
}

.lang-dropdown {
    position: absolute;
    top: 130%;
    right: 0;
    background-color: white;
    list-style: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 10px;
    width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.lang-dropdown li a:hover {
    background-color: #f4f7f6;
}

.lang-dropdown img {
    width: 20px;
}

/* ======== Gallery Page Styles ======== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px 20px 15px 20px;
    transition: opacity 0.3s ease;
}

.gallery-item .overlay h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

/* ======== Contact Section Styles ======== */
.contact-section {
    background-color: #f4f7f6; /* Warna latar yang sedikit berbeda */
    padding: 50px 30px;
    border-radius: 12px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-details h2, .contact-form-container h2 {
    margin-bottom: 20px;
    color: #0056b3;
}

.contact-details p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

#get-in-touch-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#get-in-touch-form input,
#get-in-touch-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#get-in-touch-form input:focus,
#get-in-touch-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#get-in-touch-form button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start; /* Tombol tidak full width */
}

#get-in-touch-form button:hover {
    background-color: #0056b3;
}

.form-message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    display: none; /* Sembunyikan secara default */
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive untuk Kontak dan Galeri */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ======== Popular Destinations Section Styles ======== */
.popular-destinations {
    padding: 60px 20px;
    background-color: #ffffff;
    /* Untuk animasi scroll */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Kelas ini akan ditambahkan oleh JS saat section terlihat */
.popular-destinations.visible {
    opacity: 1;
    transform: translateY(0);
}

.popular-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.popular-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.popular-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid #555;
    border-radius: 50px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #333;
    color: white;
}

.popular-cards-wrapper {
    overflow-x: auto; /* Memungkinkan scroll horizontal */
    padding-bottom: 15px; /* Memberi ruang untuk shadow */
}

/* Menyembunyikan scrollbar bawaan browser */
.popular-cards-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}
.popular-cards-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.popular-cards {
    display: flex;
    gap: 20px;
}

.popular-card {
    flex: 0 0 280px; /* Lebar kartu, tidak akan menyusut */
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    background-size: cover;
    background-position: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* Gradient overlay untuk keterbacaan teks */
.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.2) 30%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.popular-card .card-content {
    position: relative;
    z-index: 2;
}

.popular-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.popular-card p {
    font-size: 1rem;
    font-weight: 400;
}

/* Responsive untuk bagian populer */
@media (max-width: 992px) {
    .popular-container {
        grid-template-columns: 1fr; /* Stack layout on smaller screens */
        text-align: center;
    }
    .popular-cards-wrapper {
        margin-top: 30px;
    }
}

/* ======== Lightbox Styles ======== */
.lightbox {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 5px;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #bbb;
}

/* ======== Gallery Item Highlight Styles ======== */
.gallery-item.highlight {
    box-shadow: 0 0 0 4px #007bff, 0 8px 25px rgba(0, 123, 255, 0.4);
    transition: box-shadow 0.5s ease-in-out;
}

/* ======== Scroll to Top Button Styles ======== */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
}

#scrollTopBtn:hover {
    background-color: #0056b3;
}

#scrollTopBtn.visible {
    opacity: 1;
    visibility: visible;
}