/* PegawaiNegeri.id — Civic knowledge portal */

:root {
  --ink: #10233a;
  --ink-soft: #3a4d63;
  --paper: #f3f0e8;
  --paper-deep: #e7e1d3;
  --surface: #fffdf8;
  --teal: #0f5c63;
  --teal-deep: #0a3f45;
  --gold: #b8893a;
  --merah: #a61b2e;
  --line: rgba(16, 35, 58, 0.12);
  --shadow: 0 18px 40px rgba(16, 35, 58, 0.08);
  --radius: 4px;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --shell: min(1120px, calc(100% - 2.5rem));
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 92, 99, 0.08), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(184, 137, 58, 0.1), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, #efe9dc 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 240, 232, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50% 50% 42% 58%;
  background:
    linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 55%, var(--gold) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-text strong {
  font-weight: 800;
}

.brand-text span {
  color: var(--teal);
  font-weight: 700;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.primary-nav .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav .menu a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

.nav-toggle-bars {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 -5px 0 var(--ink);
  margin: 0.45rem 0;
}

.nav-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--merah);
  color: #fff;
}

.btn-primary:hover {
  background: #8f1525;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-nav {
  background: var(--teal);
  color: #fff;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
}

.btn-nav:hover {
  background: var(--teal-deep);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7f3ea;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 63, 69, 0.92) 0%, rgba(16, 35, 58, 0.78) 48%, rgba(166, 27, 46, 0.55) 100%),
    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.06'%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"),
    linear-gradient(160deg, #0a3f45, #1b3350 50%, #5a1d2a);
  background-size: cover, auto, cover;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(184, 137, 58, 0.28), transparent 35%),
    linear-gradient(0deg, rgba(8, 24, 34, 0.55), transparent 42%);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 7rem 0 4.5rem;
  max-width: 42rem;
  animation: rise 0.9s ease both;
}

.brand-hero {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.4vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero-lead {
  margin: 1.15rem 0 0;
  font-size: 1.05rem;
  color: rgba(247, 243, 234, 0.88);
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.section-head h2,
.page-hero h1,
.trust-copy h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head p,
.page-hero p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

.text-link {
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

/* Topics */
.topic-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.topic {
  display: block;
  padding: 1.35rem 1.2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 100%;
}

.topic:hover {
  border-color: rgba(15, 92, 99, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.topic-index {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.topic h3 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.topic p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* Posts */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.post-card-link {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  text-decoration: none;
  color: inherit;
  min-height: 180px;
}

.post-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.post-card-media {
  min-height: 100%;
  background: #d9d2c3;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-media-fallback {
  background:
    linear-gradient(145deg, rgba(15, 92, 99, 0.75), rgba(166, 27, 46, 0.55)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 0 8px, transparent 8px 16px);
}

.post-card-body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.post-card-body h3 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.post-card-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.meta-cat {
  color: var(--teal);
  font-weight: 700;
}

.empty-note {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}

/* Trust band */
.trust-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background:
    linear-gradient(120deg, rgba(15, 92, 99, 0.08), rgba(184, 137, 58, 0.12)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
}

.trust-copy {
  max-width: 40rem;
}

.trust-copy h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.trust-copy p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
}

/* Page / single */
.page-hero {
  padding: 3.5rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  max-width: 18ch;
}

.content-narrow {
  max-width: 42rem;
}

.prose {
  font-size: 1.05rem;
}

.prose h2,
.prose h3 {
  font-family: var(--font-serif);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--ink-soft);
}

.prose a {
  color: var(--teal);
}

.single-thumb {
  margin-bottom: 0.5rem;
}

.single-thumb img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.pagination-wrap {
  margin-top: 2.5rem;
}

.pagination-wrap .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-wrap a,
.pagination-wrap .current {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 3.5rem 0 1.5rem;
  background: var(--ink);
  color: rgba(247, 243, 234, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-footer .brand-text span {
  color: #e2c27a;
}

.footer-brand p {
  margin: 1rem 0 0;
  max-width: 28ch;
  color: rgba(247, 243, 234, 0.7);
  font-size: 0.95rem;
}

.footer-col h2 {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-menu a {
  text-decoration: none;
  color: rgba(247, 243, 234, 0.72);
  font-size: 0.92rem;
}

.footer-menu a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 1.25rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(247, 243, 234, 0.55);
}

/* Widgets */
.widget {
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

/* Responsive */
@media (max-width: 960px) {
  .topic-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-band {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  :root {
    --shell: min(1120px, calc(100% - 1.5rem));
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    position: relative;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + 1px);
    left: 0;
    right: 0;
    background: rgba(243, 240, 232, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav .menu {
    flex-direction: column;
    gap: 0.65rem;
  }

  .btn-nav {
    width: fit-content;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card-link {
    grid-template-columns: 1fr;
  }

  .post-card-media {
    min-height: 160px;
  }

  .hero-content {
    padding-top: 5.5rem;
  }
}

@media (max-width: 560px) {
  .topic-rail,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-content,
  .btn,
  .topic,
  .post-card {
    animation: none !important;
    transition: none !important;
  }
}

.hero-search{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1.5rem;max-width:34rem}
.hero-search input[type="search"]{flex:1 1 12rem;min-width:0;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(8,24,34,.35);color:#fff;padding:.85rem 1.15rem;font:inherit;outline:none}
.hero-search input[type="search"]::placeholder{color:rgba(247,243,234,.65)}
.hero-search input[type="search"]:focus{border-color:rgba(184,137,58,.85);box-shadow:0 0 0 3px rgba(184,137,58,.2)}
.hero-search .btn{flex:0 0 auto}
.custom-logo-link{display:inline-flex;align-items:center;line-height:0}
.custom-logo{display:block;height:42px;width:auto;max-width:220px}
.brand-footer .custom-logo{height:48px;max-width:240px;filter:brightness(0) invert(1)}
.footer-grid-simple{grid-template-columns:1.5fr 1fr}
