/* Blog listing (newBlogs.html) and post page (newBlogDetails.html).
   Builds on css/news.css: same tokens, hero, chips, filters and buttons. */

/* Covers: a photo, or a typographic panel for posts without an image */
.blog-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--news-wash);
  aspect-ratio: 16 / 9;
}
.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-cover--type {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
  background: var(--news-teal);
  color: #fff;
  text-decoration: none;
}
.blog-cover--type.is-light { background: var(--news-wash); color: var(--news-teal); }
/* Covers are links on the listing: beat the page's link colours */
.news-page a.blog-cover--type, .news-page a.blog-cover--type:hover { color: #fff; }
.news-page a.blog-cover--type.is-light, .news-page a.blog-cover--type.is-light:hover { color: var(--news-teal); }
.blog-cover__eyebrow {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #bfe3f0;
  position: relative;
  z-index: 1;
}
.is-light .blog-cover__eyebrow { color: var(--news-teal); }
.blog-cover__mark {
  position: absolute;
  right: -0.06em;
  bottom: -0.32em;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(150px, 16vw, 220px);
  line-height: 1;
  color: #7fc4dc;
  opacity: 0.35;
  pointer-events: none;
}
.is-light .blog-cover__mark { color: var(--news-teal); opacity: 0.12; }
.blog-cover__title {
  position: relative;
  z-index: 1;
  max-width: 80%;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
}

/* Featured (newest) post */
.blog-featured {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 66, 89, 0.1);
  overflow: hidden;
}
.blog-featured__cover { flex: 1 1 440px; min-width: 0; }
.blog-featured__cover .blog-cover { height: 100%; min-height: 260px; aspect-ratio: auto; }
.blog-featured__cover .blog-cover--type { padding: 32px; }
.blog-featured__cover .blog-cover__title { font-size: clamp(24px, 2.6vw, 34px); }
.blog-featured__text {
  flex: 1 1 440px;
  min-width: 0;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
@media (min-width: 768px) { .blog-featured__text { padding: 48px; } }
.blog-featured__text h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.2;
}
.blog-featured__text h2 a { color: var(--news-ink); }
.blog-featured__text p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--news-muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Cards */
.blog-card {
  background: #fff;
  border: 1px solid var(--news-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-card:hover { box-shadow: 0 12px 32px rgba(0, 66, 89, 0.08); transform: translateY(-2px); }
.blog-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.blog-card h3 { margin: 0; font-family: 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 18px; line-height: 1.4; }
.blog-card h3 a { color: var(--news-teal); }
.blog-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--news-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--news-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
}
.blog-card__foot a { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.blog-from-news { display: block; color: var(--news-muted); font-size: 13px; line-height: 1.5; }
.blog-from-news a { font-weight: 600; }
.blog-card .blog-from-news a { padding: 0; }

.blog-skeleton-card { min-height: 380px; border: 0; }
.blog-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 32px; }
.blog-more p { margin: 0; font-size: 14px; color: var(--news-muted); }
.blog-crosslink {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  background: #fff;
  border: 1px solid var(--news-line);
  border-radius: 16px;
  padding: 24px;
}
@media (min-width: 768px) { .blog-crosslink { padding: 28px 40px; } }
.blog-crosslink p { margin: 0; font-size: 16px; color: var(--news-ink); }
.blog-crosslink strong { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 600; display: block; margin-bottom: 2px; }
.blog-crosslink span { color: var(--news-muted); font-size: 15px; }

/* Post page */
.blog-post-hero { padding-bottom: 136px; }
.blog-post-hero--plain { padding-bottom: 64px; }
.blog-post-hero .news-meta span.blog-dot { color: #9bb3bd; }
.blog-post-cover {
  max-width: 1000px;
  margin: -96px auto 0;
  padding: 0 16px;
  position: relative;
}
.blog-post-cover .blog-cover { border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 66, 89, 0.12); aspect-ratio: 2 / 1; }
.blog-post-cover .blog-cover--type { padding: 32px 36px; aspect-ratio: 3 / 1; }
.blog-post-cover .blog-cover__title { font-size: clamp(24px, 3vw, 38px); max-width: 70%; }
@media (max-width: 600px) {
  .blog-post-cover .blog-cover, .blog-post-cover .blog-cover--type { aspect-ratio: 16 / 9; }
}

.blog-article { max-width: 752px; margin: 0 auto; padding: 48px 16px 24px; display: flex; flex-direction: column; gap: 28px; }
.blog-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 16px 20px;
  background: var(--news-wash);
  border-radius: 12px;
  font-size: 15px;
  color: var(--news-ink);
}
.blog-callout a { font-weight: 600; }

.blog-prose { font-size: 18px; line-height: 1.75; color: #1f3a45; overflow-wrap: anywhere; }
.blog-prose > :first-child { margin-top: 0; }
.blog-prose p { margin: 0 0 22px; }
.blog-prose h1, .blog-prose h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.25;
  color: var(--news-ink);
  margin: 44px 0 14px;
}
.blog-prose h3, .blog-prose h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.4;
  color: var(--news-ink);
  margin: 34px 0 10px;
}
.blog-prose ul, .blog-prose ol { margin: 0 0 22px; padding-left: 1.4em; }
.blog-prose li { margin: 0 0 10px; padding-left: 4px; }
.blog-prose li::marker { color: var(--news-teal); }
.blog-prose strong { color: var(--news-ink); font-weight: 600; }
.blog-prose a { color: var(--news-teal); text-decoration: underline; text-decoration-color: #7fc4dc; text-underline-offset: 3px; }
.blog-prose a:hover { text-decoration-color: var(--news-teal); }
.blog-prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--news-teal);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--news-teal);
}
.blog-prose hr { border: 0; border-top: 1px solid var(--news-line); margin: 36px 0; }
.blog-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.blog-prose code { font-size: 0.9em; background: var(--news-wash); padding: 1px 6px; border-radius: 4px; }
.blog-prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 22px; }
.blog-prose th, .blog-prose td { border: 1px solid var(--news-line); padding: 8px 12px; text-align: left; }
@media (max-width: 600px) { .blog-prose { font-size: 17px; } }

@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
  .blog-card:hover { transform: none; }
}
