.ahb-hero-section {
  text-align: center;
}

.ahb-featured-topics-section .ahb-silo-card,
.ahb-top-guides-section .ahb-guide-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ahb-lead-magnet-section {
  background: linear-gradient(135deg, #f5f9ff, #eef7ff);
}

.ahb-hero-section .wp-block-image img {
  border-radius: 12px;
}

/* AHB: remove the big top gap on hero blocks */
.wp-block-group.ahb-hero-section{
  margin-top: 0 !important;
}

/* AHB: remove the big top gap on hub + subhub hero blocks */
.wp-block-group.ahb-hero-split{
	margin-top: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}


.ahb-silo-card {
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  text-align: left;
}

.ahb-silo-card .ahb-topic-icon img {
  max-width: 100%;
  border-radius: 999px;
  margin-bottom: 12px;
}

.ahb-guide-card {
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.ahb-guide-card .ahb-guide-cta .wp-block-button__link {
  font-weight: 600;
}

/* Quick start bar styling */
.ahb-quickstart-bar {
  margin-top: -10px; /* gently tuck it under the hero */
  border-top: 1px solid rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

/* Label "Quick start:" */
.ahb-quickstart-bar .ahb-quickstart-label {
  font-size: 1.2rem;      /* bigger than default */
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

/* Pills */
.ahb-quickstart-bar .ahb-quickstart-pill .wp-block-button__link {
  border-radius: 999px;
  padding: 10px 24px;      /* slightly taller + wider */
  font-size: 1.05rem;      /* a touch bigger */
  font-weight: 600;
}

.ahb-quickstart-bar .wp-block-buttons {
  flex-wrap: wrap;
}


/* Hero heading + text */
.ahb-hero-section h1 {
  font-size: clamp(2.2rem, 3vw, 2.7rem);
  line-height: 1.2;
}

.ahb-hero-section p.has-medium-font-size {
  font-size: 1rem;
  max-width: 540px;
}

/* Topic cards */
.ahb-silo-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.ahb-silo-card p {
  font-size: 0.95rem;
}


.ahb-about-tagline {
  font-size: 0.95rem;
  margin-top: 4px;
  margin-bottom: 14px;
}

.ahb-about-tagline a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sticky mobile CTA bar */
.ahb-sticky-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: #0f63d8; /* tweak to match Astra primary if needed */
  color: #fff;
  display: none;
  z-index: 999;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.18);
}

.ahb-sticky-mobile-cta.is-visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ahb-sticky-mobile-cta a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.ahb-sticky-mobile-cta__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  margin-left: 12px;
  padding: 0;
  cursor: pointer;
}

@media (min-width: 783px) {
  .ahb-sticky-mobile-cta {
    display: none !important;
  }
}
/* Top 3 Picks strip */
.ahb-top-picks-section .ahb-top-pick-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  padding: 16px;
  height: 100%;
}

.ahb-top-picks-section .ahb-top-pick-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.ahb-top-picks-section .ahb-top-pick-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.ahb-top-picks-section .ahb-top-pick-link-wrap {
  margin-top: auto;
}

.ahb-top-picks-section .ahb-top-pick-link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Mini trust row under hero */
.ahb-trust-row {
  border-top: 1px solid rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  background: #ffffff;
}

.ahb-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  font-size: 0.85rem;
  margin: 0;
  padding-left: 0;
}

.ahb-trust-list li {
  list-style: none;
}

.ahb-trust-list li::before {
  content: "✓ ";
  color: #15803d;
  font-weight: 600;
}

@media (max-width: 600px) {
  .ahb-trust-list {
    justify-content: flex-start;
  }
}



/* === LATEST ARTICLES – custom flex grid === */

/* Outer container: flex row with wrapping */
.ahb-latest-posts-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}

/* Each card: 3 columns on desktop */
.ahb-latest-card {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  box-sizing: border-box;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .ahb-latest-card {
    flex: 0 0 calc(50% - 16px);
    max-width: calc(50% - 16px);
  }
}

/* Mobile: 1 column */
@media (max-width: 700px) {
  .ahb-latest-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Image at top of card */
.ahb-latest-card__thumb {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
}

.ahb-latest-card__image {
  display: block;
  width: auto;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

/* Title / excerpt / CTA */
.ahb-latest-card__title {
  font-size: 1rem;
  margin: 0 0 6px;
}

.ahb-latest-card__title a {
  text-decoration: none;
}

.ahb-latest-card__excerpt {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.ahb-latest-card__more {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
}

/* === Top 3 Affiliate Products strip === */

.ahb-aff-products-section {
  padding: 40px 0;
  background: #f8fafc;
}

.ahb-aff-products-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.ahb-aff-products-heading {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 20px;
  position: relative;
  z-index: 1;
}

.ahb-aff-products-heading::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #ff9900;
}

.ahb-aff-products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;         /* equal height per row */
  justify-content: center;
}

/* Card */
.ahb-aff-card {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  padding: 16px 18px;
  text-align: center;

  display: flex;
  flex-direction: column;

  overflow: hidden;             /* prevents image overflow overlay */
}

@media (max-width: 1024px) {
  .ahb-aff-card {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 700px) {
  .ahb-aff-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Thumb: fixed height, centered image (no stretching) */
.ahb-aff-card__thumb {
  height: 240px;                /* adjust 220–260 if you want */
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.ahb-aff-card__thumb a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

/* Stronger, theme-proof image constraints */
.ahb-aff-card__thumb img.ahb-aff-card__image {
  display: block;
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

/* Badge */
.ahb-aff-card__badge {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eef2ff;
  color: #3730a3;
}

/* Make content areas predictable so CTA lines up */
.ahb-aff-card__title {
  font-size: 1.1rem;
  margin: 8px 0 6px;
  line-height: 1.25;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;        /* 2-line title */
  overflow: hidden;
  min-height: 2.6em;            /* reserves 2 lines */
}

.ahb-aff-card__spec {
  margin: 4px 0 8px;
  font-size: 0.95rem;
  line-height: 1.25;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;        /* 2-line spec */
  overflow: hidden;
  min-height: 2.4em;
}

.ahb-aff-card__desc {
  font-size: 0.9rem;
  margin: 0 0 12px;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;        /* 3-line description */
  overflow: hidden;
  min-height: 4.1em;
}

/* CTA pinned to bottom */
.ahb-aff-card__cta {
  margin-top: auto;
  padding-top: 10px;
}

.ahb-aff-card__button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ff9900;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.ahb-aff-card__button:hover {
  filter: brightness(0.96);
}



/* Micro-trust note under the grid */
.ahb-aff-products-note {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 14px;
}

/* Remove underline from Top 3 products CTA buttons */
.ahb-aff-card__button,
.ahb-aff-card__button:hover,
.ahb-aff-card__button:focus,
.ahb-aff-card__button:active {
  text-decoration: none !important;
}

/* Latest Articles – override Astra link styling inside our section */
body .ahb-latest-posts-section .ahb-latest-posts-grid a {
  text-decoration: none !important;
  box-shadow: none !important;   /* Astra uses this as "underline" */
  border-bottom: none !important;
}

/* Optional: softer hover instead of underline */
body .ahb-latest-posts-section .ahb-latest-posts-grid a:hover {
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
  opacity: 0.9;
}

/* Top 3 Picks for You – remove underlines / Astra link shadows */
body .ahb-top-picks-section a {
  text-decoration: none !important;
  box-shadow: none !important;   /* Astra's fake underline */
  border-bottom: none !important;
}

/* Optional hover style */
body .ahb-top-picks-section a:hover {
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
  opacity: 0.9;
}



/* === Next Step card thumbnails (featured image + fallback icon) === */
.ahb-card-thumb {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 12px 0;
  background: rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahb-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ahb-card-thumb--fallback {
  color: rgba(17,24,39,0.55);
}

.ahb-card-thumb--fallback .ahb-fallback-icon {
  width: 62px;
  height: 62px;
}

/* Make the "Choose Your Next Step" cards align nicely */
.ahb-nextstep-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ahb-nextstep-card .wp-block-buttons {
  margin-top: auto;
}

.ahb-nextstep-card h3 {
  margin-top: 0;
}

/* Starter Guides grid (one post per hub category) */
.ahb-starter-guides-grid {
  margin-top: 16px;
}

.ahb-starter-badge {
  display: inline-block;
  margin: 8px 0 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eef2ff;
  color: #3730a3;
}

/* Optional: extra row spacing if Astra compresses the 2-row grids */
.ahb-starter-guides-grid {
  row-gap: 32px;
}

/* === Equal-height cards + bottom-aligned CTAs === */

/* Make Gutenberg columns stretch each card to equal height */
.ahb-featured-topics-section .wp-block-columns,
.ahb-top-guides-section .wp-block-columns,
.ahb-top-picks-section .wp-block-columns {
  align-items: stretch;
}

/* Each column becomes a flex container so the card can fill it */
.ahb-featured-topics-section .wp-block-column,
.ahb-top-guides-section .wp-block-column,
.ahb-top-picks-section .wp-block-column {
  display: flex;
}

/* Core card layout: full-height flex columns */
.ahb-silo-card,
.ahb-guide-card,
.ahb-top-picks-section .ahb-top-pick-card,
.ahb-aff-card,
.ahb-latest-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Make the flex grids stretch cards vertically */
.ahb-aff-products-grid,
.ahb-latest-posts-grid {
  align-items: stretch;
}

/* Push CTA / final row to the bottom of the card */
.ahb-guide-card .wp-block-buttons,
.ahb-top-picks-section .ahb-top-pick-link-wrap,
.ahb-aff-card__cta,
.ahb-latest-card__more {
  margin-top: auto;
}

.ahb-silo-card a.ahb-topic-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.ahb-silo-card a.ahb-topic-card-link:hover {
  text-decoration: none;
}

/* === Top Guides cards: equal height + proper thumbnail sizing + bottom CTA === */

/* ---------- CARD LAYOUT (works for both old layout and Query Loop) ---------- */
.ahb-guide-card{
  display:flex;
  flex-direction:column;
  height:100%;
  gap:12px;
}

/* Push CTA to bottom:
   - old layout: .wp-block-buttons
   - new Query Loop: .ahb-guide-card__more (core/read-more wrapper)
*/
.ahb-guide-card .wp-block-buttons,
.ahb-guide-card .ahb-guide-card__more{
  margin-top:auto !important;
}

/* Make read-more look like a CTA button */
.ahb-guide-card .ahb-guide-card__more a{
  display:inline-block;
  padding:10px 14px;
  border-radius:10px;
  text-decoration:none;
  font-weight:600;
}

/* Optional: tighten title/excerpt spacing */
.ahb-guide-card h3{ margin:0; }
.ahb-guide-card p{ margin:0; }


/* ---------- OLD "3 COLUMNS" MODE (your previous HTML) ---------- */
.ahb-top-guides-section .wp-block-columns{ align-items: stretch; }
.ahb-top-guides-section .wp-block-column{ display:flex; }
.ahb-top-guides-section .wp-block-column > .wp-block-group.ahb-guide-card{ flex:1; }


/* ---------- QUERY LOOP MODE (new native loop) ---------- */
/* Assumes you used:
   - Query wrapper: .ahb-top-guides-query
   - Post template class: .ahb-top-guides-grid
*/
.ahb-top-guides-section .wp-block-query.ahb-top-guides-query .wp-block-post-template.ahb-top-guides-grid{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:24px;
  list-style:none;
  padding:0;
  margin:24px 0 0;
}

/* each post item becomes a flex column so the card can stretch */
.ahb-top-guides-section .wp-block-query.ahb-top-guides-query li.wp-block-post{
  display:flex;
  flex:1 1 calc(33.333% - 24px);
}

.ahb-top-guides-section .wp-block-query.ahb-top-guides-query li.wp-block-post > .ahb-guide-card{
  flex:1;
}

/* Responsive columns */
@media (max-width: 900px){
  .ahb-top-guides-section .wp-block-query.ahb-top-guides-query li.wp-block-post{
    flex:1 1 calc(50% - 24px);
  }
}
@media (max-width: 600px){
  .ahb-top-guides-section .wp-block-query.ahb-top-guides-query li.wp-block-post{
    flex:1 1 100%;
  }
}


/* ---------- THUMBNAIL (supports BOTH custom wrapper and Query Loop featured image) ---------- */

/* 1) If you output a custom wrapper (old way) */
.ahb-guide-card__thumb{
  width: 100%;
  height: 190px;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 12px 0;
  display: block;
  background: #f1f5f9;
}

/* If the image is directly inside your wrapper */
.ahb-guide-card__image{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* 2) If you use Gutenberg Query Loop featured image:
   core/post-featured-image outputs:
   <figure class="wp-block-post-featured-image ...">
*/
.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image{
  width:100%;
  height:190px;
  margin:0 0 12px 0 !important;
  border-radius:14px;
  overflow:hidden;
  display:block !important;
  background:#f1f5f9;
}

/* Ensure the link (if any) and img fill the figure box */
.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image > a{
  width:100%;
  height:100%;
  display:block;
}
.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image img{
  width:100% !important;
  height:100% !important;
  display:block;
  object-fit:cover;
  object-position:center;
}

/* Placeholder box (only applies if your PHP outputs it)
   NOTE: Query Loop won't output placeholder unless you add one in code. */
.ahb-guide-card__thumb--placeholder{
  width:100%;
  height:190px;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(0,0,0,.08), rgba(0,0,0,.02));
}

/* ===========================
   TOP GUIDES (AHB) — polish UI
   =========================== */

/* 1) Remove underlines (title + all links inside cards) */
.ahb-top-guides-section .ahb-guide-card a{
  text-decoration: none !important;
}
.ahb-top-guides-section .ahb-guide-card a:hover{
  text-decoration: none !important;
  opacity: .92;
}

/* 2) Thumbnail sizing (Query Loop featured image + your custom wrapper) */
.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image,
.ahb-top-guides-section .ahb-guide-card .ahb-guide-card__thumb{
  width: 100% !important;
  height: auto !important;          /* tweak 160–220 */
  margin: 0 0 14px 0 !important;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
	object-fit: contain !important; 
}

/* Make the link + img fill the fixed-height box */
.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image > a,
.ahb-top-guides-section .ahb-guide-card .ahb-guide-card__thumb > a{
  display: block;
  width: 100%;
  height: 100%;
}

.ahb-top-guides-section .ahb-guide-card figure.wp-block-post-featured-image img,
.ahb-top-guides-section .ahb-guide-card .ahb-guide-card__thumb img,
.ahb-top-guides-section .ahb-guide-card img.ahb-guide-card__image{
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* 3) Make “See this guide” a real button (supports common WP read-more markups) */
.ahb-top-guides-section .ahb-guide-card .wp-block-read-more,
.ahb-top-guides-section .ahb-guide-card .wp-block-read-more__link,
.ahb-top-guides-section .ahb-guide-card a.wp-block-read-more,
.ahb-top-guides-section .ahb-guide-card .wp-block-post-excerpt__more-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--wp--preset--color--primary, #0b5fff);
  color: #fff !important;
  text-decoration: none !important;
}

/* Hover for the button */
.ahb-top-guides-section .ahb-guide-card .wp-block-read-more:hover,
.ahb-top-guides-section .ahb-guide-card .wp-block-read-more__link:hover,
.ahb-top-guides-section .ahb-guide-card a.wp-block-read-more:hover,
.ahb-top-guides-section .ahb-guide-card .wp-block-post-excerpt__more-link:hover{
  filter: brightness(0.95);
}

/* 4) Keep CTA at the bottom (works with either AHB button row or WP read-more block) */
.ahb-top-guides-section .ahb-guide-card .wp-block-buttons,
.ahb-top-guides-section .ahb-guide-card .wp-block-read-more,
.ahb-top-guides-section .ahb-guide-card .wp-block-post-excerpt__more-link{
  margin-top: auto !important;
}

/* Optional: reduce title spacing a touch */
.ahb-top-guides-section .ahb-guide-card h3{
  margin: 0 !important;
}
