/* Hub Page template styles */
/* Sections that exactly reuse another block's look (hero base layout,
   featured-resources grid, webinar card, FAQ, CTA footer) rely entirely on
   that block's own CSS file, enqueued alongside this one in inc/hub-page.php.
   Everything here is either new (hero cards, quick facts, additional
   resources) or a small addition on top of a reused section (hero subheader,
   secondary CTA, quick-facts container reuse). */

/* ── 1. Hero (topics-page-hero look, no gradient headline) ── */
.hub-page-hero-block {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    box-sizing: border-box;
}
main:has(.hub-page-hero-block) {
    max-width: none !important;
    overflow-x: visible !important;
}

.hub-page-hero-section {
    min-height: 320px;
}
.hub-page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hub-page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hub-page-hero-content {
    position: relative;
    z-index: 10;
    padding: 156px 20px 64px;
}
.hub-page-hero-title {
    font-size: 32px;
    font-weight: 400;
    line-height: normal;
    margin: 0;
    padding: 0 0 16px 0;
}
.hub-page-hero-line {
    display: block;
    color: #ffffff;
}
.hub-page-hero-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(100, 27, 210, 0.46);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}
.hub-page-hero-date-badge svg { flex-shrink: 0; }
.hub-page-hero-subheader {
    max-width: 46rem;
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 500;
    line-height: 160%;
    color: rgba(255, 255, 255, 0.8);
}
.hub-page-hero-cta-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.hub-page-hero-cta--secondary {
    color: #ffffff !important;
    text-decoration: none !important;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hub-page-hero-cta--secondary:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .hub-page-hero-content { padding-left: 48px; padding-right: 48px; padding-top: 156px; }
    .hub-page-hero-title { font-size: 48px; }
}
@media (min-width: 1024px) {
    .hub-page-hero-content { padding-left: 100px; padding-right: 100px; }
    .hub-page-hero-title { font-size: 66px; }
}

/* Extra bottom room when hero cards will overlay this section */
.hub-page-hero-block:has(.hub-page-hero-cards) .hub-page-hero-section {
    padding-bottom: 96px;
}

/* ── 2. Hero Cards (overlay the hero's bottom edge) ── */
.hub-page-hero-cards {
    position: relative;
    z-index: 20;
    margin-top: -80px;
}
.hub-page-hero-cards__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .hub-page-hero-cards__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hub-page-hero-cards__inner--single {
        grid-template-columns: 1fr;
    }
}
.hub-page-hero-card {
    border-radius: 20px;
    border: 1px solid #C8A3FF;
    background: #F7F1FF;
    backdrop-filter: blur(9.8px);
    -webkit-backdrop-filter: blur(9.8px);
    padding: 40px;
}
.hub-page-hero-card__title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    text-align: left;
}
.hub-page-hero-card__text {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    text-align: left;
}
.hub-page-hero-card__text p:last-child { margin-bottom: 0; }
.hub-page-hero-card__text a {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 0.65rem 1.5rem;
    border-radius: 9999px;
    background-color: #000000;
    color: #ffffff !important;
    font-weight: 500;
    text-decoration: none !important;
    transition: opacity 0.15s ease;
}
.hub-page-hero-card__text a:hover { opacity: 0.85; }

/* ── 3. Quick Facts (reuses .topics-template-courses-table's gradient box; each
   fact is its own full-width row — icon, then key, then value — matching the
   topics page's course table rows) ── */
.hub-quick-facts-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.hub-quick-fact {
    display: grid;
    grid-template-columns: 28px 1fr 1fr;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.hub-quick-fact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    font-size: 16px;
    color: #A77BF0;
}
.hub-quick-fact__key {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}
.hub-quick-fact__value {
    margin: 0;
    font-size: 0.875rem;
    color: #5A6E85;
}
/* Facts beyond the first 5 sit in a collapsible panel (same 0fr→1fr grid
   trick as the resource buckets); the spacing lives on the inner grid's
   margin so nothing leaks out while collapsed. */
.hub-quick-facts-more {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.25s ease, visibility 0.25s;
}
.hub-quick-facts-more.is-open {
    grid-template-rows: 1fr;
    visibility: visible;
}
.hub-quick-facts-more__inner {
    overflow: hidden;
    min-height: 0;
}
.hub-quick-facts-more .hub-quick-facts-grid {
    margin-top: 15px;
}
.hub-quick-facts-toggle,
.hub-page button.hub-quick-facts-toggle,
.hub-page .elementor-widget .hub-quick-facts-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px auto 0 !important;
    padding: 4px 8px !important;
    border: none !important;
    border-radius: 6px !important;
    background-color: transparent !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    color: #5A6E85 !important;
    cursor: pointer;
    transition: color 0.15s ease;
}
.hub-quick-facts-toggle:hover,
.hub-quick-facts-toggle:focus,
.hub-quick-facts-toggle:focus-visible,
.hub-page button.hub-quick-facts-toggle:hover,
.hub-page button.hub-quick-facts-toggle:focus {
    background-color: transparent !important;
    color: #7429E5 !important;
}
.hub-quick-facts-toggle__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.hub-quick-facts-toggle[aria-expanded="true"] .hub-quick-facts-toggle__chevron {
    transform: rotate(180deg);
}

@media (max-width: 640px) {
    .hub-quick-fact {
        grid-template-columns: 28px 1fr;
        row-gap: 4px;
    }
    .hub-quick-fact__value {
        grid-column: 2;
    }
}

/* ── 4. Info Card (text left, image right — only the text sits inside the
   blue-bordered card; the image is a plain sibling outside it) ── */
.hub-info-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
@media (min-width: 1024px) {
    .hub-info-card-wrap {
        flex-direction: row;
        align-items: center;
        gap: 60px;
    }
    .hub-info-card { flex: 1 1 0%; }
    /* .hub-info-card__media { flex: 1 1 0%; } */
}
.hub-info-card {
    border-radius: 20px;
    background: #EEF7FF;
    backdrop-filter: blur(9.8px);
    -webkit-backdrop-filter: blur(9.8px);
    padding: 40px 24px;
}
@media (min-width: 1024px) {
    .hub-info-card { padding: 60px; }
}
.hub-info-card__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 500;
    color: #111827;
}
.hub-info-card__body {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}
.hub-info-card__img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* ── 6. Featured Resources: fixed-height thumbnails so all 3 cards line up
   (the reused .topics-template-course-thumb--featured is otherwise
   auto-height/contain-fit, sized for course logos rather than post images) ── */
.hub-featured-resources-section .topics-template-course-thumb--featured {
    height: 180px;
}
.hub-featured-resources-section .topics-template-course-thumb-img--featured {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── 7. Additional Resources ("Explore more" collapsible buckets) ── */
.hub-additional-resources-headline {
    margin: 0 0 1.5rem;
    font-size: 24px;
    font-weight: 500;
}
@media (min-width: 1024px) {
    .hub-additional-resources-headline { font-size: 30px; }
}
.hub-resource-buckets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hub-resource-bucket {
    border: 1px solid #C8A3FF;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.hub-resource-bucket.is-open {
    background: linear-gradient(90deg, rgba(64, 184, 255, 0.06) 0%, rgba(171, 139, 255, 0.06) 100%);
}
.hub-resource-bucket__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.hub-resource-bucket__label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.hub-resource-icon { color: #7429E5; flex-shrink: 0; }
.hub-resource-bucket__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    background: #F0E5FF;
    color: #7429E5;
    font-size: 12px;
    font-weight: 600;
}
.hub-resource-bucket__icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.375rem;
    font-weight: 300;
    line-height: 1;
    color: #5A6E85;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-resource-bucket__icon-minus { display: none; }
.hub-resource-bucket__trigger[aria-expanded="true"] .hub-resource-bucket__icon-plus { display: none; }
.hub-resource-bucket__trigger[aria-expanded="true"] .hub-resource-bucket__icon-minus { display: inline; }

.hub-resource-bucket__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease;
}
.hub-resource-bucket.is-open .hub-resource-bucket__panel {
    grid-template-rows: 1fr;
}
.hub-resource-bucket__items {
    overflow: hidden;
    min-height: 0;
    list-style: none;
    margin: 0;
    /* No bottom padding while collapsed: a 0fr row can't shrink below its
       padding, which left extra space under the trigger. */
    padding: 0 20px;
    transition: padding-bottom 0.2s ease;
}
.hub-resource-bucket.is-open .hub-resource-bucket__items {
    padding-bottom: 14px;
}
.hub-resource-bucket__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #111827 !important;
    transition: background-color 0.15s ease;
}
.hub-resource-bucket__item:hover {
    background-color: #F7F1FF;
}
.hub-resource-bucket__item-title {
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 500;
}
.hub-resource-bucket__chevron {
    flex-shrink: 0;
    color: #9CA3AF;
}

/* Strip Elementor's global button/link styles (default + hover) — same
   defensive pattern as faq-section.css's .faq-section__trigger overrides. */
.hub-resource-bucket__trigger,
.hub-page button.hub-resource-bucket__trigger,
.hub-page .elementor-widget .hub-resource-bucket__trigger {
    background-color: transparent !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    color: inherit !important;
    border-radius: 0 !important;
    padding: 14px 20px !important;
}
.hub-resource-bucket__trigger:hover,
.hub-resource-bucket__trigger:focus,
.hub-resource-bucket__trigger:focus-visible,
.hub-page button.hub-resource-bucket__trigger:hover,
.hub-page button.hub-resource-bucket__trigger:focus {
    background-color: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    border-radius: 0 !important;
    padding: 14px 20px !important;
}

.hub-resource-bucket__item,
.hub-page a.hub-resource-bucket__item,
.hub-page .elementor-widget .hub-resource-bucket__item {
    background-color: transparent !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    border-radius: 8px !important;
    padding: 10px 8px !important;
}
.hub-resource-bucket__item:hover,
.hub-resource-bucket__item:focus,
.hub-page a.hub-resource-bucket__item:hover,
.hub-page a.hub-resource-bucket__item:focus {
    background-color: #F7F1FF !important;
    color: #111827 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    border-radius: 8px !important;
    padding: 10px 8px !important;
}

/* ── 9. CTA Footer (matches .topics-template-experts-cta in
   page-topics-template.php; its .topics-template-pill-cta base look is
   scoped to .topics-page-template-main, which this page doesn't have, so
   that piece is mirrored here under hub-prefixed classes). ── */
.hub-cta-footer {
    background: transparent;
}
@media (min-width: 768px) {
    .hub-cta-footer { padding-bottom: 5rem; }
}
.hub-cta-footer__inner {
    max-width: 1000px;
    padding: 2.5rem;
    border-radius: 28px;
    background: linear-gradient(90deg, #eef7ff 0%, #f5f4ff 100%);
    text-align: center;
}
.hub-cta-footer__headline {
    margin: 0;
    font-size: 30px;
    line-height: 36px;
    color: #090a0b;
}
.hub-cta-footer__btn {
    margin-top: 1.5rem;
}

.hub-pill-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none !important;
    background-color: transparent !important;
    border: 2px solid rgba(213, 0, 195, 0.35);
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-pill-cta:hover {
    transform: translateY(-1px);
}
.hub-pill-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    background: linear-gradient(90deg, #ff7ae3 13.48%, #d970ff 45.77%, #ab80ff 76.85%);
}
.hub-pill-cta:hover::before {
    opacity: 1;
}
.hub-pill-cta__label {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}
.hub-pill-cta:not(:hover) .hub-pill-cta__label {
    background: linear-gradient(86deg, #b800a8 5.41%, #440d8f 49.98%, #2d0049 96.57%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.hub-pill-cta:hover .hub-pill-cta__label {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}
@media (max-width: 767px) {
    .hub-cta-footer__headline {
        font-size: 1.375rem;
        line-height: 1.35;
    }
    .hub-pill-cta__label {
        font-size: 0.9375rem;
    }
}
