/* ============================================================
   Tema "Sekolah" — SekolahCMS
   Warna utama via CSS variable --tp (diatur dari panel).
   ============================================================ */
:root {
  --tp: #1d4ed8;
  --tp-dark: color-mix(in srgb, var(--tp) 80%, #000);
  --ink: #0f172a;
  --muted: #64748b;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
a { color: var(--tp); }
.btn-primary { background: var(--tp); border-color: var(--tp); }
.btn-primary:hover, .btn-primary:focus { background: var(--tp-dark); border-color: var(--tp-dark); }
.btn-outline-primary { color: var(--tp); border-color: var(--tp); }
.btn-outline-primary:hover { background: var(--tp); border-color: var(--tp); }

/* ---------- Top strip & navbar ---------- */
.topstrip {
  background: var(--tp-dark);
  color: #e2e8f0;
  font-size: .8rem;
  padding: 7px 0;
}
.topstrip a { color: #e2e8f0; text-decoration: none; }
.topstrip a:hover { color: #fff; }

.main-navbar { box-shadow: 0 1px 10px rgba(15, 23, 42, .08); padding-top: .6rem; padding-bottom: .6rem; }
.brand-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--tp); color: #fff; font-size: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; color: var(--ink); }
.brand-text small { font-size: .72rem; color: var(--muted); }
.main-navbar .nav-link { font-weight: 600; color: #334155; padding-left: .9rem; padding-right: .9rem; }
.main-navbar .nav-link.active, .main-navbar .nav-link:hover { color: var(--tp); }
.nav-search { gap: 6px; margin: 6px 0; }
.nav-search input { width: 130px; border-radius: 20px; }
.nav-search .btn { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--tp-dark) 0%, var(--tp) 60%, color-mix(in srgb, var(--tp) 65%, #fff) 130%);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 96px 0;
}
.hero-inner { max-width: 640px; }
.hero h1 { font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.7rem); }
.hero p { font-size: 1.1rem; opacity: .9; margin: 14px 0 26px; }
.hero .btn-light { color: var(--tp-dark); font-weight: 700; }

/* ---------- Quick info ---------- */
.quick-info { margin-top: -34px; position: relative; z-index: 5; }
.qi-card {
  background: #fff; border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .09);
  display: flex; gap: 14px; align-items: center; height: 100%;
}
.qi-card i { font-size: 1.5rem; color: var(--tp); }
.qi-card div { display: flex; flex-direction: column; line-height: 1.3; }
.qi-card strong { font-size: .85rem; }
.qi-card span { font-size: .82rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0 56px; }
.section-alt { background: #f1f5f9; }
.section-title {
  font-weight: 800; font-size: 1.5rem; position: relative; padding-bottom: 10px; margin-bottom: 16px;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 4px; border-radius: 4px; background: var(--tp);
}
.headmaster-photo { max-height: 320px; object-fit: cover; }

/* ---------- Page header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--tp-dark), var(--tp));
  background-size: cover; background-position: center;
  color: #fff; padding: 46px 0 38px;
}
.page-header h1 { font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 6px; }
.page-header .breadcrumb-item, .page-header .breadcrumb-item a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.page-header .breadcrumb-item.active { color: #fff; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .5); }

/* ---------- Konten artikel ---------- */
.content-html { line-height: 1.85; font-size: 1.02rem; }
.content-html img { max-width: 100%; height: auto; border-radius: 10px; }
.content-html h2, .content-html h3, .content-html h4 { font-weight: 700; margin-top: 1.4em; }
.content-html blockquote {
  border-left: 4px solid var(--tp); background: #f8fafc;
  padding: 12px 18px; border-radius: 0 10px 10px 0; color: #334155;
}
.content-html table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.content-html table td, .content-html table th { border: 1px solid #e2e8f0; padding: 8px 10px; }
.content-html iframe { max-width: 100%; border-radius: 10px; }
.post-hero-img { max-height: 460px; object-fit: cover; }

/* ---------- Kartu berita ---------- */
.post-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(15, 23, 42, .13); }
.post-card-img { display: block; aspect-ratio: 16/9; overflow: hidden; background: #eef2f7; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; font-size: 2.2rem;
}
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.post-card-meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; flex-wrap: wrap; }
.badge-cat {
  background: color-mix(in srgb, var(--tp) 12%, #fff); color: var(--tp);
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-decoration: none;
}
.badge-cat:hover { background: var(--tp); color: #fff; }
.post-card-title { font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.4; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--tp); }
.post-card-excerpt { color: var(--muted); font-size: .87rem; margin: 0; }

/* ---------- Meta & share ---------- */
.post-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; align-items: center; }
.share-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.05rem; text-decoration: none;
}
.share-btn.wa { background: #25d366; } .share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #0f1419; } .share-btn.copy { background: var(--muted); }
.share-btn:hover { opacity: .85; color: #fff; }

/* ---------- Sidebar ---------- */
.sidebar-widget {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 18px; margin-bottom: 18px;
}
.widget-title {
  font-size: .95rem; font-weight: 800; padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 2px solid var(--tp); display: inline-block;
}
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li + li { border-top: 1px dashed #e2e8f0; }
.widget-list a {
  display: block; padding: 8px 2px; color: #334155; text-decoration: none; font-size: .9rem;
}
.widget-list a:hover { color: var(--tp); padding-left: 6px; transition: all .15s; }
.widget-post { display: flex; gap: 10px; padding: 8px 0; text-decoration: none; align-items: center; }
.widget-post + .widget-post { border-top: 1px dashed #e2e8f0; }
.widget-post img, .widget-post-ph {
  width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.widget-post-ph { background: #eef2f7; color: #cbd5e1; display: flex; align-items: center; justify-content: center; }
.widget-post strong { display: block; font-size: .84rem; color: var(--ink); line-height: 1.35; }
.widget-post small { color: var(--muted); font-size: .74rem; }
.widget-post:hover strong { color: var(--tp); }

/* ---------- Kontak ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed #e2e8f0; }
.contact-list i { font-size: 1.25rem; color: var(--tp); }
.contact-list strong { display: block; font-size: .85rem; }
.contact-list span, .contact-list a { color: var(--muted); font-size: .9rem; }
.contact-card { border: 0; border-radius: 16px; box-shadow: 0 4px 18px rgba(15, 23, 42, .08); }
.maps-embed iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Pencarian ---------- */
.search-result {
  display: block; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px;
  margin-bottom: 10px; text-decoration: none; color: var(--ink); background: #fff;
}
.search-result:hover { border-color: var(--tp); }
.search-result p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }

/* ---------- CTA & error ---------- */
.cta-strip { background: linear-gradient(135deg, var(--tp-dark), var(--tp)); padding: 40px 0; }
.error-page { max-width: 480px; margin: 40px auto; }
.error-code { font-size: 90px; font-weight: 900; color: var(--tp); line-height: 1; }
.error-icon { font-size: 64px; color: var(--tp); }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; }
.footer-logo { background: #fff; border-radius: 10px; padding: 4px; }
.footer-title {
  color: #fff; font-size: .95rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 16px;
}
.footer-muted { color: #94a3b8; font-size: .9rem; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links a {
  color: #cbd5e1; text-decoration: none; display: block; padding: 5px 0; font-size: .9rem;
}
.footer-links a:hover { color: #fff; padding-left: 4px; transition: all .15s; }
.footer-links i { font-size: .7rem; color: var(--tp); }
.footer-contact li { display: flex; gap: 10px; padding: 5px 0; font-size: .9rem; color: #94a3b8; }
.footer-contact i { color: color-mix(in srgb, var(--tp) 60%, #fff); }
.footer-contact a { color: #cbd5e1; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 16px 0; font-size: .82rem; color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .nav-search input { width: 100%; }
  .hero { padding: 64px 0; }
}
