/* ---------------------------------------------------------------
   Blog listing
--------------------------------------------------------------- */
.blog-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1f1f1f linear-gradient(135deg, #ff8000 0%, #1f1f1f 100%);
}
/* `.blog-card-thumb > .field` / `> a` / `.field__item` / `img` and the
   `.field--name-field-image` overrides live in main.css (Category A
   duplicates removed from this file). */
.blog-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* `.section-eyebrow` lives in main.css (Category A duplicate removed). */
/* Spacing between the standard page-title block and the blog view
   below it. Keeps the H1 from sitting right on top of the featured
   card. */
body.path-blog #block-main-page-title,
body.page-route-view-blog-blog #block-main-page-title {
  margin-bottom: 2rem;
}
.blog-view-wrapper { margin-top: 1rem; }

/* ---------------------------------------------------------------
   Featured (most recent) post — wider, taller, more prominent
--------------------------------------------------------------- */
.featured-post .featured-post-wrapper { display: block; }
.featured-post .blog-card-thumb {
  /* Keep a fluid aspect ratio so real images fill the box at every
     width without leaving a gap or overflowing into the card body. */
  aspect-ratio: 16 / 9;
  background: #1f1f1f linear-gradient(135deg, #ff8000 0%, #161616 100%);
}
.featured-post .card-body { padding: 2rem 2.5rem; }
.featured-post h3 { font-size: 1.75rem; line-height: 1.25; }
.featured-post .blog-card-excerpt {
  font-size: 1rem;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.featured-post .badge {
  background-color: #ff8000 !important;
  color: #fff !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.75rem !important;
}
@media (min-width: 768px) {
  .featured-post h3 { font-size: 2.25rem; }
  .featured-post .card-body { padding: 2.5rem 3rem; }
  /* On wider viewports the featured card is wider, so a slightly
     shorter aspect keeps the hero from feeling oversized. */
  .featured-post .blog-card-thumb { aspect-ratio: 21 / 9; }
}

/* ---------------------------------------------------------------
   Single blog post page (node--article--full)
--------------------------------------------------------------- */

/* Full-bleed: break out of any parent .container so the hero and the
   "more posts" section span the entire viewport width, even when the
   theme's page.html.twig wraps the main content in a .container. */
.blog-post-hero,
.more-posts-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.blog-post-hero {
  background: #161616;
  padding-top: 4rem;
  padding-bottom: 1rem;
  overflow: hidden;
}
.blog-post-hero--has-image::before {
  content: "";
  position: absolute;
  /* Slight outset + scale so the blur's soft edges don't show inside
     the hero box. */
  inset: -20px;
  background-image: var(--blog-post-hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 0;
}
.blog-post-hero--has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,22,22,0.45) 0%, rgba(22,22,22,0.80) 100%);
  z-index: 0;
}
.blog-post-hero > .container { position: relative; z-index: 1; }

/* The site's page-title.html.twig wraps the rendered title field in
   <h1 class="display-4 fw-bold ...">, so our entire hero ends up
   INSIDE that outer h1. Without these resets every child (back-link,
   badge, date, reading time, our inner h1) inherits display-4's
   ~3.5rem / bold typography and looks oversized. */
.blog-post-hero,
.blog-post-hero * {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}
.blog-post-hero a { font-size: 0.95rem !important; font-weight: 500 !important; }
.blog-post-hero .small { font-size: 0.875rem !important; }
.blog-post-hero .badge {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}
.blog-post-hero .fw-semibold { font-weight: 600 !important; }
.blog-post-hero .fw-medium   { font-weight: 500 !important; }

/* High-specificity + !important so the theme's default h1 sizing
   (e.g. .display-4, base h1 rules) cannot override these. */
.blog-post-hero h1.blog-post-title,
h1.blog-post-title,
.blog-post-title {
  font-size: 3rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  max-width: 50rem;
  margin: 0 !important;
  font-weight: 700 !important;
  display: block;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff8000 0%, #c2410c 100%);
  font-size: 1.1rem;
}
.author-name { color: #1b1b1b; }

.article-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #2b2b2b;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
.article-body h2,
.article-body h3,
.article-body h4 {
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  color: #1b1b1b;
}
.article-body h2 { font-size: 1.625rem; }
.article-body h3 { font-size: 1.35rem; }
.article-body a {
  color: inherit;
  font-weight: 700;
}
.article-body a:hover,
.article-body a:focus {
  color: inherit;
  text-decoration: underline;
}
.article-body blockquote {
  border-left: 4px solid #ff8000;
  background: rgba(255, 107, 26, 0.06);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #1b1b1b;
}
.article-body ul,
.article-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body code {
  background: rgba(0,0,0,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.95em;
}

.blog-tag {
  font-weight: 500;
  font-size: 0.8rem;
}
.blog-tag-light {
  background: rgba(255, 107, 26, 0.1);
  color: #c2410c;
}

/* "More from the blog" */
.more-posts-section {
  background: #f6f6f8;
  overflow: hidden;
}
.more-post-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1f1f1f linear-gradient(135deg, #ff8000 0%, #1f1f1f 100%);
}
.more-post-thumb > .field,
.more-post-thumb > a,
.more-post-thumb > .field > .field__item,
.more-post-thumb .field--name-field-image,
.more-post-thumb .field--name-field-image > a {
  display: block;
  width: 100%;
  height: 100%;
}
/* `.more-post-thumb img` lives in main.css (Category A duplicate removed). */
.blog-card-cat {
  background: rgba(255, 107, 26, 0.1);
  color: #c2410c;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card-title { color: #1b1b1b; }
.blog-card-date { font-size: 0.8rem; }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.08) !important; }

/* ---------------------------------------------------------------
   Orange-accented pagination
--------------------------------------------------------------- */
.pagination .page-link {
  color: #1b1b1b;
  border-color: rgba(0, 0, 0, 0.1);
}
.pagination .page-link:hover,
.pagination .page-link:focus {
  color: var(--orange);
  background-color: rgba(255, 107, 26, 0.08);
  border-color: rgba(255, 107, 26, 0.25);
  box-shadow: none;
}
.pagination .page-item.active .page-link,
.pagination .page-item.is-active .page-link {
  background-color: var(--orange);
  border-color: #ff8000;
  color: #fff;
}

/* Dark-mode pager: keep text readable on dark backgrounds */
@media (prefers-color-scheme: dark) {
  .pagination .page-link {
    color: #f5f5f5;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.18);
  }
  .pagination .page-link:hover,
  .pagination .page-link:focus {
    color: #ff8000;
    background-color: rgba(255, 107, 26, 0.15);
    border-color: rgba(255, 107, 26, 0.45);
  }
  .pagination .page-item.disabled .page-link {
    color: rgba(255, 255, 255, 0.45);
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.12);
  }
  .pagination .page-item.active .page-link,
  .pagination .page-item.is-active .page-link {
    background-color: #ff8000;
    border-color: #ff8000;
    color: #fff;
  }
}
[data-bs-theme="dark"] .pagination .page-link,
.dark .pagination .page-link,
.theme-dark .pagination .page-link {
  color: #f5f5f5;
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}
[data-bs-theme="dark"] .pagination .page-link:hover,
.dark .pagination .page-link:hover,
.theme-dark .pagination .page-link:hover,
[data-bs-theme="dark"] .pagination .page-link:focus,
.dark .pagination .page-link:focus,
.theme-dark .pagination .page-link:focus {
  color: #ff8000;
  background-color: rgba(255, 107, 26, 0.15);
  border-color: rgba(255, 107, 26, 0.45);
}
[data-bs-theme="dark"] .pagination .page-item.disabled .page-link,
.dark .pagination .page-item.disabled .page-link,
.theme-dark .pagination .page-item.disabled .page-link {
  color: rgba(255, 255, 255, 0.45);
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}
[data-bs-theme="dark"] .pagination .page-item.active .page-link,
.dark .pagination .page-item.active .page-link,
.theme-dark .pagination .page-item.active .page-link {
  background-color: #ff8000;
  border-color: #ff8000;
  color: #fff;
}

/* Dark-mode tweak for the More-posts background */
@media (prefers-color-scheme: dark) {
  .more-posts-section { background: #1a1a1a; }
  .more-posts-section h3 { color: #f5f5f5; }
  .article-body, .article-body p { color: #e5e5e5; }
  .article-body h2, .article-body h3, .article-body h4 { color: #fff; }
  .author-name { color: #f5f5f5; }
}
[data-bs-theme="dark"] .more-posts-section,
.dark .more-posts-section,
.theme-dark .more-posts-section { background: #1a1a1a; }
[data-bs-theme="dark"] .more-posts-section h3,
.dark .more-posts-section h3,
.theme-dark .more-posts-section h3 { color: #f5f5f5; }
[data-bs-theme="dark"] .article-body,
.dark .article-body,
.theme-dark .article-body { color: #e5e5e5; }
[data-bs-theme="dark"] .article-body h2,
[data-bs-theme="dark"] .article-body h3,
[data-bs-theme="dark"] .article-body h4,
.dark .article-body h2,
.dark .article-body h3,
.dark .article-body h4,
.theme-dark .article-body h2,
.theme-dark .article-body h3,
.theme-dark .article-body h4 { color: #fff; }
[data-bs-theme="dark"] .author-name,
.dark .author-name,
.theme-dark .author-name { color: #f5f5f5; }
