/* ============================================================
   MTs NU Banjaran – Global Stylesheet
   ============================================================ */
:root {
  --hijau:       #1b4332;
  --hijau-mid:   #2d6a4f;
  --hijau-light: #52b788;
  --emas:        #c9952a;
  --emas-light:  #e9c46a;
  --krem:        #fdf8ef;
  --putih:       #ffffff;
  --gelap:       #0f1f14;
  --abu:         #6b7280;
  --border:      rgba(201,149,42,0.25);
  --shadow-sm:   0 2px 10px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 10px 36px rgba(0,0,0,0.14);
  --radius:      12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; background: var(--krem); color: var(--gelap); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── CONTAINER ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ─── TOPBAR ─── */
.topbar {
  background: var(--hijau);
  color: rgba(255,255,255,0.72);
  font-size: 0.76rem; letter-spacing: 0.04em;
  padding: 7px 0;
  border-bottom: 1px solid rgba(201,149,42,0.4);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar-right { display: flex; gap: 18px; }
.topbar a { color: var(--emas-light); }
.topbar a:hover { text-decoration: underline; }

/* ─── NAVBAR ─── */
#navbar {
  position: sticky; top: 0; z-index: 300;
  background: var(--putih);
  border-bottom: 3px solid var(--emas);
  box-shadow: var(--shadow-md);
}
.nav-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 50px; height: 50px; border-radius: 0;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--emas); font-weight: 700;
  flex-shrink: 0;
  overflow: visible;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: var(--hijau); }
.brand-sub  { font-size: 0.67rem; color: var(--abu); letter-spacing: 0.05em; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 8px 13px; border-radius: 6px; color: var(--gelap);
  transition: background .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active { background: var(--hijau); color: #fff; }
.btn-ppdb { background: var(--emas) !important; color: var(--hijau) !important; margin-left: 6px; }
.btn-ppdb:hover { background: var(--emas-light) !important; }

.nav-search { margin-left: 6px; }
.nav-search form { display: flex; align-items: center; gap: 6px; }
.nav-search input {
  width: 190px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--putih);
  font-size: 0.82rem;
  font-family: 'Lato', sans-serif;
  outline: none;
}
.nav-search input:focus { border-color: var(--hijau-mid); }
.btn-search {
  background: var(--hijau);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}
.btn-search:hover { background: var(--hijau-mid); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--hijau); border-radius: 2px; transition: .3s; }

/* ─── BREADCRUMB ─── */
.breadcrumb-bar { background: var(--putih); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb { font-size: 0.78rem; color: var(--abu); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--hijau-mid); }
.breadcrumb a:hover { color: var(--emas); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--gelap); font-weight: 700; }

/* ─── PAGE HERO ─── */
.page-hero {
  background:
    linear-gradient(135deg, rgba(27,67,50,0.88) 0%, rgba(45,106,79,0.82) 100%),
    url('/assets/bgsect.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 60px 0; text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(201,149,42,0.14), transparent 60%);
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem,4vw,3rem); font-weight: 800; color: #fff;
  margin-bottom: 10px; position: relative;
}
.page-hero h1 span { color: var(--emas-light); }
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1rem; max-width: 560px; margin: 0 auto; position: relative; }

/* ─── SECTION ─── */
.section { padding: 72px 0; }
.section.bg-light { background: #f3f4f0; }
.section.bg-hijau  { background: var(--hijau); }
.section.bg-emas   { background: var(--emas); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-block; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--hijau-mid); margin-bottom: 10px;
}
.section-label::before, .section-label::after { content: '—'; margin: 0 8px; color: var(--emas); }
.section-label.light { color: rgba(233,196,106,0.85); }
.section-label.light::before, .section-label.light::after { color: var(--emas); }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 700; color: var(--hijau); line-height: 1.25;
}
.section-title span  { color: var(--emas); }
.section-title.light { color: #fff; }
.section-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--emas), var(--emas-light));
  margin: 14px auto 0; border-radius: 2px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-block;
  background: var(--emas); color: var(--hijau);
  font-weight: 700; font-size: 0.88rem; letter-spacing: 0.04em;
  padding: 12px 28px; border-radius: 8px; border: none; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--emas-light); transform: translateY(-2px); }

.btn-outline {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.5); color: #fff;
  font-weight: 700; font-size: 0.88rem;
  padding: 10px 24px; border-radius: 8px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.btn-outline-hijau {
  display: inline-block;
  border: 2px solid var(--hijau); color: var(--hijau);
  font-weight: 700; font-size: 0.88rem;
  padding: 10px 24px; border-radius: 8px;
  transition: background .2s, color .2s;
}
.btn-outline-hijau:hover { background: var(--hijau); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

/* ─── CARDS ─── */
.card {
  background: var(--putih); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-body { padding: 22px; }
.card-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--emas); color: var(--hijau);
  padding: 3px 10px; border-radius: 4px; margin-bottom: 10px;
}
.card-meta { font-size: 0.76rem; color: var(--abu); margin-bottom: 8px; }
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--hijau);
  line-height: 1.4; margin-bottom: 10px;
}
.card-excerpt { font-size: 0.86rem; color: #4b5563; line-height: 1.7; }
.link-baca { font-size: 0.84rem; font-weight: 700; color: var(--hijau-mid); margin-top: 12px; display: inline-block; }
.link-baca:hover { color: var(--emas); }

.card-thumb {
  height: 190px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: rgba(255,255,255,0.35);
  background: linear-gradient(135deg, var(--hijau), var(--hijau-mid));
  position: relative;
  overflow: hidden;
}
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-thumb > * { position: relative; }

/* ─── CARD ICON ─── */
.card-icon {
  background: var(--putih); border-radius: var(--radius);
  padding: 30px 24px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.card-icon:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-icon-img {
  font-size: 2.6rem; margin-bottom: 14px;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hijau), var(--hijau-mid));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  overflow: hidden;
}
.card-icon-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.card-icon h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700; color: var(--hijau); margin-bottom: 8px;
}
.card-icon p { font-size: 0.85rem; color: var(--abu); line-height: 1.7; }

/* ─── DARK CARD (keunggulan bg hijau) ─── */
.card-dark {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 30px 24px; text-align: center;
  transition: background .25s, transform .25s;
}
.card-dark:hover { background: rgba(255,255,255,0.11); transform: translateY(-5px); }
.card-dark .icon { font-size: 2.6rem; margin-bottom: 14px; display: block; }
.card-dark h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; color: var(--emas-light); margin-bottom: 10px; font-weight: 700;
}
.card-dark p { font-size: 0.84rem; color: rgba(255,255,255,0.7); line-height: 1.7; }

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-berita { display: grid; grid-template-columns: 1.8fr 1fr; gap: 28px; }

/* ─── HERO (Beranda) ─── */
.hero {
  position: relative; overflow: hidden; min-height: 580px;
  background:
    linear-gradient(155deg,
      var(--hero-g1, rgba(27,67,50,0.90)) 0%,
      var(--hero-g2, rgba(30,92,58,0.78)) 55%,
      var(--hero-g3, rgba(45,106,79,0.84)) 100%),
    var(--hero-bg-image, url('/assets/bgsect.jpeg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; align-items: center;
}
.hero-circle {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-circle.c1 { width: 500px; height: 500px; border: 60px solid rgba(255,255,255,0.04); top: -60px; right: -60px; }
.hero-circle.c2 { width: 320px; height: 320px; border: 40px solid rgba(201,149,42,0.1); bottom: -80px; right: 60px; }

.hero-content { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; padding: 80px 0; position: relative; z-index: 2; }
.hero-badge {
  display: inline-block;
  background: rgba(201,149,42,0.2); border: 1px solid rgba(201,149,42,0.5);
  color: var(--emas-light); font-size: 0.72rem; letter-spacing: 0.12em; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 18px; text-transform: uppercase;
}
.hero-arabic {
  font-family: 'Amiri', serif; font-size: 2rem;
  color: rgba(233,196,106,0.8); margin-bottom: 8px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem,4vw,3.2rem); font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: 16px;
}
.hero-title span { color: var(--emas-light); }
.hero-desc { font-size: 0.98rem; color: rgba(255,255,255,0.8); line-height: 1.78; max-width: 460px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 16px; padding: 32px;
  backdrop-filter: blur(8px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.stat-item { text-align: center; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 800; color: var(--emas-light); line-height: 1; }
.stat-label { font-size: 0.76rem; color: rgba(255,255,255,0.6); margin-top: 6px; letter-spacing: 0.04em; }
.stat-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); grid-column: 1/-1; }

/* ─── VISI STRIP ─── */
.visi-strip { background: var(--emas); padding: 18px 0; text-align: center; }
.visi-strip p {
  max-width: 900px; margin: 0 auto;
  font-family: 'Amiri', serif; font-size: 1.1rem; color: var(--hijau); font-style: italic; font-weight: 700;
  padding: 0 28px;
}

/* ─── FORM ─── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--gelap); margin-bottom: 6px; }
.form-label .req { color: #dc2626; margin-left: 3px; }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--putih);
  font-size: 0.9rem; font-family: 'Lato', sans-serif; color: var(--gelap);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--hijau-mid); }
.form-control.error { border-color: #dc2626; }
.form-hint { font-size: 0.76rem; color: var(--abu); margin-top: 4px; }
.form-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--hijau);
  padding-bottom: 10px; margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

/* ─── PENGUMUMAN / SIDEBAR ─── */
.pengumuman-box {
  background: var(--putih); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.pengumuman-box h3 {
  font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--hijau);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.pengumuman-box h3::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.peng-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.peng-item:last-child { border-bottom: none; }
.peng-date {
  background: var(--hijau); color: #fff;
  border-radius: 8px; padding: 7px 9px; text-align: center;
  font-size: 0.75rem; font-weight: 700; min-width: 46px; flex-shrink: 0; line-height: 1.2;
}
.peng-date span { font-size: 1.15rem; display: block; font-family: 'Playfair Display', serif; }
.peng-body p { font-size: 0.85rem; color: var(--gelap); font-weight: 700; margin-bottom: 2px; }
.peng-body small { font-size: 0.74rem; color: var(--abu); }

/* ─── CTA SECTION ─── */
.cta-section {
  background: linear-gradient(135deg, var(--hijau) 0%, var(--hijau-mid) 100%);
  padding: 72px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(201,149,42,0.13), transparent 70%);
}
.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem,3.5vw,2.8rem); color: #fff; font-weight: 800;
  margin-bottom: 12px; position: relative;
}
.cta-section p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 28px; position: relative; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ─── FOOTER ─── */
footer {
  background: var(--gelap); color: rgba(255,255,255,0.7);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  width: 54px; height: 54px; border-radius: 0;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--emas); margin-bottom: 14px;
  overflow: visible;
}
.footer-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer-brand h3 { font-family: 'Playfair Display', serif; font-size: 1rem; color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
  transition: background .2s;
}
.footer-social a:hover { background: var(--emas); }
.footer-col h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emas); font-weight: 700; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 0.83rem; transition: color .2s; }
.footer-col ul a:hover { color: #fff; }
.kontak-item { display: flex; gap: 9px; font-size: 0.82rem; margin-bottom: 10px; line-height: 1.5; }
.kontak-icon { font-size: 0.95rem; flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  padding: 18px 0; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.77rem; flex-wrap: wrap; gap: 8px;
}
.footer-bottom span { color: var(--emas); }

/* ─── UTILITIES ─── */
.text-center { text-align: center; }
.text-hijau   { color: var(--hijau); }
.text-emas    { color: var(--emas); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }

/* ─── ALERT ─── */
.alert { padding: 14px 18px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 18px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ─── PAGINATION ─── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--gelap);
  transition: all .2s;
}
.pagination a:hover  { background: var(--hijau); color: #fff; border-color: var(--hijau); }
.pagination .active  { background: var(--hijau); color: #fff; border-color: var(--hijau); }
.pagination .dots    { border: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero-content { grid-template-columns: 1fr; gap: 0; }
  .hero-right { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .grid-berita { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--putih); padding: 16px 24px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
  }
  .nav-search { width: 100%; margin-left: 0; }
  .nav-search form { width: 100%; }
  .nav-search input { width: 100%; flex: 1; }
  .topbar-right { display: none; }
}
