/* =========================================
   1. IMPORT FONTS & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    background-color: #f9f9f9;
    color: #444;
    overflow-x: hidden;
}

/* Agar scroll bar hilang saat loading */
body.loading {
    overflow: hidden;
}

/* =========================================
   2. UTILITIES & ANIMATIONS
   ========================================= */
.reveal {
    position: relative;
    transform: translateY(40px);
    opacity: 0;
    transition: all 1s ease;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

.bg-light { background-color: #fff; }
.bg-offwhite { background-color: #f4f4f4; }

.section-head {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-head h2 {
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
}

.section-head h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #228B22;
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-head p { color: #666; }

/* =========================================
   3. PRELOADER / LOADING SCREEN
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #228B22; /* Warna Hijau Utama */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-logo {
    width: 40px; /* Ukuran icon di tengah */
    height: auto;
    z-index: 2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hide-loader {
    opacity: 0;
    visibility: hidden;
}

/* =========================================
   4. NAVBAR STYLING
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: 0.4s;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 1rem 5%;
}

.nav-brand a {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 35px; }
.nav-links a {
    text-decoration: none; color: #fff; font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: 0.3s; position: relative;
}

.nav-links a::after {
    content: ''; display: block; width: 0; height: 2px;
    background: #fff; transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }

.navbar.scrolled .nav-brand a, 
.navbar.scrolled .nav-links a { color: #333; text-shadow: none; }
.navbar.scrolled .nav-links a::after { background: #228B22; }

.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background-color: #fff; margin: 5px; transition: 0.3s; }
.navbar.scrolled .burger div { background-color: #333; }

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero, .hero-small {
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; position: relative;
}
.hero::after, .hero-small::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 1;
}
.hero-content { z-index: 2; position: relative; max-width: 800px; padding: 0 20px; }

.hero { height: 100vh; background-image: url('assets/background1.png'); background-attachment: fixed; }
.hero-small { height: 50vh; background-image: url('assets/background1.png'); }

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; margin-bottom: 1rem; line-height: 1.2;
}

.btn-hero {
    display: inline-block; padding: 12px 30px; background: #228B22;
    color: #fff; text-decoration: none; border-radius: 50px; margin-top: 20px;
    font-weight: 600; transition: 0.3s;
}
.btn-hero:hover { background: #1b6ca8; transform: translateY(-3px); }

section { padding: 5rem 5%; }

/* =========================================
   6. TRAVEL ESSENTIALS (FULL IMAGE)
   ========================================= */
.essentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.essential-card {
    position: relative; height: 350px; border-radius: 15px; overflow: hidden;
    background-size: cover; background-position: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); transition: transform 0.3s ease;
}
.essential-card:hover { transform: translateY(-5px); }

.essential-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.8));
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 30px; transition: background 0.3s;
}
.essential-card:hover .essential-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.7));
}

.essential-overlay h3 {
    color: #fff; font-size: 1.8rem; margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); border-bottom: 3px solid #228B22;
    display: inline-block; padding-bottom: 5px;
}
.essential-overlay p {
    color: #f0f0f0; font-size: 1rem; line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); margin-top: 10px;
}

/* =========================================
   7. CARD GRID
   ========================================= */
.card-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.card {
    background: #fff; border-radius: 15px; overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); transition: 0.3s; position: relative;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.card img { width: 100%; height: 250px; object-fit: cover; transition: 0.5s; }
.card:hover img { transform: scale(1.05); }
.card-body { padding: 25px; }
.card-title { font-size: 1.4rem; color: #222; margin-bottom: 10px; }
.card-desc { font-size: 0.95rem; color: #666; margin-bottom: 15px; }
.card-tag {
    display: inline-block; padding: 5px 15px; background: #e8f5e9;
    color: #228B22; font-size: 0.8rem; border-radius: 20px; font-weight: 600;
}

/* =========================================
   8. GALLERY GRID & TIMELINE
   ========================================= */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px;
}
.gallery-item { position: relative; overflow: hidden; border-radius: 10px; height: 250px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.gallery-item:hover img { transform: scale(1.1); filter: brightness(70%); }

.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline::after {
    content: ''; position: absolute; width: 4px; background-color: #ddd;
    top: 0; bottom: 0; left: 50%; margin-left: -2px;
}
.container-time { padding: 10px 40px; position: relative; width: 50%; }
.container-time.left { left: 0; text-align: right; }
.container-time.right { left: 50%; }
.container-time::after {
    content: ''; position: absolute; width: 20px; height: 20px; right: -10px;
    background-color: #fff; border: 4px solid #228B22; top: 15px; border-radius: 50%; z-index: 10;
}
.container-time.right::after { left: -10px; }
.content-time {
    padding: 20px 30px; background: white; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.content-time h3 { color: #228B22; margin-bottom: 10px; }

/* =========================================
   9. FOOTER
   ========================================= */
.footer-bottom {
    background: #1a1a1a; color: #bbb; padding: 40px 5%;
    display: flex; justify-content: space-between; align-items: center;
    border-top: 5px solid #228B22; flex-wrap: wrap;
}
.footer-links a { color: #bbb; text-decoration: none; margin-left: 20px; transition: 0.3s; }
.footer-links a:hover { color: #fff; }

/* =========================================
   10. MOBILE RESPONSIVE
   ========================================= */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute; right: 0; height: 100vh; top: 0; background: #fff;
        flex-direction: column; align-items: center; justify-content: center;
        width: 70%; transform: translateX(100%); transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .nav-links li { margin: 20px 0; }
    .nav-links a { color: #333; font-size: 1.2rem; }
    .burger { display: block; z-index: 2000; }
    .burger div { background-color: #fff; }
    .navbar.scrolled .burger div { background-color: #333; }
    .nav-active { transform: translateX(0%); }
    .burger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); background: #333; }
    .burger.toggle .line2 { opacity: 0; }
    .burger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); background: #333; }

    .timeline::after { left: 31px; }
    .container-time { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .container-time::after { left: 21px; }
    .container-time.right { left: 0; }
}