/* ==========================================================================
   content.css — blog posts, article lists, category pages
   ========================================================================== */

.page-hero--compact { padding-block: clamp(1.75rem, 1.25rem + 2vw, 2.75rem); }
.page-hero--compact .page-hero__title { font-size: var(--fs-700); }

/* Post header */
.post-hero {
  color: #fff;
  background:
    radial-gradient(46rem 20rem at 92% -30%, rgb(245 197 24 / 0.12), transparent 60%),
    var(--c-ink);
  padding-block: clamp(1.75rem, 1.25rem + 2vw, 2.75rem) clamp(2rem, 1.5rem + 2vw, 3rem);
}
.post-hero__inner > * { max-width: 56rem; }
.post-hero__title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.08; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.25rem; font-size: var(--fs-300); color: var(--c-muted-light); }
.post-meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.post-meta .icon { width: 1rem; height: 1rem; color: var(--c-accent); }
.post-meta__tag { padding: 0.15rem 0.6rem; border: 1px solid var(--c-line-dark); border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none; }
.post-meta__tag:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* Post body + sidebar */
.post-layout { display: grid; gap: 2.5rem; padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
@media (min-width: 64em) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; align-items: start; }
  .post-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* Article typography (WordPress content) */
.prose { min-width: 0; max-width: 46rem; font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin-top: 1.9em; scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose h2 { font-size: clamp(1.55rem, 1.35rem + 0.9vw, 2rem); letter-spacing: -0.015em; }
.prose h3 { font-size: 1.25rem; }
.prose h4, .prose h5, .prose h6 { font-size: 1.0625rem; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose a { color: var(--c-navy); font-weight: 600; }
.prose a:hover { color: var(--c-orange); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--c-orange); }
.prose img { border-radius: var(--radius); margin-inline: auto; }
.prose > img:first-child { width: 100%; }
.prose blockquote { padding: 1rem 1.25rem; border-left: 4px solid var(--c-accent); background: var(--c-bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--c-line); margin-block: 2em; }
.prose strong { font-weight: 650; color: var(--c-ink); }
.prose code { font-size: 0.9em; padding: 0.1em 0.35em; background: var(--c-bg-soft); border-radius: 0.3rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.prose th, .prose td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.prose td p, .prose th p { margin: 0; }
/* WordPress tables have no <thead>, so their first row acts as the header */
.prose table:not(:has(thead)) tr:first-child td, .prose th { background: var(--c-ink); color: #fff; font-weight: 650; }
.prose table:not(:has(thead)) tr:first-child td strong, .prose th strong { color: inherit; }
.prose table:has(thead) tbody td:first-child { font-weight: 600; }
.prose tr:nth-child(even) td { background: var(--c-bg-soft); }
.prose tr:last-child td { border-bottom: 0; }

/* Admissions card */
.enquiry-card { display: grid; gap: 0.75rem; padding: 1.5rem; background: var(--c-ink); color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.enquiry-card__title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; line-height: 1.25; }
.enquiry-card__text { font-size: var(--fs-300); color: var(--c-muted-light); }
.enquiry-card__actions { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.enquiry-card__actions .btn { justify-content: center; width: 100%; }
.enquiry-card .btn--outline-dark { color: #fff; border-color: var(--c-line-dark); }
.enquiry-card .btn--outline-dark:hover { border-color: var(--c-accent); color: var(--c-accent); }
.enquiry-card__link { justify-self: center; font-size: var(--fs-300); font-weight: 600; color: var(--c-accent); }

/* Post cards */
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.post-grid > li { display: flex; }
.post-card { display: flex; flex-direction: column; width: 100%; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--c-bg-soft); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; padding: 1.15rem 1.25rem 1.3rem; }
.post-card__cat { align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-orange); text-decoration: none; }
.post-card__title { font-size: 1.0625rem; line-height: 1.35; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { color: var(--c-navy); text-decoration: underline; }
.post-card__excerpt { font-size: var(--fs-300); color: var(--c-muted); }
.post-card__date { margin-top: auto; padding-top: 0.25rem; font-size: 0.8125rem; color: var(--c-muted); }

.related .section-title { margin-bottom: 1.75rem; }

/* Topic filter */
.cat-filter { margin-bottom: 2rem; }
.cat-filter ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-filter a { display: block; padding: 0.45rem 1rem; border: 1px solid var(--c-line); border-radius: 999px; font-size: var(--fs-300); font-weight: 600; text-decoration: none; }
.cat-filter a:hover { border-color: var(--c-ink); }
.cat-filter a[aria-current="page"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-accent); }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 3rem; }
.pager ol { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pager a, .pager span { display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding-inline: 0.75rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.pager a:hover { border-color: var(--c-ink); }
.pager [aria-current="page"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-accent); }
.pager__gap { display: grid; place-items: center; min-width: 1.5rem; color: var(--c-muted); }

/* Phones: the long post title is already the H1, so the breadcrumb stops at the category */
@media (max-width: 47.99em) {
  .post-hero .breadcrumb li:last-child { display: none; }
}

/* "Why Vestor" box under blog posts (partials/why-vestor-box.njk) */
.post-main { min-width: 0; }
.why-box { margin-top: 2.5rem; padding: clamp(1.4rem, 1rem + 1.5vw, 2rem); border-radius: var(--radius-lg); background: var(--c-ink); color: #fff; }
.why-box .eyebrow { color: var(--c-accent); }
.why-box__title { margin-top: 0.6rem; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); color: #fff; }
.why-box__list { display: grid; gap: 0.7rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.why-box__list li { display: flex; gap: 0.7rem; align-items: flex-start; color: rgb(255 255 255 / 0.85); line-height: 1.5; }
.why-box__list .icon { flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.15rem; color: var(--c-accent); }
.why-box__list strong { color: #fff; }
.why-box__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.why-box__links a:not(.btn) { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Quick-answer box at the top of refreshed posts (SEO Phase 4) */
.prose .quick-answer { margin: 0 0 2rem; padding: 1.1rem 1.3rem; border-left: 4px solid var(--c-accent); border-radius: 0 var(--radius) var(--radius) 0; background: rgb(255 199 39 / 0.12); }
.prose .quick-answer p { margin: 0; }
.why-box__links .btn { max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; }
