/*
Theme Name: LBIH Mandiri Website
Author: Ahmadi Yuli Ananta
Description: Khusus untuk website LBIH Mandiri v1.
Version: 1.0
*/

/* ==========================================================================
   1. RESET & LAYOUT DASAR
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; color: #334155; background-color: #f8fafc; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.bg-light { background-color: #f8fafc; }
.relative-z { position: relative; z-index: 10; }

/* Grid dua kolom umum */
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; align-items: stretch; }
@media (max-width: 992px) { .two-col-grid { grid-template-columns: 1fr; } }


/* ==========================================================================
   2. HEADER & NAVIGASI
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.header-container { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 80px; }

/* Logo Branding */
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-link { display: inline-flex; align-items: center; }
.site-branding .custom-logo { max-height: 50px; width: auto; display: block; }
.site-title-text {
    font-size: 24px; font-weight: 600; color: #0f172a; text-decoration: none; line-height: 1.1;
}
.site-title-text:hover { color: #1d4ed8; }
.site-title { margin: 0; font-size: 24px; font-weight: 800; }
.site-title a { color: #0f172a; text-decoration: none; }
.site-identity { min-width: 0; }
.site-tagline { margin: 2px 0 0; color: #64748b; font-size: 12px; line-height: 1.2; }

.header-right {
    display: flex; align-items: center; justify-content: flex-end;
    flex: 1; gap: 24px; min-width: 0;
}

/* Menu Utama (Desktop) */
.main-navigation { display: flex; justify-content: center; flex: 1; }
.main-navigation .nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; align-items: center; justify-content: center; }
.main-navigation .nav-list li { position: relative; }
.main-navigation .nav-list li a { color: #475569; text-decoration: none; font-weight: 600; font-size: 15px; transition: color 0.2s ease; }
.main-navigation .nav-list li a:hover { color: #1d4ed8; }

.header-social { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-social .social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.header-social .social-icon:hover { transform: translateY(-1px); opacity: 0.9; }
.header-social .social-icon img { width: 16px; height: 16px; object-fit: contain; display: block; }
.header-social .social-icon[aria-label="YouTube"] img { width: 18px; height: 18px; }
.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 86px; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    text-decoration: none; letter-spacing: 0.02em; transition: transform 0.2s ease, opacity 0.2s ease;
}
.social-link:hover { transform: translateY(-1px); opacity: 0.9; }
.social-link.youtube { background: #ff0000; color: #fff; }
.social-link.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4); color: #fff; }
.social-link.tiktok { background: #000000; color: #fff; }

/* Indikator Panah Sub Menu */
.main-navigation .nav-list li.menu-item-has-children > a::after {
    content: " \25BC"; font-size: 10px; margin-left: 6px; opacity: 0.6;
}

/* Sub Menu Dropdown (Desktop) */
.main-navigation .nav-list ul.sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 220px;
    background-color: #ffffff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0; border-top: 3px solid #1d4ed8; padding: 10px 0; margin: 0;
    list-style: none; z-index: 9999;
    opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s ease;
}
.main-navigation .nav-list li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation .nav-list ul.sub-menu li { width: 100%; }
.main-navigation .nav-list ul.sub-menu li a { display: block; padding: 10px 20px; font-size: 14px; font-weight: normal; color: #334155; }
.main-navigation .nav-list ul.sub-menu li a:hover { background-color: #f8fafc; color: #1d4ed8; padding-left: 25px; }

/* Tombol Hamburger Mobile */
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.mobile-menu-toggle .bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #0f172a; transition: all 0.3s ease; }


/* ==========================================================================
   3. HERO SECTION (HALAMAN DEPAN)
   ========================================================================== */
.hero-section {
    position: relative; padding: 28px 0 40px;
    background: linear-gradient(135deg, #0a2342 0%, #123d72 28%, #1f6ea5 52%, #123d72 78%, #0a2342 100%);
    color: #fff; overflow: hidden;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin-bottom: 18px; }
.hero-badge {
    display: inline-block; padding: 5px 15px; font-size: 14px; font-weight: bold;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; margin-bottom: 12px;
}
.hero-title { font-size: 38px; line-height: 1.25; margin-bottom: 14px; }
.hero-desc { font-size: 18px; color: #e2e8f0; line-height: 1.5; margin-bottom: 22px; max-width: 550px; }
.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.btn-hero {
    padding: 12px 25px; border-radius: 50px; text-decoration: none; color: #fff; font-weight: bold;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.3); transition: 0.3s;
}
.btn-hero:hover { background: #fbbf24; border-color: #fbbf24; color: #0f172a; }
.hero-image-box {
    background: rgba(255,255,255,0.05); padding: 15px; border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(5px);
}
.hero-image-box img { width: 100%; height: 320px; object-fit: cover; border-radius: 16px; }


/* ==========================================================================
   4. SECTION KEUNGGULAN & LEMBAGA
   ========================================================================== */
.advantages-wrapper {
    margin-top: 0; margin-bottom: 0; z-index: 20; position: relative;
    background: linear-gradient(135deg, rgba(11,47,95,0.9) 0%, rgba(61,142,216,0.9) 50%, rgba(11,47,95,0.9) 100%);
    border-radius: 20px; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.2); overflow: hidden;
}
.advantages-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.advantage-item { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 15px; padding: 20px; border-right: 1px solid rgba(255,255,255,0.1); }
.advantage-item:last-child { border-right: none; }
.adv-icon { width: 45px; height: 45px; background: rgba(255,255,255,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.adv-icon .dashicons { font-size: 24px; width: 24px; height: 24px; }
.adv-icon-gold { background: #fbbf24; color: #78350f; }
.adv-icon-green { background: #86efac; color: #166534; }
.adv-icon-orange { background: #fdba74; color: #9a3412; }
.adv-icon-pink { background: #f9a8d4; color: #9d174d; }
.adv-text h4 { font-size: 15px; margin: 0 0 5px; color: #fff; }
.adv-text p { font-size: 12px; margin: 0; color: #bae6fd; }

.institutions-section { padding: 18px 0 28px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.institution-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.inst-card { text-align: center; padding: 25px 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 20px; transition: transform 0.3s; }
.inst-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.inst-img-box { display: flex; align-items: center; justify-content: center; width: 200px; height: 200px; margin: 0 auto 15px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 15px; }
.inst-img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inst-card h3 { font-size: 17px; color: #0f172a; margin-bottom: 10px; }
.inst-card p { font-size: 13px; color: #475569; margin-bottom: 15px; min-height: 60px; }
.inst-link { font-size: 13px; font-weight: bold; color: #1d4ed8; text-decoration: none; }


/* ==========================================================================
   5. AGENDA & DONASI
   ========================================================================== */
.agenda-donasi-section { padding: 28px 0; }
.agenda-box, .donasi-box { border-radius: 30px; padding: 22px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); }
.agenda-box { background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%); border: 1px solid #dbeafe; }
.agenda-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; padding-bottom: 15px; }
.agenda-header h2 { font-size: 20px; margin: 0; color: #0f172a; }
.agenda-header a { font-size: 14px; font-weight: bold; color: #1d4ed8; text-decoration: none; }
.agenda-item { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.agenda-thumb { width: 100%; height: 130px; overflow: hidden; background: #dbeafe; color: #1e3a8a; display: flex; align-items: center; justify-content: center; }
.agenda-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-thumb .dashicons { width: 28px; height: 28px; font-size: 28px; }
.agenda-details { padding: 12px 16px 14px 86px; min-height: 90px; }
.agenda-date { position: absolute; top: 106px; left: 14px; width: 56px; background: #1d4ed8; color: #fff; border-radius: 8px; padding: 7px 4px; text-align: center; box-shadow: 0 4px 8px rgba(29,78,216,0.25); }
.agenda-date .day, .agenda-date .month, .agenda-date .year { display: block; font-weight: bold; }
.agenda-date .day { font-size: 23px; line-height: 1; }
.agenda-date .month { font-size: 11px; text-transform: uppercase; margin-top: 3px; }
.agenda-date .year { font-size: 10px; margin-top: 1px; }
.agenda-info h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.3; }
.agenda-info h3 a { color: #0f172a; text-decoration: none; }
.agenda-info p { margin: 0 0 4px; font-size: 13px; line-height: 1.45; color: #64748b; }
.agenda-read-more { font-size: 13px; font-weight: bold; color: #1d4ed8; text-decoration: none; }
.agenda-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.agenda-archive-card { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.agenda-archive-thumb { display: flex; align-items: center; justify-content: center; height: 180px; background: #dbeafe; color: #1e3a8a; overflow: hidden; }
.agenda-archive-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-archive-thumb .dashicons { width: 36px; height: 36px; font-size: 36px; }
.agenda-archive-date { position: absolute; top: 154px; left: 16px; width: 60px; padding: 8px 4px; border-radius: 8px; background: #1d4ed8; color: #fff; text-align: center; box-shadow: 0 4px 8px rgba(29,78,216,0.25); }
.agenda-archive-date .day, .agenda-archive-date .month, .agenda-archive-date .year { display: block; font-weight: bold; }
.agenda-archive-date .day { font-size: 24px; line-height: 1; }
.agenda-archive-date .month { margin-top: 3px; font-size: 11px; text-transform: uppercase; }
.agenda-archive-date .year { margin-top: 1px; font-size: 10px; }
.agenda-archive-content { min-height: 148px; padding: 16px 18px 18px 92px; }
.agenda-archive-content h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
.agenda-archive-content h2 a { color: #0f172a; text-decoration: none; }
.agenda-archive-content p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: #64748b; }
.agenda-archive-link { color: #1d4ed8; font-size: 13px; font-weight: bold; text-decoration: none; }

.donasi-box { display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, #eaf3ff 0%, #dfeefb 100%); border: 1px solid #bfdbfe; }
.donasi-img { flex: 0 0 40%; text-align: center; background: rgba(255,255,255,0.4); padding: 15px; border-radius: 20px; }
.donasi-img img { max-width: 100%; border-radius: 15px; }
.donasi-text h3 { font-size: 18px; color: #0f172a; margin-bottom: 10px; }
.donasi-text p { font-size: 14px; color: #334155; margin-bottom: 20px; }
.btn-primary { display: inline-block; padding: 12px 25px; background: #1d4ed8; color: #fff; text-decoration: none; border-radius: 12px; font-weight: bold; box-shadow: 0 8px 15px rgba(29,78,216,0.2); transition: 0.3s; }
.btn-primary:hover { background: #fbbf24; color: #0f172a; border-color: #fbbf24; }


/* ==========================================================================
   6. BERITA TERBARU & SINGLE POST/PAGE
   ========================================================================== */
.news-section { padding: 28px 0 50px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.section-header h2 { font-size: 28px; margin: 0; color: #0f172a; }
.section-header a { font-weight: bold; color: #1d4ed8; text-decoration: none; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.news-card { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid #e2e8f0; transition: transform 0.3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.news-thumb img, .news-thumb-fallback { width: 100%; height: 220px; object-fit: cover; }
.news-thumb-fallback { display: flex; align-items: center; justify-content: center; background: #1e3a8a; color: #fff; font-size: 20px; font-weight: bold; padding: 20px; }
.news-content { padding: 25px; }
.news-meta { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-bottom: 10px; }
.news-content h3 { font-size: 20px; margin: 0 0 10px; line-height: 1.4; }
.news-content h3 a { color: #0f172a; text-decoration: none; }
.news-content p { font-size: 14px; color: #475569; margin-bottom: 15px; }
.read-more { font-size: 14px; font-weight: bold; color: #1d4ed8; text-decoration: none; }

/* Tampilan Halaman Single Post & Page (single.php & page.php) */
.site-main { min-height: 60vh; padding: 40px 0; }
.single-post, .single-page { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 40px; border: 1px solid #e2e8f0; }
.post-header, .page-header { margin-bottom: 30px; border-bottom: 1px solid #f1f5f9; padding-bottom: 20px; }
.post-header .post-title, .page-header .page-title { color: #0f172a; font-size: 36px; margin-bottom: 15px; line-height: 1.2; }
.post-meta { font-size: 14px; color: #64748b; }
.post-thumbnail img, .page-thumbnail img { max-width: 100%; height: auto; border-radius: 12px; margin-bottom: 30px; display: block; }
.post-content, .page-content { line-height: 1.8; color: #334155; font-size: 17px; }
.post-content h2, .post-content h3 { color: #0f172a; margin: 30px 0 15px; }
.post-content p { margin-bottom: 20px; }
.post-content a { color: #1d4ed8; text-decoration: underline; }
.post-comments { margin-top: 50px; border-top: 1px solid #e2e8f0; padding-top: 30px; }


/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer { background-color: #0f172a; color: #cbd5e1; padding: 40px 0; text-align: center; border-top: 4px solid #1d4ed8; }
.site-footer a { color: #60a5fa; text-decoration: none; }


/* ==========================================================================
   8. RESPONSIVE MOBILE (Layar Kecil)
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 32px; }
    .donasi-box { flex-direction: column; text-align: center; }
}

@media screen and (max-width: 768px) {
    .hero-image-wrapper { justify-self: start; width: 100%; }
    .hero-image-box { margin-left: 0; margin-right: auto; }
    .hero-image-box img { object-position: left center; }

    .header-container { gap: 8px; min-height: 70px; padding: 0 14px; }
    .site-branding { flex: 1 1 auto; min-width: 0; }
    .brand-logo-wrap { gap: 8px; min-width: 0; }
    .site-branding .custom-logo { max-height: 40px; }
    .site-title-text { min-width: 0; font-size: 18px; overflow-wrap: anywhere; }
    .header-right { flex: 0 0 auto; gap: 8px; }
    .header-social { gap: 5px; }
    .header-social .social-icon { width: 30px; height: 30px; }
    .header-social .social-icon img { width: 14px; height: 14px; }
    .header-social .social-icon[aria-label="YouTube"] img { width: 16px; height: 16px; }

    /* Menu Mobile Toggle */
    .mobile-menu-toggle { display: block; flex: 0 0 40px; padding: 7px; }
    
    .main-navigation {
        position: absolute; top: 80px; left: 0; right: 0;
        background-color: #ffffff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-top: 1px solid #e2e8f0;
        max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out;
    }
    .main-navigation.is-active { max-height: 600px; overflow-y: auto; }
    .main-navigation .nav-list { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
    .main-navigation .nav-list li { width: 100%; border-bottom: 1px solid #f1f5f9; }
    .main-navigation .nav-list li a { display: block; padding: 15px 0; }
    
    /* Sub menu mobile */
    .main-navigation .nav-list ul.sub-menu {
        position: relative; top: 0; box-shadow: none; border: none; border-left: 2px solid #e2e8f0; margin-left: 20px; padding-top: 0;
        opacity: 1; visibility: visible; transform: translateY(0); display: none;
    }
    .main-navigation .nav-list li:hover > ul.sub-menu, .main-navigation .nav-list li:active > ul.sub-menu { display: block; }
    
    /* Animasi Hamburger */
    .mobile-menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Single Page Responsiveness */
    .single-post, .single-page { padding: 25px; }
    .post-header .post-title, .page-header .page-title { font-size: 28px; }
}

@media screen and (max-width: 400px) {
    .site-title-text { font-size: 16px; }
    .site-branding .custom-logo { max-height: 34px; }
    .header-social .social-icon { width: 27px; height: 27px; }
    .header-social .social-icon[aria-label="TikTok"] { display: none; }
}

/* ==========================================================================
   9. TAMPILAN LIST ARSIP BERITA (Kiri Kanan)
   ========================================================================== */

.news-list-wrapper { 
    display: flex; 
    flex-direction: column; 
}
.news-list-item { 
    display: flex; 
    gap: 20px; 
    padding: 25px 0; 
    border-bottom: 1px solid #e2e8f0; /* Garis pemisah bawah */
    align-items: flex-start; 
}
/* Hilangkan garis pemisah pada berita paling bawah */
.news-list-item:last-child { 
    border-bottom: none; 
}

/* Pengaturan Gambar Kiri */
.news-list-thumb { 
    flex: 0 0 240px; /* Ukuran gambar pas seperti di contoh */
} 
.news-list-thumb img, .news-list-thumb-fallback { 
    width: 100%; 
    height: 150px; 
    object-fit: cover; 
    border-radius: 8px; /* Lengkungan sudut lebih natural */
    display: block; 
}
.news-list-thumb-fallback { 
    display: flex; align-items: center; justify-content: center; 
    background: #1e3a8a; color: #fff; font-weight: bold; 
}

/* Pengaturan Teks Kanan */
.news-list-content { 
    flex: 1; 
}
.news-list-meta { 
    font-size: 13px; 
    margin-bottom: 8px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}
.news-list-meta .cat-name { 
    color: #0ea5e9; /* Warna Kategori biru cerah */
    font-weight: 700; 
    text-transform: uppercase; /* Huruf Kapital Semua */
}
.news-list-meta .date { 
    color: #94a3b8; 
}

.news-list-content h3 { 
    font-size: 22px; 
    margin: 0 0 10px; 
    line-height: 1.4; 
    font-weight: 700;
}
.news-list-content h3 a { 
    color: #1e293b; 
    text-decoration: none; 
}
.news-list-content h3 a:hover { 
    color: #1d4ed8; 
}
.news-list-content p { 
    font-size: 15px; 
    color: #475569; 
    margin: 0; 
    line-height: 1.6; 
}

/* Responsif untuk Mobile (Layar HP) */
@media screen and (max-width: 768px) {
    .news-list-item { flex-direction: column; gap: 15px; padding: 20px 0; }
    .news-list-thumb { flex: 0 0 auto; width: 100%; }
    .news-list-thumb img, .news-list-thumb-fallback { height: auto; aspect-ratio: 16/9; }
}