/* ============================================================
   AHSP CIPTA KARYA – Global Stylesheet
   SE DJBK No.47/SE/Dk/2026
   ============================================================ */

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1a3c6e;
  --primary-dark: #0f2447;
  --primary-light:#2a5fa8;
  --accent:       #e8a020;
  --accent-light: #fbe8c0;
  --bg:           #f4f6fb;
  --bg-white:     #ffffff;
  --text:         #1e2532;
  --text-muted:   #5a6580;
  --border:       #d0d9ec;
  --success:      #1a7e4a;
  --success-bg:   #e6f5ee;
  --table-head:   #1a3c6e;
  --table-even:   #edf1fb;
  --shadow-sm:    0 2px 8px rgba(26,60,110,.08);
  --shadow-md:    0 4px 20px rgba(26,60,110,.13);
  --radius:       10px;
  --nav-h:        64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* -- Top Navbar -- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--primary-dark);
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-weight: 700; font-size: 1rem;
  text-decoration: none; flex-shrink: 0;
}

.navbar-brand .brand-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.navbar-brand .brand-text { line-height: 1.2; }
.navbar-brand .brand-text small { font-weight: 400; font-size: .72rem; opacity: .8; display: block; }

.navbar-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; list-style: none;
  flex-wrap: wrap;
}

.navbar-nav a {
  color: rgba(255,255,255,.85); font-size: .82rem;
  padding: 6px 12px; border-radius: 6px;
  transition: background .2s, color .2s;
  font-weight: 500;
  text-decoration: none;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  background: var(--primary-light); color: #fff;
}

.navbar-nav .dropdown { position: relative; }
.navbar-nav .dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-md);
  min-width: 230px; padding: 6px 0; list-style: none; z-index: 100;
}
.navbar-nav .dropdown:hover .dropdown-menu { display: block; }
.navbar-nav .dropdown-menu a {
  color: var(--text); display: block; padding: 8px 16px; font-size: .82rem;
  border-radius: 0;
}
.navbar-nav .dropdown-menu a:hover { background: var(--table-even); color: var(--primary); }

/* -- Page Header Banner -- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 48px 40px;
  position: relative; overflow: hidden;
}

.page-header::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,.05); border-radius: 50%;
}

.page-header .badge-se {
  display: inline-block; background: var(--accent);
  color: var(--primary-dark); font-weight: 700; font-size: .72rem;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
  letter-spacing: .5px; text-transform: uppercase;
}

.page-header h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.page-header p { opacity: .88; font-size: .95rem; max-width: 640px; }

/* -- Main Layout -- */
.layout { display: flex; max-width: 1400px; margin: 0 auto; padding: 28px 20px; gap: 24px; }

/* -- Sidebar -- */
.sidebar {
  width: 265px; flex-shrink: 0;
}

.sidebar-card {
  background: var(--bg-white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 20px);
}

.sidebar-card h3 {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--border);
}

.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block; padding: 7px 12px; border-radius: 7px;
  color: var(--text); font-size: .85rem; transition: all .2s;
}
.sidebar-nav a:hover { background: var(--table-even); color: var(--primary); text-decoration: none; }
.sidebar-nav a.active { background: var(--primary); color: #fff; font-weight: 600; }

.sidebar-nav .nav-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted); padding: 12px 12px 4px;
}

.sidebar-nav .sub-item a { padding-left: 24px; font-size: .82rem; }

/* -- Content Area -- */
.content { flex: 1; min-width: 0; }

/* -- Cards -- */
.card {
  background: var(--bg-white); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow-sm); margin-bottom: 24px;
}

.card h2 {
  font-size: 1.2rem; font-weight: 700; color: var(--primary);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 3px solid var(--primary); display: flex; align-items: center; gap: 8px;
}

.card h3 {
  font-size: 1rem; font-weight: 700; color: var(--primary-dark);
  margin: 20px 0 10px;
}

.card h4 {
  font-size: .9rem; font-weight: 700; color: var(--text); margin: 16px 0 8px;
}

.card p { margin-bottom: 10px; }
.card ul, .card ol { padding-left: 24px; margin-bottom: 12px; }
.card li { margin-bottom: 5px; }

/* -- Info Box -- */
.info-box {
  background: var(--success-bg); border-left: 4px solid var(--success);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 16px 0; font-size: .9rem;
}
.info-box strong { color: var(--success); }

.warning-box {
  background: #fff8e1; border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 16px 0; font-size: .9rem;
}
.warning-box strong { color: #b37400; }

/* -- Tables -- */
.table-wrapper { overflow-x: auto; margin: 16px 0; border-radius: 8px; border: 1px solid var(--border); }

table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}

table thead th {
  background: var(--table-head); color: #fff;
  padding: 11px 14px; text-align: left; font-weight: 600;
  white-space: nowrap; font-size: .82rem;
}

table thead th:first-child { border-radius: 8px 0 0 0; }
table thead th:last-child  { border-radius: 0 8px 0 0; }

table tbody td {
  padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: top;
}

table tbody tr:nth-child(even) td { background: var(--table-even); }
table tbody tr:hover td { background: #dce7f8; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: .72rem; font-weight: 700; letter-spacing: .3px;
}
.badge-tetap { background: #d4edda; color: #155724; }
.badge-ubah  { background: #fff3cd; color: #856404; }
.badge-normatif { background: #cce5ff; color: #004085; }
.badge-code { background: var(--accent-light); color: var(--primary-dark); font-family: monospace; font-size: .8rem; }

/* -- Stats Grid -- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
  background: var(--bg-white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); text-align: center;
  border-top: 4px solid var(--primary);
}

.stat-card .stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label  { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* -- Divisi Cards Grid (for TOC) -- */
.divisi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.divisi-card {
  background: var(--bg-white); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); border-left: 5px solid var(--primary);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}

.divisi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.divisi-card .divisi-number {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary); margin-bottom: 6px;
}

.divisi-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.divisi-card p { font-size: .83rem; color: var(--text-muted); flex: 1; }

.divisi-card .card-footer {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
.divisi-card .card-footer a {
  font-size: .8rem; font-weight: 600; color: var(--primary-light);
  background: var(--table-even); padding: 5px 12px;
  border-radius: 20px; text-decoration: none;
}
.divisi-card .card-footer a:hover { background: var(--primary); color: #fff; }

.divisi-card.accent-orange { border-left-color: var(--accent); }
.divisi-card.accent-teal   { border-left-color: #0a7c6f; }
.divisi-card.accent-purple { border-left-color: #6a3ea1; }
.divisi-card.accent-red    { border-left-color: #c0392b; }

/* -- Hero Section (index) -- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff; padding: 80px 40px; text-align: center; position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 800px; margin: 0 auto; }

.hero .se-badge {
  display: inline-block; background: var(--accent); color: var(--primary-dark);
  font-weight: 700; font-size: .8rem; padding: 5px 16px; border-radius: 20px;
  margin-bottom: 20px; letter-spacing: .5px;
}

.hero h1 { font-size: 2.6rem; font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.05rem; opacity: .9; margin-bottom: 32px; }

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent); color: var(--primary-dark);
  font-weight: 700; padding: 13px 28px; border-radius: 8px;
  border: none; cursor: pointer; font-size: .95rem; text-decoration: none;
  transition: background .2s, transform .2s;
  display: inline-block;
}
.btn-primary:hover { background: #f0b030; transform: translateY(-2px); text-decoration: none; color: var(--primary-dark); }

.btn-outline {
  background: transparent; color: #fff;
  font-weight: 600; padding: 13px 28px; border-radius: 8px;
  border: 2px solid rgba(255,255,255,.5); cursor: pointer; font-size: .95rem;
  text-decoration: none; transition: border-color .2s, background .2s;
  display: inline-block;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }

/* -- Feature Grid (index) -- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding: 40px 0; }

.feature-card {
  background: var(--bg-white); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); text-align: center;
  transition: transform .2s; cursor: pointer;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.feature-card p { font-size: .83rem; color: var(--text-muted); }
.feature-card a { display: block; margin-top: 14px; font-size: .82rem; font-weight: 600; color: var(--primary-light); }

/* -- Breadcrumb -- */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-muted); padding: 14px 40px;
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary-light); }
.breadcrumb span { color: var(--text-muted); }

/* -- Section Anchor Target -- */
.anchor-target { scroll-margin-top: calc(var(--nav-h) + 20px); }

/* -- Footer -- */
footer {
  background: var(--primary-dark); color: rgba(255,255,255,.7);
  padding: 32px 40px; text-align: center; margin-top: 48px;
  font-size: .82rem;
}
footer strong { color: #fff; }
footer a { color: var(--accent); }

.visitor-counter {
  display: inline-flex; align-items: center; gap: 18px;
  margin-top: 18px; padding: 14px 28px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; font-size: .8rem; color: rgba(255,255,255,.8);
  flex-wrap: wrap; justify-content: center;
}
.vc-icon { font-size: 1.3rem; }
.vc-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; }
.vc-stat strong { color: var(--accent); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.vc-stat span { font-size: .68rem; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.vc-divider { width: 1px; height: 34px; background: rgba(255,255,255,.2); }
.vc-loading { opacity: .5; font-style: italic; }

/* -- Responsive -- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar-card { position: static; }
  .hero h1 { font-size: 1.9rem; }
  .navbar-nav { display: none; }
}

@media (max-width: 600px) {
  .page-header { padding: 32px 20px; }
  .page-header h1 { font-size: 1.4rem; }
  .card { padding: 20px; }
  .hero { padding: 48px 20px; }
  .hero h1 { font-size: 1.6rem; }
}

/* -- Table of Contents specific -- */
.toc-section { margin-bottom: 28px; }
.toc-section h3 { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.toc-section h3::before { content: ''; display: inline-block; width: 5px; height: 18px; background: var(--accent); border-radius: 3px; }

.toc-list { list-style: none; padding: 0; }
.toc-list li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.toc-list li .kode { flex-shrink: 0; background: var(--table-even); color: var(--primary); font-family: monospace; font-size: .78rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; min-width: 60px; text-align: center; }
.toc-list li .title { flex: 1; font-size: .87rem; }
.toc-list li .satuan { flex-shrink: 0; color: var(--text-muted); font-size: .78rem; }

/* -- Print -- */
@media print {
  .navbar, .sidebar, footer { display: none; }
  .layout { padding: 0; }
  .content { max-width: 100%; }
}
