/* ==========================================================================
   Avyanna — Blog listing & single post
   Namespaced with .avb- so legacy theme/Customizer rules don't interfere.
   ========================================================================== */

:root {
  --avb-yellow: #ffcc29;
  --avb-yellow-soft: #fff6d6;
  --avb-blue: #234baf;
  --avb-blue-dark: #19388a;
  --avb-blue-soft: #eef2fc;
  --avb-ink: #14171f;
  --avb-text: #3b4150;
  --avb-muted: #6b7280;
  --avb-line: #e6e8ee;
  --avb-surface: #ffffff;
  --avb-bg: #f6f7fa;
  --avb-radius: 16px;
  --avb-radius-sm: 10px;
  --avb-shadow: 0 1px 2px rgba(20, 23, 31, .04), 0 8px 24px rgba(20, 23, 31, .06);
  --avb-shadow-lg: 0 2px 4px rgba(20, 23, 31, .04), 0 18px 40px rgba(20, 23, 31, .12);
  --avb-header: 108px;
}
@media (max-width: 1024px) {
  :root { --avb-header: 82px; }
}

.avb-page { background: var(--avb-surface); color: var(--avb-text); }
.avb-page *, .avb-page *::before, .avb-page *::after { box-sizing: border-box; }
.avb-page a { text-decoration: none; }

.avb-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.avb-container--narrow { max-width: 860px; }
@media (max-width: 575px) {
  .avb-container { padding: 0 16px; }
}

/* ---------- Shared bits ---------- */
.avb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--avb-blue);
  margin-bottom: 14px;
}
.avb-eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--avb-yellow);
}
.avb-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--avb-yellow);
  color: var(--avb-ink) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.3;
  transition: background .2s;
}
.avb-badge:hover { background: #ffd95c; }
.avb-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  display: inline-block;
}
.avb-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--avb-yellow);
  color: var(--avb-ink) !important;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.avb-btn:hover {
  background: #ffd95c;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 204, 41, .35);
}
.avb-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--avb-line);
  background: var(--avb-surface);
  color: var(--avb-text) !important;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.avb-chip:hover { border-color: var(--avb-blue); color: var(--avb-blue) !important; }
.avb-chip.is-active {
  background: var(--avb-blue);
  border-color: var(--avb-blue);
  color: #fff !important;
}
.avb-chip--sm { padding: 6px 14px; font-size: 13px; }

/* ---------- Hero ---------- */
.avb-hero {
  position: relative;
  margin-top: var(--avb-header);
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(255, 204, 41, .22), transparent 60%),
    radial-gradient(700px 300px at 0% 100%, rgba(35, 75, 175, .10), transparent 60%),
    var(--avb-bg);
  overflow: hidden;
}
.avb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(35, 75, 175, .12) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
          mask-image: linear-gradient(90deg, transparent 40%, #000);
  pointer-events: none;
}
.avb-hero > .avb-container { position: relative; z-index: 1; }
.avb-hero__title {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--avb-ink);
}
.avb-hero__lead {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--avb-muted);
}

/* Toolbar: chips + search */
.avb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}
.avb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.avb-search {
  position: relative;
  flex: 0 1 340px;
  margin: 0;
}
.avb-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--avb-muted);
  font-size: 14px;
}
.avb-search input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 44px;
  border: 1px solid var(--avb-line);
  border-radius: 999px;
  background: var(--avb-surface);
  font-size: 15px;
  color: var(--avb-ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.avb-search input[type="search"]:focus {
  border-color: var(--avb-blue);
  box-shadow: 0 0 0 4px rgba(35, 75, 175, .12);
}
@media (max-width: 767px) {
  .avb-hero { padding: 48px 0 36px; }
  .avb-hero__lead { font-size: 16px; }
  .avb-search { flex-basis: 100%; }
  .avb-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .avb-chips::-webkit-scrollbar { display: none; }
  .avb-chip { flex: 0 0 auto; }
}

/* ---------- Listing grid ---------- */
.avb-listing { padding: 56px 0 96px; }
.avb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
}
@media (max-width: 1024px) { .avb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .avb-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Card ---------- */
.avb-card {
  display: flex;
  flex-direction: column;
  background: var(--avb-surface);
  border: 1px solid var(--avb-line);
  border-radius: var(--avb-radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.avb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--avb-shadow-lg);
  border-color: transparent;
}
.avb-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--avb-bg);
  overflow: hidden;
}
.avb-card__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.avb-card:hover .avb-card__media img { transform: scale(1.05); }
.avb-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 40px;
  color: #c9cfdc;
}
.avb-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}
.avb-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--avb-muted);
}
.avb-card__meta .avb-badge { padding: 4px 10px; font-size: 11px; margin-right: 2px; }
.avb-card__title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.005em;
}
.avb-card__title a {
  color: var(--avb-ink) !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background-image: linear-gradient(var(--avb-yellow), var(--avb-yellow));
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s, color .2s;
}
.avb-card:hover .avb-card__title a { color: var(--avb-blue) !important; }
.avb-card__excerpt {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--avb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.avb-card__more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--avb-blue) !important;
}
.avb-card__more i { transition: transform .25s; }
.avb-card:hover .avb-card__more i { transform: translateX(4px); }

/* Featured card: spans the whole first row, image left / text right */
.avb-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: 20px;
  box-shadow: var(--avb-shadow);
}
.avb-card--featured .avb-card__media { aspect-ratio: 4 / 3; }
.avb-card--featured .avb-card__body { padding: 44px 48px; justify-content: center; }
.avb-card--featured .avb-card__title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.22; margin-bottom: 16px; }
.avb-card--featured .avb-card__excerpt { font-size: 16.5px; -webkit-line-clamp: 4; margin-bottom: 28px; }
.avb-card--featured .avb-card__more {
  margin-top: 0;
  align-self: flex-start;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--avb-yellow);
  color: var(--avb-ink) !important;
}
@media (max-width: 1024px) {
  .avb-card--featured { grid-template-columns: 1fr; }
  .avb-card--featured .avb-card__media { min-height: 0; aspect-ratio: 4 / 3; }
  .avb-card--featured .avb-card__body { padding: 28px; }
}
@media (max-width: 640px) {
  .avb-card--featured .avb-card__body { padding: 22px 20px 24px; }
}

.avb-card--compact .avb-card__title { font-size: 18px; }

/* ---------- Pagination ---------- */
.avb-pagination { margin-top: 56px; }
.avb-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.avb-pagination li { margin: 0; }
.avb-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--avb-line);
  border-radius: 999px;
  background: var(--avb-surface);
  color: var(--avb-ink) !important;
  font-weight: 600;
  transition: all .2s;
}
.avb-pagination a.page-numbers:hover { border-color: var(--avb-blue); color: var(--avb-blue) !important; }
.avb-pagination .page-numbers.current { background: var(--avb-blue); border-color: var(--avb-blue); color: #fff !important; }
.avb-pagination .page-numbers.dots { border: 0; min-width: 24px; padding: 0; }

/* ---------- Empty state ---------- */
.avb-empty {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 0;
}
.avb-empty > i { font-size: 48px; color: #c9cfdc; margin-bottom: 18px; }
.avb-empty h2 { font-size: 26px; color: var(--avb-ink); margin: 0 0 8px; }
.avb-empty p { color: var(--avb-muted); margin: 0 0 24px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.avb-progress {
  position: fixed;
  top: var(--avb-header);
  left: 0;
  right: 0;
  height: 4px;
  z-index: 100000;
  pointer-events: none;
}
.avb-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--avb-yellow), #ffb300);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.avb-hero--single { padding: 48px 0 170px; text-align: center; }
.avb-hero--single:not(:has(+ .avb-cover)) { padding-bottom: 56px; }
.avb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--avb-muted);
}
.avb-breadcrumb a { color: var(--avb-muted) !important; font-weight: 500; }
.avb-breadcrumb a:hover { color: var(--avb-blue) !important; }
.avb-breadcrumb i { font-size: 9px; opacity: .6; }
.avb-hero--single .avb-badge { margin-bottom: 18px; }
.avb-hero__title--single {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.15;
  margin: 0 auto 28px;
  max-width: 900px;
}
.avb-byline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.avb-byline__avatar img { width: 44px; height: 44px; border-radius: 50%; display: block; border: 2px solid #fff; box-shadow: var(--avb-shadow); }
.avb-byline__text { display: flex; flex-direction: column; gap: 2px; }
.avb-byline__name { font-weight: 700; color: var(--avb-ink); font-size: 15px; }
.avb-byline__meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--avb-muted); }

/* Cover image overlapping hero */
.avb-cover {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: -130px auto 0;
}
.avb-cover img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: var(--avb-bg);
  box-shadow: var(--avb-shadow-lg);
  margin: 0 !important;
}
.avb-cover figcaption { margin-top: 12px; font-size: 14px; color: var(--avb-muted); text-align: center; }
@media (max-width: 767px) {
  .avb-hero--single { padding: 32px 0 110px; }
  .avb-cover { margin-top: -80px; }
  .avb-cover img { border-radius: 14px; }
  .avb-byline__avatar { display: none; }
  .avb-byline { justify-content: center; text-align: center; }
  .avb-byline__text { align-items: center; }
  .avb-byline__meta { justify-content: center; }
}

/* 3-column layout: share rail | article | toc */
.avb-layout {
  display: grid;
  grid-template-columns: 64px minmax(0, 720px) 260px;
  justify-content: center;
  column-gap: 48px;
  padding-top: 56px;
  padding-bottom: 72px;
}
/* Side rails occupy only the first row (article text), so they stop scrolling where the write-up ends. */
.avb-rail { grid-row: 1; }
.avb-rail--share { grid-column: 1; }
.avb-rail--toc { grid-column: 3; }
.avb-main { grid-column: 2; }
.avb-layout--no-toc { grid-template-columns: 64px minmax(0, 760px); }
.avb-main { min-width: 0; }
.avb-main--after { grid-row: 2; }
.avb-sticky { position: sticky; top: calc(var(--avb-header) + 28px); }
/* Theme's "eergx-ovh" option puts overflow:hidden on this wrapper, which disables sticky.
   overflow-x: clip still prevents horizontal scroll but keeps the side rails fixed. */
.single-post .body-bg-1 { overflow: visible !important; overflow-x: clip !important; }
/* Customizer "Additional CSS" sets `html, body { overflow-x: hidden !important }`. With both set,
   <body> becomes its own scroll box and sticky rails never stick. Let <html> stay visible on
   single posts; body's overflow-x:hidden then applies to the viewport, so sideways scroll is still blocked. */
html:has(> body.single-post) { overflow-x: visible !important; }
.avb-share__btn--youtube:hover { background: #ff0000; border-color: #ff0000; }
.avb-rail__label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--avb-muted);
}
.avb-rail--share .avb-rail__label { text-align: center; }

/* Share buttons */
.avb-share { display: flex; flex-wrap: wrap; gap: 10px; }
.avb-share--vertical { flex-direction: column; align-items: center; }
.avb-share__btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--avb-line);
  background: var(--avb-surface);
  color: var(--avb-text) !important;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
}
.avb-share__btn:hover { background: var(--avb-blue); border-color: var(--avb-blue); color: #fff !important; transform: translateY(-2px); }
.avb-share__btn.is-copied { background: #16a34a; border-color: #16a34a; color: #fff !important; }

/* TOC */
.avb-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--avb-line); }
.avb-toc li { margin: 0; }
.avb-toc a {
  display: block;
  margin-left: -2px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.45;
  color: var(--avb-muted) !important;
  transition: color .2s, border-color .2s;
}
.avb-toc .avb-toc__l3 a { padding-left: 30px; font-size: 13.5px; }
.avb-toc a:hover { color: var(--avb-ink) !important; }
.avb-toc a.is-active { color: var(--avb-blue) !important; border-left-color: var(--avb-yellow); font-weight: 600; }
.avb-rail--toc .avb-toc ol { max-height: calc(100vh - var(--avb-header) - 120px); overflow-y: auto; scrollbar-width: thin; }

.avb-toc--inline {
  display: none;
  margin-bottom: 32px;
  border: 1px solid var(--avb-line);
  border-radius: var(--avb-radius-sm);
  background: var(--avb-bg);
}
.avb-toc--inline summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--avb-ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avb-toc--inline summary::-webkit-details-marker { display: none; }
.avb-toc--inline summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 12px; transition: transform .2s; }
.avb-toc--inline[open] summary::after { transform: rotate(180deg); }
.avb-toc--inline ol { margin: 0 20px 18px; }

@media (max-width: 1199px) {
  .avb-layout { grid-template-columns: 56px minmax(0, 720px); column-gap: 36px; }
  .avb-rail--toc { display: none; }
  .avb-toc--inline { display: block; }
}
@media (max-width: 860px) {
  .avb-layout, .avb-layout--no-toc { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .avb-rail--share { display: none; }
  .avb-main { grid-column: 1; }
}

/* ---------- Article typography ---------- */
.avb-prose {
  font-size: 18px;
  line-height: 1.8;
  color: var(--avb-text);
  overflow-wrap: break-word;
}
.avb-prose > *:first-child { margin-top: 0 !important; }
.avb-prose p { margin: 0 0 1.4em; font-size: inherit; line-height: inherit; color: inherit; }
.avb-prose strong, .avb-prose b { color: var(--avb-ink); font-weight: 700; }
.avb-prose a { color: var(--avb-blue) !important; text-decoration: underline !important; text-decoration-color: rgba(35, 75, 175, .35) !important; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.avb-prose a:hover { text-decoration-color: var(--avb-blue) !important; }
.avb-prose h1, .avb-prose h2, .avb-prose h3, .avb-prose h4, .avb-prose h5, .avb-prose h6 {
  color: var(--avb-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -.015em;
  scroll-margin-top: calc(var(--avb-header) + 24px);
}
.avb-prose h2 { font-size: clamp(26px, 2.6vw, 32px) !important; line-height: 1.25 !important; margin: 2.2em 0 .7em !important; }
.avb-prose h3 { font-size: clamp(21px, 2vw, 24px) !important; line-height: 1.3 !important; margin: 1.8em 0 .6em !important; }
.avb-prose h4 { font-size: 20px !important; line-height: 1.35 !important; margin: 1.6em 0 .5em !important; }
.avb-prose h5, .avb-prose h6 { font-size: 18px !important; margin: 1.4em 0 .5em !important; }
.avb-prose h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: var(--avb-yellow);
}

/* Lists */
.avb-prose ul, .avb-prose ol { margin: 0 0 1.6em !important; padding-left: 0 !important; list-style: none !important; }
.avb-prose li { position: relative; margin: 0 0 .7em; padding-left: 32px; font-size: inherit; line-height: 1.7; color: inherit; }
.avb-prose li::marker { content: none; }
.avb-prose li::before { content: none !important; }
.avb-prose ul > li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: .72em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--avb-yellow);
  box-shadow: 0 0 0 3px var(--avb-yellow-soft);
}
.avb-prose ol { counter-reset: avb-ol; }
.avb-prose ol > li { counter-increment: avb-ol; padding-left: 40px; }
.avb-prose ol > li::after {
  content: counter(avb-ol);
  position: absolute;
  left: 0;
  top: .2em;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--avb-blue-soft);
  color: var(--avb-blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.avb-prose li > ul, .avb-prose li > ol { margin: .6em 0 0 !important; }

/* Images & media */
.avb-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.avb-prose figure, .avb-prose .wp-block-image { margin: 2em 0; }
.avb-prose figcaption, .avb-prose .wp-caption-text { margin-top: 10px; font-size: 14px; color: var(--avb-muted); text-align: center; }
.avb-prose iframe, .avb-prose video { max-width: 100%; border-radius: 12px; }
.avb-prose .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Blockquote */
.avb-prose blockquote {
  margin: 2em 0 !important;
  padding: 24px 28px !important;
  border: 0 !important;
  border-left: 4px solid var(--avb-yellow) !important;
  border-radius: 0 12px 12px 0;
  background: var(--avb-yellow-soft) !important;
  font-size: 19px;
  font-style: normal;
  color: var(--avb-ink);
}
.avb-prose blockquote p:last-child { margin-bottom: 0; }

/* Tables */
.avb-prose table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  margin: 2em 0;
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--avb-line) !important;
  border-radius: 12px;
  font-size: 15.5px;
  line-height: 1.5;
}
.avb-prose table tbody, .avb-prose table thead { display: table; width: 100%; border-collapse: collapse; }
.avb-prose th, .avb-prose td {
  padding: 13px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--avb-line) !important;
  text-align: left !important;
  vertical-align: top;
  color: var(--avb-text);
}
.avb-prose tr:last-child td { border-bottom: 0 !important; }
.avb-prose thead th, .avb-prose thead td,
.avb-prose table:not(:has(thead)) tbody tr:first-child td {
  background: var(--avb-ink) !important;
  color: #fff !important;
  font-weight: 700;
}
.avb-prose tbody tr:nth-child(even) td { background: var(--avb-bg); }
.avb-prose table:not(:has(thead)) tbody tr:nth-child(even) td { background: transparent; }
.avb-prose table:not(:has(thead)) tbody tr:nth-child(odd):not(:first-child) td { background: var(--avb-bg); }
.avb-prose .wp-block-table { margin: 2em 0; }
.avb-prose .wp-block-table table { margin: 0; }

/* Code, hr */
.avb-prose code { padding: 2px 6px; border-radius: 6px; background: var(--avb-bg); font-size: .9em; color: var(--avb-blue-dark); }
.avb-prose pre { padding: 20px; border-radius: 12px; background: var(--avb-ink); color: #e5e7eb; overflow-x: auto; font-size: 15px; }
.avb-prose pre code { background: none; color: inherit; padding: 0; }
.avb-prose hr { margin: 3em 0; border: 0; border-top: 1px solid var(--avb-line); opacity: 1; }

/* Neutralise the legacy drop-cap on the first paragraph */
.avb-prose p:first-of-type::first-letter { font-size: inherit !important; float: none !important; line-height: inherit !important; margin: 0 !important; font-weight: inherit !important; color: inherit !important; }

@media (max-width: 767px) {
  .avb-prose { font-size: 17px; line-height: 1.75; }
  .avb-prose table { font-size: 14px; }
  .avb-prose th, .avb-prose td { padding: 10px 12px !important; }
}

/* ---------- Article footer ---------- */
.avb-article-footer { margin-top: 56px; display: flex; flex-direction: column; gap: 28px; }
.avb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.avb-tags__label { font-weight: 700; color: var(--avb-ink); margin-right: 6px; }
.avb-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--avb-line);
  border-bottom: 1px solid var(--avb-line);
  font-weight: 600;
  color: var(--avb-ink);
}
.avb-author {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border-radius: var(--avb-radius);
  background: var(--avb-bg);
}
.avb-author__avatar img { width: 72px; height: 72px; border-radius: 50%; display: block; }
.avb-author__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--avb-muted); }
.avb-author__name { margin: 4px 0 8px; font-size: 20px; font-weight: 700; color: var(--avb-ink); }
.avb-author p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--avb-text); }

.avb-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 40px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--avb-blue) 0%, var(--avb-blue-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.avb-cta::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 204, 41, .45), transparent 70%);
}
.avb-cta > * { position: relative; }
.avb-cta h3 { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #fff; line-height: 1.25; }
.avb-cta p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 16px; line-height: 1.6; }
@media (max-width: 767px) {
  .avb-cta { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .avb-author { flex-direction: column; padding: 22px; }
}

.avb-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.avb-postnav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--avb-line);
  border-radius: var(--avb-radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.avb-postnav__item:hover { border-color: var(--avb-blue); box-shadow: var(--avb-shadow); }
.avb-postnav__item span { font-size: 13px; font-weight: 600; color: var(--avb-muted); }
.avb-postnav__item strong { font-size: 16px; line-height: 1.4; color: var(--avb-ink); }
.avb-postnav__item--next { text-align: right; }
@media (max-width: 640px) {
  .avb-postnav { grid-template-columns: 1fr; }
  .avb-postnav__item--next { text-align: left; }
}

/* ---------- Related ---------- */
.avb-related { padding: 72px 0 88px; background: var(--avb-bg); }
.avb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.avb-section-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; color: var(--avb-ink); letter-spacing: -.015em; }
.avb-section-head a { font-weight: 700; color: var(--avb-blue) !important; display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Comments ---------- */
.avb-comments { padding: 64px 0 80px; }
.avb-comments .blog-details-comments-wrap:empty { display: none; }
.avb-comments .comment-respond {
  padding: 36px;
  border: 1px solid var(--avb-line);
  border-radius: var(--avb-radius);
}
.avb-comments .comment-reply-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: var(--avb-ink); }
.avb-comments .comment-notes { color: var(--avb-muted); font-size: 14px; margin-bottom: 20px; }
.avb-comments .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.avb-comments .comment-form > * { grid-column: 1 / -1; margin: 0; }
.avb-comments .comment-form .item:not(.url):not(.mesggage) { grid-column: auto; }
.avb-comments .fx-form-1-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--avb-ink); text-transform: capitalize; }
.avb-comments input[type="text"], .avb-comments input[type="email"], .avb-comments input[type="url"], .avb-comments textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--avb-line);
  border-radius: var(--avb-radius-sm);
  background: var(--avb-surface);
  font-size: 15px;
  color: var(--avb-ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.avb-comments textarea { min-height: 140px; resize: vertical; }
.avb-comments input:focus, .avb-comments textarea:focus { border-color: var(--avb-blue); box-shadow: 0 0 0 4px rgba(35, 75, 175, .12); }
.avb-comments .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--avb-muted); }
.avb-comments .comment-form-cookies-consent input { margin-top: 4px; }
.avb-comments .egx-btn-3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--avb-yellow);
  color: var(--avb-ink);
  font-weight: 700;
}
.avb-comments .egx-btn-3 .btn-icon { display: none; }
.avb-comments .form-submit { display: none; }
.avb-comments .comments-title { font-size: 24px; font-weight: 800; color: var(--avb-ink); margin-bottom: 24px; }
.avb-comments .comments-box-single { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--avb-line); }
.avb-comments .comments-box-single img { border-radius: 50%; width: 56px; height: 56px; }
@media (max-width: 640px) {
  .avb-comments .comment-respond { padding: 24px 20px; }
  .avb-comments .comment-form { grid-template-columns: 1fr; }
}

/* Accessibility helper (theme may not define it) */
.avb-page .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .avb-card, .avb-card__media img, .avb-btn, .avb-share__btn { transition: none !important; }
  .avb-card:hover, .avb-card:hover .avb-card__media img { transform: none; }
}

.avb-card--featured .avb-card__title a { -webkit-line-clamp: 4; }
