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

:root {
  --primary: #880e4f;
  --primary-dark: #560027;
  --primary-light: #bc477b;
  --accent: #fce4ec;
  --bg: #fff5f8;
  --text: #1a1a1a;
  --text-muted: #6b5c63;
  --border: #f0c8d8;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(136,14,79,0.10);
}

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

/* DEMO BAR */
.demo-bar {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
}
.demo-bar a { color: #fce4ec; text-decoration: underline; margin: 0 4px; }

/* HEADER */
.site-header {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-top {
  background: var(--primary-dark);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-top .logo-icon {
  width: 48px; height: 48px; flex-shrink: 0;
}
.header-top-text h1 { font-size: 15px; font-weight: 700; line-height: 1.2; }
.header-top-text p { font-size: 11px; opacity: 0.85; }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* Checkbox hack mobile menu */
#nav-toggle { display: none; }
.nav-label {
  display: none;
  cursor: pointer;
  padding: 12px 0;
  flex-direction: column;
  gap: 5px;
}
.nav-label span {
  display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: .3s;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}
nav ul li a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 14px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}
nav ul li a:hover, nav ul li a.active { background: var(--primary-light); }

@media(max-width: 768px) {
  .nav-label { display: flex; }
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--primary);
    border-top: 1px solid var(--primary-light);
    z-index: 200;
  }
  #nav-toggle:checked ~ .nav-wrap nav ul { display: flex; }
  nav ul li a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .header-top { padding: 8px 16px; }
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: var(--white);
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h2 { font-size: clamp(22px, 5vw, 38px); font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero p { font-size: 16px; opacity: 0.9; max-width: 600px; margin: 0 auto 28px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.7); }

/* STATS BAR */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat-item { padding: 20px 12px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
@media(max-width:600px) {
  .stats-bar { grid-template-columns: repeat(2,1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--border); }
}

/* SECTION */
.section { padding: 48px 20px; max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center;
  margin-bottom: 36px;
}
.section-title h2 {
  font-size: clamp(20px,4vw,30px);
  font-weight: 800;
  color: var(--primary);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0; width: 50px; height: 3px;
  background: var(--primary-light);
  border-radius: 2px;
}
.section-title p { color: var(--text-muted); margin-top: 10px; font-size: 15px; }

/* CARDS */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
@media(max-width:900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px) { .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(136,14,79,0.15); }

.service-card { text-align: center; }
.service-icon {
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.service-icon svg { width: 32px; height: 32px; }
.service-card h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.service-card p { font-size: 13px; color: var(--text-muted); }

.news-card { display: flex; flex-direction: column; }
.news-meta { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent);
  color: var(--primary);
}
.news-date { font-size: 12px; color: var(--text-muted); }
.news-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.news-card p { font-size: 13px; color: var(--text-muted); flex: 1; }
.news-card a { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; margin-top: 12px; }

/* PENGUMUMAN */
.pengumuman-list { display: flex; flex-direction: column; gap: 12px; }
.pengumuman-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.pengumuman-date {
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
.pengumuman-date .day { font-size: 22px; font-weight: 800; line-height: 1; }
.pengumuman-date .month { font-size: 11px; }
.pengumuman-content h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.pengumuman-content p { font-size: 13px; color: var(--text-muted); }
.pengumuman-num { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-style: italic; }

/* HERO BANNER SECTION */
.banner-section {
  background: linear-gradient(135deg, var(--accent) 0%, #ffe0ec 100%);
  border-top: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  padding: 40px 20px;
  text-align: center;
}
.banner-section h2 { color: var(--primary); font-size: clamp(18px,3vw,26px); margin-bottom: 10px; }
.banner-section p { color: var(--text-muted); max-width: 600px; margin: 0 auto 20px; }

/* PROFIL */
.visi-misi { background: var(--accent); border-radius: 12px; padding: 28px; margin-bottom: 32px; }
.visi-misi h3 { color: var(--primary); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.visi-misi p, .visi-misi li { font-size: 14px; color: var(--text); line-height: 1.7; }
.visi-misi ul { padding-left: 20px; margin-top: 8px; }
.visi-misi ul li { margin-bottom: 6px; }

.org-chart { text-align: center; padding: 20px 0; }
.org-node {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  margin: 4px;
}
.org-node.secondary { background: var(--primary-light); font-weight: 600; font-size: 12px; }
.org-node.tertiary { background: var(--accent); color: var(--primary); font-size: 12px; font-weight: 600; }
.org-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.org-line { width: 2px; height: 24px; background: var(--border); margin: 0 auto; }
.org-hline { display: flex; align-items: center; justify-content: center; gap: 0; }

.pejabat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media(max-width:700px) { .pejabat-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .pejabat-grid { grid-template-columns: 1fr; } }
.pejabat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.pejabat-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px; color: var(--white); font-weight: 800;
}
.pejabat-card h4 { font-size: 14px; font-weight: 700; color: var(--text); }
.pejabat-card p { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 4px; }
.pejabat-card small { font-size: 11px; color: var(--text-muted); }

/* LAYANAN */
.layanan-detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}
.layanan-detail-card h3 {
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.layanan-detail-card h3 .licon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.layanan-detail-card h3 .licon svg { width: 20px; height: 20px; }
.info-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 16px; }
@media(max-width:600px) { .info-row { grid-template-columns: 1fr; } }
.info-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px;
}
.info-box strong { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 6px; }
.info-box ul { padding-left: 16px; }
.info-box li { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.info-box p { font-size: 13px; color: var(--text); }

/* BERITA */
.berita-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media(max-width:900px) { .berita-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:580px) { .berita-grid { grid-template-columns: 1fr; } }
.berita-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .2s, box-shadow .2s;
}
.berita-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(136,14,79,0.15); }
.berita-thumb {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.berita-body { padding: 16px; }
.berita-body h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.berita-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.berita-body .news-date { font-size: 12px; color: var(--text-muted); }

/* PENGUMUMAN PAGE */
.pengumuman-full {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.pengumuman-full-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pengumuman-full-item:last-child { border-bottom: none; }
.pi-num {
  font-size: 12px; font-style: italic; color: var(--text-muted); margin-top: 4px;
}
.pi-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.pi-dl {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
}

/* KONTAK */
.kontak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media(max-width:700px) { .kontak-grid { grid-template-columns: 1fr; } }
.kontak-info-list { display: flex; flex-direction: column; gap: 16px; }
.kontak-info-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--card-shadow);
}
.ki-icon {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ki-icon svg { width: 22px; height: 22px; }
.ki-text strong { font-size: 13px; color: var(--primary); display: block; margin-bottom: 2px; }
.ki-text p, .ki-text a { font-size: 13px; color: var(--text); text-decoration: none; }
.jam-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.jam-table th, .jam-table td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.jam-table th { background: var(--accent); color: var(--primary); font-weight: 700; }
.jam-table td:last-child { color: var(--text-muted); }

/* FORM */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.form-card h3 { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  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 { height: 120px; resize: vertical; }
.btn-submit {
  background: var(--primary);
  color: var(--white);
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background .2s;
}
.btn-submit:hover { background: var(--primary-dark); }

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}
.page-header h1 { font-size: clamp(20px,4vw,30px); font-weight: 800; margin-bottom: 6px; }
.page-header p { font-size: 14px; opacity: 0.9; }
.breadcrumb { font-size: 12px; opacity: 0.75; margin-top: 8px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }

/* SEJARAH */
.sejarah-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}
.sejarah-block h3 { color: var(--primary); font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sejarah-block p { font-size: 14px; color: var(--text); line-height: 1.8; }

/* FOOTER */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 40px 20px 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto 32px;
}
@media(max-width:700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand h3 { color: var(--white); font-size: 15px; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
footer h4 { color: var(--white); font-size: 14px; font-weight: 700; margin-bottom: 12px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; }
footer ul li a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 13px; transition: color .2s; }
footer ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  padding-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  max-width: 1100px;
  margin: 0 auto;
}

/* UTILITIES */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.bg-accent-full { background: var(--accent); padding: 40px 0; }
.divider { height: 1px; background: var(--border); margin: 32px 0; }
