/* =====================================================
   GLOBAL
===================================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
  background-color: #f8f9fa;
  color: #212529;
}

table tr td {
  border: 1px solid black;
  padding: 5px;
}

th {
  border: 1px solid black;
  padding: 5px;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}


[data-bs-theme="dark"] .card {
  background-color: #1e1e1e;
  color: #ffffff;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-text {
  color: #ffffff;
}

[data-bs-theme="dark"] .list-group-item {
  background-color: #1e1e1e;
  color: #ffffff;
  border-color: #333;
}


/* =====================================================
   HERO SECTION
===================================================== */
.hero-section {
  background-color: #f8f9fa;
}

html[data-bs-theme="dark"] .hero-section {
  background-color: #0f1115;
}

/* Hero Card Overlay */
.hero-card {
  border-radius: 16px;
  overflow: hidden;
}

.hero-card .overlay-dark {
  background: linear-gradient(
    to top,
    rgba(0,0,0,.75),
    rgba(0,0,0,.15),
    transparent
  );
}

/* =====================================================
   CARD
===================================================== */
.card {
  border: none;
  border-radius: 14px;
  background-color: #ffffff;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.card-img-top {
  object-fit: cover;
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body p {
  color: inherit;
}

/* Card footer (tanggal) */
.card-footer {
  background: transparent;
  border-top: 1px solid rgba(0,0,0,.05);
}

/* =====================================================
   LIST GROUP (SIDEBAR)
===================================================== */
.list-group-item {
  border: 1px solid rgba(0,0,0,.08);
}

/* =====================================================
   FORM
===================================================== */
.form-control {
  border-radius: 10px;
}

/* =====================================================
   DARK THEME
===================================================== */
html[data-bs-theme="dark"] body {
  background-color: #0f1115;
  color: #e6e6e6;
}

/* Navbar */
html[data-bs-theme="dark"] .navbar {
  background-color: #16181d !important;
}

/* Card */
html[data-bs-theme="dark"] .card {
  background-color: #181b21;
  box-shadow: 0 6px 22px rgba(0,0,0,.6);
}

/* Card text */
html[data-bs-theme="dark"] .card-body,
html[data-bs-theme="dark"] .card-body h5,
html[data-bs-theme="dark"] .card-body p {
  color: #f1f1f1;
}

/* Card footer (tanggal) */
html[data-bs-theme="dark"] .card-footer {
  color: #9aa0a6;
  border-top: 1px solid #2a2f36;
}

/* List group */
html[data-bs-theme="dark"] .list-group-item {
  background-color: #181b21;
  color: #eaeaea;
  border-color: #2a2f36;
}

html[data-bs-theme="dark"] .list-group-item:hover {
  background-color: #1f242c;
}

/* Badge */
html[data-bs-theme="dark"] .badge {
  color: #fff;
}

/* Breadcrumb */
html[data-bs-theme="dark"] .breadcrumb {
  background: transparent;
}

html[data-bs-theme="dark"] .breadcrumb a {
  color: #8ab4f8;
}

html[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #b0b0b0;
}

/* Form */
html[data-bs-theme="dark"] .form-control {
  background-color: #121418;
  color: #eaeaea;
  border-color: #2a2f36;
}

html[data-bs-theme="dark"] .form-control::placeholder {
  color: #9aa0a6;
}

/* Button */
html[data-bs-theme="dark"] .btn-dark {
  background-color: #2a2f36;
  border-color: #2a2f36;
}

/* Footer */
html[data-bs-theme="dark"] footer {
  background-color: #121418;
  color: #bdbdbd;
}

/* =====================================================
   IMAGE
===================================================== */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* ==============================
   NEWS CARD DARK FIX
============================== */
.news-card {
  background-color: var(--bs-body-bg);
}

.news-title,
.news-excerpt {
  color: var(--bs-body-color);
}

/* Dark override */
html[data-bs-theme="dark"] .news-title {
  color: #f1f1f1;
}

html[data-bs-theme="dark"] .news-excerpt {
  color: #cfcfcf;
}

/* ===== NEWS IMAGE FIX (GRID / NASIONAL) ===== */
.news-thumb {
  width: 100%;
  /* 600x400 */
  /*aspect-ratio: 3 / 2; */
  
  /* 600x450 */
  aspect-ratio: 4 / 3; 
  overflow: hidden;
  background: #eaeaea;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== TITLE LINK ===== */
.news-title {
  color: inherit;
  text-decoration: none;
}

.news-title:hover {
  text-decoration: underline;
}

/* ===== DARK MODE FIX ===== */
[data-bs-theme="dark"] .card {
  background: #1e1e1e;
  color: #eaeaea;
}

[data-bs-theme="dark"] .news-title {
  color: #ffffff;
}

[data-bs-theme="dark"] .text-muted {
  color: #b5b5b5 !important;
}

[data-bs-theme="dark"] .news-thumb {
  background: #2a2a2a;
}

/* DARK MODE TABLE BORDER FIX */
html[data-bs-theme="dark"] table {
  border-collapse: collapse;
}

html[data-bs-theme="dark"] table td,
html[data-bs-theme="dark"] table th {
  border: 1px solid #ffffff !important;
  color: white;
  background-color: black;
}

html[data-bs-theme="dark"] .mbg-table td,
html[data-bs-theme="dark"] .mbg-table th {
  border: 1px solid #ffffff !important;
}


.hero-card {
  border-radius: 20px;
  overflow: hidden;
}

.hero-card img {
  height: 420px;
  object-fit: cover;
}

.overlay-dark {
  background: linear-gradient(
    to top,
    rgba(0,0,0,.7),
    rgba(0,0,0,.1)
  );
}


/* overlay utama */
.hero-overlay {
  position: absolute;
  bottom: 20px;            /* ⬅️ naikkan dari bawah */
  left: 0;
  right: 0;
  padding: 0 1.5rem;
}

/* kotak headline merah */
.hero-overlay .badge:first-child {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* kotak abu-abu */
.hero-overlay .badge.bg-secondary {
  display: inline-block;
  max-width: 75%;          /* ⬅️ supaya tidak kepanjangan */
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
}

/* text */
.hero-overlay h6 {
  margin: 0;
  font-size: 1rem;
}

.hero-overlay p {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}


@media (max-width: 991px) {
  .hero-card img {
    height: 360px; /* sedikit dipendekin */
  }

  .hero-overlay {
    bottom: 10px; /* ⬅️ konten turun */
    padding: 0 1rem;
  }

  .carousel-indicators {
    bottom: 10px; /* indikator lebih rapet ke bawah */
  }
}

@media (max-width: 576px) {
  .hero-card img {
    height: 280px; /* fokus ke gambar atas */
  }

  .hero-overlay {
    bottom: 5px; /* makin turun */
    padding: 0 0.75rem;
  }

  .hero-overlay .badge {
    margin-bottom: 6px;
  }

  .hero-overlay h6 {
    font-size: 0.95rem;
  }

  .carousel-indicators {
    bottom: 6px;
  }
}

.judul-responsif {
  font-size: clamp(1rem, 2.5vw, 1.75rem);
}


@media (max-width: 991.98px) {
  .judul-responsif {
    font-size: 1rem; /* tablet & mobile (≈ text biasa) */
  }
}

.pagination {
  flex-wrap: wrap;           /* boleh turun baris */
  justify-content: center;   /* tengah */
}

@media (max-width: 576px) {
  .pagination {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;       /* satu baris */
  }

  .pagination::-webkit-scrollbar {
    height: 6px;
  }
}


.titik_dua_tengah {
  margin: 5px;
  padding: 5px;
  text-align: center;
  align-content: center;
  align-items: center;
  vertical-align: middle;
}

/* ===== BASE (LIGHT MODE) ===== */
.breadcrumb {
  --bs-breadcrumb-divider: "/";
}

.breadcrumb-item + .breadcrumb-item::before {
  color: black; /* abu gelap, jelas di light */
  opacity: 1;
}

/* ===== DARK MODE ===== */
[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
  color: #dee2e6; /* abu terang */
}

[data-bs-theme="dark"] .breadcrumb-item a {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #adb5bd;
}

img:hover {
  transform: scale(1.07) translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.3);
  z-index: 20;
}

.card:hover {
  transform: scale(1.07) translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.3);
  z-index: 20;
}

@media (max-width: 768px) {
  datalist {
    display: none;
  }
}

.hide {
  display: none;
}
