/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --bg-dark: #0A0A0A;
    --bg-darker: #141414;
    --surface-color: #1E1E1E;
    --primary-color: #f90;
    --text-primary: #ffffff;
    --text-secondary: #b6b6b6;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

html {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-dark);
}

/* ===== MAP BACKGROUND ===== */
#map-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    pointer-events: none; transition: filter 2.0s ease-in-out;
}
#map-background.is-blurred { filter: blur(3px); }
.mapboxgl-ctrl-logo { display: none !important; }

/* ===== MAIN WRAPPER & SCROLLING ===== */
#scroll-container {
    height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
}
#scroll-container::-webkit-scrollbar { display: none; }

.container {
    width: 100%; margin: 0 auto; padding: 0 25px;
}

/* --- HEADER / NAVIGATION --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 15px 25px;
    z-index: 1000; background: linear-gradient(to bottom, rgba(18, 18, 18, 0.7), transparent);
    display: flex; justify-content: space-between; align-items: center; transition: padding 0.3s ease;
}
.logo { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.main-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--bg-darker);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateX(100%); transition: transform 0.4s ease-in-out; z-index: 1010;
}
.main-nav.is-open { transform: translateX(0); }
.main-nav a {
    color: var(--text-primary); text-decoration: none; font-size: 1.5rem;
    font-weight: 500; margin: 15px 0; transition: color 0.3s ease;
}
.main-nav a:hover { color: var(--primary-color); }
.nav-toggle {
    display: block; background: transparent; border: none; color: var(--text-primary);
    font-size: 1.5rem; cursor: pointer; z-index: 1020;
}

/* --- FULLSCREEN SECTION LAYOUT --- */
.fullscreen-section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}
.twinkling-lights-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.section-content { text-align: center; width: 100%; position: relative; z-index: 1; }
#contact.fullscreen-section { justify-content: flex-start; padding-top: 100px; padding-bottom: 50px; }

/* --- Background Color Scheme --- */
#hero, #about { background-color: transparent; }
#features, #contact, #preview { background-color: var(--bg-darker); }

/* ===== SECTION 2: ABOUT LAYOUT ===== */
#about .container { display: flex; align-items: center; }
.about-content-grid { display: grid; grid-template-columns: 1fr; align-items: center; width: 100%; }
.about-text-content { text-align: center; }

/* --- DEFAULT TYPOGRAPHY --- */
.hero-title {
    font-size: 2.1rem; line-height: 1.2; font-weight: 600; margin-bottom: 1rem;
    background: linear-gradient(to right, #f90, #ffc566); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; max-width: 500px; margin-left: auto; margin-right: auto;
}
.section-title {
    font-size: 1.8rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.footer-column h3 {
    font-size: 1.2rem; font-weight: 500; color: var(--text-primary);
    margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #333;
}
.hero-subtitle, .section-description, .footer-column ul li {
    font-size: 0.9rem; color: var(--text-secondary);
}
.hero-subtitle { max-width: 450px; margin: 0 auto 2rem; }
.section-description { max-width: 100%; margin: 0 auto 25px; }
.footer-column ul li { margin-bottom: 8px; }

/* --- BUTTONS (BTN) --- */
.btn {
    display: inline-flex; /* Diganti agar ikon dan teks sejajar */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Jarak antara teks dan ikon */
    padding: 10px 22px; font-size: 0.9rem; border-radius: 50px;
    text-decoration: none; font-weight: 600; transition: all 0.3s ease;
}
.btn-primary { background-color: var(--primary-color); color: var(--bg-dark); border: 2px solid var(--primary-color); }
.btn-primary:hover { background-color: transparent; color: var(--primary-color); transform: scale(1.05); }

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* ===== SECTION 3: FITUR (GAYA BARU & RESPONSIF) ===== */
.section-content--features { text-align: left; }
.section-content--features .section-title, .features-subtitle { text-align: center; }
.features-subtitle {
    max-width: 600px; margin-left: auto; margin-right: auto;
    margin-bottom: 2rem; color: var(--text-secondary);
    font-size: 0.9rem; line-height: 1.5;
}
.features-interactive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}
.features-list { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.feature-item {
    background-color: var(--surface-color); border: 1px solid #2a2a2a;
    border-left: 4px solid transparent; border-radius: 12px; padding: 1rem;
    display: flex; align-items: center; gap: 1rem; cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.feature-item:hover { background-color: #2c2c2c; }
.feature-item.active {
    background-color: #252525; border-left-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.08);
}
.feature-item__icon {
    font-size: 2rem; color: var(--primary-color); flex-shrink: 0;
    width: 45px; text-align: center;
}
.feature-item__text h3 {
    font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin: 0 0 0.25rem 0;
}
.feature-item__text p {
    font-size: 0.9rem; color: var(--text-secondary); margin: 0; line-height: 1.5;
}
.features-preview { display: none; height: 100%; }
#feature-preview-image {
    width: 100%; height: 100%; object-fit: contain; display: block;
    border-radius: 12px; transition: opacity 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.2); border: 1px solid #2a2a2a; object-fit: cover;
}

/* --- FOOTER SECTION (#contact) --- */
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 30px; width: 100%; }
.footer-column { text-align: left; }
.footer-column ul { list-style: none; }
.footer-column a, .footer-column p { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-column a:hover { color: var(--primary-color); }
.social-links { margin-bottom: 30px; text-align: center; }
.social-links a { color: var(--text-secondary); font-size: 1.3rem; margin: 0 12px; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: scale(1.2); }
.copyright { color: #666; font-size: 0.8rem; border-top: 1px solid #2a2a2a; padding-top: 25px; width: 100%; max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; }
.copyright .hide-on-mobile { display: none; }
#contact .section-description, #contact .social-links { display: none; }

/* --- ARROW NAVIGATION --- */
#section-nav-arrows { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.nav-arrow { width: 40px; height: 40px; background-color: rgba(30, 30, 30, 0.8); backdrop-filter: blur(5px); color: var(--text-secondary); border: 1px solid #444; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; font-size: 1rem; transition: all 0.3s ease; }
.nav-arrow:hover { background-color: var(--primary-color); color: var(--bg-dark); border-color: var(--primary-color); transform: scale(1.1); }
.nav-arrow.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* ================================================================= */
/* ===== KODE BARU: SECTION PROFIL DUSUN (#preview) ================ */
/* ================================================================= */
.profil-dusun-grid {
    display: grid; grid-template-columns: 1fr;
    gap: 2.5rem; align-items: center; width: 100%;
    margin: 0 auto;
}
.profil-dusun-image-wrapper {
    display: none;
    position: relative; border-radius: 16px; overflow: hidden;
    height: 250px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid #2a2a2a;
}
.profil-dusun-image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease-out;
}
.profil-dusun-image-wrapper:hover img { transform: scale(1.05); }
.profil-dusun-content {
    display: flex; flex-direction: column; text-align: center;
}
.profil-dusun-content .section-title { margin-bottom: 0.5rem; }
.profil-dusun-tagline {
    font-size: 1rem; font-style: italic; color: var(--text-secondary);
    margin-bottom: 1rem; margin-left: auto; margin-right: auto;
}
.profil-dusun-content .section-description {
    text-align: center; margin-left: auto; margin-right: auto;
    margin-bottom: 1rem; line-height: 1.7; 
}
.profil-dusun-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem; /* DIUBAH: Menambah jarak ke tombol di bawahnya */
}
.stat-item {
    background-color: var(--surface-color);
    padding: 1.25rem 1rem;
    border: 1px solid #2a2a2a;
    border-left: 4px solid transparent;
    border-radius: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}
.stat-item:hover {
    background-color: #2c2c2c;
    border-left-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.08);
}
.stat-number {
    display: block; font-size: 1.8rem; font-weight: 700;
    color: var(--primary-color); line-height: 1.1;
}
.stat-number small {
    font-size: 1rem; font-weight: 500; color: var(--text-secondary);
}
.stat-label {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    line-height: 1.2;
}

/* DITAMBAHKAN: Wrapper untuk dua tombol baru */
.profil-dusun-buttons {
    display: flex;
    justify-content: center; /* Tombol rata tengah di mobile */
    gap: 1rem; /* Jarak antara tombol */
    flex-wrap: wrap; /* Agar tombol turun jika layar terlalu kecil */
}

/* DIHAPUS: Class lama tidak diperlukan lagi */
/* .btn-dokumentasi { ... } */

/* ========================================================== */
/* ============= MEDIA QUERIES FOR RESPONSIVENESS ============= */
/* ========================================================== */

@media (max-width: 767px) {
    .fullscreen-section {
        height: auto;
        padding-top: 80px;
        padding-bottom: 80px;
    }
    #about .about-text-content .section-title { margin-bottom: 20rem; }
}
@media (max-width: 767px) and (max-height: 700px) {
    #about .about-text-content .section-title { margin-bottom: 15rem; }
}
@media (max-width: 767px) and (max-height: 600px) {
    #about .about-text-content .section-title { margin-bottom: 10rem; }
}

@media (min-width: 768px) {
    .container { padding: 0 50px; }
    .main-header { padding: 20px 50px; }
    .logo { font-size: 1.5rem; } 
    .main-nav {
        position: static; height: auto; width: auto; background-color: transparent;
        flex-direction: row; transform: none; transition: none;
    }
    .main-nav a { font-size: 1rem; margin: 0; margin-left: 20px; color: var(--text-secondary); }
    .main-nav a:hover { color: var(--primary-color); }
    .nav-toggle { display: none; }
    
    .about-content-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .about-text-content { text-align: left; }
    .about-text-content .section-title,
    .about-text-content .section-description { margin-left: 0; margin-right: 0; }
    #about .container { max-width: none; margin: 0; }

    .hero-title, .hero-subtitle { max-width: none; }
    .hero-title { font-size: 3.2rem; }
    .hero-subtitle, .section-description, .footer-column ul li { font-size: 1.05rem; }
    .section-title { font-size: 2.2rem; }
    .footer-column h3 { font-size: 1.3rem; }
    
    .btn { padding: 12px 24px; font-size: 1rem; }
    .social-links a { font-size: 1.5rem; margin: 0 15px; }
    .fullscreen-section { padding: 80px 0; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
    #contact.fullscreen-section { justify-content: center; }
    .copyright .hide-on-mobile { display: inline; }
    #contact .section-description, #contact .social-links { display: block; }

    .stat-number { font-size: 2rem; }
    .stat-label { font-size: 0.9rem; }
}

@media (min-width: 992px) {
    .profil-dusun-grid {
        grid-template-columns: 0.9fr 1fr;
        gap: 3.5rem;
    }
    .profil-dusun-image-wrapper { 
        display: block;
        height: 450px;
    }
    .profil-dusun-content { text-align: left; }
    .profil-dusun-content .section-title,
    .profil-dusun-content .section-description,
    .profil-dusun-tagline {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    /* DITAMBAHKAN: Mengatur tombol agar rata kiri di desktop */
    .profil-dusun-buttons {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .features-interactive-grid { grid-template-columns: 1fr 1.3fr; gap: 3rem; }
    .features-preview { display: block; }
}

@media (min-width: 1200px) {
    .feature-item__text h3 { font-size: 1.4rem; }
    .feature-item__text p { font-size: 1rem; }
}

/* ===== STYLING UNTUK TOMBOL BARU DI SECTION ABOUT ===== */
.about-buttons {
    margin-top: 4rem;
    margin-bottom: 1rem;
}