/* =====================================================================
   assets/css/style.css  -  Tema Hijau Islami (Frontend Publik)
   Palet: Dark Green #0f5132 | Emerald #198754 | Cream #faf6ec | Gold #c9a24b
   ===================================================================== */

:root {
  --green-950: #08331f;
  --green-900: #0f5132;
  --green-800: #146c43;
  --green-700: #198754;
  --green-100: #d1e7dd;
  --green-50:  #eef7f2;
  --cream:     #faf6ec;
  --cream-2:   #f3ecd9;
  --gold:      #c9a24b;
  --ink:       #1f2d27;
  --muted:     #62736b;
  --radius:    16px;
  --shadow:    0 10px 30px rgba(15, 81, 50, .12);
  --shadow-lg: 0 18px 45px rgba(15, 81, 50, .22);

  /* pola bintang islami (SVG, transparan) */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M40 6l8.5 20.5L69 20l-6.5 21L80 40l-17.5-1L69 60l-20.5-6.5L40 74l-8.5-20.5L11 60l6.5-21L0 40l17.5 1L11 20l20.5 6.5z'/%3E%3C/g%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
}
h1, h2, h3, h4, h5 { font-weight: 700; color: var(--green-900); }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }
.arabic { font-family: 'Amiri', 'Scheherazade New', serif; direction: rtl; line-height: 2; }

/* ---------- Tombol ---------- */
.btn { border-radius: 50px; font-weight: 600; padding: .65rem 1.5rem; transition: all .25s; }
.btn-emerald { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-emerald:hover { background: var(--green-900); border-color: var(--green-900); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #3a2c05; }
.btn-gold:hover { background: #b88f38; border-color: #b88f38; color: #2a1f03; transform: translateY(-2px); }
.btn-outline-light:hover { color: var(--green-900); }

/* ---------- Top bar & Navbar ---------- */
.topbar { background: var(--green-950); color: #cfe8db; font-size: .82rem; }
.topbar a { color: #cfe8db; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .bismillah { font-size: 1.35rem; color: var(--gold); line-height: 1.6; }

.navbar-main { background: rgba(255,255,255,.96); backdrop-filter: blur(8px); box-shadow: 0 2px 18px rgba(15,81,50,.08); transition: padding .25s; }
.navbar-main.scrolled { padding-top: .25rem; padding-bottom: .25rem; }
.navbar-brand { display: flex; align-items: center; gap: .7rem; color: var(--green-900); font-weight: 700; line-height: 1.2; }
.navbar-brand small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; display: grid; place-items: center; font-size: 1.5rem; flex: 0 0 auto; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.navbar-main .nav-link { color: var(--ink); font-weight: 500; font-size: .92rem; padding: .6rem .8rem !important; border-radius: 8px; }
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--green-700); background: var(--green-50); }
.dropdown-menu { border: 0; border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem; }
.dropdown-item { border-radius: 8px; font-size: .9rem; padding: .5rem .9rem; }
.dropdown-item:hover { background: var(--green-50); color: var(--green-900); }
@media (min-width: 992px) { .navbar .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 640px; color: #fff; overflow: hidden; background: var(--green-900); }
.hero .carousel, .hero .carousel-inner, .hero .carousel-item { position: absolute; inset: 0; height: 100%; }
.hero .carousel-item { background-size: cover; background-position: center; }
.hero .carousel-item.no-photo { background: linear-gradient(135deg, var(--green-950), var(--green-800) 60%, var(--green-700)); }
.hero::before { /* gradasi hijau islami di atas foto */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(115deg, rgba(8,51,31,.94) 0%, rgba(15,81,50,.82) 45%, rgba(25,135,84,.45) 100%);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background-image: var(--pattern); opacity: .9; pointer-events: none; }
.hero-content { position: relative; z-index: 2; padding: 6rem 0 7rem; }
.hero .ayat { font-size: 2rem; color: var(--gold); margin-bottom: .2rem; }
.hero .ayat-arti { font-size: .88rem; color: #cfe8db; font-style: italic; margin-bottom: 1.5rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.2; }
.hero .lead { color: #e4f3eb; max-width: 560px; }
.hero .carousel-indicators { z-index: 3; margin-bottom: 1.5rem; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; line-height: 0; }
.hero-wave svg { width: 100%; height: 70px; display: block; }
.badge-soft { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; font-weight: 500; padding: .5rem 1rem; border-radius: 50px; }

/* ---------- Section umum ---------- */
.section { padding: 5rem 0; }
.section-cream { background: var(--cream); }
.section-green { background: var(--green-50); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title .eyebrow { display: inline-block; color: var(--green-700); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin: .35rem 0 .6rem; }
.section-title .ornament { display: inline-flex; align-items: center; gap: .6rem; color: var(--gold); }
.section-title .ornament::before, .section-title .ornament::after { content: ""; width: 56px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.section-title .ornament::after { transform: scaleX(-1); }
.section-title p { color: var(--muted); max-width: 620px; margin: .6rem auto 0; }

.card-soft { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; height: 100%; transition: transform .25s, box-shadow .25s; }
.card-soft:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.icon-circle { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; margin-bottom: 1rem; }

/* ---------- Sambutan ---------- */
.pimpinan-photo { width: 100%; max-width: 330px; aspect-ratio: 4/5; border-radius: 24px; background: linear-gradient(160deg, var(--green-900), var(--green-700)); display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: 6rem; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; margin: 0 auto; }
.pimpinan-photo img { width: 100%; height: 100%; object-fit: cover; }
.pimpinan-frame { position: relative; max-width: 330px; margin: 0 auto; }
.pimpinan-frame::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 3px solid var(--gold); border-radius: 24px; z-index: 0; }
.pimpinan-frame .pimpinan-photo { position: relative; z-index: 1; }
.quote-box { border-left: 4px solid var(--gold); padding-left: 1.2rem; }

/* ---------- Profil / Kurikulum ---------- */
.misi-list { list-style: none; padding: 0; margin: 0; }
.misi-list li { position: relative; padding: .5rem 0 .5rem 2.2rem; }
.misi-list li::before { content: "\F26A"; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: .5rem; color: var(--green-700); font-size: 1.25rem; }
.teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-avatar { overflow: hidden; width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, var(--green-900), var(--green-700)); border: 4px solid var(--green-100); }
.table-silabus thead th { background: var(--green-900); color: #fff; font-weight: 600; border: 0; }
.table-silabus tbody td { vertical-align: middle; }

/* ---------- Galeri foto ---------- */
.gallery-item { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: var(--green-100); cursor: pointer; box-shadow: var(--shadow); border: 0; padding: 0; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .caption { position: absolute; inset: auto 0 0 0; padding: 2rem 1rem .8rem; color: #fff; text-align: left; background: linear-gradient(to top, rgba(8,51,31,.92), transparent); opacity: 0; transform: translateY(10px); transition: all .3s; }
.gallery-item:hover .caption { opacity: 1; transform: none; }
.gallery-item .tag { font-size: .7rem; background: var(--gold); color: #3a2c05; border-radius: 50px; padding: .1rem .6rem; font-weight: 600; }
.gallery-item .title { display: block; font-weight: 600; font-size: .9rem; margin-top: .25rem; }

/* ---------- Video ---------- */
.video-card { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); height: 100%; }
.video-thumb { position: relative; display: block; width: 100%; border: 0; padding: 0; background: #000; cursor: pointer; }
.video-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .88; transition: opacity .3s; }
.video-thumb:hover img { opacity: 1; }
.video-thumb .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 66px; height: 66px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-size: 2rem; box-shadow: 0 0 0 10px rgba(25,135,84,.3); transition: transform .25s; }
.video-thumb:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.video-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.video-card.featured .video-thumb .play { width: 84px; height: 84px; font-size: 2.6rem; }

/* ---------- Berita ---------- */
.news-card { border: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-img { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--green-900), var(--green-700)); display: grid; place-items: center; color: rgba(255,255,255,.55); font-size: 3rem; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .card-body { flex: 1; display: flex; flex-direction: column; }
.news-meta { font-size: .78rem; color: var(--muted); }
.news-card h3 { font-size: 1.08rem; line-height: 1.45; }
.news-card h3 a { color: var(--green-900); text-decoration: none; }
.news-card h3 a:hover { color: var(--green-700); }
.article-body { font-size: 1.05rem; line-height: 1.9; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); }

/* ---------- Download ---------- */
.download-table { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.download-table thead th { background: var(--green-900); color: #fff; border: 0; font-weight: 600; padding: 1rem; }
.download-table td { padding: .9rem 1rem; vertical-align: middle; }
.file-icon { width: 42px; height: 42px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 1.3rem; background: var(--green-50); color: var(--green-700); }
.file-icon.pdf { background: #fde8e8; color: #c0392b; }
.file-icon.doc { background: #e5eefc; color: #2b579a; }

/* ---------- PPDB ---------- */
.ppdb-wrap { background: linear-gradient(135deg, var(--green-950), var(--green-800)); position: relative; overflow: hidden; }
.ppdb-wrap::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); }
.ppdb-wrap .container { position: relative; }
.ppdb-info h2, .ppdb-info p, .ppdb-info li { color: #fff; }
.ppdb-info .step { display: flex; gap: .9rem; margin-bottom: 1.1rem; }
.ppdb-info .step .num { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: var(--gold); color: #3a2c05; font-weight: 700; display: grid; place-items: center; }
.ppdb-form { background: #fff; border-radius: 22px; padding: 2rem; box-shadow: var(--shadow-lg); }
.form-label { font-weight: 600; font-size: .86rem; color: var(--green-900); }
.form-control, .form-select { border-radius: 10px; padding: .6rem .9rem; border-color: #cfdcd5; }
.form-control:focus, .form-select:focus { border-color: var(--green-700); box-shadow: 0 0 0 .22rem rgba(25,135,84,.18); }
.hp-field { position: absolute !important; left: -9999px; height: 0; width: 0; overflow: hidden; }

/* ---------- Footer ---------- */
.footer { background: var(--green-950); color: #b9d3c5; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .6; pointer-events: none; }
.footer .container { position: relative; }
.footer h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1.1rem; position: relative; padding-bottom: .6rem; }
.footer h5::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 3px; background: var(--gold); border-radius: 3px; }
.footer a { color: #b9d3c5; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: .45rem; }
.footer .contact-row { display: flex; gap: .75rem; margin-bottom: .8rem; }
.footer .contact-row i { color: var(--gold); margin-top: .25rem; }
.social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-grid; place-items: center; margin-right: .4rem; transition: all .25s; }
.social a:hover { background: var(--gold); color: #3a2c05; transform: translateY(-3px); }
.map-wrap { border-radius: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.12); }
.map-wrap iframe { width: 100%; height: 230px; border: 0; display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }

/* ---------- Floating WA ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 8px 22px rgba(37,211,102,.5); text-decoration: none; animation: pulse 2.4s infinite; }
.wa-float:hover { color: #fff; transform: scale(1.08); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

.page-hero { background: linear-gradient(135deg, var(--green-950), var(--green-800)); color: #fff; padding: 3.5rem 0; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item a { color: #cfe8db; text-decoration: none; }
.page-hero .breadcrumb-item.active { color: #fff; }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: #cfe8db; }

@media (max-width: 991.98px) {
  .hero-content { padding: 4rem 0 6rem; }
  .section { padding: 3.5rem 0; }
  .ppdb-form { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Donasi ---------- */
.bank-card { background: var(--green-50); border: 1px dashed var(--green-700); border-radius: 14px; padding: .9rem 1rem; }
.bank-no { font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; color: var(--green-900); word-break: break-all; }
.qris-img { max-width: 260px; width: 100%; border-radius: 14px; border: 1px solid #dfe9e3; background: #fff; padding: .5rem; }

.donor-card { background: #fff; border-radius: 14px; padding: 1rem; box-shadow: var(--shadow); height: 100%; text-align: center; }
.donor-avatar { width: 46px; height: 46px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--green-900), var(--green-700)); }
.donor-amount { color: var(--green-700); font-weight: 700; font-size: 1.05rem; }
.donor-doa { font-size: .8rem; font-style: italic; color: var(--muted); margin-top: .4rem; }

/* Tab galeri */
.pill-link { background: #fff; color: var(--green-900); border: 1px solid var(--green-100); border-radius: 50px; padding: .55rem 1.4rem; font-weight: 600; }
.pill-link.active, .pill-link:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
