/* ──────────────────────────────────────────────────────────
   Blog Hub
   ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap');

.page-template-template-blog-hub #content,
.archive #content,
.category #content,
.archive.category #content {
  overflow: visible !important;
}

.blog-hub-hero {
  --bh-accent: #275a94;
  --bh-accent-hover: #4a78ab;
  --bh-tab-bg: #eaefe8;
  --bh-text: #14171a;
  --bh-text-muted: #5b6066;

  font-family: 'Work Sans', sans-serif;
}

/* ── Hero ──────────────────────────────────────────────── */
.blog-hub-hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 28px 28px;
  overflow: visible;
}

.blog-hub-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blog-hub-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .15) 55%, rgba(0, 0, 0, 0) 100%);
}

.blog-hub-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* Centered container that constrains the hero content (not the tabs) to 80% */
.blog-hub-hero__container {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
  padding-bottom: 40px;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .blog-hub-hero__container {
    max-width: 80%;
  }
}

/* -- Category -- */
  
.category-hub-hero {
  background-color: #f7f8f7;
}

@media (max-width: 600px) {
  .category-hub-hero .blog-hub-hero__title {
    font-size: 28px !important;
    margin-bottom: 20px !important;
  }  
}

.category-hub-hero {
  background-color: #f7f8f7;
}

.blog-popular-cat {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  padding-top: 0 !important;
}

.blog-hub-tabs {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  padding: 24px 24px 36px max( 24px, 4% );
}

@media (min-width: 1024px) {
    .blog-hub-tabs {
      padding: 24px 24px 16px max( 24px, 10% );
    }
}

.blog-hub-tabs::-webkit-scrollbar {
  display: none;
}

.blog-hub-tabs__item {
  flex: 0 0 auto;
  display: inline-block;
  padding: 10px 22px;
  border-radius: 30px;
  color: var(--bh-text);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color .15s ease;
  border-radius: 100px;
  background: white;
  box-shadow: 0 4px 9px 0 rgba(0, 0, 0, 0.12);
}

.blog-hub-tabs__item:hover,
.blog-hub-tabs__item.is-active {
  background: rgba(255, 255, 255, 0.50);
  font-weight: 600;
}

/* Invisible bold ghost reserves the bold-text width at all times so the
   tab never resizes when font-weight changes on hover/active. */
.blog-hub-tabs__item::after {
  content: attr(data-text);
  display: block;
  font-weight: 600;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.blog-hub-hero__content {
  width: 100%;
  max-width: 480px;
}

.blog-hub-hero__breadcrumb * {
  margin: 0 0 12px;
  font-weight: 400;
  line-height: 22px;
  color: var(--bh-text-muted);
  font-family: 'Work Sans', sans-serif;
  margin-bottom: 30px;
}

@media (max-width: 480px) {
  .blog-hub-hero__breadcrumb {
      margin-bottom: 20px;
  }
}

.blog-hub-hero__breadcrumb a {
  color: var(--bh-text-muted);
  text-decoration: none;
  font-family: 'Work Sans', sans-serif;
}

.blog-hub-hero__title {
  margin: 0 0 14px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--bh-text);
}

@media (max-width: 480px) {
  .blog-hub-hero__title {
    font-size: 33px !important;
  }
}

.blog-hub-hero__text {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bh-text);
  max-width: 380px;
}

/* ── Search ──────────────────────────────────────────────
   Styled to match the FAQ search widget interface */
.blog-hub-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 440px;
}

.blog-hub-search__input {
  flex: 1;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  border-radius: 10px !important;
  padding: 12px 21px !important;
  background: #fff;
  color: var(--bh-text, #14171a);
  border: none !important;
  box-sizing: border-box;
}

@media (max-width: 600px){
  .blog-hub-search__input {
    padding: 10.6px 21px !important;
  }
}

.blog-hub-search__input:focus {
  outline: 2px solid #000;
}

.blog-hub-search__input::placeholder {
  color: var(--bh-text-muted, #5b6066);
}

.blog-hub-search__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: none !important;
  outline: 2px solid transparent;
  border-radius: 50%;
  background: #fff;
  color: var(--bh-text, #14171a);
  cursor: pointer;
  transition: background-color .3s, outline-color .3s;
}

.blog-hub-search__submit:hover {
  outline-color: #000;
  background: #F2F2F2;
}

.blog-hub-search__submit svg {
  display: block;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
  transform-origin: center;
}

.blog-hub-search__submit svg circle {
  transition: r .4s cubic-bezier(.34, 1.56, .64, 1);
  transform-origin: center;
}

.blog-hub-search__submit svg path {
  stroke-dasharray: 6;
  stroke-dashoffset: 0;
  transition: stroke-dasharray .3s ease .05s;
}

.blog-hub-search__submit:hover svg {
  transform: rotate(-20deg) scale(1.1);
}

.blog-hub-search__submit:hover svg path {
  stroke-dasharray: 10;
}

.blog-hub-search__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: calc(100% - 60px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  z-index: 99;
}

.blog-hub-search__message {
  margin: 0;
  padding: 10px 16px;
  font-size: 14px;
  opacity: .6;
}

.blog-hub-search__result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--bh-text, #14171a);
}

.blog-hub-search__result:hover,
.blog-hub-search__result.is-active {
  background: #f5f5f5;
}

.blog-hub-search__result-title {
  font-size: 14px;
  line-height: 1.3;
}

.blog-hub-search__result-cat {
  font-size: 12px;
  opacity: .6;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-hub-hero {
    min-height: 420px;
  }

  .blog-hub-hero__content {
    max-width: 70%;
  }
}

@media (max-width: 600px) {
  .blog-hub-hero {
    min-height: 0;
  }

  .blog-hub-tabs {
    padding: 16px 16px 16px max( 16px, 20px );
  }

  .blog-hub-hero__container {
    padding: 0 0 300px;
  }

  .blog-hub-hero__content {
    max-width: 100%;
  }

  .blog-hub-hero__title {
    font-size: 28px;
  }

  .blog-hub-search {
    max-width: 100%;
  }
}

/* ──────────────────────────────────────────────────────────
   Blog titles
   ────────────────────────────────────────────────────────── */
.blog-sub-title {
  margin: 0 0 28px;
  font-weight: 700;
  color: var(--bh-text, #14171a);
  font-size: 28px !important;
  line-height: 1.3;
}

.blog-medium-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bh-text, #14171a);
}

@media (min-width: 480px) {
  .blog-medium-title {
    font-size: 22px !important;
    line-height: 30px;
  }
}

/* ──────────────────────────────────────────────────────────
   Explore our health guides — carousel
   ────────────────────────────────────────────────────────── */
.blog-guides {
  font-family: 'Work Sans', sans-serif;
  padding: 56px 0;
}

.blog-guides__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (max-width: 480px) {
  .blog-guides__inner .blog-sub-title {
    max-width: 215px;
  }
}

@media (min-width: 1024px) {
  .blog-guides__inner {
    max-width: 80%;
  }
}

.blog-guides__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 24px 8px 0;
}

.blog-guides__track::-webkit-scrollbar {
  display: none;
}

.blog-guides__card:first-child {
  margin-left: max( 24px, 10% );
}

@media (max-width: 900px) {
   .blog-guides__card:first-child {
    margin-left: max( 24px, 5% );
  } 
}

.blog-guides__card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: calc((100% - (4 * 24px)) / 3.8);
  max-width: 320px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-guides__card-image {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 16px;
  background: var(--bh-tab-bg, #eaefe8);
}

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

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

.blog-guides__card-title {
  margin: 0;
  font-size: 20px !important;
  font-weight: 700;
  color: var(--bh-text, #14171a);
}

.blog-hub-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 28px;
}

.blog-hub-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--bh-tab-bg, #E6DED6);
  cursor: pointer;
}

.blog-hub-carousel__dot.is-active {
  background: var(--bh-text, #14171a);
  transform: scale(1.2);
}

@media (max-width: 900px) {
  .blog-guides__card {
    width: calc((100% - (2 * 24px)) / 3);
  }
}

@media (max-width: 600px) {
  .blog-guides {
    padding: 40px 0;
  }

  .blog-guides__track {
    gap: 16px;
  }

  .blog-guides__card {
    width: 65%;
  }

  .blog-guides__card-image {
    aspect-ratio: 1 / 1.2;
    margin-bottom: 12px;
  }

  .blog-guides__card-title {
    font-size: 19px;
  }
}

/* ──────────────────────────────────────────────────────────
   Most popular articles
   ────────────────────────────────────────────────────────── */
.blog-popular {
  font-family: 'Work Sans', sans-serif;
  background: #f7f8f7;
  padding: 35px 0;
  border-radius: 30px;
}

.blog-popular__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .blog-popular__inner {
      max-width: 80%;
  }   
}

.blog-popular__title {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 700;
  color: var(--bh-text, #14171a);
}

.blog-popular__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 105px;
}

/* Shared pill */
.blog-hub-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  background: #F2F2F2;
  color: #2B5993;
  font-size: 13px !important;
  font-weight: 600;
}

.blog-hub-pill[data-pill-url] {
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background-color .15s ease, color .15s ease;
}

.blog-hub-pill[data-pill-url]:hover {
  background: #e0e6f0;
}

/* Featured (left) */
.blog-popular__featured {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-popular__featured-image {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  margin-bottom: 20px;
  background: var(--bh-tab-bg, #eaefe8);
}

.blog-popular__featured-image .blog-hub-card-arrow {
  bottom: 20px;
  right: 20px;
}

.blog-popular__featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-popular__tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.blog-popular__featured-title {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bh-text, #14171a);
}

@media (min-width: 1024px) {
  .blog-popular__featured-title {
    font-size: 24px !important;
  }
}

.blog-popular__featured-meta {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--bh-text-muted, #5b6066);
}

.blog-popular__featured-excerpt {
  margin: 0;
  line-height: 1.6;
  color: var(--bh-text, #14171a);
}

@media (min-width: 1024px) {
.blog-popular__featured-excerpt {
  font-size: 16px;
 }
}

/* List (right) */
.blog-popular__list {
  display: flex;
  flex-direction: column;
}

.blog-popular__list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 20px;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 1024px) {
  .blog-popular__list-item:first-child {
    padding-top: 0;
  }

  .blog-popular__list-item:last-child {
    border-bottom: 1px solid #C3C3C3;
  }
}

@media (max-width: 480px) {
  .blog-popular__list-item:first-child {
    padding-top: 20px;
    border-top: 1px solid #C3C3C3;
  }

  .blog-popular__list-item:last-child {
    border-bottom: none;
  }

  .blog-popular__divider {
    margin: 10px 0 20px !important;
  }
}

@media (min-width: 1700px) {
    .blog-popular__list-item {
      gap: 80px;
    }
}

.blog-popular__list-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.blog-hub-pill {
  align-self: flex-start;
}


.blog-popular__list-image {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 205px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bh-tab-bg, #eaefe8);
}

.blog-popular__list-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: left;
}

.blog-popular__divider {
  border: none;
  border-top: 1px solid #C3C3C3;
  height: 0;
  margin: 0 0 20px;
}

@media (max-width: 900px) {
  .blog-popular__grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 22px;
  }

  .blog-popular__list-image {
    width: 160px;
    margin-top: auto;
  }

  .blog-popular__featured-title {
    font-size: 20px !important;
  }

  .blog-popular__list-content .blog-medium-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 600px) {
  .blog-popular {
    padding: 40px 0;
  }

  .blog-popular__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .blog-popular__featured-title {
    font-size: 20px;
  }

  .blog-popular__list-image {
    width: 100px;
    margin-top: auto;
  }
}

/* ──────────────────────────────────────────────────────────
   Recent articles
   ────────────────────────────────────────────────────────── */
.blog-recent {
  font-family: 'Work Sans', sans-serif;
  padding: 56px 0;
}

.blog-recent__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .blog-recent__inner {
      max-width: 80%;
  }   
}

.blog-recent__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-bottom: 40px;
}

/* Tablet gets its own 6-per-page loop (2 cards + 4 trending-style rows),
   rendered alongside the desktop 8-per-page loop and toggled by viewport —
   see blog-recent.php for why this needs two separate WP_Query loops. */
.blog-recent__panel--tablet {
  display: none;
}

.blog-recent__grid--tablet {
  grid-template-columns: 1fr 1fr;
}

.blog-recent__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 1024px) {
  .blog-recent__card{
    border-bottom: 1px solid #c3c3c3;
    margin-bottom: 5px;
    padding-bottom: 20px;
  }
}

.blog-recent__card-image {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  background: var(--bh-tab-bg, #eaefe8);
}

.blog-recent__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: left;
}

/* Shared hover overlay + arrow (recent/popular card thumbnails) */
.blog-hub-card-image-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 26, 0.35);
  opacity: 0;
  transition: opacity .15s ease;
}

.blog-hub-card-arrow {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity .15s ease;
}

.blog-hub-card-arrow svg {
  width: 16px;
  height: 16px;
}

.blog-recent__card:hover .blog-hub-card-image-overlay::after,
.blog-recent__card:hover .blog-hub-card-arrow,
.blog-popular__featured:hover .blog-hub-card-image-overlay::after,
.blog-popular__featured:hover .blog-hub-card-arrow,
.blog-popular__list-item:hover .blog-hub-card-image-overlay::after,
.blog-popular__list-item:hover .blog-hub-card-arrow,
.blog-trending__item:hover .blog-hub-card-image-overlay::after,
.blog-trending__item:hover .blog-hub-card-arrow {
  opacity: 1;
}

.blog-recent__card-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.blog-recent__card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--bh-text, #14171a);
}

@media (max-width: 600px) {
  .blog-recent__card-title {
    font-size: 20px !important;    
  }
}

.blog-recent__card:hover .blog-recent__card-title,
.blog-popular__featured:hover .blog-popular__featured-title,
.blog-popular__list-item:hover .blog-medium-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-recent__empty {
  font-size: 15px;
  color: var(--bh-text-muted, #5b6066);
}

/* "Showing results for…" bar inserted by blog-hero-search.js when a
   search has been submitted, filtering the grid below in place. */
.blog-recent__search-status {
  margin: -12px 0 24px;
  font-size: 14px;
  color: var(--bh-text-muted, #5b6066);
}

.blog-recent__search-clear {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--bh-accent, #275a94);
  text-decoration: underline;
  cursor: pointer;
}

/* Pagination (paginate_links() output) */
.blog-recent__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.blog-recent__pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bh-accent, #275a94);
  text-decoration: none;
}

.blog-recent__pagination a.page-numbers:hover {
  background: #d8dbd6;
}

.blog-recent__pagination .current {
  background: #F2F2F2;
  color: var(--bh-text, #000);
}

.blog-recent__pagination .dots {
  color: var(--bh-text-muted, #5b6066);
}

.blog-recent__pagination .prev,
.blog-recent__pagination .next {
  color: var(--bh-text, #14171a);
}

.blog-recent__pagination .prev svg,
.blog-recent__pagination .next svg {
  width: 16px;
  height: 16px;
}

.blog-recent__pagination .disabled {
  color: var(--bh-text-muted, #5b6066);
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 900px) {
  .blog-recent__panel--desktop {
    display: none;
  }

  .blog-recent__panel--tablet {
    display: block;
  }

  .blog-recent__grid--tablet .blog-recent__card-image {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 600px) {
   .blog-recent__grid--tablet .blog-recent__card-image {
    aspect-ratio: 4.7 / 3;
  }

  .blog-recent {
    padding: 40px 0;
  }

  .blog-recent__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ──────────────────────────────────────────────────────────
   Trending in health
   ────────────────────────────────────────────────────────── */
.blog-trending {
  font-family: 'Work Sans', sans-serif;
  padding: 56px 0;
}

.blog-trending__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .blog-trending__inner {
      max-width: 80%;
  }   
}

.blog-trending__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 35px 8.5px 25px;
  border-radius: 100px;
  background: #829f77;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 24px;
}

@media (max-width: 600px) {
  .blog-trending__badge {
    justify-content: center;
    font-size: 24px !important;
    padding: 4px 20px !important;
  }
}

.blog-trending__badge svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.blog-trending__text {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--bh-text, #14171a);
  max-width: 600px;
}

.blog-trending__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 109px;
}

.blog-trending__cell {
  display: flex;
  flex-direction: column;
}

.blog-trending__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
}

.blog-trending__item-image {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 140px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bh-tab-bg, #eaefe8);
  margin-bottom: auto;
}

@media (max-width: 600px) {
  .blog-trending__item {
    padding-top: 0 !important;
  }

  .blog-trending__item-image {
    margin-bottom: auto;   
  }
}

.blog-trending__item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-trending__item-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.blog-trending__item-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bh-text, #14171a);
  min-height: 70px;
}

@media (min-width: 1024px) {
  .blog-trending__item-title {
    font-size: 24px !important;
    min-height: auto;
  } 
}

.blog-trending__item:hover .blog-trending__item-title {
  text-decoration: underline;
}

.blog-trending__divider {
  border: none;
  border-top: 1px solid #C3C3C3;
  margin: 0;
  height: 0;
}

@media (max-width: 900px) {
  /* 2-per-view scroll-snap carousel (blog-hub-carousel__dots is built by
     js/blog-hub/blog-guides-carousel.js, shared with .blog-guides__track). */
  .blog-trending__grid {
    display: flex;
    grid-template-columns: none;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .blog-trending__grid::-webkit-scrollbar {
    display: none;
  }

  .blog-trending__cell {
    flex: 0 0 calc((100% - 24px) / 2);
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .blog-trending {
    padding: 40px 0;
  }

  .blog-trending__badge {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    padding: 14px 20px;
  }

  .blog-trending__cell {
    flex: 0 0 100%;
  }

  .blog-trending__item-title {
    font-size: 17px;
  }
}

/* ──────────────────────────────────────────────────────────
   Join our newsletter
   ────────────────────────────────────────────────────────── */
.blog-newsletter {
  font-family: 'Work Sans', sans-serif;
  padding: 0;
}

.blog-newsletter__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 24px;
  border-radius: 28px;
  background: #F8F8F8;
  overflow: hidden;
  padding: 34px 0 0 44px;
}

@media (max-width: 600px) {
  .blog-newsletter__inner {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .blog-newsletter__inner {
      max-width: 80%;
  }   
}

.blog-newsletter__content {
  padding-bottom: 48px;
}

.blog-newsletter__content input {
  font-size: 16px !important;
}

.blog-newsletter__content input[type=submit] {
  font-weight: 600 !important;
  font-size: 18px !important;
}

.blog-newsletter__title {
  margin: 0 0 16px;
  font-size: 38px !important;
  font-weight: 700;
  color: var(--bh-text, #14171a);
}

@media (min-width: 1024px) {    
  .blog-newsletter__title {
    font-size: 50px !important;
  }
}

.blog-newsletter__title-accent {
  color: var(--bh-accent, #275a94);
}

.blog-newsletter__text {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bh-text, #14171a);
  max-width: 420px;
}

.blog-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 540px;
}

.blog-newsletter__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.blog-newsletter__input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border: 1px solid #d8dad6;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--bh-text, #14171a);
  background: #fff;
}

.blog-newsletter__input:focus {
  outline: none;
  border-color: var(--bh-accent, #275a94);
}

.blog-newsletter__input::placeholder {
  color: var(--bh-text-muted, #5b6066);
}

.blog-newsletter__submit {
  border: none;
  border-radius: 10px;
  background: var(--bh-accent, #275a94);
  color: #fff;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background-color .15s ease;
}

.blog-newsletter__submit:hover {
  background: var(--bh-accent-hover, #4a78ab);
}

.blog-newsletter__image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

.blog-newsletter__img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  object-position: bottom;
}

@media (max-width: 900px) {
  .blog-newsletter__inner {
    grid-template-columns: 1.7fr 1fr;
    padding: 34px 0 0 32px;
    gap: 16px;
  }

  .blog-newsletter__img {
    max-height: 270px;
  }

  .blog-newsletter__content {
    padding-bottom: 32px;
  }
}

@media (max-width: 600px) {
  .blog-newsletter {
    padding: 0 16px 0;
  }

  .blog-newsletter__inner {
    grid-template-columns: 1fr;
    padding: 32px 20px 0;
    border-radius: 20px;
  }

  .blog-newsletter__image {
    justify-content: flex-start;
  }

  .blog-newsletter__title {
    font-size: 26px !important;
    margin-bottom: 12px;
  }

  .blog-newsletter__row {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────
   Helpful online resources
   ────────────────────────────────────────────────────────── */
.blog-resources {
  font-family: 'Work Sans', sans-serif;
  padding: 56px 0;
}

.blog-resources__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .blog-resources__inner {
      max-width: 80%;
  }   
}

.blog-resources__title {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--bh-text, #14171a);
  font-size: 28px !important;
}

.blog-resources__text {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--bh-text, #14171a);
}

.blog-resources__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.blog-resources__stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-resources__card {
  position: relative;
  display: flex;
  border-radius: 20px;
  background: #CBD8E9;
  text-decoration: none;
  color: inherit;
}

.blog-resources__card--small {
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px;
  min-height: 140px;
}

.blog-resources__card-title {
  margin: 0;
  font-size: 24px !important;
  font-weight: 500 !important;
  color: var(--bh-text, #14171a);
  font-family: 'Work Sans', sans-serif !important;
}

.blog-resources__card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}

.blog-resources__card--small:hover .blog-resources__card-arrow {
  transform: translateX(3px);
}

.blog-resources__card--large {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 40px;
  gap: 24px;
}

.blog-resources__card-content {
  position: relative;
  z-index: 1;
  max-width: 380px;
}

.blog-resources__card-heading {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 600;
  color: var(--bh-text, #14171a);
}

.blog-resources__card-desc {
  margin: 10px 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bh-text, #14171a);
  max-width: 305px;
}

.blog-resources__card-btn {
  display: inline-block;
  padding: 9px 32px;
  border-radius: 100px;
  background: #fff;
  color: #2B5993 !important;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease-out;
}

.blog-resources__card-btn:hover {
  background: #fefffe !important;
  transform: scale(1.02);
}

.blog-resources__card-image {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  z-index: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
}

.blog-resources__card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 900px) {
  .blog-resources__grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-resources__card--large {
    padding: 28px;
  }

  .blog-resources__card-content {
    max-width: 100%;
  }

  .blog-resources__card-image {
    height: 160px;
  }

  .blog-resources__card-desc {
    margin-bottom: 45px;
  }
}

@media (max-width: 600px) {
  .blog-resources__grid,
  .blog-resources__stack {
    gap: 14px;
  }

  .blog-resources__card--large {
    height: 300px;
  }

  .blog-resources__card-image {
    left: 20%;
  }

  .blog-resources__card-desc {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .blog-resources {
    padding: 40px 0;
  }

  .blog-resources__grid {
    grid-template-columns: 1fr;
  }

  .blog-resources__card--large {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .blog-resources__card-content {
    max-width: 100%;
  }

  .blog-resources__card-image {
    width: 100%;
    align-self: auto;
  }

  .blog-resources__card--small {
    padding: 24px;
    min-height: 105px;
  }

  .blog-resources__card-title {
    font-size: 20px;
  }
}

/* ──────────────────────────────────────────────────────────
   Regulated care you can trust
   ────────────────────────────────────────────────────────── */
.blog-trust-badges {
  font-family: 'Work Sans', sans-serif;
  padding: 56px 0 72px;
}

.blog-trust-badges__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .blog-trust-badges__inner {
      max-width: 80%;
  }
}

@media (max-width: 480px) {
  .blog-trust-badges__inner .blog-sub-title {
      max-width: 80%;
  }
}

.blog-trust-badges__title {
  margin: 0 0 32px;
  font-size: 28px;
  font-weight: 700;
  color: var(--bh-text, #14171a);
}

.blog-trust-badges__row {
  display: flex;
  align-items: center;
  gap: 48px 64px;
}

.blog-trust-badges__item {
  display: flex;
  align-items: center;
  height: 83px;
}

.blog-trust-badges__img {
  height: 100%;
  width: auto;
  max-width: 250px;
  object-fit: contain;
}

@media (min-width: 1024px) {
  .blog-trust-badges__row {
    width: 100%;
    max-width: 80%;
    margin: 0 auto;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 1023px) {
  .blog-trust-badges__row {
    flex-wrap: nowrap;
    gap: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px 4px 0;
  }

  .blog-trust-badges__row::-webkit-scrollbar {
    display: none;
  }

  .blog-trust-badges__item {
    flex-shrink: 0;
  }

  .blog-trust-badges__item:first-child {
    margin-left: max( 24px, 5% );
  }
}

@media (max-width: 600px) {
  .blog-trust-badges {
    padding: 40px 0 56px;
  }

  .blog-trust-badges__item {
    height: 60px;
  }
}

/* ──────────────────────────────────────────────────────────
   Motion — scroll reveal, hover-jump, title fade-in, stagger
   ────────────────────────────────────────────────────────── */

@keyframes bh-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bh-slide-up {
  from { transform: translateY(14px); }
  to   { transform: translateY(0); }
}

@keyframes bh-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bh-bolt-appear {
  0%   { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  65%  { transform: scale(1.2) rotate(6deg);  opacity: 1; }
  100% { transform: scale(1)   rotate(0deg);  opacity: 1; }
}

@keyframes bh-bolt-zap {
  0%   { transform: rotate(0deg)   scale(1); }
  15%  { transform: rotate(-14deg) scale(1.15); }
  35%  { transform: rotate(11deg)  scale(1.2); }
  52%  { transform: rotate(-8deg)  scale(1.1); }
  68%  { transform: rotate(5deg)   scale(1.05); }
  82%  { transform: rotate(-2deg)  scale(1.02); }
  100% { transform: rotate(0deg)   scale(1); }
}

@media (prefers-reduced-motion: no-preference) {

  /* ── Section scroll reveal ───────────────────────────── */
  .blog-hub-js-reveal .blog-hub-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
  }

  .blog-hub-js-reveal .blog-hub-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* ── Title fade-in (opacity only — section translateY carries the motion) */
  .blog-hub-js-reveal .blog-hub-reveal .blog-sub-title,
  .blog-hub-js-reveal .blog-hub-reveal .blog-resources__title,
  .blog-hub-js-reveal .blog-hub-reveal .blog-newsletter__title,
  .blog-hub-js-reveal .blog-hub-reveal .blog-trending__badge {
    opacity: 0;
    transition: opacity .5s ease;
    transition-delay: .25s;
  }

  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-sub-title,
  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-resources__title,
  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-newsletter__title,
  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-trending__badge {
    opacity: 1;
  }

  /* ── Recent cards: staggered reveal (delay set per-card by JS) ─ */
  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-recent__card {
    animation: bh-card-in .4s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: var(--bh-reveal-delay, .08s);
  }

  /* ── Trending badge SVG: pop in after badge, zap on hover ── */
  .blog-trending__badge svg {
    transform-origin: center;
  }

  .blog-hub-js-reveal .blog-hub-reveal.is-visible .blog-trending__badge svg {
    animation: bh-bolt-appear .6s cubic-bezier(.34, 1.56, .64, 1) both;
    animation-delay: .3s;
  }

  .blog-trending__badge:hover svg {
    animation: bh-bolt-zap .55s ease forwards;
  }

  /* ── Card hover scale ───────────────────────────────────── */
  .blog-recent__card,
  .blog-guides__card,
  .blog-popular__featured,
  .blog-popular__list-item,
  .blog-trending__item,
  .blog-resources__card {
    transition: transform 120ms ease-out;
  }

  .blog-recent__card:hover,
  .blog-guides__card:hover,
  .blog-popular__featured:hover,
  .blog-popular__list-item:hover,
  .blog-trending__item:hover,
  .blog-resources__card--small:hover,
  .blog-resources__card--large:hover {
    transform: scale(1.01);
  }

  .blog-recent__card:active,
  .blog-guides__card:active,
  .blog-popular__featured:active,
  .blog-popular__list-item:active,
  .blog-trending__item:active,
  .blog-resources__card:active {
    transform: scale(0.99);
    transition-duration: .1s;
  }

  /* ── Image scale on card hover ───────────────────────── */
  .blog-recent__card-img,
  .blog-popular__featured-img,
  .blog-popular__list-img,
  .blog-trending__item-img {
    transition: transform .45s ease;
  }

  .blog-recent__card:hover .blog-recent__card-img,
  .blog-popular__featured:hover .blog-popular__featured-img,
  .blog-popular__list-item:hover .blog-popular__list-img,
  .blog-trending__item:hover .blog-trending__item-img {
    transform: scale(1.06);
  }

  /* Override guides card (non-motion base already sets this) */
  .blog-guides__card-img {
    transition: transform .45s ease;
  }

  .blog-guides__card:hover .blog-guides__card-img {
    transform: scale(1.06);
  }

  /* ── Category tab hover scale ────────────────────────── */
  .blog-hub-tabs__item {
    transition: background-color .15s ease, transform 120ms ease-out;
  }

  .blog-hub-tabs__item:hover:not(.is-active) {
    transform: scale(1.01);
  }

  /* ── Trust badge hover ───────────────────────────────── */
  .blog-trust-badges__item {
    transition: opacity .15s ease, transform .2s ease;
    opacity: .85;
  }

  .blog-trust-badges__item:hover {
    opacity: 1;
    transform: translateY(-2px);
  }
}
