/* PPDB Mu'allimin Sawah Dangka - custom tweaks on top of Bootstrap 5.3 */
:root {
    --navy: #1b365d;
    --emerald: #0f5132;
    --gold: #d4af37;
    --soft: #f8f9fa;
    --soft-2: #f4f6f9;
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--bs-body-font-family); background: var(--soft); color: #2b2f36; }
section[id] { scroll-margin-top: 72px; }

.text-navy { color: var(--navy) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-gold { color: var(--gold) !important; }
.bg-soft { background: var(--soft-2); }
.w-40 { width: 40%; }

/* Navbar */
.navbar-ppdb { background: var(--navy); box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.navbar-ppdb .navbar-brand { color: #fff; font-weight: 600; }
.navbar-ppdb .nav-link { color: rgba(255,255,255,.8); font-weight: 500; position: relative; }
.navbar-ppdb .nav-link:hover, .navbar-ppdb .nav-link.active { color: var(--gold); }
.navbar-ppdb .navbar-toggler-icon { filter: invert(1); }

/* Buttons & badges */
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1b1b1b; font-weight: 600; }
.btn-gold:hover { background: #bf9b2c; border-color: #bf9b2c; color: #000; }
.btn-outline-navy { border: 2px solid var(--navy); color: var(--navy); font-weight: 600; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.badge-gold { background: rgba(212,175,55,.18); color: #8a6d0f; font-weight: 600; padding: .5em .8em; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-title { color: var(--navy); font-weight: 700; margin-bottom: 2.5rem; position: relative; }
.section-title::after { content: ''; display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--gold); margin: .75rem auto 0; }

/* Cards */
.card { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 .75rem 1.5rem rgba(27,54,93,.12) !important; }
.card-active { border: 2px solid var(--emerald) !important; }

/* Hero */
.hero-section { padding: 3rem 0 4rem; background: linear-gradient(180deg, #e9eef5 0%, var(--soft) 100%); }
.hero-title { color: var(--navy); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.5rem); }
.hero-img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.hero-placeholder { min-height: 320px; height: 100%; display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--navy), var(--emerald)); font-size: .9rem; }
.hero-placeholder i { font-size: 3rem; opacity: .7; }

/* Mudir */
.avatar-mudir { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 0 0 3px var(--gold), 0 .5rem 1rem rgba(0,0,0,.12); }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: #dfe5ee; color: #98a3b5; font-size: 5rem; }
.speech { border-left: 4px solid var(--gold); padding-left: 1.25rem; margin: 0; font-size: 1.02rem; line-height: 1.8; color: #444; }

/* Booklet */
.booklet-callout { background: linear-gradient(120deg, var(--navy), var(--emerald)); color: #fff; }
.booklet-img { max-height: 260px; max-width: 100%; border-radius: .75rem; box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.35); }

/* Tables */
.table-navy th { background: var(--navy) !important; color: #fff !important; border: 0; }

/* Steps */
.step-list li { display: flex; gap: .85rem; align-items: center; margin-bottom: .9rem; position: relative; }
.step-num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--emerald); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .9rem; }
.path-item { padding: .55rem 0; border-bottom: 1px dashed #dde2ea; }
.path-item:last-child { border-bottom: 0; }

/* Fee highlight */
.fee-card { background: linear-gradient(160deg, var(--emerald), #0b3d26); color: #fff; }

/* Footer */
.footer-ppdb { background: var(--navy); color: #fff; }
.wa-link { color: #fff; text-decoration: none; }
.wa-link:hover { color: var(--gold); }
.wa-icon { width: 42px; height: 42px; border-radius: 50%; background: #25d366; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.social-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .2s; }
.social-btn:hover { background: var(--gold); color: #000; }
.qr-img { width: 140px; height: 140px; object-fit: contain; background: #fff; padding: 6px; border-radius: .5rem; }

@media (max-width: 575.98px) {
    .section { padding: 3rem 0; }
    .avatar-mudir { width: 140px; height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card { transition: none; }
}

/* Video & map embeds */
.map-ratio { --bs-aspect-ratio: 42%; }
.map-ratio iframe { border: 0; }
@media (max-width: 767.98px) { .map-ratio { --bs-aspect-ratio: 80%; } }

/* Jalur: clickable accordion rows (match the dashed list look) */
.path-accordion .accordion-item { background: transparent; border: 0; border-bottom: 1px dashed #dde2ea; border-radius: 0; }
.path-accordion .accordion-item:last-child { border-bottom: 0; }
.path-accordion .accordion-button { background: transparent; box-shadow: none; padding: .65rem 0; color: var(--navy); font-weight: 500; font-size: 1rem; }
.path-accordion .accordion-button:not(.collapsed) { color: var(--emerald); background: transparent; }
.path-accordion .accordion-button:focus { box-shadow: none; }
.path-accordion .accordion-button::after { background-size: 1rem; }
.path-accordion .accordion-body { padding: 0 0 .9rem; border-left: 3px solid var(--gold); padding-left: .9rem; margin-bottom: .5rem; }

/* hints only shown to a logged-in admin */
.admin-hint { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.25rem; border: 2px dashed var(--gold); background: #fffaf0; border-radius: .75rem; color: #6b5a1e; font-size: .92rem; }
.admin-hint > i { font-size: 1.8rem; color: var(--gold); }
.path-accordion .accordion-button { cursor: pointer; }
.path-accordion .accordion-button:hover { color: var(--emerald); }

/* Hero carousel: fixed frame, photos are cropped to fill it (size of the file no longer matters) */
.hero-carousel { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #dfe5ee; }
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item { height: 100%; }
.hero-carousel .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
@media (min-width: 992px) {
    .hero-media { position: relative; min-height: 380px; }
    .hero-media .hero-carousel { position: absolute; inset: 0; aspect-ratio: auto; }
}

/* Pengumuman: long text is clamped until "Baca selengkapnya" */
.news-body.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-toggle { color: var(--emerald); font-weight: 500; text-decoration: none; }

/* Floating WhatsApp button */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 1030; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; box-shadow: 0 6px 18px rgba(0,0,0,.28); text-decoration: none; transition: transform .2s; }
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* Gallery */
.gallery-item { display: block; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: .75rem; box-shadow: 0 .25rem .75rem rgba(27,54,93,.12); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-cap { position: absolute; inset: auto 0 0 0; padding: 1.4rem .75rem .55rem; color: #fff; font-size: .8rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
@media (prefers-reduced-motion: reduce) { .gallery-item img, .wa-float { transition: none; } }

/* numbered steps: keep the number at the first line when the text wraps */
.step-list li { align-items: flex-start; }
.step-num { margin-top: .1rem; }

/* Formatted text (FAQ answers, announcements, jalur details) */
.rich p { margin: 0 0 .6rem; }
.rich ol, .rich ul { margin: 0 0 .6rem; padding-left: 1.3rem; }
.rich li { margin-bottom: .25rem; }
.rich a { color: var(--emerald); text-decoration: underline; }
.rich > :last-child { margin-bottom: 0; }
/* clamp by height so it also works with lists/paragraphs inside */
.news-body.clamped { display: block; -webkit-line-clamp: unset; max-height: 7.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* ===== Hero banner (full-width carousel + overlay text) ===== */
.hero-banner { position: relative; color: #fff; background: #12294a; overflow: hidden; display: flex; align-items: center;
    min-height: clamp(480px, 64vh, 660px); padding: 5.5rem 0 7rem; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg .carousel, .hero-bg .carousel-inner, .hero-bg .carousel-item { height: 100%; }
.hero-bg .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
.hero-bg-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(212,175,55,.28), transparent 45%), linear-gradient(135deg, #1b365d, #0f5132); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,41,74,.94) 0%, rgba(18,41,74,.78) 48%, rgba(18,41,74,.2) 100%); }
.hero-bg .carousel-indicators { bottom: 4.6rem; margin: 0 2rem 0 0; justify-content: flex-end; z-index: 3; }
.hero-content { position: relative; z-index: 2; }
.hero-copy { max-width: 640px; }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .95rem; margin-bottom: 1.1rem; border-radius: 999px; font-weight: 600; font-size: .85rem;
    color: #f2d675; background: rgba(212,175,55,.16); border: 1px solid rgba(212,175,55,.45); }
.hero-h1 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); font-weight: 700; line-height: 1.15; margin-bottom: 1rem; }
.hero-lead { font-size: 1.05rem; opacity: .93; margin-bottom: 1.75rem; max-width: 36rem; }
@media (max-width: 767.98px) {
    .hero-banner { padding: 3.5rem 0 6rem; }
    .hero-overlay { background: linear-gradient(180deg, rgba(18,41,74,.82), rgba(18,41,74,.93)); }
    .hero-bg .carousel-indicators { margin-right: 1rem; }
}

/* stats strip floating under the banner */
.stats-wrap { position: relative; z-index: 5; margin-top: -3.4rem; }
.stat-box { height: 100%; text-align: center; padding: 1.15rem 1rem; background: #fff; border-radius: 1rem; border-top: 4px solid var(--gold); box-shadow: 0 .75rem 1.75rem rgba(27,54,93,.14); }
.stat-num { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.1; color: var(--navy); }
.stat-label { margin-top: .3rem; font-size: .82rem; color: #6b7686; }
.info-card { border-left: 5px solid var(--gold) !important; }

/* small uppercase label above section titles */
.section-head { text-align: center; }
.section-kicker { display: block; margin-bottom: .4rem; font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--emerald); }

/* =====================================================================
   v2 look: light navbar, flush stats bar, tagline band, pill kickers,
   program / path cards, 3-column footer
   ===================================================================== */

/* navbar */
.nav-light { background: #fff; box-shadow: 0 2px 14px rgba(27,54,93,.1); padding-top: .55rem; padding-bottom: .55rem; }
.brand-block { display: flex; align-items: center; gap: .7rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-label { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #6b7686; }
.brand-text strong { color: var(--navy); font-size: 1.05rem; }
.brand-sub { font-size: .7rem; color: #6b7686; }
.nav-light .nav-link { color: var(--navy); font-weight: 600; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; }
.nav-light .nav-link:hover, .nav-light .nav-link.active { color: var(--emerald); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.btn-navy:hover { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.nav-light .btn-outline-navy { border-width: 1.5px; }

/* hero: a bit lower, dots centred, glass secondary button, filled pill */
.hero-banner { min-height: clamp(420px, 58vh, 560px); padding: 4rem 0 4.5rem; }
.hero-bg .carousel-indicators { bottom: .9rem; margin: 0; justify-content: center; }
.hero-bg .carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; border: 0; margin: 0 4px; }
.hero-kicker { background: var(--emerald); color: #fff; border: 0; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; }
.btn-glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.45); color: #fff; backdrop-filter: blur(3px); font-weight: 600; }
.btn-glass:hover { background: rgba(255,255,255,.26); color: #fff; }

/* stats: flush white strip under the banner */
.stats-bar { background: #fff; border-bottom: 1px solid #e9edf3; }
.stat-cell { text-align: center; padding: 1.15rem .5rem; }
.stat-cell .stat-num { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; color: var(--emerald); line-height: 1.1; }
.stat-cell .stat-label { margin-top: .25rem; font-size: .78rem; color: #6b7686; }
@media (min-width: 992px) { .stat-cell + .stat-cell { border-left: 1px solid #e9edf3; } }

/* tagline band */
.tagline-band { background: linear-gradient(135deg, #0f5132 0%, #0b3d26 100%); color: #fff; padding: 3.5rem 0; }
.tagline-title { font-size: clamp(1.5rem, 3.6vw, 2.5rem); font-weight: 700; line-height: 1.25; margin-bottom: .9rem; }
.tagline-title::before { content: '\201C'; color: var(--gold); margin-right: .15em; }
.tagline-title::after { content: '\201D'; color: var(--gold); margin-left: .1em; }
.tagline-text { max-width: 46rem; margin: 0 auto; opacity: .92; font-size: 1.05rem; }

/* about split */
.about-title { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--navy); margin-bottom: 1.25rem; }
.about-line { width: 38px; height: 3px; border-radius: 3px; background: var(--emerald); flex: none; }
.about-text { color: #4b5563; font-size: 1.02rem; line-height: 1.85; }
.about-highlight { margin-top: 1.25rem; padding: .85rem 1.1rem; border-left: 4px solid var(--emerald); background: rgba(15,81,50,.07); color: var(--emerald); font-weight: 600; border-radius: 0 .5rem .5rem 0; display: inline-block; }
.about-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 1.25rem; box-shadow: 0 1rem 2.25rem rgba(27,54,93,.18); }

/* section headings: pill kicker + title + optional description (no underline bar) */
.section-title::after { display: none; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head .section-title { margin: 0 0 .6rem; }
.section-head .section-title:last-child { margin-bottom: 0; }
.section-kicker { display: inline-block; margin-bottom: .7rem; padding: .28rem .85rem; border-radius: 999px; background: rgba(15,81,50,.1); color: var(--emerald);
    font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-desc { max-width: 44rem; margin: 0 auto; color: #6b7686; }

/* program cards */
.program-card { height: 100%; padding: 1.6rem; background: #fff; border: 1px solid #edf0f5; border-radius: 1rem; box-shadow: 0 .25rem .9rem rgba(27,54,93,.06); transition: transform .2s, box-shadow .2s; }
.program-card:hover { transform: translateY(-3px); box-shadow: 0 .75rem 1.5rem rgba(27,54,93,.12); }
.program-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: .85rem; margin-bottom: 1rem; font-size: 1.4rem; color: var(--navy); background: rgba(27,54,93,.09); }
.program-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: .3rem; }
.program-card p { margin: 0; font-size: .85rem; color: var(--emerald); }

/* path cards */
.path-card { display: flex; align-items: center; gap: .9rem; width: 100%; height: 100%; padding: 1rem 1.15rem; text-align: left; background: #fff; border: 1px solid #edf0f5; border-radius: 1rem; box-shadow: 0 .25rem .9rem rgba(27,54,93,.06); color: inherit; }
.path-card.is-link { cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.path-card.is-link:hover { transform: translateY(-3px); border-color: rgba(212,175,55,.7); box-shadow: 0 .75rem 1.5rem rgba(27,54,93,.12); }
.path-icon { display: inline-flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(15,81,50,.1); color: var(--emerald); font-size: 1.2rem; }
.path-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.path-meta strong { color: var(--navy); font-size: 1rem; }
.path-meta small { color: #7a869a; font-size: .76rem; }
.path-arrow { margin-left: auto; color: var(--gold); }

/* footer */
.foot-h { color: var(--gold); font-weight: 700; font-size: 1rem; margin-bottom: .9rem; }
.btn-wa { background: #25d366; border: 0; color: #fff; font-weight: 600; border-radius: 999px; padding: .55rem 1.1rem; }
.btn-wa:hover { background: #1fb457; color: #fff; }
.foot-list li { display: flex; gap: .7rem; margin-bottom: .6rem; opacity: .9; }
.foot-list i { color: var(--gold); margin-top: .15rem; }
.foot-list a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.social-btn { border-radius: .65rem; width: 40px; height: 40px; }

/* titles: no duplicate pill label, keep the small gold accent bar */
.section-title::after { display: block; }
/* hero: stronger dark side for readable text; darker glass button */
.hero-overlay { background: linear-gradient(90deg, rgba(18,41,74,.96) 0%, rgba(18,41,74,.85) 50%, rgba(18,41,74,.3) 100%); }
.btn-glass { background: rgba(18,41,74,.55); border-color: rgba(255,255,255,.55); }
.btn-glass:hover { background: rgba(18,41,74,.8); }

/* countdown chip in the hero */
.hero-countdown { display: inline-flex; align-items: center; gap: .5rem; margin: -.5rem 0 1.25rem; padding: .35rem .95rem; border-radius: 999px; font-size: .9rem;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32); }
.hero-countdown i { color: var(--gold); }

/* ---- Tombol Daftar / Masuk per jenjang (MA & MTs) ---- */
.hero-level-actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.hero-level-group { display: flex; flex-direction: column; gap: .4rem; }
.hero-level-label { color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.nav-level-menu { border: 0; border-radius: .6rem; box-shadow: 0 8px 24px rgba(18,41,74,.18); min-width: 11rem; }
.nav-level-menu .dropdown-item { font-weight: 500; color: var(--navy); }
.nav-level-menu .dropdown-item:hover { background: var(--navy); color: #fff; }
.nav-light .dropdown-toggle::after { margin-left: .4em; }
@media (max-width: 575.98px) {
    .hero-level-actions { gap: .8rem; }
    .hero-level-group .btn-lg { padding: .55rem 1rem !important; font-size: 1rem; }
}
