/* Blog hub (page-blog-hub.php, inc/blog-hub.php). Brand values from the Figma style guide;
   hero, search and pills follow the Courses Hub (assets/css/courses-hub.css). */

.blog-hub {
    --bh-ink: #090A0B;
    --bh-dark: #160E2B;
    --bh-deep: #15002A;
    --bh-text: #17122A;
    --bh-body: #334155;
    --bh-muted: #5B5470;
    --bh-border: #E4DEEE;
    --bh-border-strong: #CFC4E3;
    --bh-lavender: #F7F5FB;
    --bh-violet-50: #F0E5FF;
    --bh-purple-500: #9B59FF;
    --bh-purple-700: #5511BC;
    --bh-link: #7A2FC8;
    --bh-header-h: 0px; /* set by blog-hub.js from the sticky site header */
    color: var(--bh-text);
    font-family: Inter, system-ui, sans-serif;
}

main.site-main.blog-hub {
    max-width: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.blog-hub .bh-wrap {
    max-width: 85rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
@media (min-width: 768px) {
    .blog-hub .bh-wrap { padding-left: 32px; padding-right: 32px; }
}

.blog-hub .bh-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.bh-editor-notice {
    padding: 10px 20px;
    background: #FFF4E5;
    border-bottom: 1px solid #F5C47A;
    font-size: 14px;
    color: #6B4100;
}

/* Topic families (suite colours): --fam (strong), --fam-ink (text on white), --fam-deep, --fam-light */
.bh-fam-violet { --fam: #9B59FF; --fam-ink: #5511BC; --fam-deep: #15002A; --fam-light: #C8A3FF; }
.bh-fam-teal   { --fam: #20CFE2; --fam-ink: #005668; --fam-deep: #07232D; --fam-light: #8FE7F0; }
.bh-fam-green  { --fam: #11AB9B; --fam-ink: #006E44; --fam-deep: #0A1F1E; --fam-light: #88D5CD; }
.bh-fam-red    { --fam: #FF8FAA; --fam-ink: #B22850; --fam-deep: #281219; --fam-light: #FFC7D4; }
.bh-fam-orange { --fam: #FBA754; --fam-ink: #A8431C; --fam-deep: #2C1600; --fam-light: #FDD3A9; }
.bh-fam-purple { --fam: #D27ED5; --fam-ink: #5F2D76; --fam-deep: #201729; --fam-light: #E9BEEA; }

/* ── Hero ── */
.bh-hero {
    position: relative;
    z-index: 41; /* above the sticky filter bar, so the search suggestions can drop over it */
    background:
        radial-gradient(60% 120% at 88% 0%, rgba(213, 0, 195, 0.32) 0%, rgba(213, 0, 195, 0) 60%),
        radial-gradient(50% 110% at 8% 100%, rgba(116, 41, 229, 0.38) 0%, rgba(116, 41, 229, 0) 65%),
        linear-gradient(180deg, #020019 0%, var(--bh-dark) 100%);
    color: #ffffff;
    padding: 48px 0 44px;
}
@media (min-width: 1024px) {
    .bh-hero { padding: 64px 0 56px; }
}
.bh-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.bh-hero__eyebrow {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 160%;
    letter-spacing: 2.72px;
    text-transform: uppercase;
}
.bh-hero__title .purple-gradient-text {
    /* background-clip:text clips glyphs that overhang their box (tight tracking): give the last letter room */
    padding-right: 0.08em;
    -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
}
.bh-hero__title {
    max-width: 22ch;
    margin: 0 0 28px;
    font-size: clamp(2.1rem, 4.6vw, 64px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.bh-search {
    --bh-scope-w: 136px;
    position: relative;
    width: 100%;
    max-width: 760px;
}
@media (max-width: 559px) {
    .bh-search { --bh-scope-w: 104px; }
}
.blog-hub .bh-search__input {
    width: 100%;
    box-sizing: border-box;
    height: 58px;
    padding: 0 120px 0 calc(var(--bh-scope-w) + 16px) !important;
    border: 1.5px solid var(--bh-border-strong) !important;
    border-radius: 9999px !important;
    background: #ffffff !important;
    font-family: inherit;
    font-size: 16px !important;
    color: var(--bh-text) !important;
    box-shadow: none !important;
}
.blog-hub .bh-search__input::placeholder { color: #6E6782; }
.blog-hub .bh-search__input:focus { outline: none; border-color: var(--bh-link) !important; box-shadow: 0 0 0 3px rgba(155, 89, 255, 0.35) !important; }
.blog-hub .bh-search__submit {
    position: absolute;
    top: 6px;
    right: 6px;
    bottom: 6px;
    padding: 0 22px !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: var(--bh-ink) !important;
    color: #FCFCFC !important;
    font-family: inherit;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
}
.blog-hub .bh-search__submit:hover { background: #2A2633 !important; }
.blog-hub .bh-search__submit:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* Keyboard focus */
.blog-hub .bh-card a:focus-visible,
.blog-hub .bh-link:focus-visible,
.blog-hub .bh-btn:focus-visible {
    outline: 2px solid var(--bh-link);
    outline-offset: 2px;
}

/* ── Main ── */
.bh-main {
    padding: 8px 0 72px;
    transition: opacity 0.2s ease;
}
.bh-main[aria-busy="true"] { opacity: 0.45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .bh-main { transition: none; }
}


.blog-hub .bh-h2 {
    margin: 0 0 24px;
    font-size: clamp(1.5rem, 2.4vw, 32px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--bh-ink);
}
.bh-eyebrow {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.blog-hub .bh-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--bh-link);
    text-decoration: none;
    white-space: nowrap;
}
.blog-hub .bh-link:hover { text-decoration: underline; color: var(--bh-link); }

.blog-hub .bh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.blog-hub .bh-btn--light { background: #ffffff; color: var(--bh-ink); }
.blog-hub .bh-btn--light:hover { background: var(--bh-violet-50); color: var(--bh-ink); }
.blog-hub .bh-btn--outline { border: 1.5px solid var(--bh-ink); background: #ffffff; color: var(--bh-ink); }
.blog-hub .bh-btn--outline:hover { background: var(--bh-ink); color: #ffffff; }
.blog-hub .bh-btn--small { padding: 8px 14px; font-size: 14px; }

/* ── Cards ── */
.bh-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.blog-hub .bh-card a { text-decoration: none; }
.bh-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--fam-deep) 0%, var(--fam-ink) 55%, var(--fam) 100%);
}
.blog-hub .bh-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.bh-card:hover .bh-card__media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
    .blog-hub .bh-card__media img { transition: none; }
    .bh-card:hover .bh-card__media img { transform: none; }
}
.bh-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}
.bh-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.blog-hub .bh-card__topic { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.blog-hub .bh-card__topic a { position: relative; z-index: 2; color: var(--fam-ink); }
.blog-hub .bh-card__topic a:hover { text-decoration: underline; }
.blog-hub .bh-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--bh-ink);
}
.blog-hub .bh-card__title a { color: inherit; }
/* Whole card opens the post; the topic link sits above it. */
.blog-hub .bh-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.blog-hub .bh-card__title a:hover { color: var(--bh-purple-700); }
.blog-hub .bh-card:hover .bh-card__title a { color: var(--bh-purple-700); }
.bh-card__excerpt { margin: 0; font-size: 16px; line-height: 1.55; color: var(--bh-body); }
.bh-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #64707D;
}

/* Lead story */
.bh-card--lead { gap: 20px; }
.blog-hub .bh-card--lead .bh-card__title { font-size: clamp(1.5rem, 2.6vw, 34px); line-height: 1.18; letter-spacing: -0.03em; font-weight: 500; }
.bh-card--lead .bh-card__media { border-radius: 20px; }

/* Compact list item (thumbnail + text) */
.bh-card--list { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid var(--bh-border); }
.bh-card--list:first-child { border-top: 0; padding-top: 0; }
.bh-card--list .bh-card__media { flex: 0 0 120px; aspect-ratio: 4 / 3; border-radius: 10px; }
.blog-hub .bh-card--list .bh-card__title { font-size: 16px; }
.bh-card--list .bh-card__placeholder { padding: 8px; font-size: 11px; }

/* Ranked (most read) */
.bh-card--rank { flex-direction: row; gap: 14px; }
.bh-card__rank {
    flex: 0 0 auto;
    min-width: 34px;
    font-size: 40px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #FF4BF0 0%, #D586FF 50%, #9172FF 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.blog-hub .bh-card--rank .bh-card__title { font-size: 16px; }

/* ── Grids ── */
.bh-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px 28px;
}
@media (min-width: 640px) {
    .bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .bh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .bh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Latest: lead | list | promo */
.bh-latest__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}
@media (min-width: 768px) {
    .bh-latest__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .bh-latest__lead { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
    .bh-latest__grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1.15fr) minmax(0, 0.9fr); gap: 40px; }
    .bh-latest__lead { grid-column: auto; }
}

/* ── Course promo ── */
.bh-promo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: 100%;
    min-height: 260px;
    box-sizing: border-box;
    padding: 28px;
    border-radius: 20px;
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(213, 0, 195, 0.45) 0%, rgba(213, 0, 195, 0) 70%),
        linear-gradient(160deg, #31007C 0%, var(--bh-deep) 70%);
    color: #ffffff;
}
.bh-promo__eyebrow { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #E2CCFF; }
.bh-promo__title { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -0.03em; color: #ffffff; }
.bh-promo__text { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.bh-promo { position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.bh-promo .bh-btn { margin-top: auto; }
/* The whole card is the link (the button's hit area covers it). */
.blog-hub .bh-promo .bh-btn::after { content: ''; position: absolute; inset: 0; border-radius: 20px; }
.bh-promo:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(91, 31, 153, 0.28); }
.blog-hub .bh-promo:hover .bh-btn { background: var(--bh-violet-50); }
.bh-promo:focus-within { outline: 2px solid var(--bh-purple-500); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .bh-promo, .bh-promo:hover { transition: none; transform: none; }
}
.bh-grid .bh-promo { min-height: 0; }

/* ── Newsletter band (uses the [post_newslatter_form] shortcode, styled for dark backgrounds) ── */
.bh-news {
    padding: 56px 0;
    background:
        radial-gradient(50% 120% at 100% 50%, rgba(155, 89, 255, 0.35) 0%, rgba(155, 89, 255, 0) 70%),
        var(--bh-dark);
    color: #ffffff;
}
.bh-news__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}
@media (min-width: 900px) {
    .bh-news__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
}
.bh-news .bh-eyebrow { color: #E2CCFF; }
.bh-news__title { margin: 0 0 12px; font-size: clamp(1.75rem, 3vw, 40px); font-weight: 500; line-height: 1.15; letter-spacing: -0.04em; color: #ffffff; }
.bh-news__text { margin: 0; max-width: 46ch; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.bh-news .post__form .post__form-text-box .post__form-text { margin-bottom: 24px; }

/* ── Most read ── */
.bh-popular__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bh-popular__list li { margin: 0; padding-top: 16px; border-top: 1px solid var(--bh-border); }
@media (min-width: 768px) {
    .bh-popular__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .bh-popular__list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ── Suite rows ── */
.bh-rail__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.bh-rail__head .bh-h2 { margin: 0; display: flex; align-items: center; gap: 12px; }
.bh-rail__head .bh-h2::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--fam);
    flex: 0 0 auto;
}
@media (max-width: 639px) {
    .bh-rail__head { flex-direction: column; gap: 8px; }
}

/* ── Results ── */
.bh-results__head { margin-bottom: 28px; }
.bh-results__head .bh-h2 { margin-bottom: 4px; }
.bh-results__count { margin: 0; font-size: 15px; color: var(--bh-muted); }
.bh-empty {
    padding: 40px 28px;
    border: 1px dashed var(--bh-border-strong);
    border-radius: 20px;
    background: var(--bh-lavender);
    text-align: center;
    color: var(--bh-body);
}
.bh-empty p { margin: 0; }
.bh-empty__title { margin-bottom: 6px !important; font-size: 20px; font-weight: 600; color: var(--bh-ink); }
.bh-more { display: flex; justify-content: center; margin-top: 44px; }
/* The shortcode's CSS names Inter with no fallback; keep it sans-serif if Inter hasn't loaded. */
.bh-news .post__form,
.bh-news .post__form input,
.bh-news .post__form button,
.bh-news .post__form p { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important; }

.bh-filters {
    border: 1px solid var(--bh-border);
    border-radius: 20px;
    background: #ffffff;
}
@media (min-width: 1024px) {
    .bh-filters {
        position: sticky;
        top: calc(var(--bh-header-h) + 16px);
        max-height: calc(100vh - var(--bh-header-h) - 32px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .bh-filters__toggle { display: none !important; }
}
.blog-hub .bh-filters__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--bh-ink) !important;
    cursor: pointer;
}
.blog-hub .bh-filters__toggle:focus-visible { outline: 2px solid var(--bh-link); outline-offset: 2px; }
.bh-filters__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    background: var(--bh-ink);
    font-size: 12px;
    color: #ffffff;
}
.bh-filters__chev { margin-left: auto; transition: transform 0.2s ease; }
.bh-filters.is-open .bh-filters__chev { transform: rotate(180deg); }
/* Small screens: the panel folds away behind the toggle (only once JS is running). */
@media (max-width: 1023px) {
    .bh-js .bh-filters:not(.is-open) .bh-filters__panel { display: none; }
    .bh-filters__panel { border-top: 1px solid var(--bh-border); }
}
.bh-filters__panel { padding: 18px 20px 20px; }
.bh-filters__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.blog-hub .bh-filters__title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--bh-ink); }
.blog-hub .bh-filters__head .bh-link { font-size: 14px; }
@media (max-width: 1023px) {
    .bh-filters__title { display: none; }
}

.bh-filters form { margin: 0; }
.blog-hub .bh-filters__group {
    margin: 0;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--bh-border);
    min-width: 0;
}
.bh-filters__group + .bh-filters__group { margin-top: 16px; }
.blog-hub .bh-filters__group legend {
    float: left; /* keeps the legend inside the fieldset's border-top */
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bh-muted);
}
.bh-filters__group > ul { clear: both; margin: 0; padding: 0; list-style: none; }
.bh-filters__hint { clear: both; margin: 0 0 8px; font-size: 13px; color: var(--bh-muted); }

.bh-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.35;
    color: var(--bh-text);
    cursor: pointer;
}
.blog-hub .bh-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--bh-purple-700);
    cursor: pointer;
}
.bh-check:hover span:first-of-type { color: var(--bh-purple-700); }
.bh-check__count { margin-left: auto; padding-left: 8px; font-size: 13px; color: #64707D; }

@media (prefers-reduced-motion: reduce) {
    .bh-filters__chev { transition: none; }
}

/* Mobile: close the panel and jump to the results */
.blog-hub .bh-filters__done {
    display: none;
    width: 100%;
    margin-top: 16px;
    border: 0;
    background: var(--bh-ink);
    color: #ffffff;
    cursor: pointer;
}
.blog-hub .bh-filters__done:hover { background: #2A2633; color: #ffffff; }
@media (max-width: 1023px) {
    .bh-js .blog-hub .bh-filters__done,
    .bh-js.blog-hub .bh-filters__done { display: flex; }
}

[data-bh-words][hidden] { display: none !important; }

/* Find-a-topic boxes (panel and sidebar) */
.blog-hub .bh-find {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 0 16px !important;
    border: 1.5px solid var(--bh-border-strong) !important;
    border-radius: 9999px !important;
    background: #ffffff !important;
    font-family: inherit;
    font-size: 15px !important;
    color: var(--bh-text) !important;
    box-shadow: none !important;
}
.blog-hub .bh-find:focus { outline: none; border-color: var(--bh-link) !important; box-shadow: 0 0 0 3px rgba(155, 89, 255, 0.25) !important; }

/* Sidebar topic list */
.bh-filters__topics { clear: both; margin: 10px 0 0; padding: 0; list-style: none; }
.bh-filters__topics li { margin: 0; }
.bh-filters__topics li.is-ticked + li:not(.is-ticked) { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bh-border); }

/* Topic rows: course link + see all */
.bh-rail__links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.blog-hub .bh-link--muted { color: var(--bh-text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.blog-hub .bh-link--muted:hover { color: var(--bh-purple-700); }

/* Hero search: topic suggestions */
.bh-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 8px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(2, 0, 25, 0.35);
    list-style: none;
    text-align: left;
}
.bh-suggest[hidden] { display: none; }
.bh-suggest__label { margin: 4px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bh-muted); }
.blog-hub .bh-suggest li[role="option"] {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--bh-text);
    cursor: pointer;
}
.blog-hub .bh-suggest li[role="option"][aria-selected="true"],
.blog-hub .bh-suggest li[role="option"]:hover { background: var(--bh-violet-50); color: #31007C; }
.bh-suggest__n { font-size: 13px; color: #64707D; white-space: nowrap; }

/* ── Layout: filters sidebar (always shown) | content ── */
.blog-hub .bh-wrap--wide { max-width: 105rem; }
.bh-main { padding-top: 32px; }
@media (min-width: 1024px) { .bh-main { padding-top: 48px; } }
.bh-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}
@media (min-width: 1024px) {
    .bh-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
}
@media (min-width: 1440px) {
    .bh-layout { gap: 56px; }
}
.bh-content { min-width: 0; }
.bh-content > section + section { margin-top: 56px; }
@media (min-width: 1024px) {
    .bh-content > section + section { margin-top: 72px; }
}

/* Grids sized for the content column */
@media (min-width: 1024px) {
    .bh-content .bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .bh-content .bh-grid,
    .bh-content .bh-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .bh-content .bh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Latest: lead full width, then list | promo; three columns on wide screens */
@media (min-width: 1200px) {
    .bh-content .bh-latest__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
    .bh-content .bh-latest__lead { grid-column: 1 / -1; }
}
@media (min-width: 1600px) {
    .bh-content .bh-latest__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, 0.85fr); gap: 36px; }
    .bh-content .bh-latest__lead { grid-column: auto; }
}
@media (min-width: 1024px) {
    .bh-content .bh-popular__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .bh-content .bh-popular__list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Newsletter: a dark card in the content column */
.bh-content .bh-news { padding: 36px 28px; border-radius: 24px; }
@media (min-width: 768px) { .bh-content .bh-news { padding: 44px 40px; } }
@media (min-width: 900px) and (max-width: 1279px) {
    .bh-content .bh-news__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ── "All topics" in the search bar (as on the courses hub) ── */
.bh-alltopics { position: static; }
.blog-hub .bh-search__scope {
    position: absolute;
    top: 1.5px;
    bottom: 1.5px;
    left: 1.5px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    width: var(--bh-scope-w);
    box-sizing: border-box;
    padding: 0 14px 0 22px;
    border-right: 1.5px solid var(--bh-border);
    border-radius: 9999px 0 0 9999px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--bh-text);
    cursor: pointer;
    list-style: none;
}
.bh-search__scope::-webkit-details-marker { display: none; }
.blog-hub .bh-search__scope:hover { background: #F8F4FE; }
.blog-hub .bh-search__scope:focus-visible { outline: 2px solid var(--bh-link); outline-offset: -4px; }
.bh-search__scope svg { margin-left: auto; color: var(--bh-muted); transition: transform 0.2s ease; }
.bh-alltopics[open] .bh-search__scope svg { transform: rotate(180deg); }
.bh-search__scope-short { display: none; }
@media (max-width: 559px) {
    .bh-search__scope-long { display: none; }
    .bh-search__scope-short { display: inline; }
    .blog-hub .bh-search__scope { padding-left: 18px; }
}

/* Phones: icon-only search button so the placeholder fits */
.bh-search__submit-icon { display: none; }
@media (max-width: 559px) {
    .blog-hub .bh-search__submit { width: 46px; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
    .bh-search__submit-text { display: none; }
    .bh-search__submit-icon { display: block; }
    .blog-hub .bh-search__input { padding-right: 60px !important; }
}

/* Sidebar topic groups (five suites + News & updates) */
.bh-filters__suite { border-bottom: 1px solid var(--bh-border); }
.bh-filters__suite:last-of-type { border-bottom: 0; }
.bh-filters__suite summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bh-ink);
    cursor: pointer;
    list-style: none;
}
.bh-filters__suite summary::-webkit-details-marker { display: none; }
.bh-filters__suite summary::before {
    content: '';
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fam);
}
.bh-filters__suite summary::after {
    content: '';
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.8px solid var(--bh-muted);
    border-bottom: 1.8px solid var(--bh-muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}
.bh-filters__suite[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.bh-filters__suite summary:hover .bh-filters__suite-name { color: var(--bh-purple-700); }
.bh-filters__suite summary:focus-visible { outline: 2px solid var(--bh-link); outline-offset: 2px; border-radius: 6px; }
.bh-filters__suite ul { margin: 0; padding: 0 0 10px 20px; list-style: none; }
.bh-filters__suite li { margin: 0; }
.bh-filters__picked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 9999px;
    background: var(--bh-violet-50);
    font-size: 12px;
    font-weight: 600;
    color: #31007C;
}
@media (prefers-reduced-motion: reduce) {
    .bh-filters__suite summary::after { transition: none; }
}

/* Suite rows: links to each area's busiest topics */
.bh-rail__topics { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; }
.bh-rail__topics li { margin: 0; }
.blog-hub .bh-rail__topics a { font-size: 14px; font-weight: 500; color: var(--fam-ink); text-decoration: none; }
.blog-hub .bh-rail__topics a:hover { text-decoration: underline; }
.bh-rail__head { align-items: flex-end; }

/* ── Topic index under the search bar: same layout as the courses hub's (.courses-hub-index) ── */
.bh-search .bh-index {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 35;
    width: min(1280px, calc(100vw - 40px));
    max-height: min(70vh, 640px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 24px;
    border: 1.5px solid var(--bh-border-strong);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 50px rgba(10, 4, 24, 0.28);
    transform: translateX(-50%);
    text-align: left;
    color: var(--bh-text);
}
@media (min-width: 1024px) {
    .bh-search .bh-index { padding: 28px 32px 32px; }
}
.bh-index__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.blog-hub .bh-index__title { flex: 1; margin: 0; font-size: 20px; font-weight: 700; color: var(--bh-ink); }
.blog-hub .bh-index__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 1px solid var(--bh-border) !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: var(--bh-text) !important;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.blog-hub .bh-index__close:hover { background: var(--bh-lavender) !important; }
.bh-index__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 768px) {
    .bh-index__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .bh-index__cols { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
    .bh-index__col { padding: 0 18px; border-left: 1px solid var(--bh-border); }
    .bh-index__col:first-child { padding-left: 0; border-left: 0; }
}
.bh-index__col { min-width: 0; transition: opacity 0.2s ease; }
.bh-index__col.is-empty { opacity: 0.5; }
.blog-hub .bh-index__suite { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px; text-decoration: none; }
.bh-index__suite-name {
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--suite-color);
}
.bh-index__suite:hover .bh-index__suite-name { text-decoration: underline; }
.bh-index__suite-count { font-size: 12px; font-weight: 400; color: var(--bh-muted); }
.bh-index__list { margin: 0; padding: 0; list-style: none; }
.bh-index__list li { margin: 0; }
.blog-hub .bh-index__topic {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -8px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--bh-text);
    text-decoration: none;
}
.blog-hub .bh-index__topic:hover,
.blog-hub .bh-index__topic[aria-current="true"] { background: var(--bh-violet-50); color: #31007C; }
.blog-hub .bh-index__topic:focus-visible { outline: 2px solid var(--bh-link); outline-offset: -2px; }
.bh-index__n { flex: 0 0 auto; font-size: 13px; color: #64707D; }
.bh-index__empty { margin: 0; font-size: 14px; color: var(--bh-muted); }
@media (prefers-reduced-motion: reduce) {
    .bh-index__col { transition: none; }
}

/* ── Free guides and templates strip (topic and suite views) ── */
.bh-res {
    margin: 0 0 40px;
    padding: 24px;
    border: 1px solid #C8A3FF;
    border-radius: 20px;
    background: #F7F1FF;
}
@media (min-width: 768px) { .bh-res { padding: 28px 32px; } }
.bh-res__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.bh-res__eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bh-purple-700); }
.blog-hub .bh-res__title { margin: 0; font-size: clamp(1.25rem, 2vw, 24px); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; color: var(--bh-ink); }
.bh-res__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .bh-res__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bh-res__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--bh-border);
    border-radius: 14px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.bh-res__item:hover { border-color: var(--bh-purple-500); box-shadow: 0 10px 24px rgba(91, 31, 153, 0.14); transform: translateY(-2px); }
.bh-res__item:focus-within { outline: 2px solid var(--bh-link); outline-offset: 2px; }
.bh-res__media {
    flex: 0 0 112px;
    aspect-ratio: 16 / 9; /* guide/template covers are 16:9 */
    align-self: flex-start;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(160deg, #31007C 0%, var(--bh-deep) 100%);
}
.blog-hub .bh-res__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bh-res__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bh-res__type { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bh-muted); }
.blog-hub .bh-res__link { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--bh-ink); text-decoration: none; }
/* Whole card opens the resource */
.blog-hub .bh-res__link::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.blog-hub .bh-res__link:focus-visible { outline: none; }
.bh-res__cta { font-size: 14px; font-weight: 600; color: var(--bh-link); }
@media (prefers-reduced-motion: reduce) {
    .bh-res__item, .bh-res__item:hover { transition: none; transform: none; }
}
@media (max-width: 639px) {
    .bh-res__head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── Library pages (guides, templates, webinars) ── */
@media (min-width: 1024px) {
    .bh-layout.bh-layout--single { grid-template-columns: minmax(0, 1fr); }
}
.bh-results__clear { margin: -16px 0 24px; }
/* Resource cards: an action line instead of date and reading time */
.bh-card__meta--cta { gap: 4px 12px; }
.blog-hub .bh-card__cta { font-size: 14px; font-weight: 600; color: var(--bh-link); }
.bh-card:hover .bh-card__cta { text-decoration: underline; }
/* Webinars: the upcoming section (cards styled by webinar-archive.css) above the library */
.bh-upcoming { padding: 40px 0 8px; }
@media (min-width: 1024px) { .bh-upcoming { padding-top: 56px; } }
.bh-upcoming + .bh-main { padding-top: 24px; border-top: 1px solid var(--bh-border); margin-top: 32px; }

/* Hero without the search bar (Nov 2026): no gap under the title when nothing follows it. */
.bh-hero__title:last-child { margin-bottom: 0; }
