/*
Theme Name: Al-Muawanah
Theme URI: https://almuawanah.sch.id/
Author: Institut Pendidikan Islam Al-Muawanah
Author URI: https://almuawanah.sch.id/
Description: Tema WordPress modern untuk Institut Pendidikan Islam Al-Muawanah. Nuansa hijau emerald, putih, dan aksen gold. Mendukung MDTA, LPQ, Pesantren, Berita, Galeri, Pendaftaran, dan Kontak. Sepenuhnya dapat dikembangkan dan disunting.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: almuawanah
Tags: education, islamic, custom-menu, custom-logo, featured-images, translation-ready, threaded-comments, right-sidebar
*/

/* ==========================================================
   Institut Pendidikan Islam Al-Muawanah — WordPress Theme
   ========================================================== */

:root {
  --emerald-900: #0b3d2e;
  --emerald-800: #0f5132;
  --emerald-700: #14663f;
  --emerald-600: #1c7a4d;
  --emerald-500: #2a9d68;
  --emerald-50:  #eaf5ef;
  --gold-500:    #c9a24a;
  --gold-400:    #d9b56b;
  --gold-100:    #f6ecd2;
  --white:       #ffffff;
  --gray-50:     #f7f8f7;
  --gray-100:    #eef0ee;
  --gray-200:    #dee2df;
  --gray-500:    #6b7570;
  --gray-700:    #384039;
  --gray-900:    #14201a;
  --shadow-sm: 0 2px 8px rgba(11,61,46,.06);
  --shadow-md: 0 8px 24px rgba(11,61,46,.10);
  --shadow-lg: 0 20px 50px rgba(11,61,46,.15);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-arabic: "Amiri", "Scheherazade New", serif;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--emerald-600); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; color: var(--emerald-900); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: .18em; font-size: .78rem; font-weight: 600;
  color: var(--gold-500);
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 28px; height: 1px; background: var(--gold-400);
}
.eyebrow.left::before { display: none; }

.section { padding: 5.5rem 0; position: relative; }
.section-sm { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title p { color: var(--gray-500); max-width: 640px; margin: .75rem auto 0; }

.text-arabic { font-family: var(--font-arabic); font-size: 1.6rem; color: var(--gold-500); direction: rtl; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.6rem; border-radius: 999px; font-weight: 600;
  font-size: .95rem; cursor: pointer; border: 1.5px solid transparent;
  transition: all .25s ease; text-decoration: none;
}
.btn-primary { background: var(--emerald-700); color: var(--white); }
.btn-primary:hover { background: var(--emerald-800); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--emerald-800); }
.btn-gold { background: var(--gold-500); color: var(--emerald-900); }
.btn-gold:hover { background: var(--gold-400); color: var(--emerald-900); }
.btn-ghost { color: var(--emerald-700); border-color: var(--emerald-700); background: transparent; }
.btn-ghost:hover { background: var(--emerald-700); color: var(--white); }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-900));
  display: grid; place-items: center; color: var(--gold-400);
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.brand-text { line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); color: var(--emerald-900); font-size: 1.05rem; display: block; }
.brand-text span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-500); font-weight: 600; }

.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a { font-weight: 500; font-size: .95rem; color: var(--gray-700); position: relative; }
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a,
.nav-links a.active, .nav-links a:hover { color: var(--emerald-700); }
.nav-links li.current-menu-item > a::after,
.nav-links li.current_page_item > a::after,
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--gold-500); border-radius: 2px;
}
.nav-links li.nav-cta > a,
.nav-cta { margin-left: 1rem; background: var(--gold-500); color: var(--emerald-900) !important; padding: .7rem 1.3rem; border-radius: 999px; }
.nav-links li.nav-cta > a::after { display: none !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--emerald-900); margin: 5px 0; transition: .3s; }

@media (max-width: 960px) {
  .nav-links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; gap: 1.25rem;
    background: var(--white); padding: 2rem;
    border-bottom: 1px solid var(--gray-100);
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  color: var(--white); overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(11,61,46,.92) 0%, rgba(15,81,50,.75) 55%, rgba(11,61,46,.55) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M60 5l15 30 30 5-22 22 5 30-28-15-28 15 5-30-22-22 30-5z'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.hero-inner { position: relative; z-index: 2; padding: 5rem 0; max-width: 780px; }
.hero h1 { color: var(--white); margin: 1rem 0 1.25rem; }
.hero h1 .highlight { color: var(--gold-400); font-style: italic; }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,.9); max-width: 620px; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; }
.hero-arabic { font-family: var(--font-arabic); color: var(--gold-400); font-size: 2rem; direction: rtl; margin-bottom: 1rem; }

.hero-stats {
  position: relative; z-index: 2; margin-top: 4rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 2rem;
}
.hero-stats .stat strong { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold-400); display: block; }
.hero-stats .stat span { font-size: .85rem; color: rgba(255,255,255,.75); }
@media (max-width: 720px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-grid .image-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-grid .image-wrap::after {
  content: ""; position: absolute; inset: auto -20px -20px auto;
  width: 140px; height: 140px; border: 3px solid var(--gold-400);
  border-radius: 20px; z-index: -1;
}
.about-grid p { color: var(--gray-500); margin: 1rem 0; }
.about-values { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; margin-top: 1.5rem; }
.value-card {
  background: var(--gray-50); padding: 1rem 1.25rem; border-radius: var(--radius);
  border-left: 3px solid var(--gold-500);
}
.value-card strong { display: block; color: var(--emerald-800); margin-bottom: .25rem; }
.value-card span { font-size: .88rem; color: var(--gray-500); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* Program */
.programs { background: var(--gray-50); position: relative; }
.programs::before {
  content:""; position: absolute; inset: 0; pointer-events:none;
  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 5 L55 25 L75 25 L60 40 L65 60 L40 50 L15 60 L20 40 L5 25 L25 25 Z' fill='none' stroke='%230b3d2e' stroke-opacity='.04'/%3E%3C/svg%3E");
}
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
@media (max-width: 960px) { .program-grid { grid-template-columns: 1fr; } }

.program-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.program-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.program-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.program-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.program-card:hover .thumb img { transform: scale(1.08); }
.program-card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,61,46,.55));
}
.program-icon {
  position: absolute; left: 1.25rem; bottom: -22px; z-index: 2;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--white); color: var(--emerald-700);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  border: 2px solid var(--gold-400);
}
.program-body { padding: 2rem 1.75rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.program-body .tag { color: var(--gold-500); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.program-body h3 { margin: .35rem 0 .75rem; }
.program-body p { color: var(--gray-500); font-size: .95rem; }
.program-features { list-style: none; margin: 1.25rem 0; }
.program-features li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .9rem; color: var(--gray-700); }
.program-features li::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.program-card .btn { align-self: flex-start; margin-top: auto; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 960px) { .news-grid { grid-template-columns: 1fr; } }
.news-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all .3s ease;
  border: 1px solid var(--gray-100);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.news-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--gray-100); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .thumb img { transform: scale(1.06); }
.news-body { padding: 1.5rem; }
.news-body .meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--gray-500); margin-bottom: .5rem; }
.news-body .meta .cat { color: var(--gold-500); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.news-body h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.news-body h3 a { color: inherit; }
.news-body p { font-size: .92rem; color: var(--gray-500); }
.news-body a.read-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-weight: 600; color: var(--emerald-700); font-size: .9rem; }
.news-body a.read-more:hover { color: var(--gold-500); gap: .7rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; grid-auto-flow: dense; }
.gallery-grid a { overflow: hidden; border-radius: var(--radius); position: relative; aspect-ratio: 1/1; display:block; }
.gallery-grid a.tall { grid-row: span 2; aspect-ratio: 1/2; }
.gallery-grid a.wide { grid-column: span 2; aspect-ratio: 2/1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-grid a:hover img { transform: scale(1.08); }
.gallery-grid a::after { content: ""; position: absolute; inset: 0; background: rgba(11,61,46,0); transition: background .3s; }
.gallery-grid a:hover::after { background: rgba(11,61,46,.25); }
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  color: var(--white); border-radius: var(--radius-lg); padding: 3.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content:""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-opacity='.12'%3E%3Cpath d='M50 10 L60 40 L90 50 L60 60 L50 90 L40 60 L10 50 L40 40 Z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .6;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.85); margin-top: .5rem; max-width: 520px; }
.cta-band > * { position: relative; z-index: 2; }
@media (max-width: 800px) { .cta-band { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; } }

/* Footer */
footer.site-footer {
  background: var(--emerald-900); color: rgba(255,255,255,.75);
  padding: 4rem 0 1.5rem; margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
footer.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: 1rem; margin-bottom: 1.25rem; letter-spacing: .08em; text-transform: uppercase; }
footer.site-footer ul { list-style: none; }
footer.site-footer ul li { padding: .3rem 0; font-size: .92rem; }
footer.site-footer a:hover { color: var(--gold-400); }
.footer-brand p { font-size: .92rem; margin-top: 1rem; max-width: 320px; }
.socials { display: flex; gap: .6rem; margin-top: 1.25rem; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: var(--white); transition: .3s; }
.socials a:hover { background: var(--gold-500); color: var(--emerald-900); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; flex-wrap: wrap; gap: 1rem;
}

/* Page Header */
.page-header {
  padding: 6rem 0 4rem; text-align: center; color: var(--white);
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  position: relative; overflow: hidden;
}
.page-header::before {
  content:""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-opacity='.1'%3E%3Cpath d='M60 10 L75 40 L105 50 L75 60 L60 110 L45 60 L15 50 L45 40 Z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-header h1 { color: var(--white); position: relative; }
.page-header .breadcrumb { position: relative; color: rgba(255,255,255,.7); margin-top: .75rem; font-size: .9rem; }
.page-header .breadcrumb a { color: var(--gold-400); }

/* Form */
.form-wrap {
  max-width: 780px; margin: 0 auto; background: var(--white);
  padding: 3rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  border-top: 4px solid var(--gold-500);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--emerald-800); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .9rem 1rem; border-radius: 10px;
  border: 1.5px solid var(--gray-200); font-family: var(--font-body);
  font-size: .95rem; transition: .2s; background: var(--gray-50);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--emerald-500); background: var(--white);
  box-shadow: 0 0 0 4px rgba(42,157,104,.12);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Detail */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-content p { color: var(--gray-700); margin: 1rem 0; }
.detail-content ul { margin: 1rem 0 1rem 1.25rem; color: var(--gray-700); }
.detail-content h2 { margin-top: 2rem; }
.sidebar-card {
  background: var(--gray-50); padding: 1.75rem; border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold-500); margin-bottom: 1.5rem;
}
.sidebar-card h4 { color: var(--emerald-800); margin-bottom: 1rem; font-family: var(--font-display); font-size: 1.15rem; }
.sidebar-card ul { list-style: none; }
.sidebar-card ul li { padding: .5rem 0; border-bottom: 1px dashed var(--gray-200); font-size: .92rem; }
.sidebar-card ul li:last-child { border: 0; }

/* Filter bar */
.filter-bar{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-bottom:3rem}
.filter-bar a, .filter-bar button{padding:.55rem 1.2rem;border-radius:999px;border:1.5px solid var(--gray-200);background:#fff;font-family:var(--font-body);cursor:pointer;font-weight:600;font-size:.88rem;color:var(--gray-700);transition:.2s; text-decoration:none;}
.filter-bar a:hover, .filter-bar a.active, .filter-bar button:hover, .filter-bar button.active{background:var(--emerald-700);color:#fff;border-color:var(--emerald-700)}

/* Pagination */
.pagination { display:flex; justify-content:center; gap:.5rem; margin-top:3rem; flex-wrap:wrap; }
.pagination .page-numbers { padding:.6rem 1rem; border-radius:10px; background:var(--gray-50); color:var(--gray-700); font-weight:600; font-size:.9rem; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background:var(--emerald-700); color:#fff; }

/* Post content */
.post-content { max-width: 820px; margin: 0 auto; }
.post-content h2, .post-content h3 { margin-top: 2rem; }
.post-content p { margin: 1rem 0; color: var(--gray-700); }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; color: var(--gray-700); }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
.post-content blockquote { border-left: 4px solid var(--gold-500); padding: 1rem 1.5rem; background: var(--gray-50); margin: 1.5rem 0; font-style: italic; color: var(--gray-700); border-radius: 0 var(--radius) var(--radius) 0; }

/* Screen reader */
.screen-reader-text { position:absolute!important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden; }
.skip-link { position:absolute; left:-9999px; top:0; background:var(--emerald-900); color:#fff; padding:.75rem 1rem; z-index:100;}
.skip-link:focus { left:0; }

/* WP alignment */
.alignleft { float:left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float:right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { display:block; margin: 1rem auto; }
.wp-caption { max-width:100%; }
.wp-caption-text { font-size:.85rem; color:var(--gray-500); text-align:center; }
