/* Blog pages (app/pages/blog, app/components/blog). Same theme as the home page: white / blush, red accent,
   maroon titles, Poppins; the page title sits on a photo band like the heroes of the other inner pages. */

/* ---------- Page grid: band on top, then the main column next to the sidebar ---------- */
.vx-blog {
  --vx-red: #ea2b1f;
  --vx-maroon: #520000;
  --vx-blush: #fbf6f4;
  --vx-text: #4a4f5c;
  --vx-muted: #7a7f8c;
  --vx-line: rgba(82, 0, 0, 0.08);
  /* Inner width of the site's .container, so the band lines up with the navbar */
  --vx-w: calc(100% - 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--vx-w)) minmax(0, 1fr);
  padding-bottom: 72px;
  overflow-x: clip;
  background: #fff;
  color: var(--vx-text);
  font-family: Poppins, sans-serif;
}
/* Wrappers that keep the article / page content together in the HTML without being a layout box */
.vx-blog__flat { display: contents; }
.vx-blog__hero { grid-column: 1 / -1; grid-row: 1; }
.vx-blog__main { grid-column: 2; grid-row: 2; min-width: 0; padding-top: 40px; }
.vx-blog__postnav { grid-column: 2; grid-row: 3; }
.vx-blog__side { grid-column: 2; grid-row: 4; min-width: 0; margin-top: 48px; }

.vx-blog a { color: var(--vx-red); text-decoration: none; }
.vx-blog a:hover { color: #b6140b; text-decoration: none; }

/* ---------- Photo band ---------- */
.vx-blog__hero {
  position: relative;
  isolation: isolate;
  padding: 116px 0 40px;
  background: #3a0805 url('/web/assets/img/home/bg-kontainer.webp') center / cover no-repeat;
  color: #fff;
}
.vx-blog__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(255, 106, 61, 0.28) 0%, rgba(255, 106, 61, 0) 70%),
    linear-gradient(135deg, rgba(48, 6, 4, 0.94) 0%, rgba(98, 12, 7, 0.9) 50%, rgba(150, 22, 14, 0.86) 100%);
}
.vx-blog__hero-in { width: var(--vx-w); margin: 0 auto; }
.vx-blog__hero h1,
.vx-blog__hero .vx-blog__home-title {
  margin: 0;
  max-width: 900px;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
/* Short accent rule above the title (the mark of the section labels on the home page) */
.vx-blog__hero .page-title::before,
.vx-blog__hero .vx-blog__home-title::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff6a3d, #ffb08a);
}
.vx-blog .vx-blog__hero a { color: #ffb08a; }
.vx-blog .vx-blog__hero a:hover { color: #fff; }
.vx-blog__archive-head > div,
.vx-blog__archive-head p { max-width: 680px; margin: 12px 0 0; font-size: 0.95rem; line-height: 1.75; color: rgba(255, 255, 255, 0.8); }
.vx-blog__archive-head > div p { margin: 0 0 0.6em; }
.vx-blog__author { display: flex; flex-direction: column-reverse; gap: 20px; align-items: flex-start; }
.vx-blog__author > div { margin: 0; }
.vx-blog__author .avatar {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

/* Article: label line (category / author) above the title */
.vx-blog--post .entry-header { display: flex; flex-direction: column; }
.vx-blog--post .vx-blog__hero .entry-meta {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.vx-blog--post .vx-blog__hero .entry-meta::before { content: ''; width: 24px; height: 2px; margin-right: 4px; border-radius: 2px; background: #ffb08a; }
.vx-blog--post .vx-blog__hero .entry-meta a[rel='author'] { color: #fff; }

/* ---------- Cards (home grid and the category / tag / author / search lists) ---------- */
.vx-blog__grid,
.vx-blog__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.vx-blog__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--vx-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px -18px rgba(82, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s, box-shadow 0.35s;
}
.vx-blog__card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 43, 31, 0.22);
  box-shadow: 0 22px 44px -18px rgba(234, 43, 31, 0.3);
}
.vx-blog__thumb { overflow: hidden; background: var(--vx-blush); }
.vx-blog__thumb a { display: block; }
.vx-blog__thumb img { display: block; width: 100%; height: auto; }
.vx-blog__card .vx-blog__thumb img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.vx-blog__card:hover .vx-blog__thumb img { transform: scale(1.04); }
.vx-blog__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }

/* Category as the section label of the home page: red caps and a short rule */
.vx-blog__cats,
.vx-blog__list .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.vx-blog__cats::before,
.vx-blog__list .entry-meta::before { content: ''; width: 24px; height: 2px; margin-right: 4px; border-radius: 2px; background: var(--vx-red); }
.vx-blog__list .entry-meta { order: -1; color: #b9aeb0; }
.vx-blog__list .entry-meta a[rel='author'] { color: var(--vx-muted); font-weight: 600; }
.vx-blog__list .entry-meta a[rel='author']:hover { color: var(--vx-red); }

.vx-blog__card .entry-title { margin: 0; font-size: 1.08rem; font-weight: 600; line-height: 1.45; }
.vx-blog__card .entry-title a { color: var(--vx-maroon); transition: color 0.25s; }
.vx-blog__card:hover .entry-title a,
.vx-blog__card .entry-title a:hover { color: var(--vx-red); }
/* The whole card opens the article; the other links stay clickable on top */
.vx-blog__card .entry-title a::after { content: ''; position: absolute; inset: 0; }
.vx-blog__cats a,
.vx-blog__card .entry-meta a,
.vx-blog__more { position: relative; z-index: 1; }
.vx-blog__grid .entry-meta { margin-top: 8px; font-size: 0.8rem; color: var(--vx-muted); }
.vx-blog__summary { margin: 12px 0 18px; font-size: 0.9rem; line-height: 1.75; color: var(--vx-text); }
/* Secondary action: text link, as .vx-link on the home page */
.vx-blog__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: auto;
  padding: 2px 0;
  border-bottom: 1.5px solid rgba(234, 43, 31, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  transition: gap 0.25s, border-color 0.25s;
}
.vx-blog__more::after { content: '\2192'; font-size: 1rem; line-height: 1; }
.vx-blog__card:hover .vx-blog__more { gap: 10px; border-color: var(--vx-red); }
.vx-blog__empty { margin: 0 0 24px; padding: 28px; border: 1px dashed rgba(234, 43, 31, 0.25); border-radius: 20px; background: var(--vx-blush); text-align: center; }

/* ---------- Page links ---------- */
.vx-blog__pagination { display: block; margin-top: 44px; }
.vx-blog__pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.vx-blog__pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(82, 0, 0, 0.1);
  border-radius: 999px;
  color: var(--vx-maroon);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.vx-blog__pagination a.page-numbers:hover { border-color: var(--vx-red); background: #fff4f0; color: var(--vx-red); }
.vx-blog__pagination .current { border-color: var(--vx-red); background: var(--vx-red); color: #fff; box-shadow: 0 8px 18px rgba(234, 43, 31, 0.28); }
.vx-blog__pagination .dots { min-width: 0; padding: 0 2px; border: 0; color: var(--vx-muted); }
.vx-blog__pagination .prev,
.vx-blog__pagination .next { padding: 0 14px; border-color: transparent; color: var(--vx-red); font-weight: 600; }

/* ---------- Article ---------- */
.vx-blog__cover { border-radius: 16px; box-shadow: 0 24px 56px -26px rgba(82, 0, 0, 0.5); }
.vx-blog--cover .vx-blog__hero { padding-bottom: 96px; }
.vx-blog--cover .vx-blog__main { padding-top: 0; }
.vx-blog--cover .vx-blog__cover { position: relative; margin: -64px 0 32px; }

.vx-blog__content { font-size: 1rem; line-height: 1.85; color: #3f4450; overflow-wrap: anywhere; }
.vx-blog__content h1,
.vx-blog__content h2,
.vx-blog__content h3,
.vx-blog__content h4,
.vx-blog__content h5,
.vx-blog__content h6 { color: var(--vx-maroon); font-weight: 600; line-height: 1.35; margin: 1.7em 0 0.6em; }
.vx-blog__content h1 { font-size: 1.55rem; }
.vx-blog__content h2 { position: relative; margin-top: 2em; padding-left: 16px; font-size: 1.38rem; }
/* Red bar next to the section titles, as the tab titles on the home page */
.vx-blog__content h2::before { content: ''; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 4px; border-radius: 4px; background: var(--vx-red); }
.vx-blog__content h3 { font-size: 1.16rem; }
.vx-blog__content h4,
.vx-blog__content h5,
.vx-blog__content h6 { font-size: 1.04rem; }
.vx-blog__content > :first-child { margin-top: 0; }
.vx-blog__content p { margin: 0 0 1.15em; }
.vx-blog__content strong,
.vx-blog__content b { color: #1f1f2e; font-weight: 600; }
.vx-blog__content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) { color: inherit; font-weight: inherit; }
.vx-blog__content a :is(strong, b) { color: inherit; }
.vx-blog__content a { font-weight: 500; border-bottom: 1px solid rgba(234, 43, 31, 0.35); transition: border-color 0.25s; }
.vx-blog__content a:hover { border-color: var(--vx-red); }
.vx-blog__content img { max-width: 100%; height: auto; border-radius: 14px; }
.vx-blog__content a:has(img) { border: 0; }
.vx-blog__content figure { margin: 1.6em 0; }
.vx-blog__content figcaption { margin-top: 8px; font-size: 0.84rem; color: var(--vx-muted); text-align: center; }
.vx-blog__content ul,
.vx-blog__content ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.vx-blog__content li { margin: 0.3em 0; padding-left: 0.2em; }
.vx-blog__content li::marker { color: var(--vx-red); font-weight: 600; }
.vx-blog__content blockquote { margin: 1.6em 0; padding: 16px 22px; border-left: 4px solid var(--vx-red); border-radius: 0 14px 14px 0; background: var(--vx-blush); color: #3b3134; }
.vx-blog__content blockquote > :last-child { margin-bottom: 0; }
.vx-blog__content table { display: block; width: 100%; margin: 1.6em 0; overflow-x: auto; border-collapse: collapse; font-size: 0.94rem; line-height: 1.6; }
.vx-blog__content th,
.vx-blog__content td { padding: 10px 14px; border: 1px solid #ead9d4; text-align: left; vertical-align: top; }
.vx-blog__content th,
.vx-blog__content thead td { background: var(--vx-blush); color: var(--vx-maroon); font-weight: 600; }
.vx-blog__content iframe { max-width: 100%; border-radius: 14px; }
.vx-blog__content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.vx-blog__content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.vx-blog__content .alignright { float: right; margin: 0 0 1em 1.2em; }
.vx-blog__content .has-text-align-center { text-align: center; }
.vx-blog__content .has-text-align-right { text-align: right; }
.vx-blog__content [id] { scroll-margin-top: 110px; }

/* Contents box (same markup as the old "Table of Contents Plus" plugin) */
#toc_container { margin: 1.8em 0 2em; padding: 22px 24px; border: 1px solid rgba(234, 43, 31, 0.1); border-radius: 20px; background: var(--vx-blush); }
#toc_container .toc_title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--vx-red);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
#toc_container .toc_title::before { content: ''; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
#toc_container ul { list-style: none; margin: 0; padding: 0; }
#toc_container ul ul { margin: 2px 0 6px 0.4em; padding-left: 0.9em; border-left: 1px solid rgba(234, 43, 31, 0.16); }
#toc_container li { margin: 0; padding: 3px 0; font-size: 0.9rem; line-height: 1.55; }
#toc_container ul ul li { font-size: 0.86rem; }
#toc_container a { border: 0; color: #3b3134; font-weight: 500; transition: color 0.25s; }
#toc_container ul ul a { color: var(--vx-text); font-weight: 400; }
#toc_container a:hover { color: var(--vx-red); }
#toc_container .toc_number { margin-right: 2px; color: var(--vx-red); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tags: chips as on the "Panduan Impor" steps of the home page */
.vx-blog__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed rgba(234, 43, 31, 0.2); }
.vx-blog .vx-blog__tags a {
  padding: 6px 14px;
  border: 1px solid rgba(234, 43, 31, 0.18);
  border-radius: 999px;
  background: #fff4f0;
  color: #a3170f;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color 0.25s, background 0.25s;
}
.vx-blog .vx-blog__tags a:hover { border-color: var(--vx-red); background: #ffe9e2; }

/* Previous / next article: text links */
.vx-blog__postnav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--vx-line); }
.vx-blog__postnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border-bottom: 1.5px solid rgba(234, 43, 31, 0.3);
  font-size: 0.92rem;
  font-weight: 600;
  transition: gap 0.25s, border-color 0.25s;
}
.vx-blog__postnav a:hover { gap: 10px; border-color: var(--vx-red); }

/* ---------- Sidebar ---------- */
.vx-blog__search { position: relative; margin: 0 0 22px; }
.vx-blog__search input {
  width: 100%;
  height: 52px;
  padding: 0 58px 0 20px;
  border: 1px solid rgba(82, 0, 0, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #1f1f2e;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vx-blog__search input::placeholder { color: #a39a9c; }
.vx-blog__search input:focus { outline: 0; border-color: #ff8a65; box-shadow: 0 0 0 4px rgba(234, 43, 31, 0.12); }
.vx-blog__search button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6a3d 0%, #ea2b1f 100%);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px rgba(234, 43, 31, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vx-blog__search button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(234, 43, 31, 0.4); }
.vx-blog__widget { padding: 24px 24px 10px; border: 1px solid var(--vx-line); border-radius: 20px; background: #fff; box-shadow: 0 12px 32px -20px rgba(82, 0, 0, 0.18); }
.vx-blog__widget h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--vx-red);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.vx-blog__widget h2::before { content: ''; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.vx-blog__widget ul { list-style: none; margin: 0; padding: 0; counter-reset: vx-recent; }
.vx-blog__widget li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px dashed rgba(234, 43, 31, 0.2);
  font-size: 0.9rem;
  line-height: 1.55;
  counter-increment: vx-recent;
}
.vx-blog__widget li:first-child { border-top: 0; }
.vx-blog__widget li::before { content: counter(vx-recent, decimal-leading-zero); padding-top: 2px; color: var(--vx-red); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; }
.vx-blog__widget li a { color: #3b1a1a; font-weight: 500; transition: color 0.25s; }
.vx-blog__widget li a:hover { color: var(--vx-red); }

/* ---------- Wider screens ---------- */
@media (min-width: 576px) {
  .vx-blog { --vx-w: 510px; }
  .vx-blog__grid,
  .vx-blog__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .vx-blog__author { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
}
@media (min-width: 768px) {
  .vx-blog { --vx-w: 690px; padding-bottom: 88px; }
  .vx-blog__hero { padding: 140px 0 52px; }
  .vx-blog__hero h1,
  .vx-blog__hero .vx-blog__home-title { font-size: 2.2rem; }
  .vx-blog__main { padding-top: 48px; }
  .vx-blog--cover .vx-blog__hero { padding-bottom: 132px; }
  .vx-blog--cover .vx-blog__cover { margin: -88px 0 40px; border-radius: 20px; }
  .vx-blog__content { font-size: 1.02rem; }
  .vx-blog__content h2 { font-size: 1.5rem; }
  .vx-blog__content h3 { font-size: 1.2rem; }
  #toc_container { padding: 26px 30px; }
  #toc_container .toc_list { columns: 2; column-gap: 40px; }
  #toc_container .toc_list > li { break-inside: avoid; }

  /* First article of the page leads: image beside the text, full width (and the last one when it would sit alone) */
  .vx-blog__grid > .vx-blog__card:first-child,
  .vx-blog__list > .vx-blog__card:first-child,
  .vx-blog__grid > .vx-blog__card:last-child:nth-child(even),
  .vx-blog__list > .vx-blog__card:last-child:nth-child(even) { grid-column: 1 / -1; flex-direction: row; }
  .vx-blog__card:first-child > .vx-blog__thumb,
  .vx-blog__card:last-child:nth-child(even) > .vx-blog__thumb { position: relative; flex: 0 0 50%; min-height: 280px; }
  .vx-blog__card:first-child > .vx-blog__thumb img,
  .vx-blog__card:last-child:nth-child(even) > .vx-blog__thumb img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .vx-blog__card:first-child > .vx-blog__body,
  .vx-blog__card:last-child:nth-child(even) > .vx-blog__body { justify-content: center; padding: 28px 30px; }
  .vx-blog__card:first-child > .vx-blog__body .vx-blog__more,
  .vx-blog__card:last-child:nth-child(even) > .vx-blog__body .vx-blog__more { margin-top: 0; }
  .vx-blog__card:first-child .entry-title,
  .vx-blog__card:last-child:nth-child(even) .entry-title { font-size: 1.3rem; line-height: 1.4; }
}
@media (min-width: 992px) {
  .vx-blog {
    --vx-w: 930px;
    grid-template-columns: minmax(0, 1fr) calc(var(--vx-w) * 0.67) calc(var(--vx-w) * 0.33) minmax(0, 1fr);
  }
  .vx-blog__side { grid-column: 3; grid-row: 2 / span 2; align-self: start; position: sticky; top: 96px; margin-top: 0; padding: 48px 0 0 32px; }
}
@media (min-width: 1200px) {
  .vx-blog { --vx-w: min(1232px, 100% - 48px); }
  .vx-blog__hero { padding: 152px 0 60px; }
  .vx-blog__hero h1,
  .vx-blog__hero .vx-blog__home-title { font-size: 2.5rem; }
  .vx-blog__main { padding-top: 56px; }
  .vx-blog__side { padding: 56px 0 0 48px; }
  .vx-blog--cover .vx-blog__hero { padding-bottom: 150px; }
  .vx-blog--cover .vx-blog__cover { margin-top: -98px; }
  .vx-blog__grid,
  .vx-blog__list { gap: 28px; }
  .vx-blog__card:first-child > .vx-blog__body,
  .vx-blog__card:last-child:nth-child(even) > .vx-blog__body { padding: 32px 36px; }
  .vx-blog__card:first-child .entry-title,
  .vx-blog__card:last-child:nth-child(even) .entry-title { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .vx-blog__card,
  .vx-blog__card .vx-blog__thumb img,
  .vx-blog__more,
  .vx-blog__postnav a { transition: none; }
  .vx-blog__card:hover { transform: none; }
  .vx-blog__card:hover .vx-blog__thumb img { transform: none; }
}
