/*
Theme Name: TPQ Muhammadiyah Purbayan
Theme URI: https://example.com/
Author: TPQ Muhammadiyah Purbayan
Description: Tema WordPress untuk TPQ Muhammadiyah Purbayan, Kotagede, Yogyakarta. Halaman: Profil, Prestasi, Kegiatan, Kurikulum, Donasi.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tpq
*/

:root {
  --green-900: #0b3d27;
  --green-700: #0f5c3a;
  --green-500: #1b8a58;
  --green-100: #e3f2e9;
  --gold: #e3a92b;
  --gold-soft: #fbefcf;
  --cream: #fbf8ef;
  --ink: #1d2b24;
  --muted: #5d6b63;
  --line: #e4e0d2;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 61, 39, .10);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Poppins", var(--font);
  --font-ar: "Amiri", "Scheherazade New", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--cream); line-height: 1.7; font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: var(--green-900); }
p { margin: 0 0 1em; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.section { padding: 80px 0; }
.section--white { background: var(--white); }
.section--green { background: var(--green-900); color: #e8f3ec; }
.section--green h2, .section--green h3 { color: #fff; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green-500); margin-bottom: 10px;
}
.section--green .eyebrow { color: var(--gold); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head p { color: var(--muted); }
.section--green .section-head p { color: #b9d4c5; }
.ar { font-family: var(--font-ar); direction: rtl; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--green-900); }
.btn--gold:hover { background: #f0b83d; }
.btn--green { background: var(--green-700); color: #fff; }
.btn--green:hover { background: var(--green-500); }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { border-color: var(--green-700); color: var(--green-700); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(251,248,239,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green-900); }
.brand__mark {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green-700);
  display: grid; place-items: center; color: var(--gold); font-family: var(--font-ar); font-size: 1.5rem; line-height: 1;
  box-shadow: inset 0 0 0 3px var(--gold);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-head); font-size: 1rem; }
.brand__text small { color: var(--muted); font-size: .75rem; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 500; font-size: .92rem;
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--green-100); color: var(--green-700); }
.main-nav .nav-cta > a { background: var(--gold); color: var(--green-900); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-900); margin: 5px 0; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(227,169,43,.28), transparent 40%),
    linear-gradient(135deg, var(--green-900), var(--green-700));
  padding: 90px 0 120px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 4l9 18 19-6-6 19 18 9-18 9 6 19-19-6-9 18-9-18-19 6 6-19-18-9 18-9-6-19 19 6z' fill='none' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E");
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__ar { font-size: 2rem; color: var(--gold); margin-bottom: 14px; }
.hero p { color: #d3e8dc; font-size: 1.1rem; max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__card {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 28px;
  padding: 30px; backdrop-filter: blur(6px);
}
.hero__card .ayah { font-size: 2.1rem; line-height: 1.9; color: #fff; text-align: center; margin-bottom: 8px; }
.hero__card .ayah-id { text-align: center; color: #cfe6d8; font-size: .95rem; margin: 0; }
.hero__card small { display: block; text-align: center; margin-top: 8px; color: var(--gold); }
.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; }

/* Stats */
.stats { margin-top: -56px; position: relative; z-index: 2; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 26px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--green-700); }
.stat span { color: var(--muted); font-size: .9rem; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
}
.card__img {
  aspect-ratio: 16/10; background: linear-gradient(135deg, var(--green-100), var(--gold-soft));
  display: grid; place-items: center; color: var(--green-700); font-size: 2.4rem; object-fit: cover; width: 100%;
}
.card__body { padding: 22px; flex: 1; }
.card__meta { font-size: .8rem; color: var(--green-500); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.card h3 a { color: inherit; text-decoration: none; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Profil */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.photo-frame {
  aspect-ratio: 4/3; border-radius: 28px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--green-500), var(--green-900)); display: grid; place-items: center;
  color: var(--gold); font-size: 4rem; box-shadow: var(--shadow);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame::after { content: ""; position: absolute; inset: 12px; border: 2px dashed rgba(227,169,43,.7); border-radius: 20px; pointer-events: none; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-100); color: var(--green-700); font-size: .8rem; display: grid; place-items: center; font-weight: 800;
}
.visi-misi { display: grid; gap: 16px; margin-top: 24px; }
.vm { background: var(--green-100); border-radius: var(--radius); padding: 20px 22px; }
.vm h3 { font-size: 1rem; margin-bottom: 6px; }

/* Kurikulum */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: lvl; }
.level {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius);
  padding: 26px 22px; position: relative; counter-increment: lvl;
}
.level::before {
  content: counter(lvl); position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--green-900); font-family: var(--font-head); font-weight: 700; display: grid; place-items: center;
}
.level h3 { font-size: 1.1rem; margin-top: 6px; }
.level p, .level li { color: #c4dccf; font-size: .93rem; }
.level ul { margin: 0; padding-left: 18px; }

/* Prestasi */
.medal {
  display: flex; gap: 16px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; align-items: flex-start;
}
.medal__icon {
  flex: 0 0 56px; height: 56px; border-radius: 50%; background: var(--gold-soft); display: grid;
  place-items: center; font-size: 1.7rem;
}
.medal h3 { font-size: 1.02rem; margin-bottom: 2px; }
.medal p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Donasi */
.donasi {
  background: linear-gradient(135deg, var(--gold-soft), #fff); border: 1px solid #f0dba6;
  border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.progress { height: 14px; background: #efe6c9; border-radius: 99px; overflow: hidden; margin: 18px 0 8px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--gold)); border-radius: 99px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.progress-meta strong { color: var(--green-900); }
.pay-box { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.pay-box h3 { font-size: 1.05rem; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.amounts button {
  padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--cream);
  font-family: var(--font-head); font-weight: 600; cursor: pointer; font-size: .85rem;
}
.amounts button.is-active, .amounts button:hover { border-color: var(--green-700); background: var(--green-100); color: var(--green-700); }
.rek { background: var(--green-100); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; font-size: .92rem; }
.rek strong { display: block; font-family: var(--font-head); color: var(--green-900); letter-spacing: .04em; }

/* Kontak / Footer */
.map-embed { border-radius: var(--radius); overflow: hidden; min-height: 280px; background: var(--green-100); border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 100%; min-height: 280px; border: 0; }
.site-footer { background: var(--green-900); color: #b9d4c5; padding: 56px 0 24px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #d6eadf; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 18px; font-size: .85rem; text-align: center; }

/* Konten halaman/artikel */
.page-hero { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: #cfe6d8; margin: 8px 0 0; }
.entry { max-width: 760px; margin-inline: auto; }
.entry img { border-radius: var(--radius); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter a { padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; background: var(--white); }
.filter a.is-active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* Responsif */
@media (max-width: 980px) {
  .hero__grid, .split, .donasi { grid-template-columns: 1fr; }
  .grid--3, .grid--4, .levels { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--line); display: none; padding: 12px 16px 20px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 96px; }
  .grid--3, .grid--2, .grid--4, .levels, .footer-grid { grid-template-columns: 1fr; }
  .donasi { padding: 28px 20px; }
  .brand__text small { display: none; }
}
