/* ==========================================================================
   Berita Modern: tambahan untuk WordPress
   (dimuat setelah main.css, yaitu desain beranda dari layout awal)
   ========================================================================== */

/* ---------- Utilitas WordPress ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--dark);
  display: block;
  font-size: 14px;
  height: auto;
  left: 8px;
  padding: 12px 20px;
  top: 8px;
  width: auto;
  z-index: 100000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin: 0 auto 1em; }

.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption,
.entry-content figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.button,
.comment-form .submit {
  display: inline-block;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.button:hover,
.comment-form .submit:hover {
  background: var(--dark);
  color: #fff;
}

/* ---------- Gambar kosong & badge kategori ---------- */
.bm-noimg {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2b2f3a, #596070);
}

.badge--c0 { background: var(--orange); }
.badge--c1 { background: var(--blue); }
.badge--c2 { background: var(--red); }
.badge--c3 { background: #12a150; }
.badge--c4 { background: #7c3aed; }

a.badge:hover { color: #fff; opacity: 0.85; }

/* ---------- Kartu overlay: seluruh kartu bisa diklik ---------- */
.card-overlay::after { content: none; }

.card-overlay__link {
  position: absolute;
  inset: 0;
  display: block;
}

.card-overlay__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 75%);
}

.card-overlay .bm-noimg { position: absolute; inset: 0; }

.card-overlay__body { pointer-events: none; }
.card-overlay__title a { pointer-events: auto; }
.card-overlay__title--sm { font-size: 22px; }

.card-overlay:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Breaking news ---------- */
.breaking__text { min-width: 0; }

.breaking__text a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Masthead & navigasi ---------- */
.masthead {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 76px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.site-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.site-title a { color: var(--dark); }
.site-title a:hover { color: var(--red); }

.site-description {
  font-size: 12px;
  color: var(--muted);
}

.custom-logo-link img {
  width: auto;
  height: auto;
  max-height: 48px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 16px;
}

.main-nav .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.main-nav .menu > li { position: relative; }

.main-nav a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-cat > a,
.main-nav .current-menu-ancestor > a {
  color: var(--red);
}

.main-nav .sub-menu,
.main-nav .children {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 200px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu,
.main-nav li:hover > .children,
.main-nav li:focus-within > .children {
  display: block;
}

.main-nav .sub-menu a,
.main-nav .children a { font-weight: 500; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

/* ---------- Form pencarian ---------- */
.search-form {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-form:focus-within { border-color: var(--red); }

.search-field {
  width: 180px;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 13px;
  background: transparent;
}

.search-submit {
  display: grid;
  place-items: center;
  width: 38px;
  border: 0;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
}

.search-submit:hover { background: var(--red); }
.search-submit svg { width: 16px; height: 16px; }

/* ---------- Arsip & pencarian ---------- */
.archive-header { margin: 32px 0 8px; }

.archive-header .section-title {
  margin: 0 0 18px;
  font-size: 26px;
}

.archive-title span { color: var(--red); }

.archive-description {
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
}

.archive-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.archive-item__thumb {
  position: relative;
  flex: 0 0 200px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: #222;
}

.archive-item__thumb img { transition: transform 0.4s ease; }
.archive-item:hover .archive-item__thumb img { transform: scale(1.06); }

.archive-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.archive-item__title {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.archive-item__excerpt {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Paginasi ---------- */
.pagination { margin: 32px 0 48px; }

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.page-numbers.dots { border: 0; }
.page-numbers.dots:hover { background: none; color: inherit; }

/* ---------- Artikel & halaman ---------- */
.entry-wrap {
  max-width: 820px;
  margin: 32px auto 56px;
}

.entry-header { margin-bottom: 20px; }

.entry-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.entry-title {
  margin-bottom: 12px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--muted);
}

.entry-meta .post-date { font-size: 13px; }
.entry-meta a { font-weight: 600; }

.entry-thumb {
  margin: 0 0 24px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #222;
}

.entry-content {
  font-size: 17px;
  line-height: 1.75;
}

.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}

.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 22px; }
.entry-content h4 { font-size: 18px; }

.entry-content ul { list-style: disc; padding-left: 1.5em; }
.entry-content ol { list-style: decimal; padding-left: 1.5em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content a {
  color: var(--red);
  text-decoration: underline;
}

.entry-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--red);
  color: #333;
  font-style: italic;
}

.entry-content img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: initial;
  border-radius: var(--radius);
}

.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content iframe,
.entry-content video { max-width: 100%; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.entry-content pre {
  padding: 16px;
  overflow: auto;
  border-radius: var(--radius);
  background: #111;
  color: #eee;
  font-size: 14px;
}

.page-links { margin-top: 1.5em; font-size: 14px; }

.entry-footer .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.entry-footer .tags a {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.entry-footer .tags a:hover {
  border-color: var(--red);
  color: var(--red);
}

.post-navigation { margin: 40px 0; }

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next { flex: 1; }
.post-navigation .nav-next { text-align: right; }

.post-navigation a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post-navigation a:hover { border-color: var(--red); }

.nav-sub {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related .post-item { align-items: flex-start; }

/* ---------- Komentar ---------- */
.comments { margin-top: 40px; }

.comment-list,
.comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .children { margin-left: 28px; }

.comment-body {
  position: relative;
  margin-bottom: 20px;
  padding: 16px 16px 16px 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
}

.comment-body .avatar {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-metadata { font-size: 12px; color: var(--muted); }
.reply a { font-size: 12px; font-weight: 600; color: var(--red); }

.comment-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: 0;
  border-color: var(--red);
}

.comment-form p { margin-bottom: 14px; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ---------- Tidak ada hasil & 404 ---------- */
.no-results,
.not-found {
  padding: 56px 0;
  text-align: center;
}

.no-results h2 { margin-bottom: 8px; font-size: 22px; }
.no-results p { margin-bottom: 16px; color: var(--muted); }

.not-found h1 {
  font-size: 88px;
  line-height: 1;
  font-weight: 800;
  color: var(--red);
}

.not-found p { margin: 12px 0 20px; color: var(--muted); }

.no-results .search-form,
.not-found .search-form {
  max-width: 420px;
  margin: 0 auto 20px;
}

.no-results .search-field,
.not-found .search-field {
  flex: 1;
  width: auto;
}

/* ---------- Footer ---------- */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
  text-align: left;
}

.widget-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
}

.widget li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 12px;
}

.footer-menu a { font-weight: 500; }

/* ---------- Responsif tambahan ---------- */
@media (max-width: 992px) {
  .archive-list { grid-template-columns: 1fr; }
  .related__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }

  .main-nav {
    display: none;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 12px;
  }

  .main-nav.is-open { display: flex; }

  .main-nav .menu { flex-direction: column; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }

  .main-nav .sub-menu,
  .main-nav .children {
    display: block;
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
  }

  .search-field { width: 100%; flex: 1; }
}

@media (max-width: 640px) {
  .entry-title { font-size: 26px; }
  .entry-content { font-size: 16px; }
  .not-found h1 { font-size: 64px; }

  .archive-item__thumb { flex-basis: 120px; }
  .archive-item__title { font-size: 16px; }
  .archive-item__excerpt { display: none; }

  .post-navigation .nav-links { flex-direction: column; }
}
