/* =====================================================================
   TEMA HARI BESAR - GAYA BERSAMA (dimuat SETELAH tema-modern.css)
   Dipakai semua tema berawalan "hb-" (hari besar nasional & hari besar Islam).
   Tiap tema hanya mengisi variabel warna/ornamen; tata letak ada di sini:
   1. Kolom Kiri   : Teks sambutan, ucapan hari besar, dan tombol aksi
   2. Kolom Tengah : Figur 3D guru/santri dalam bingkai lengkung (Utuh & Tidak Tertutupi)
   3. Kolom Kanan  : Kartu interaktif (Radar Jarak GPS atau Kartu Investasi Wakaf Santri)
   Hanya tampilan (CSS), tidak menyentuh logika PHP.

   Variabel yang diisi tiap tema:
     --primary / --primary-dark / --primary-light / --secondary / --accent
     --badge-bg / --badge-text
     --hb-gold        warna aksen utama (bingkai, garis, tombol)
     --hb-on-gold     warna teks di atas aksen
     --hb-bg          warna latar halaman
     --hb-hero-bg     latar hero (gradasi)
     --hb-hero-pattern  pola samar di hero (url svg)   [opsional]
     --hb-pattern     pola samar di latar halaman       [opsional]
     --hb-garland     hiasan gantung di atas hero       [opsional]
     --hb-font        font judul
     --hb-orn         ornamen di bawah judul seksi
   ===================================================================== */

body.tema-hb {
    --hb-gold: #c9a24b;
    --hb-on-gold: #2b1d05;
    --hb-bg: #f6f8fb;
    --hb-font: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --hb-orn: '\2726  \2726  \2726';
    --hb-line: color-mix(in srgb, var(--hb-gold) 35%, white);
    background-color: var(--hb-bg);
    background-image: var(--hb-pattern, none);
}
body.tema-hb h1, body.tema-hb h2, body.tema-hb h3, body.tema-hb h4,
body.tema-hb .hero-title, body.tema-hb .stat-number { font-family: var(--hb-font); }

/* Bar atas & navigasi */
body.tema-hb .top-bar { background: var(--primary-dark); color: rgba(255, 255, 255, .85); border-bottom: 2px solid var(--hb-gold); }
body.tema-hb .top-bar a { color: #fff; }
body.tema-hb .navbar { background: rgba(255, 255, 255, .94); border-bottom: 3px solid var(--hb-gold); }
body.tema-hb .brand-text h1 { color: var(--primary-dark); }
body.tema-hb .nav-link:hover { color: var(--primary); }

/* ---------- HERO ---------- */
body.tema-hb .hero {
    position: relative; overflow: hidden;
    background: var(--hb-hero-bg, linear-gradient(135deg, var(--primary-dark), var(--primary)));
    padding: 84px 0 92px;
    border-radius: 0 0 48px 48px;
    border-bottom: 4px solid var(--hb-gold);
    color: #fff;
}
/* Pola samar (menimpa foto transparan bawaan) */
body.tema-hb .hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: var(--hb-hero-pattern, none);
    background-size: var(--hb-pattern-size, 90px 90px);
    background-position: center; background-repeat: repeat;
    opacity: var(--hb-pattern-opacity, .55);
}
/* Hiasan gantung di tepi atas */
body.tema-hb .hero::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; z-index: 1; pointer-events: none;
    height: var(--hb-garland-h, 100px);
    background: var(--hb-garland, none) repeat-x center top / auto 100%;
}

/* Container diperlebar agar 3 kolom tampil leluasa, megah, dan berimbang */
body.tema-hb .hero > .container,
body.tema-hb .hero-container-wide {
    position: relative; z-index: 2;
    max-width: 1420px;
    width: 95%;
    margin: 0 auto;
}

body.tema-hb .hero-title { font-size: clamp(26px, 3.2vw, 42px); font-weight: 800; line-height: 1.18; }
body.tema-hb .hero-title span { color: var(--hb-gold); filter: brightness(1.18); }
body.tema-hb .hero-subtitle { font-size: 15px; max-width: 520px; line-height: 1.6; color: rgba(255, 255, 255, .92); }
body.tema-hb .hero-badge { border-color: color-mix(in srgb, var(--hb-gold) 65%, transparent); border-radius: 999px; }
body.tema-hb .btn-hero-primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--hb-gold) 82%, white), var(--hb-gold));
    color: var(--hb-on-gold); border-color: transparent;
}
body.tema-hb .btn-hero-primary:hover { filter: brightness(1.07); color: var(--hb-on-gold); }

/* Kotak ucapan hari besar */
.hb-ucapan { display: none; }
body.tema-hb .hb-ucapan {
    display: inline-flex; align-items: center; gap: 14px;
    margin: 4px 0 18px; padding: 9px 18px 9px 10px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid color-mix(in srgb, var(--hb-gold) 70%, transparent);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .45);
    animation: hbMuncul .7s ease both;
}
body.tema-hb .hb-ucapan-ikon {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--hb-gold) 80%, white), var(--hb-gold));
    color: var(--hb-on-gold); font-size: 19px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .14);
}
body.tema-hb .hb-ucapan-teks { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
body.tema-hb .hb-ucapan-teks small {
    font: 700 11px/1.2 'Plus Jakarta Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase;
    color: color-mix(in srgb, var(--hb-gold) 75%, white);
}
body.tema-hb .hb-ucapan-teks strong { font-family: var(--hb-font); font-size: clamp(15px, 1.8vw, 20px); font-weight: 700; color: #fff; }
@keyframes hbMuncul { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- TATA LETAK 3 KOLOM HERO HARI BESAR ---------- */
/*
   1. Kolom Kiri   (1.25fr): Teks Sambutan, Badge, Ucapan, & Tombol Aksi
   2. Kolom Tengah (0.8fr) : Figur 3D Guru/Santri dalam Bingkai Lengkung (Utuh & Mandiri)
   3. Kolom Kanan  (1fr)   : Kartu Interaktif (Radar Jarak GPS atau Kartu Investasi Wakaf)
*/
body.tema-hb .hero-grid,
body.tema-hb .hero-grid-3col {
    display: grid !important;
    grid-template-columns: 1.25fr 0.8fr 1fr !important;
    gap: 28px !important;
    align-items: center !important;
}

body.tema-hb .hero-col-text {
    z-index: 2;
    text-align: left;
}

/* Kolom 2: Bingkai Lengkung Figur 3D di Tengah */
body.tema-hb .hero-col-figure {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

body.tema-hb .hb-figure-arch {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 480px;
    border-radius: 240px 240px 28px 28px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .42) 100%),
        var(--foto-hero) center 4% / cover no-repeat,
        var(--hb-frame-bg, rgba(255, 255, 255, .85));
    border: 6px solid var(--hb-gold);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, .18),
        0 35px 65px -18px rgba(0, 0, 0, .55);
    transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .35s ease;
}

body.tema-hb .hb-figure-arch:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, .25),
        0 42px 75px -16px rgba(0, 0, 0, .65);
}

/* Kolom 3: Kartu Radar Jarak GPS / Kartu Wakaf Mandiri di Sebelah Kanan */
body.tema-hb .hero-col-card {
    z-index: 3;
    display: flex;
    justify-content: center;
}

body.tema-hb .hero-col-card .radar-card {
    width: 100%;
    max-width: 400px;
    border-radius: 22px;
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, .35);
}

/* Tampilkan informasi jarak radius GPS secara lengkap tanpa dipotong */
body.tema-hb .hero-col-card .radar-info-row {
    display: flex;
}

/* ---------- STATISTIK & SEKSI ---------- */
body.tema-hb .stats-grid { margin-top: 36px; gap: 16px; }
body.tema-hb .stat-card {
    background: #fff; border: 1px solid var(--hb-line); border-bottom: 4px solid var(--hb-gold);
    border-radius: 20px; box-shadow: 0 10px 30px -14px rgba(15, 23, 42, .2);
}
body.tema-hb .stat-number {
    background: none; -webkit-text-fill-color: var(--primary-dark); color: var(--primary-dark);
    font-weight: 800; font-size: 40px;
}
body.tema-hb .section-header { text-align: center; }
body.tema-hb .section-tag {
    background: var(--primary) !important; color: #fff !important;
    border-radius: 999px; padding: 5px 16px; font-weight: 700;
}
body.tema-hb .section-title { color: var(--primary-dark); }
body.tema-hb .section-title::after {
    content: var(--hb-orn); display: block; margin-top: 6px;
    font-size: 12px; letter-spacing: 6px; color: var(--hb-gold); font-family: sans-serif;
}
body.tema-hb #berita, body.tema-hb #galeri { background: rgba(255, 255, 255, .88) !important; }
body.tema-hb #guru { background: color-mix(in srgb, var(--primary) 7%, white) !important; }
body.tema-hb .about-card, body.tema-hb .guru-card,
body.tema-hb .portal-bar-card, body.tema-hb .magazine-hub-card {
    background: #fff; border: 1px solid var(--hb-line); border-top: 4px solid var(--primary);
    border-radius: 20px; box-shadow: 0 10px 30px -16px rgba(15, 23, 42, .22);
}
body.tema-hb #berita article { border: 1px solid var(--hb-line) !important; border-radius: 20px !important; }
body.tema-hb .guru-avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--hb-gold); }
body.tema-hb .footer { background: linear-gradient(180deg, var(--primary-dark), #0b1220); border-top: 4px solid var(--hb-gold); }

/* ---------- RESPONSIF HERO 3 KOLOM ---------- */
/* ---------- RESPONSIF HERO 3 KOLOM SEJAJAR (LAPTOP & DESKTOP: >= 768px) ---------- */
/* Pertahankan 3 kolom sejajar berdampingan: Teks (kiri) - Figur (tengah) - Kartu (kanan) */
@media (min-width: 768px) {
    body.tema-hb .hero-grid,
    body.tema-hb .hero-grid-3col {
        display: grid !important;
        grid-template-columns: 1.15fr 0.78fr 0.95fr !important;
        gap: clamp(12px, 1.8vw, 28px) !important;
        align-items: center !important;
    }
    body.tema-hb .hero-col-text {
        grid-column: auto !important;
        text-align: left !important;
        max-width: 100% !important;
    }
    body.tema-hb .hero-title {
        font-size: clamp(20px, 2.3vw, 38px) !important;
        line-height: 1.2 !important;
    }
    body.tema-hb .hero-subtitle {
        font-size: clamp(12.5px, 1.15vw, 15px) !important;
        max-width: 480px !important;
        margin: 0 0 16px 0 !important;
    }
    body.tema-hb .hero-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }
    body.tema-hb .btn-hero {
        padding: clamp(8px, 1vw, 11px) clamp(11px, 1.2vw, 16px) !important;
        font-size: clamp(11.5px, 1.05vw, 13.5px) !important;
    }
    body.tema-hb .hero-col-figure {
        grid-column: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    body.tema-hb .hb-figure-arch {
        width: 100% !important;
        max-width: clamp(200px, 20vw, 300px) !important;
        height: clamp(310px, 31vw, 450px) !important;
        margin: 0 auto !important;
    }
    body.tema-hb .hero-col-card {
        grid-column: auto !important;
        display: flex !important;
        justify-content: center !important;
    }
    body.tema-hb .hero-col-card .radar-card {
        width: 100% !important;
        max-width: clamp(260px, 26vw, 380px) !important;
        padding: clamp(14px, 1.4vw, 22px) !important;
        margin: 0 auto !important;
    }
}

/* Layar HP Smartphone (< 768px): 1 Kolom Bersih Bertingkat (Teks -> Figur 3D -> Kartu Terpisah di Bawah) */
@media (max-width: 767px) {
    body.tema-hb .hero {
        padding: 50px 0 40px;
    }
    body.tema-hb .hero-grid,
    body.tema-hb .hero-grid-3col {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }
    body.tema-hb .hero-col-text {
        order: 1;
        text-align: center;
    }
    body.tema-hb .hero-subtitle {
        margin: 0 auto 18px;
    }
    body.tema-hb .hero-actions {
        justify-content: center;
    }
    body.tema-hb .hero-col-figure {
        order: 2;
    }
    body.tema-hb .hero-col-card {
        order: 3;
    }
    body.tema-hb .hb-figure-arch {
        max-width: 250px;
        height: 360px;
        margin: 0 auto;
    }
    body.tema-hb .hero-col-card .radar-card {
        max-width: 400px;
        margin: 0 auto;
    }
    body.tema-hb .hb-ucapan {
        text-align: left;
    }
}

@media (max-width: 520px) {
    body.tema-hb .hb-figure-arch {
        max-width: 240px;
        height: 340px;
        border-radius: 190px 190px 22px 22px;
    }
    body.tema-hb .hb-ucapan {
        padding-right: 16px;
    }
    body.tema-hb .hb-ucapan-ikon {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }
}
