/* 1. Variabel & Reset Dasar */
:root { 
    --primary: #0a4d2e; 
    --secondary: #1a7447; 
    --accent: #ffcc00; 
    --light: #f8f9fa; 
    --dark: #333;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { background-color: #fcfcfc; color: var(--dark); line-height: 1.6; }


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: var(--primary); 
    color: white; 
    /* Inilah kode untuk memberikan bayangan */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    
    position: sticky;
    top: 0;
    z-index: 1000;
}


nav ul { display: flex; list-style: none; }
nav ul li { position: relative; }
nav ul li a { color: white; text-decoration: none; padding: 20px; display: block; }
nav ul li:hover > a { background: var(--secondary); }

nav ul ul { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: var(--primary); 
    min-width: 200px; 
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); 
    z-index: 1000; 
}
nav ul li:hover > ul { display: block; }
nav ul ul ul { top: 0; left: 100%; }

/* 3. Grid Card (Halaman List) */
.grid-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 40px 8%;
}

.card-elegant {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.card-elegant:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    border-color: var(--primary); 
}

.card-elegantterkait:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    border-color: var(--primary); 
}

/* Wrapper untuk memastikan gambar selalu kotak/persegi panjang yang sama */
.card-img-wrapper {
    width: 120px;       /* Lebar tetap */
    height: 90px;       /* Tinggi tetap */
    flex-shrink: 0;     /* Mencegah gambar gepeng saat teks panjang */
    overflow: hidden;   /* Memotong bagian yang meluap */
    border-radius: 8px; /* Sudut melengkung */
}

/* Memastikan gambar memenuhi wrapper tanpa merusak rasio */
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* INI KUNCINYA */
    display: block;
}

.card-elegantterkait {
    display: flex;
    flex-direction: column;
    height: 100%; /* Memastikan semua kartu memiliki tinggi yang sama dalam satu baris grid */
}

.card-img-wrapperterkait {
    width: 100%;       /* Mengisi lebar penuh kartu */
    height: 180px;     /* Tentukan tinggi yang sama untuk SEMUA kartu */
    overflow: hidden;  /* Memotong bagian yang meluap */
    border-radius: 12px 12px 0 0; /* Melengkungkan sudut atas saja */
    margin-bottom: 15px;
}

.card-img-wrapperterkait img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan gambar mengisi ruang tanpa gepeng */
    object-position: center; /* Memastikan titik fokus gambar ada di tengah */
    display: block;
}

.card-bodyterkait {
    flex-grow: 1; /* Memaksa body untuk mengisi ruang sisa */
    padding: 0 15px 15px 15px; /* Sesuaikan padding */
}

.card-body h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 15px; color: var(--dark); }
.card-body p { font-size: 0.9rem; color: #666; line-height: 1.5; }

/* 4. Halaman Konten Detail (Full) */
.detail-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero-image {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.content-body h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; line-height: 1.2; }
.meta-data { color: #888; font-size: 0.9rem; margin-bottom: 30px; border-left: 3px solid var(--accent); padding-left: 10px; }
.content-text { font-size: 1.1rem; line-height: 1.8; color: #444; text-align: justify; }

/* 5. Tombol Kembali & Artikel Terkait */
.btn-back {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
}

.related-header {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    margin-top: 40px;
}

.detail-container .grid-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

.detail-container .card-elegant { padding: 15px; }
.detail-container .card-img-wrapper { height: 160px; }

/* 6. Footer & Responsif */
footer { background: var(--primary); color: white; text-align: center; padding: 30px; margin-top: 50px; }

@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; }
    nav ul { flex-direction: column; }
    .hero-image { height: 250px; }
    .content-body h1 { font-size: 1.8rem; }
}

.news-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Proporsi kiri lebih lebar */
    gap: 20px;
    padding: 40px 8%;
}

.hero-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.hero-card img { width: 100%; height: 400px; object-fit: cover; }

.side-news { display: flex; flex-direction: column; gap: 15px; }

.side-card {
    background: #fff;
    /* Hapus/Komentari jika ada: height: ...; */
    padding: 15px; /* Sesuaikan padding agar tidak terlalu lebar */
    border-radius: 12px;
    display: flex;
    gap: 15px;
    border: 1px solid #eee;
    text-decoration: none;
    color: var(--dark);
    transition: 0.3s;
    align-items: flex-start; /* Mengatur alignment ke atas agar rapi */
}
.side-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.side-card img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }

@media (max-width: 768px) {
    .news-section { grid-template-columns: 1fr; }
}

/* Sembunyikan checkbox & icon di desktop */
#menu-toggle { display: none; }
.menu-icon { display: none; cursor: pointer; font-size: 24px; }

@media (max-width: 768px) {
    /* Pastikan header menggunakan flexbox agar logo dan menu terpisah */
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    /* Memastikan tombol menu (hamburger) berada di sisi kanan */
    .menu-icon {
        display: block;
        margin-left: auto; /* Mendorong tombol ke kanan */
    }

    /* Mengatur posisi dropdown agar muncul di kanan */
    .nav-menu {
        position: absolute;
        top: 60px; /* Sesuaikan dengan tinggi header */
        right: 0;  /* Ini yang memastikan menu muncul dari sisi kanan */
        width: 250px; /* Lebar menu dropdown */
        background: #1a7447;
        box-shadow: -5px 5px 10px rgba(0,0,0,0.1); /* Bayangan sedikit ke kiri */
        display: none;
    }

    /* Menampilkan menu saat diklik */
    #menu-toggle:checked ~ .nav-menu {
        display: block;
    }
}

.box-besar-sambutan {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* Penting untuk teknik float */
}

.foto-koran {
    float: right; /* Foto didorong ke kanan */
    margin-left: 30px; /* Jarak antara foto dan teks */
    margin-bottom: 20px;
    width: 300px; /* Ukuran lebar foto */
}

.foto-koran img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.isi-sambutan-koran {
    text-align: justify;
    line-height: 1.8;
}

/* Responsif: Di HP, jangan biarkan teks mengalir agar tidak sempit */
@media (max-width: 768px) {
    .foto-koran {
        float: none; /* Matikan float di HP */
        width: 100%;
        margin: 0 0 20px 0;
    }
}

.box-utama-sambutan {
    background: #ffffff;
    max-width: 900px;
    margin: 40px auto;
    padding: 50px; /* Ruang di dalam box */
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid #f9f9f9;
}

.foto-wrap {
    float: right; /* Foto diletakkan ke kanan */
    width: 300px;
    margin: 0 0 20px 30px; /* Jarak antara foto dengan teks */
}

.foto-wrap img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.caption-foto {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

.konten-sambutan {
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

/* Penyesuaian HP */
@media (max-width: 768px) {
    .box-utama-sambutan { padding: 25px; }
    .foto-wrap {
        float: none; /* Foto kembali ke tengah di HP */
        width: 100%;
        margin: 0 0 20px 0;
    }
}

.container-visi-misi {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary);
}

/* Mengatur agar kotak berjajar 2 */
.grid-visi-misi {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Membagi dua kolom sama besar */
    gap: 30px; /* Jarak antar kotak */
}

.box-vm {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    border-top: 5px solid var(--primary); /* Aksen warna di atas kotak */
    transition: transform 0.3s ease;
}

.box-vm:hover {
    transform: translateY(-10px); /* Efek melayang saat kursor di atas */
}

.box-vm h3 {
    margin-top: 0;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.box-vm ol {
    padding-left: 20px;
    line-height: 1.8;
}

/* Responsif untuk HP (Menjadi 1 kolom) */
@media (max-width: 768px) {
    .grid-visi-misi {
        grid-template-columns: 1fr; /* Jadi satu baris ke bawah */
    }
}

/* 6. Floating WA */
.float-wa {
    position: fixed; bottom: 30px; right: 30px;
    background: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2000; text-decoration: none; transition: 0.3s;
}
.float-wa:hover { transform: scale(1.1); background: #128c7e; }