:root {
  --primary-base-color: #008BA9;
  --primary-darken-color: #006A82;
  --secondary-base-color: #D08E0D;
  --secondary-darken-color: #946200;
  --accent-base-color: #00BA88;
  --accent-darken-color: #00966D;
}

[x-cloak] { display: none !important; }

/* Pakai stack font sistem saja agar tanpa fetch font eksternal (lebih ringan) */
html, body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Tingkatkan kontras teks pada widget aparatur (carousel) */
.owl-carousel .space-y-1 .text-h6,
.owl-carousel .space-y-1 .block {
  color: #f8fafc !important; /* near-white */
}
.owl-carousel .btn.btn-default {
  background-color: #111827 !important; /* slate-900 */
  color: #f8fafc !important;
  border-color: #111827 !important;
}

/* Caption aparatur: beri latar agar kontras tinggi di atas foto */
.aparatur-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  transform: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.45) 90%);
  color: #f8fafc !important;
  padding: 10px 12px;
  border-radius: 12px;
  display: block;
  width: calc(100% - 16px);
  margin: 0 auto;
  box-shadow: none;
}

/* Pastikan area teks aparatur selalu di atas latar gelap */
.owl-carousel .space-y-1 {
  background: none;
  padding: 0;
  border-radius: 0;
  display: inline-block;
}

/* Jarak antar item carousel agar target tidak bertumpuk */
.owl-carousel .owl-item {
  padding: 0;
}

/* Samakan ukuran & ujung gambar slider */
.sliderx .owl-item figure {
  height: clamp(14rem, 50vw, 30rem);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.02);
}
.sliderx .owl-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: rgba(15,23,42,0.08);
}
.sliderx-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: rgba(15,23,42,0.08);
}
.sliderx .slider-overlay-link {
  width: 100%;
  display: block;
  box-sizing: border-box;
}
.sliderx-wrapper .slider-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  pointer-events: none;
}
.sliderx-wrapper:hover .slider-nav {
  opacity: 1;
}
.sliderx-wrapper .slider-nav button {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sliderx-wrapper .slider-nav button i {
  margin: 0;
}
@media (max-width: 768px) {
  .sliderx-wrapper .slider-nav {
    opacity: 1;
  }
}
.sliderx .owl-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}
.sliderx .owl-dots .owl-dot span {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #d4d4d4; /* abu muda */
  border: 1px solid rgba(0,0,0,0.15);
}
.sliderx .owl-dots .owl-dot.active span {
  background: #0ea5e9; /* biru */
  border-color: #0ea5e9;
  box-shadow: none;
}
.sliderx.w-full.relative.group .owl-dots {
  display: none !important;
}
@media (min-width: 1024px) {
  .sliderx .owl-item figure { height: 32rem; }
  .sliderx .owl-item img { height: 100%; }
  .sliderx-media { height: 100%; }
}

/* Wrapper foto aparatur sebagai referensi posisi caption */
.aparatur-photo-wrap {
  position: relative;
  display: block;
}

/* Hero running text: jaga satu baris di semua perangkat */
.hero-marquee {
  position: relative;
  white-space: nowrap;
  height: 32px !important;
  line-height: 32px !important;
  overflow: hidden;
  display: block;
  font-size: 13px;
  padding: 0 !important;
}
.hero-marquee .ticker-track {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  will-change: transform;
  height: 32px !important;
}
.hero-marquee .ticker-track > * {
  display: block;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 32px !important;
  height: 32px;
}

/* Spasi antar link slider agar touch target tidak berdempetan */
.owl-carousel a.font-bold.text-h5 {
  display: block;
  margin: 0 12px 8px;
}

/* Perbesar target link "Indeks" agar memenuhi 24px min height */
.article-index-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  min-height: 32px;
}

/* Reserve space for the hero header to reduce CLS */
.hero-header {
  min-height: 200px;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
  height: auto;
}

/* Improve contrast on primary surfaces */
.navbar-menu.bg-primary-100 {
  background-color: var(--primary-darken-color) !important;
  color: #fff !important;
}
.btn.btn-primary {
  background-color: var(--primary-darken-color) !important;
  border-color: var(--primary-darken-color) !important;
  color: #fff !important;
}
.btn.btn-danger {
  background-color: #b71c1c !important; /* deep red for 4.5:1 contrast */
  border-color: #a21616 !important;
  color: #fff !important;
}
.btn.btn-accent {
  background-color: var(--secondary-darken-color) !important;
  border-color: var(--secondary-darken-color) !important;
  color: #fff !important;
}
.bg-primary-100.text-white,
.bg-primary-100 .text-white {
  background-color: var(--primary-darken-color) !important;
  color: #fff !important;
}

.hero-section {
  min-height: 140px;
}

@media (min-width: 1024px) {
  .hero-header {
    min-height: 320px;
    height: auto;
  }
}

.hero-marquee {
  min-height: 28px;
}

.category-bar {
  min-height: 64px;
}

/* Stabilize tables that use DataTables sorting widths */
table.dataTable {
  table-layout: fixed;
  width: 100% !important;
}

/* Sesuaikan rasio konten/sidebar agar konten ~65% pada layar lg+ */
@media (min-width: 1024px) {
  .lg\:w-2\/3 {
    width: 61.88% !important;
  }
  .lg\:w-1\/3 {
    width: 36.3% !important;
  }
}

/* Restore editor-like spacing for published article content */
.content h1,
.content h2,
.content h3 {
  margin-top: 1em;
  margin-bottom: 0.75em;
}

/* Responsif untuk media yang di-embed dari editor (artikel) */
.content img,
.content video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}
.content iframe,
.content object,
.content embed {
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 220px;
  display: block;
}
.content figure {
  width: 100%;
  margin: 0;
}

.content h4,
.content h5,
.content h6 {
  margin-top: 0.75em;
  margin-bottom: 0.6em;
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content pre,
.content table,
.content figure {
  margin-top: 0;
  margin-bottom: 1em;
}

.content ul,
.content ol {
  padding-left: 1.25rem;
}

.content blockquote {
  padding-left: 1rem;
  border-left: 4px solid var(--primary-base-color);
}

.content > *:last-child {
  margin-bottom: 0;
}
