/* 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; }
