/* Dinas Pendidikan Kab. Nusantara — style.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #1976d2;
  --accent: #ffd600;
  --accent-dark: #f9a825;
  --bg: #f0f7ff;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #4a5568;
  --border: #c5d8f5;
  --card-bg: #ffffff;
  --shadow: 0 2px 12px rgba(21,101,192,0.10);
  --shadow-md: 0 4px 24px rgba(21,101,192,0.14);
  --radius: 8px;
  --radius-lg: 14px;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* ===== DEMO BAR ===== */
.demo-bar {
  background: #222;
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 7px 16px;
  position: sticky;
  top: 0;
  z-index: 1100;
}
.demo-bar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.demo-bar a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.header-top {
  background: var(--primary-dark);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.logo-emblem {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.logo-text-wrap { line-height: 1.2; }
.logo-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--accent);
}
.logo-subtitle {
  font-size: 12px;
  opacity: .9;
  color: #e3f2fd;
}

/* ===== NAV ===== */
nav.main-nav {
  background: var(--primary);
  padding: 0 24px;
  position: relative;
}
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 14px 0;
  color: var(--white);
  font-size: 22px;
  user-select: none;
}
.nav-menu {
  list-style: none;
  display: flex;
  gap: 0;
}
.nav-menu li a {
  display: block;
  padding: 16px 18px;
  color: #e3f2fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.07);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #1976d2 100%);
  color: var(--white);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,214,0,0.03) 0px,
    rgba(255,214,0,0.03) 2px,
    transparent 2px,
    transparent 32px
  );
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 720px;
  margin-inline: auto;
}
.hero p {
  font-size: clamp(14px, 2vw, 17px);
  opacity: .88;
  max-width: 580px;
  margin: 0 auto 28px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(255,214,0,.35);
}
.hero-cta:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ===== SECTION ===== */
.section { padding: 56px 24px; }
.section-alt { background: var(--white); }
.section-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 36px;
}
.section-header { margin-bottom: 36px; }
.section-header .line {
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
  margin: 10px 0 12px;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.stat-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  color: var(--white);
}
.stat-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 13px; opacity: .85; }

/* ===== LAYANAN CARDS ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ===== BERITA ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.news-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-cat {
  display: inline-block;
  background: #e3f2fd;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.news-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.news-excerpt { font-size: 13px; color: var(--text-muted); flex: 1; }
.news-date { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* ===== PENGUMUMAN ===== */
.announce-list { display: flex; flex-direction: column; gap: 12px; }
.announce-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.announce-item:hover { transform: translateX(4px); }
.announce-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.announce-icon svg { width: 20px; height: 20px; }
.announce-body { flex: 1; }
.announce-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.announce-meta { font-size: 12px; color: var(--text-muted); }
.announce-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  background: #e3f2fd;
  color: var(--primary);
  flex-shrink: 0;
}

/* ===== PROFIL ===== */
.prose { max-width: 760px; }
.prose p { margin-bottom: 14px; font-size: 15px; color: var(--text-muted); }
.vm-box {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}
.vm-box h3 { color: var(--accent); font-size: 18px; margin-bottom: 12px; }
.vm-box p, .vm-box li { color: #e3f2fd; font-size: 14px; line-height: 1.7; }
.vm-box ul { padding-left: 20px; }
.vm-box ul li { margin-bottom: 6px; }
.vm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 0; }

/* Org chart */
.org-wrap { overflow-x: auto; padding: 8px 0; }
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 480px; }
.org-node {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  padding: 12px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  min-width: 180px;
  box-shadow: var(--shadow);
  position: relative;
}
.org-node.accent-node { background: var(--accent); color: var(--primary-dark); }
.org-node small { display: block; font-size: 11px; font-weight: 400; opacity: .85; margin-top: 3px; }
.org-connector {
  width: 2px;
  height: 24px;
  background: var(--primary);
}
.org-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
}
.org-row-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-hline {
  height: 2px;
  background: var(--primary);
  width: 100%;
  position: relative;
  top: 0;
}
.org-row-connector {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  position: relative;
  gap: 0;
}

/* Pejabat */
.pejabat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.pejabat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.pejabat-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.pejabat-avatar svg { width: 40px; height: 40px; }
.pejabat-name { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.pejabat-role { font-size: 12px; color: var(--text-muted); }

/* ===== LAYANAN PAGE ===== */
.layanan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.layanan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.layanan-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}
.layanan-header svg { width: 32px; height: 32px; flex-shrink: 0; }
.layanan-header h3 { font-size: 15px; font-weight: 700; }
.layanan-body { padding: 20px 22px; }
.req-list { list-style: none; padding: 0; }
.req-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0 5px 20px;
  position: relative;
  border-bottom: 1px solid #f0f4fb;
}
.req-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.biaya-tag {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 12px;
}

/* ===== KONTAK ===== */
.kontak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.kontak-info-list { display: flex; flex-direction: column; gap: 16px; }
.kontak-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.kontak-info-icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kontak-info-icon svg { width: 22px; height: 22px; }
.kontak-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.kontak-info-val { font-size: 14px; font-weight: 600; color: var(--text); }
.jam-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.jam-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.jam-table td:first-child { color: var(--text-muted); width: 130px; }
.jam-table td:last-child { font-weight: 600; }

/* Form */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.btn-submit {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  width: 100%;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ===== HERO STATS STRIP ===== */
.hero-stats {
  background: var(--primary-dark);
  padding: 28px 24px;
}
.hero-stats .stats-grid { max-width: 960px; margin: 0 auto; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 40px 24px 36px;
  text-align: center;
}
.page-header h1 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; margin-bottom: 8px; }
.page-header p { font-size: 15px; opacity: .85; max-width: 560px; margin: 0 auto; }
.breadcrumb { font-size: 13px; opacity: .7; margin-bottom: 12px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }

/* ===== FOOTER ===== */
footer {
  background: var(--primary-dark);
  color: #e3f2fd;
  padding: 48px 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto 32px;
}
.footer-brand h2 { font-size: 16px; color: var(--accent); margin-bottom: 8px; }
.footer-brand p { font-size: 13px; opacity: .8; line-height: 1.7; }
.footer-col h3 { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #b3d4f5; font-size: 13px; text-decoration: none; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-col p { font-size: 13px; opacity: .8; line-height: 1.8; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  opacity: .7;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; }

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.badge-primary { background: #e3f2fd; color: var(--primary); }
.badge-accent { background: #fff8e1; color: #e65100; }
.badge-green { background: #e8f5e9; color: #2e7d32; }

/* ===== MOBILE ===== */
@media (max-width: 720px) {
  .nav-toggle-label { display: block; }
  .nav-menu {
    display: none;
    flex-direction: column;
    background: var(--primary-dark);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
  }
  .nav-toggle:checked ~ .nav-menu { display: flex; }
  .nav-menu li a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.08); border-bottom-width: 1px; }
  .nav-menu li a:hover { border-bottom-color: rgba(255,255,255,.08); }
  nav.main-nav { padding: 0 16px; }

  .kontak-grid { grid-template-columns: 1fr; }
  .vm-cols { grid-template-columns: 1fr; }
  .header-top { padding: 10px 14px; }
  .section { padding: 36px 16px; }
  .hero { padding: 44px 16px 40px; }
  .page-header { padding: 28px 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .org-row { gap: 8px; }
  .org-node { min-width: 130px; font-size: 12px; }
}
