/* ═══════════════════════════════════════════════════════════
   BLOG / ARCHIVE / SEARCH / SIDEBAR / WIDGET / COMMENT STYLES
   Dipakai oleh: index.php, archive.php, search.php, single.php,
   sidebar.php, comments.php, searchform.php, 404.php
   ═══════════════════════════════════════════════════════════ */

/* ── Layout dua kolom: konten + sidebar ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.blog-main { min-width: 0; }

@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Archive / search page header meta ── */
.archive-desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-mid);
  line-height: 1.7;
  max-width: 640px;
  margin-top: 10px;
}
.search-results-info {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-dim);
  margin-bottom: 28px;
}
.search-results-info strong { color: var(--black); }

/* ── Search Form ── */
.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}
.search-form .search-field {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--gray-lt);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-form .search-field::placeholder { color: var(--gray-mid); }
.search-form .search-field:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,166,35,.15);
}
.search-form .search-submit {
  flex-shrink: 0;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s, transform .15s;
}
.search-form .search-submit svg { display: block; flex-shrink: 0; }
.search-form .search-submit:hover { background: var(--yellow-lt); transform: translateY(-1px); }

/* Search form di dalam sidebar/widget — dibuat jadi satu bar ringkas
   (input + tombol ikon menyatu) supaya tidak jadi kotak oranye besar
   yang terpisah dari kolom input. */
.widget .search-form {
  position: relative;
  display: block;
}
.widget .search-form .search-field {
  width: 100%;
  height: 44px;
  padding-right: 46px;
}
.widget .search-form .search-submit {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  height: auto;
  width: 36px;
  padding: 0;
  border-radius: 6px;
}

/* Search form varian gelap (dipakai di 404) */
.search-form-dark .search-field {
  background: var(--steel);
  border: 1.5px solid var(--steel-lt);
  color: var(--white);
}
.search-form-dark .search-field::placeholder { color: var(--gray-mid); }

/* ── No results state ── */
.no-results-box {
  background: var(--off-white);
  border: 1px dashed var(--gray-lt);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
}
.no-results-box .nr-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(245,166,35,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--yellow-dk);
}
.no-results-box h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 8px;
}
.no-results-box p {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--gray-dim);
  max-width: 440px;
  margin: 0 auto 22px;
  line-height: 1.7;
}
.no-results-box .search-form { max-width: 420px; margin: 0 auto; }

/* ── Sidebar ── */
.site-sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: 12px;
  padding: 26px;
}
.widget-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -.01em;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Generic widget content resets */
.widget ul { list-style: none; }
.widget ul li {
  padding: 9px 0;
  border-bottom: 1px solid var(--off-white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-dim);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  color: var(--gray-dim);
  text-decoration: none;
  transition: color .2s;
}
.widget ul li a:hover { color: var(--yellow-dk); }
.widget select { width: 100%; }
.widget img { max-width: 100%; height: auto; border-radius: 8px; }
.widget p { font-family: var(--font-body); font-size: 14px; color: var(--gray-dim); line-height: 1.7; }
.widget table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 13px; }
.widget table caption { font-family: var(--font-head); font-weight: 700; padding-bottom: 10px; color: var(--black); }
.widget table th, .widget table td { padding: 8px; text-align: center; color: var(--gray-dim); }
.widget table th { color: var(--black); font-weight: 700; }
.widget table td#today { background: var(--yellow); color: var(--black); border-radius: 4px; font-weight: 700; }

/* Tag cloud */
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget .tagcloud a {
  display: inline-block;
  padding: 6px 13px !important;
  background: var(--off-white);
  border-radius: 999px;
  font-size: 12.5px !important;
  color: var(--gray-dim);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.widget .tagcloud a:hover { background: var(--yellow); color: var(--black); }

/* Recent posts w/ thumbnail (if theme supports it) */
.widget .rp-item { display: flex; gap: 12px; align-items: flex-start; }
.widget .rp-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--off-white); }

/* Kartu CTA khusus di sidebar */
.widget-cta {
  background: var(--dark);
  border: none;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}
.widget-cta .widget-title { color: var(--white); border-bottom-color: var(--yellow); }
.widget-cta p { color: var(--gray-mid); margin-bottom: 18px; }
.widget-cta .btn-primary { width: 100%; text-align: center; justify-content: center; }

/* ── Pagination ── */
.pagination,
.navigation.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
}
.pagination .page-numbers,
.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-lt);
  background: var(--white);
  color: var(--gray-dim);
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.pagination .page-numbers:hover { border-color: var(--yellow); color: var(--black); }
.pagination .page-numbers.current { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.pagination .page-numbers.dots { border: none; background: none; }

/* ── Comments ── */
.comments-area { margin-top: 56px; }
.comments-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 28px;
}
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.comment-list .children { list-style: none; margin-top: 22px; margin-left: 40px; display: flex; flex-direction: column; gap: 22px; }

.jb-comment-inner {
  display: flex;
  gap: 16px;
  background: var(--off-white);
  border-radius: 12px;
  padding: 22px;
}
.jb-comment-avatar img { border-radius: 50%; display: block; }
.jb-comment-body { flex: 1; min-width: 0; }
.jb-comment-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.jb-comment-author { font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--black); }
.jb-comment-date a { font-family: var(--font-body); font-size: 12.5px; color: var(--gray-mid); text-decoration: none; }
.jb-comment-date a:hover { color: var(--yellow-dk); }
.jb-comment-awaiting { font-size: 13px; color: var(--yellow-dk); font-style: italic; margin-bottom: 8px; }
.jb-comment-content { font-family: var(--font-body); font-size: 14.5px; color: var(--gray-dim); line-height: 1.75; }
.jb-comment-content p { margin-bottom: 10px; }
.jb-comment-reply { margin-top: 10px; }
.jb-comment-reply a {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--yellow-dk);
  text-decoration: none;
}
.jb-comment-reply a:hover { text-decoration: underline; }

.comment-respond {
  margin-top: 40px;
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: 12px;
  padding: 28px;
}
.comment-reply-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 18px;
}
.comment-reply-title small a { font-size: 12px; color: var(--gray-mid); font-weight: 500; margin-left: 8px; }
.comment-notes, .logged-in-as { font-family: var(--font-body); font-size: 13px; color: var(--gray-mid); margin-bottom: 16px; }
.comment-form p { margin-bottom: 16px; }
.comment-form label {
  display: block;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-lt);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,166,35,.15);
}
.comment-form .form-submit { margin-bottom: 0; }
.comment-form #submit {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
  background: var(--yellow);
  border: none;
  border-radius: var(--radius);
  padding: 13px 26px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.comment-form #submit:hover { background: var(--yellow-lt); transform: translateY(-1px); }
.comments-closed-note {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-mid);
  font-style: italic;
}

/* ── Kartu artikel (single.php & page.php) ── */
.entry-card {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: 12px;
  padding: 36px;
}
.entry-card-thumb {
  margin: -36px -36px 28px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
@media (max-width: 640px) {
  .entry-card { padding: 24px; }
  .entry-card-thumb { margin: -24px -24px 22px; }
}

/* ── Tipografi konten (hasil editor WordPress: the_content()) ──
   Dipakai lewat class .entry-content supaya tulisan panjang (artikel,
   halaman kebijakan, dll) rapi dan enak dibaca — heading, paragraf,
   list, kutipan, tabel, dan gambar semua punya gaya konsisten dengan
   desain situs. ── */
.entry-content {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: #3a3f47;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content p {
  margin: 0 0 22px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: var(--font-head);
  color: var(--black);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 42px 0 18px;
}
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }

.entry-content h1 { font-size: 30px; }
.entry-content h2 {
  font-size: 25px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--yellow);
}
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 17px; }
.entry-content h5,
.entry-content h6 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }

.entry-content a {
  color: var(--yellow-dk);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  transition: color .2s;
}
.entry-content a:hover { color: var(--black); }

.entry-content strong,
.entry-content b { color: var(--black); font-weight: 700; }
.entry-content em,
.entry-content i { font-style: italic; }

.entry-content ul,
.entry-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 10px; padding-left: 4px; }
.entry-content li > ul,
.entry-content li > ol { margin-top: 10px; margin-bottom: 0; }
.entry-content li::marker { color: var(--yellow-dk); font-weight: 700; }

.entry-content blockquote {
  margin: 28px 0;
  padding: 20px 26px;
  background: var(--off-white);
  border-left: 4px solid var(--yellow);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray-dim);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content hr {
  border: none;
  border-top: 1px solid var(--gray-lt);
  margin: 40px 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 8px 0;
  display: block;
}
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignleft { float: left; margin: 6px 24px 16px 0; }
.entry-content .alignright { float: right; margin: 6px 0 16px 24px; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption img { margin: 0; }
.entry-content .wp-caption-text,
.entry-content figcaption {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--gray-mid);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
}
.entry-content th,
.entry-content td {
  padding: 12px 16px;
  border: 1px solid var(--gray-lt);
  text-align: left;
}
.entry-content th {
  background: var(--off-white);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--black);
}
.entry-content tr:nth-child(even) td { background: #fcfbf9; }

.entry-content code {
  background: var(--off-white);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--yellow-dk);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.entry-content pre {
  background: var(--dark);
  color: var(--gray-lt);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 13.5px;
  line-height: 1.7;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

.entry-content iframe,
.entry-content video,
.entry-content embed {
  max-width: 100%;
  border-radius: 10px;
  margin: 8px 0;
}

.entry-content .wp-block-button__link,
.entry-content .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--yellow);
  color: var(--black) !important;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none !important;
}

@media (max-width: 640px) {
  .entry-content { font-size: 15px; }
  .entry-content h1 { font-size: 25px; }
  .entry-content h2 { font-size: 21px; }
  .entry-content h3 { font-size: 18px; }
  .entry-content .alignleft,
  .entry-content .alignright { float: none; margin: 12px 0; display: block; }
}

/* ── Archive grid (2 kolom, khusus area konten yang berdampingan
   dengan sidebar — beda dari .portfolio-grid 3 kolom di homepage) ── */
/* ── Thumbnail image cover (dipakai di kartu artikel archive/search/index)
   Class ini dipasang lewat the_post_thumbnail('medium_large', array('class'=>'thumb-cover'))
   dan diberi !important supaya tetap konsisten mengisi penuh kotak gambar
   (tanpa ruang kosong di atas/bawah) apa pun rasio foto aslinya, dan tidak
   tertimpa oleh style bawaan WordPress/plugin lain. ── */
.thumb-cover {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.archive-grid .portfolio-img { height: 230px; }

@media (max-width: 640px) {
  .archive-grid { grid-template-columns: 1fr; }
}

/* ── 404 page ── */
.error-404-code {
  font-family: var(--font-head);
  font-size: clamp(72px, 14vw, 140px);
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  letter-spacing: -.03em;
  opacity: .9;
}

@media (max-width: 640px) {
  .search-form { flex-direction: column; }
  .jb-comment-inner { flex-direction: column; }
  .comment-list .children { margin-left: 16px; }
}

/* ── Accessibility & misc utility ── */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}
.screen-reader-text:focus {
  position: fixed !important;
  top: 8px; left: 8px;
  width: auto; height: auto;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--black);
  z-index: 999999;
  border-radius: var(--radius);
  clip: auto !important;
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
}

.page-links {
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--gray-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--gray-lt);
  color: var(--gray-dim);
  text-decoration: none;
}
.page-links a:hover { border-color: var(--yellow); color: var(--black); }
.page-links span:not(:first-child) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
}
