/* Resources hub (page-resources-hub.php). Loads after assets/css/blog-hub.css and only adds
   what the blog hub doesn't have: the content-type tabs and the type badge on cards. */

/* ── Content-type tabs (above the filters sidebar and results) ── */
.rh-types {
    min-width: 0;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--bh-border);
}
.rh-types::-webkit-scrollbar { display: none; }
.rh-types ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.rh-types li { margin: 0; }
.resources-hub .rh-type {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--bh-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.resources-hub .rh-type::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}
.resources-hub .rh-type:hover { color: var(--bh-ink); }
.resources-hub .rh-type.is-active { color: var(--bh-ink); }
.resources-hub .rh-type.is-active::after { background: linear-gradient(90deg, #CF30FF, #9B59FF); }
.resources-hub .rh-type:focus-visible {
    outline: 2px solid var(--bh-link);
    outline-offset: -2px;
    border-radius: 8px;
}
@media (min-width: 1024px) {
    .rh-types { margin-bottom: 40px; }
}
@media (max-width: 767px) {
    .resources-hub .rh-type { padding: 0 10px; font-size: 14px; }
    .resources-hub .rh-type::after { left: 10px; right: 10px; }
}

/* ── Type badge on the card image ── */
.rh-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(9, 10, 11, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    backdrop-filter: blur(4px);
}
.rh-card--upcoming .rh-badge { background: linear-gradient(90deg, #7400B2, #D500C3); }

/* Upcoming webinars: the date is the point, so it reads as text, not grey meta. */
.resources-hub .rh-card--upcoming .bh-card__meta { color: var(--bh-text); font-weight: 600; }

/* ── Front-page rows: dot colour per type (the blog uses the suite colour) ── */
.rh-row--guide    { --fam: #9B59FF; }
.rh-row--template { --fam: #20CFE2; }
.rh-row--webinar  { --fam: #D500C3; }
.rh-row--article  { --fam: #FBA754; }

/* Rows have no topic links under the heading, so keep it left on phones (the rail head stacks there). */
@media (max-width: 639px) {
    .rh-row .bh-rail__head { align-items: flex-start; }
}

/* ── Filtered results with all types: one short group per type (like the site search) ── */
.bh-results .rh-group + .rh-group,
.bh-results .rh-promo-wide + .rh-group,
.bh-results .rh-group + .rh-promo-wide { margin-top: 48px; }
.blog-hub .rh-group__title { font-size: clamp(1.25rem, 1.8vw, 24px); }
.rh-group__n { font-size: 0.7em; font-weight: 500; color: var(--bh-muted); letter-spacing: 0; }
.rh-group .bh-rail__head { margin-bottom: 20px; }

/* Course promo as a strip between groups */
@media (min-width: 768px) {
    .rh-promo-wide .bh-promo {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "eyebrow btn" "title btn" "text btn";
        align-items: center;
        column-gap: 32px;
        row-gap: 6px;
        min-height: 0;
        padding: 28px 32px;
    }
    .rh-promo-wide .bh-promo__eyebrow { grid-area: eyebrow; }
    .rh-promo-wide .bh-promo__title { grid-area: title; }
    .rh-promo-wide .bh-promo__text { grid-area: text; margin: 0; }
    .rh-promo-wide .bh-promo .bh-btn { grid-area: btn; margin: 0; white-space: nowrap; }
}
.rh-promo-wide .bh-promo { min-height: 0; }

/* Next live webinar card in "Latest" */
.rh-webinar-promo .bh-promo__title { font-size: 22px; }
