/**
 * Blog — Bellco Feeders.
 *
 * The starter kit's archive and single templates are light-theme markup with
 * inline <style> blocks and Font Awesome icon classes this theme never loads.
 * This is the replacement, built on the --bellco-* tokens and sharing its hero,
 * card and CTA shapes with projects.css so /blog/ and /projects/ read as one
 * site rather than two.
 *
 * Loaded only on the posts index, post archives and single posts.
 */

/* ---- index hero ---------------------------------------------------------- */

.bloghero {
  background: var(--bellco-bg-alt);
  padding: 132px 0 56px;
}

.bloghero-crumbs {
  color: var(--bellco-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.bloghero-crumbs a { color: var(--bellco-dim); text-decoration: none; }
.bloghero-crumbs a:hover,
.bloghero-crumbs a:focus-visible { color: var(--bellco-mint); }
.bloghero-crumbs span { margin: 0 8px; }

.bloghero-title {
  color: var(--bellco-text);
  font-size: 56px;
  font-weight: 900;
  line-height: 1.08;
  margin: 0 0 20px;
  text-transform: uppercase;
}

.bloghero-title .accent { color: var(--bellco-mint); }

.bloghero-intro {
  color: var(--bellco-muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  max-width: 62ch;
}

/* ---- list ---------------------------------------------------------------- */

.bloglist { background: var(--bellco-bg); padding: 72px 0 104px; }

/* The newest post leads, because three cards of equal weight give a reader no
   idea where to start. The <a> is the grid itself rather than a display:
   contents wrapper, which browsers have historically dropped out of the
   accessibility tree. */
.blogfeatured {
  align-items: stretch;
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: 16px;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  margin-bottom: 40px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.25s ease;
}

.blogfeatured:hover,
.blogfeatured:focus-visible { border-color: rgba(139, 217, 186, 0.45); }

/* A fixed ratio, not a min-height: with height:100% on the image the box has no
   intrinsic height of its own, so the row ends up sized by whatever aspect the
   photo happens to have -- which made the card twice as tall on an archive with
   one post as it was on the index. */
.blogfeatured-media { aspect-ratio: 3 / 2; overflow: hidden; }

.blogfeatured-img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  width: 100%;
}

.blogfeatured:hover .blogfeatured-img { transform: scale(1.03); }

/* Flex column, not a plain block: the card's children are <span>s so that the
   whole card can be one anchor, and only a flex container blockifies them. */
.blogfeatured-body {
  align-items: flex-start;
  align-self: center;
  display: flex;
  flex-direction: column;
  padding: 48px 48px 52px;
}

.blogfeatured-title {
  color: var(--bellco-text);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
}

.blogfeatured-excerpt {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 24px;
}

.bloggrid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blogcard {
  background: var(--bellco-bg-card);
  border: 1px solid var(--bellco-hairline);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.blogcard:hover,
.blogcard:focus-within {
  border-color: rgba(139, 217, 186, 0.45);
  transform: translateY(-4px);
}

.blogcard-link {
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.blogcard-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blogcard-img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  width: 100%;
}

.blogcard:hover .blogcard-img { transform: scale(1.04); }

.blogcard-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 26px 26px 28px;
}

.blogcard-title {
  color: var(--bellco-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.blogcard-excerpt {
  color: var(--bellco-muted);
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
}

/* ---- shared card furniture ----------------------------------------------- */

.blogcat {
  color: var(--bellco-mint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.blogmeta {
  align-items: center;
  color: var(--bellco-dim);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  margin: 0 0 18px;
}

.blogmeta-dot {
  background: var(--bellco-dim);
  border-radius: 50%;
  height: 3px;
  width: 3px;
}

.blogmore {
  align-items: center;
  color: var(--bellco-mint);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.blogempty { color: var(--bellco-muted); font-size: 18px; }
.blogempty a { color: var(--bellco-mint); }

/* ---- pagination ---------------------------------------------------------- */

.blogpagination {
  border-top: 1px solid var(--bellco-hairline);
  margin-top: 56px;
  padding-top: 32px;
}

.blogpagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blogpagination .page-numbers {
  border: 1px solid var(--bellco-hairline);
  border-radius: 2px;
  color: var(--bellco-text);
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  min-width: 44px;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
}

.blogpagination a.page-numbers:hover,
.blogpagination a.page-numbers:focus-visible {
  border-color: var(--bellco-mint);
  color: var(--bellco-mint);
}

.blogpagination .page-numbers.current {
  background: var(--bellco-mint);
  border-color: var(--bellco-mint);
  color: var(--bellco-on-mint);
}

/* ---- single -------------------------------------------------------------- */

.blogsingle-hero {
  background: var(--bellco-bg-alt);
  overflow: hidden;
  padding: 140px 0 64px;
  position: relative;
}

.blogsingle-hero-bg { inset: 0; position: absolute; }

.blogsingle-hero-img {
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  width: 100%;
}

.blogsingle-hero::after {
  background: linear-gradient(90deg, var(--bellco-bg-alt) 8%, rgba(11, 18, 32, 0.55) 70%, rgba(11, 18, 32, 0.2) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.blogsingle-hero-inner { position: relative; z-index: 1; }

.blogsingle-title {
  color: var(--bellco-text);
  font-size: 46px;
  font-weight: 900;
  line-height: 1.12;
  margin: 0 0 20px;
  max-width: 24ch;
}

.blogsingle-standfirst {
  color: var(--bellco-muted);
  font-size: 19px;
  line-height: 1.7;
  margin: 0 0 28px;
  max-width: 62ch;
}

.blogsingle-body { background: var(--bellco-bg); padding: 72px 0 88px; }

/* ---- prose --------------------------------------------------------------- */

/* Post copy is authored in core blocks, so this styles bare elements rather
   than block classes. 72ch is the readable measure the rest of the site uses
   for long-form. */
/* No measure cap: the post body fills its section the way every other band on
   the site does. The 72ch reading measure left a wide empty right-hand half on
   a desktop post and read as a layout bug rather than as typography. */
.blogprose {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.8;
}

.blogprose > :first-child { margin-top: 0; }
.blogprose > :last-child { margin-bottom: 0; }

/* Size and leading are repeated on the elements rather than left to inherit
   from .blogprose. Theme Settings emits `body, p, ul, li { font-weight:
   var(--body-weight); font-size: var(--body-size); line-height:
   var(--body-line-height) }` inline, and a rule that matches an element
   directly beats a value inherited from an ancestor -- so every paragraph and
   list item in this column was rendering at 16px/1.5 instead of the 17px/1.8
   the column declares, on all 24 posts. Same trap style.css already documents
   for colour. */
.blogprose p,
.blogprose li,
.blogprose ul,
.blogprose ol {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.8;
}

.blogprose p { margin: 0 0 20px; }

.blogprose h2 {
  color: var(--bellco-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin: 48px 0 16px;
}

.blogprose h3 {
  color: var(--bellco-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 36px 0 12px;
}

.blogprose strong { color: var(--bellco-text); font-weight: 700; }

.blogprose a {
  color: var(--bellco-mint);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 217, 186, 0.4);
}

.blogprose a:hover,
.blogprose a:focus-visible { border-bottom-color: var(--bellco-mint); }

.blogprose ul,
.blogprose ol { margin: 0 0 24px; padding-left: 22px; }
.blogprose li { margin-bottom: 10px; }
.blogprose li::marker { color: var(--bellco-mint); }

.blogprose blockquote {
  border-left: 2px solid var(--bellco-mint);
  margin: 32px 0;
  padding: 4px 0 4px 24px;
}

.blogprose blockquote p {
  color: var(--bellco-text);
  font-size: 20px;
  line-height: 1.6;
}

.blogprose img { border-radius: 12px; height: auto; }

.blogprose figure { margin: 32px 0; }

/* YouTube embeds ported from the live site. HubSpot wrapped each one in three
   nested divs with inline padding-bottom to fake a ratio; aspect-ratio does
   the same job without the wrappers, and the iframe has to be told its own
   size or it falls back to the 300x150 replaced-element default. */
.blogprose .blogvideo {
  aspect-ratio: 16 / 9;
  margin: 32px 0;
  max-width: 100%;
}

.blogprose .blogvideo iframe {
  border: 0;
  border-radius: 12px;
  display: block;
  height: 100%;
  width: 100%;
}

.blogprose figcaption {
  color: var(--bellco-dim);
  font-size: 14px;
  margin-top: 10px;
}

.blogprose hr {
  border: 0;
  border-top: 1px solid var(--bellco-hairline);
  margin: 44px 0;
}

/* A table imported from the old site can be wider than a phone. It scrolls
   inside its own box rather than being clipped by the page-level overflow
   guard, which would put the right-hand columns out of reach entirely. */
.blogprose table {
  border-collapse: collapse;
  display: block;
  font-size: 15px;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}

.blogprose th,
.blogprose td {
  border-bottom: 1px solid var(--bellco-hairline);
  padding: 12px 14px;
  text-align: left;
}

.blogprose th { color: var(--bellco-text); font-weight: 700; }

/* A wide table must scroll inside itself rather than push the page sideways. */
.blogprose .wp-block-table { overflow-x: auto; }

/* ---- prev / next --------------------------------------------------------- */

.blognav {
  border-top: 1px solid var(--bellco-hairline);
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 64px;
  padding-top: 32px;
}

.blognav-link {
  color: var(--bellco-text);
  display: block;
  text-decoration: none;
}

.blognav-link--next { text-align: right; }

.blognav-label {
  color: var(--bellco-dim);
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.blognav-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.blognav-link:hover .blognav-title,
.blognav-link:focus-visible .blognav-title { color: var(--bellco-mint); }

/* ---- closing CTA --------------------------------------------------------- */

.blogcta {
  background: var(--bellco-bg-card);
  border-top: 1px solid var(--bellco-hairline);
  padding: 80px 0;
  text-align: center;
}

.blogcta-title {
  color: var(--bellco-text);
  font-size: 34px;
  font-weight: 900;
  margin: 0 0 14px;
}

.blogcta-body {
  color: var(--bellco-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 auto 30px;
  max-width: 56ch;
}

.blogcta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 0;
}

/* ---- breakpoints --------------------------------------------------------- */

@media (max-width: 1199px) {
  .bloghero { padding: 116px 0 44px; }
  .bloghero-title { font-size: 44px; }
  .blogfeatured-body { padding: 36px 36px 40px; }
  .blogfeatured-title { font-size: 26px; }
  .bloggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .blogsingle-title { font-size: 38px; }
}

@media (max-width: 767px) {
  .bloghero { padding: 104px 0 36px; }
  .bloghero-title { font-size: 32px; }
  .bloghero-intro { font-size: 16px; }
  .bloglist { padding: 48px 0 72px; }
  .blogfeatured { grid-template-columns: 1fr; }
  .blogfeatured-media { aspect-ratio: 16 / 10; }
  .blogfeatured-body { padding: 28px 24px 32px; }
  .blogfeatured-title { font-size: 23px; }
  .bloggrid { grid-template-columns: 1fr; }
  .blogsingle-hero { padding: 104px 0 44px; }
  .blogsingle-title { font-size: 28px; }
  .blogsingle-standfirst { font-size: 17px; }
  .blogsingle-body { padding: 48px 0 64px; }
  /* Repeated on the children for the same reason as the desktop rule above --
     the wrapper alone no longer decides the size. */
  .blogprose,
  .blogprose p,
  .blogprose li,
  .blogprose ul,
  .blogprose ol { font-size: 16px; }
  .blogprose h2 { font-size: 24px; margin-top: 36px; }
  .blognav { grid-template-columns: 1fr; }
  .blognav-link--next { text-align: left; }
  .blogcta { padding: 56px 0; }
  .blogcta-title { font-size: 26px; }
  .blogcta-actions .btn { width: 100%; }
}
