/* --- 1. GLOBAL & ANTI-SCROLL --- */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    /* Mengunci agar tidak bisa geser kanan-kiri */
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #f8f8f8;
    --text-color: #333;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --section-alt: #fdfdfd;
    --muted-text: #555;
    --nav-mobile-bg: #ffffff;
}

.dark-theme {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --header-bg: #1a1a1a;
    --section-alt: #181818;
    --muted-text: #b0b0b0;
    --nav-mobile-bg: #1a1a1a;
}

body {
    padding: 7-px;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* --- 2. HEADER & NAVBAR --- */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
}

.container-nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

.logo {
    font-weight: bold;
    font-size: 1.7rem;
    color: #007bff;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    transition: color .3s;
}

nav a:hover {
    color: #007bff;
}

/* --- 3. DARK MODE TOGGLE (SAKLAR LAMPU) --- */
.theme-btn {
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
}

/* Tukar ikon otomatis */
.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.dark-theme .sun-icon {
    display: block;
}

.dark-theme .moon-icon {
    display: none;
}

/* --- 4. BURGER MENU (TAMPILAN HP) --- */
#check {
    display: none;
}

/* Checkbox selalu sembunyi */

.checkbtn {
    display: none;
    /* Sembunyi di Laptop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.checkbtn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    /* Warna garis burger ikut tema */
    transition: 0.3s;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;

    position: static;
    height: auto;
    width: auto;
    background: none;
    flex-direction: row;
    padding-top: 0;
    left: 0;
}

@media (max-width: 858px) {

    nav {
        position: fixed;
        width: 100%;
        height: calc(100vh - 70px);
        /* Menghitung tinggi layar dikurangi tinggi header */
        background: var(--nav-mobile-bg);
        top: 70px;
        left: -100%;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: all .5s ease;
        gap: 30px;
        z-index: 1000;
        overflow-y: auto;
        /* Agar menu bisa di-scroll jika link-nya banyak */
    }

    #check:checked~nav {
        left: 0;
    }

    nav a {
        font-size: 20px;
    }

    .content-block {
        flex-direction: column;
    }

    .content-text {
        order: 1;
    }

    .image-wrapper {
        order: 2;
    }

    .checkbtn {
        display: flex;
    }

    .content-block,
    .content-block.reverse,
    .content-block:nth-child(even) {
        flex-direction: column !important;
        /* Paksa urutan menumpuk ke bawah */
        gap: 20px;
        display: flex;
    }

    .content-text {
        width: 100% !important;
        text-align: center;
    }

    .image-wrapper {
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-block img {
        width: 90% !important;
        /* Agar gambar tidak terlalu mepet layar HP */
        height: auto !important;
        margin: 0 auto;
    }

    .image-credit {
        display: block;
        font-size: 11px;
        color: var(--muted-text);
        margin-top: 8px;
        font-style: italic;
        text-align: center;
    }
}

/* CSS untuk Desktop agar tetap rapi */
.image-wrapper {
    width: 50%;
    text-align: center;
}

.image-credit {
    font-size: 12px;
    color: var(--muted-text);
    margin-top: 5px;
    font-style: italic;
}


/* Tambahan agar saat menu buka, user tidak bisa scroll konten di belakangnya (Opsional) */
body:has(#check:checked) {
    overflow: hidden;
}

/* --- PERBAIKAN KONTEN SEMPIT (KUNCI UTAMA) --- */

.content-text p {
    text-align: center;
    /* Paragraf jadi di tengah agar estetik di HP */
    font-size: 15px;
}

.section-title {
    font-size: 1.8rem;
    /* Judul sedikit mengecil agar pas di layar HP */
    margin-bottom: 30px;
}

/* --- PERBAIKAN KONTAK TENGAH --- */
.kontak-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Tombol & teks benar-benar di tengah */
    justify-content: center;
    text-align: center;
}


/* --- 5. SECTIONS STYLE --- */
section {
    scroll-margin-top: 70px;
}

.home-section {
    width: 100%;
    height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('kontenLogo/LogoYayasanOrangBaikIndonesia.jpg');
    background-size: contain;
    background-color: #000;
    font-size: 25px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    color: #007bff;
    font-size: 2.2em;
    margin-bottom: 50px;
}

.content-block {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

/* Setiap blok GENAP (ke-2, ke-4, dst) akan otomatis TERBALIK posisinya */
.content-block:nth-child(even) {
    flex-direction: row-reverse;
}

.content-block.reverse {
    flex-direction: row-reverse;
}

.image-wrapper img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    height: 350px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.content-text {
    width: 50%;
}

.content-text h2 {
    color: var(--text-color);
}

.content-text p {
    color: var(--muted-text);
    text-align: justify;
    font-size: 20px;
}

.ambulance-section,
.formalin-section,
.rias-section {
    padding: 100px 0;
    background-color: var(--card-bg);
}

.cargo-section,
.peti-section {
    padding: 100px 0;
    background-color: var(--section-alt);
}

.kontak-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--card-bg);
    /* Ubah dari #fff jadi variabel ini */
}


.wa-button {
    display: inline-block;
    background: #25d366;
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

footer {
    text-align: center;
    padding: 40px;
    background: #333;
    color: #fff;
}

/* --- 6. ANIMATIONS --- */
.reveal,
.slide-left,
.slide-right,
.reveal-text {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal {
    transform: translateY(60px);
}

.slide-left {
    transform: translateX(-80px);
}

.slide-right {
    transform: translateX(80px);
}

.active {
    opacity: 1 !important;
    transform: translate(0) !important;
}