/* ==========================================================================
   Institut Pendidikan Islam Al-Muawanah — Stylesheet
   Palette: Emerald/NU Green + Gold accents
   Edit the CSS variables below to change the entire look of the site.
   ========================================================================== */

:root {
  --green-900: #0b3d2e;   /* Deep emerald - primary dark */
  --green-800: #14532d;   /* NU deep green */
  --green-700: #166534;   /* Body green */
  --green-600: #16a34a;   /* Bright accent */
  --green-50:  #f0fdf4;   /* Very light green background */
  --gold:      #c9a24c;   /* Elegant gold accent */
  --gold-soft: #e6cf8a;
  --cream:     #faf7f0;   /* Warm background */
  --ink:       #0f1f18;   /* Body text */
  --muted:     #5b6b64;
  --white:     #ffffff;
  --line:      rgba(11, 61, 46, 0.12);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 2px 8px rgba(11, 61, 46, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(11, 61, 46, 0.25);
  --shadow-lg: 0 25px 60px -20px rgba(11, 61, 46, 0.35);

  --radius: 14px;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-800); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-900);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }

p { color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Divider ornament */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 1rem 0 2rem;
}
.ornament::before, .ornament::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament span { color: var(--gold); font-size: 1.2rem; }

/* ================ HEADER / NAVIGATION ================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 46px; height: 46px; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--font-display);
  color: var(--green-900);
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-text small {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--green-900);
  position: relative;
}
.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}
.nav-cta {
  background: var(--green-800);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  transition: all .25s;
}
.nav-cta:hover {
  background: var(--green-900);
  color: var(--white) !important;
  transform: translateY(-1px);
}
.nav-cta::after { display: none !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--green-900);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ================ HERO ================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,61,46,0.55) 0%, rgba(11,61,46,0.85) 100%),
    url('../images/hero.jpg') center/cover no-repeat;
  z-index: -1;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 24px;
  text-align: center;
}
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 {
  color: var(--white);
  max-width: 900px;
  margin: 0 auto 1.5rem;
}
.hero .lead {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all .25s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: var(--green-900);
}
.btn-primary:hover { background: var(--gold-soft); color: var(--green-900); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ================ SECTIONS ================ */
section { padding: 100px 0; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}
.section-head p { font-size: 1.05rem; margin-top: 1rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-grid .visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.about-grid .visual img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { margin-bottom: 1rem; font-size: 1.05rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--green-800);
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid .visual { aspect-ratio: 3/2; }
}

/* ================ LEMBAGA CARDS ================ */
.lembaga-section {
  background:
    radial-gradient(circle at 20% 0%, rgba(22,101,52,0.05), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(201,162,76,0.06), transparent 50%),
    var(--cream);
}
.lembaga-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.lembaga-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .35s ease;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.lembaga-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-soft);
}
.lembaga-card .img {
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}
.lembaga-card .img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.lembaga-card:hover .img img { transform: scale(1.06); }
.lembaga-card .img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(11,61,46,0.5));
}
.lembaga-card .tag {
  position: absolute; top: 16px; left: 16px;
  background: var(--gold);
  color: var(--green-900);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}
.lembaga-card .body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.lembaga-card h3 { color: var(--green-900); margin-bottom: 8px; font-size: 1.5rem; }
.lembaga-card .subtitle {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lembaga-card p { flex: 1; margin-bottom: 20px; }
.lembaga-card .more {
  color: var(--green-800);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lembaga-card .more::after { content: '→'; transition: transform .25s; }
.lembaga-card:hover .more::after { transform: translateX(4px); }

@media (max-width: 900px) {
  .lembaga-grid { grid-template-columns: 1fr; }
}

/* ================ VALUES ================ */
.values-section { background: var(--green-900); color: var(--white); }
.values-section h2 { color: var(--white); }
.values-section .section-head p { color: rgba(255,255,255,0.75); }
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.value-item {
  text-align: center;
  padding: 24px;
}
.value-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.5rem;
}
.value-item h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 8px; }
.value-item p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

@media (max-width: 800px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================ CTA BAND ================ */
.cta-band {
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  color: var(--white);
  border-radius: var(--radius);
  padding: 60px;
  text-align: center;
  margin: 0 24px;
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 0l7 23h23l-18 14 7 23L30 46 11 60l7-23L0 23h23z" fill="%23c9a24c" opacity="0.05"/></svg>');
  opacity: 0.6;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 540px; margin: 1rem auto 2rem; }

/* ================ CONTACT ================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-list {
  list-style: none;
  margin-top: 24px;
}
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list .ico {
  width: 40px; height: 40px;
  background: var(--green-50);
  color: var(--green-800);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-list .label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.contact-list .value { color: var(--ink); font-weight: 500; }

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; margin-bottom: 20px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-900);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-700);
  background: var(--white);
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ================ FOOTER ================ */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-brand .brand-text strong { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.65); margin-top: 20px; max-width: 380px; }
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 10px; }
.footer-list a { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.footer-list a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: var(--gold); }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ================ PAGE HERO (inner pages) ================ */
.page-hero {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: var(--white);
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><path d="M40 0l10 30h30L55 48l10 30L40 60 15 78l10-30L0 30h30z" fill="%23c9a24c" opacity="0.06"/></svg>');
}
.page-hero > * { position: relative; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,0.8); max-width: 600px; margin: 1rem auto 0; }

/* Program detail sections */
.program-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.program-section:last-child { border-bottom: none; }
.program-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.program-grid.reverse { direction: rtl; }
.program-grid.reverse > * { direction: ltr; }
.program-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.program-visual img { width: 100%; height: 100%; object-fit: cover; }
.program-content .eyebrow { color: var(--gold); }
.program-content ul {
  list-style: none;
  margin-top: 1.5rem;
}
.program-content li {
  padding: 10px 0 10px 32px;
  position: relative;
  color: var(--ink);
}
.program-content li::before {
  content: '✦';
  position: absolute; left: 0; top: 10px;
  color: var(--gold);
}

@media (max-width: 900px) {
  .program-grid, .program-grid.reverse { grid-template-columns: 1fr; direction: ltr; }
}

/* Anim */
@media (prefers-reduced-motion: no-preference) {
  .fade-up { opacity: 0; transform: translateY(20px); transition: all .8s ease; }
  .fade-up.in { opacity: 1; transform: translateY(0); }
}
