:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --ink: #14231d;
  --muted: #55665f;
  --line: #d5dfda;
  --green: #0d5c46;
  --green-dark: #0b2a20;
  --green-soft: #e1efe9;
  --gold: #b8862b;
  --gold-soft: #f6ecd8;
  --wa: #1f9d55;
  --display: "Literata", Georgia, serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --arab: "Amiri", serif;
  --radius: 12px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.arab { font-family: var(--arab); color: var(--green); font-size: 1.7rem; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--gold); color: #1c1406; border: 0; border-radius: 8px; padding: 11px 20px; font: 600 .92rem var(--body); text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.07); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.btn-outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }

/* Photo slot: shows the real photo when the file exists, pattern otherwise */
.photo { position: relative; background: repeating-linear-gradient(135deg, var(--green-soft) 0 14px, #d3e7de 14px 28px); border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo::after { content: attr(data-label); position: absolute; inset: auto 10px 10px auto; font-size: .7rem; font-weight: 600; color: var(--green); background: rgba(255,255,255,.85); padding: 2px 8px; border-radius: 99px; }
.photo.loaded::after { display: none; }

/* Header */
.topbar { background: var(--green); color: #fff; font-size: .8rem; padding-block: 7px; }
.topbar .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.logo-mark { width: 42px; height: 42px; border-radius: 10px; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--arab); font-size: 1.4rem; flex: none; }
.logo strong { font-family: var(--display); display: block; line-height: 1.1; font-size: 1.02rem; }
.logo small { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.menu { display: flex; gap: 22px; align-items: center; }
.menu a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu a.active, .menu a:hover { color: var(--green); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 600 .85rem var(--body); color: var(--ink); cursor: pointer; }

/* Sections */
.section { padding-block: 56px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 4px; }
.section-head a { font-weight: 600; font-size: .9rem; }

/* Hero */
.hero { padding-block: 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin: 8px 0 14px; }
.hero p { color: var(--muted); max-width: 52ch; }
.hero .photo { aspect-ratio: 4/3; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.slides { position: relative; }
.slide { display: none; }
.slide.active { display: block; }
.dots { display: flex; gap: 6px; margin-top: 20px; }
.dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.dots button.active { background: var(--gold); width: 26px; }

.page-hero { background: var(--green); color: #fff; padding-block: 48px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 6px; }
.page-hero p { color: #d7efe6; max-width: 60ch; margin-top: 10px; }
.page-hero .eyebrow { color: #f0cf8a; }

/* Quick categories */
.quick { background: var(--green-soft); padding-block: 22px; }
.quick .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick a { background: var(--surface); border-radius: 10px; padding: 14px; font-weight: 600; display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
.quick a:hover { outline: 1.5px solid var(--green); }
.quick span.ic { width: 36px; height: 36px; border-radius: 9px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-family: var(--arab); font-size: 1.15rem; flex: none; }
.quick small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; }

/* Program cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .photo { aspect-ratio: 16/9; border-radius: 0; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.08rem; }
.card-body p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.tag { font-size: .7rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }

/* Stats */
.stats { background: var(--green); color: #fff; padding-block: 40px; }
.stats .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; text-align: center; }
.stats b { font-family: var(--display); font-size: 2rem; display: block; font-variant-numeric: tabular-nums; }
.stats span { font-size: .82rem; color: #d7efe6; }

/* Prayer times */
.jadwal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.jadwal div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.jadwal small { color: var(--muted); display: block; }
.jadwal b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.jadwal .now { background: var(--green); border-color: var(--green); color: #fff; }
.jadwal .now small { color: #d7efe6; }

/* News */
.news-item .photo { aspect-ratio: 3/2; }
.news-item small { color: var(--muted); display: block; margin-top: 10px; font-size: .8rem; }
.news-item h3 { font-size: 1.02rem; margin-top: 4px; }
.news-item p { color: var(--muted); font-size: .9rem; margin-top: 6px; }

/* Donation CTA */
.cta { background: var(--gold-soft); border-radius: 16px; padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 6px 0 8px; }
.phone { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); user-select: all; }
.cta-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about .photo { aspect-ratio: 4/3; }
.facts { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 42%; color: var(--muted); font-weight: 500; }
.facts td { font-weight: 600; font-variant-numeric: tabular-nums; }
.prose { max-width: 68ch; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery .photo { aspect-ratio: 1; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { margin-bottom: 10px; }

/* Footer */
.site-footer { background: var(--green-dark); color: #cfe3da; padding-block: 44px 24px; font-size: .9rem; margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer a { color: #cfe3da; text-decoration: none; display: block; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; }
.copy { border-top: 1px solid #1f4436; margin-top: 28px; padding-top: 16px; font-size: .8rem; color: #9fbdb1; }

.wa-float { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--wa); color: #fff; border-radius: 99px; padding: 12px 18px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }

@media (max-width: 860px) {
  .hero, .about, .contact, .cta { grid-template-columns: 1fr; }
  .grid-3, .gallery { grid-template-columns: repeat(2, 1fr); }
  .stats .wrap { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .menu.open { display: flex; }
  .menu a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 10px; }
}
@media (max-width: 560px) {
  .grid-3, .gallery { grid-template-columns: 1fr; }
  .quick .wrap, .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .jadwal { grid-template-columns: repeat(3, 1fr); }
  .cta { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- v2: banner hero, floating quick bar, polish ---------- */
.banner { position: relative; min-height: 540px; display: grid; background: var(--green-dark); color: #fff; overflow: hidden; }
.banner .slide { grid-area: 1 / 1; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; background: linear-gradient(90deg, rgba(8,32,24,.92) 0%, rgba(8,32,24,.7) 45%, rgba(8,32,24,.15) 100%), var(--bg) center/cover no-repeat; padding-block: 72px 120px; }
.banner .slide.active { opacity: 1; visibility: visible; }
.slide-in { width: 100%; }
.slide-in > * { max-width: 600px; }
.banner h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 10px 0 16px; color: #fff; }
.banner p { color: #dcebe5; font-size: 1.05rem; }
.banner .eyebrow { color: #f0cf8a; }
.banner .arab { color: #f0cf8a; font-size: 1.9rem; margin-bottom: 6px; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.dots-wrap { grid-area: 1 / 1; align-self: end; padding-bottom: 92px; z-index: 2; pointer-events: none; }
.dots-wrap .dots { pointer-events: auto; margin: 0; }
.dots button { background: rgba(255,255,255,.45); }

.quick-float { position: relative; z-index: 5; margin-top: -60px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 48px -24px rgba(10,40,30,.35); overflow: hidden; }
.quick-grid a { display: flex; gap: 14px; align-items: center; padding: 22px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; border-right: 1px solid var(--line); transition: background .15s; }
.quick-grid a:last-child { border-right: 0; }
.quick-grid a:hover { background: var(--green-soft); }
.quick-grid .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-family: var(--arab); font-size: 1.4rem; flex: none; }
.quick-grid small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }

.intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.intro h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 6px 0 14px; }
.intro .photo { aspect-ratio: 5/4; border-radius: 18px; }

.card { transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -20px rgba(10,40,30,.35); }
.card .photo img, .news-item .photo img, .gallery .photo img { transition: transform .5s; }
.card:hover .photo img, .news-item:hover .photo img, .gallery .photo:hover img { transform: scale(1.05); }
.page-hero { background: linear-gradient(90deg, rgba(8,32,24,.94), rgba(8,32,24,.75)), url(../assets/img/galeri-2.jpg) center/cover; padding-block: 64px; }
.topbar-links { display: flex; gap: 16px; flex-wrap: wrap; }
.email { font-weight: 700; color: var(--green); overflow-wrap: anywhere; user-select: all; }
.contact { grid-template-columns: repeat(3, 1fr); }
.contact .panel { display: flex; flex-direction: column; align-items: flex-start; }
.contact .panel .btn { margin-top: auto; }

@media (max-width: 860px) {
  .banner { min-height: 480px; }
  .banner .slide { background: linear-gradient(180deg, rgba(8,32,24,.55), rgba(8,32,24,.92)), var(--bg) center/cover no-repeat; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid a:nth-child(2) { border-right: 0; }
  .quick-grid a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .intro, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .quick-grid a { padding: 16px; font-size: .95rem; }
  .quick-grid .ic { width: 38px; height: 38px; }
  .topbar .wrap > span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .banner .slide { transition: none; } .card:hover { transform: none; } }

/* fixes after visual check */
.banner .slide { background: none; position: relative; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.banner .slide::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8,32,24,.94) 0%, rgba(8,32,24,.72) 45%, rgba(8,32,24,.2) 100%); }
.slide-in { position: relative; z-index: 2; }
.banner .arab { text-align: left; }
.menu a.btn, .menu a.btn:hover { color: #1c1406; }
@media (max-width: 860px) {
  .banner .slide { background: none; }
  .banner .slide::before { background: linear-gradient(180deg, rgba(8,32,24,.55), rgba(8,32,24,.93)); }
  .menu a.btn { border-bottom: 0; padding: 11px 20px; }
}
.contact .email { font-size: .95rem; overflow-wrap: anywhere; }
.dots-wrap { width: 100%; }

/* v3: no Arabic glyphs, svg icons, sticky footer */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
#footer { margin-top: auto; }
.site-footer { margin-top: 0; }
.logo-mark { font-size: 0; }
.quick-grid .ic svg { width: 24px; height: 24px; }
.wa-float { width: 58px; height: 58px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.wa-float svg { width: 32px; height: 32px; }
.contact .email { font-size: .84rem; }
