/* Shared Learning Center archive search and topic sidebar. */
/* Shared offset for a visible site header (matches the FAQ archive). */
#appContent {
    --hub-education-sticky-top: 88px;
}

.hub-education-page { min-width: 0; padding-bottom: 28px; }
.hub-education-page * { box-sizing: border-box; }
.hub-education-page__intro { margin: 22px auto 15px; max-width: 820px; text-align: center; }
.hub-education-page__intro h1 { margin: 0; font-size: clamp(20px, 2.1vw, 27px); line-height: 1.8; font-weight: 750; color: #2166ae; }
.hub-education-page__intro p { margin: 4px 0 0; font-size: 13px; color: #8590a0; }
.hub-education-search { position: relative; width: min(100%, 760px); margin: 14px auto 32px; z-index: 4; }
.hub-education-search__bar { display: flex; width: 100%; align-items: center; gap: 11px; border: 1px solid #dce4ed; background: #fff; border-radius: 4px; padding: 5px 6px 5px 12px; min-height: 54px; }
.hub-education-search__bar:focus-within { border-color: #2166ae; }
.hub-education-search__icon { flex: 0 0 20px; color: #667587; }
.hub-education-search input[type="search"] { flex: 1 1 auto; width: 0; min-width: 0; padding: 7px 0; margin: 0; height: 42px; border: 0; outline: 0; box-shadow: none; background: none; color: #344254; font-size: 14px; font-family: inherit; }
.hub-education-search input[type="search"]:focus { outline: none; }
.hub-education-search__bar button { border: 0; border-radius: 4px; background: #2166ae; color: #fff; min-height: 42px; padding: 0 25px; font: inherit; font-size: 13px; font-weight: 700; flex: 0 0 auto; cursor: pointer; }
.hub-education-search__bar button:hover { background: #145390; }
.hub-education-search__bar button:focus-visible, .hub-education-sidebar :is(a,button,summary):focus-visible { outline: 2px solid #2166ae; outline-offset: 2px; }
.hub-education-search__hint { color: #738295; font-size: 11px; line-height: 1.9; margin: 7px 3px 0; text-align: right; }
.hub-education-search__suggestions:not([hidden]) { display: block; }
.hub-education-search__suggestions { position: absolute; inset-inline: 0; top: calc(100% - 9px); max-height: min(360px, 55vh); overflow-y: auto; z-index: 20; background: #fff; border: 1px solid #dce4ed; border-radius: 4px; box-shadow: 0 9px 23px rgba(14,36,58,.07); }
.hub-education-search__suggestions[hidden] { display: none !important; }
.hub-education-search__option { display: flex; gap: 2px; flex-direction: column; text-decoration: none; padding: 10px 14px; border-bottom: 1px solid #edf1f7; font-size: 12px; color: #39485c; }
.hub-education-search__option small { color: #8590a0; }
.hub-education-search__option:is(:hover,.is-active) { background: #f1f6fd; color: #2166ae; }
.hub-education-search__all { display: block; padding: 11px; text-align: center; color: #2166ae; font-size: 12px; text-decoration: none; }
.hub-education-search__message { padding: 13px; text-align: center; color: #748092; font-size: 12px; }

.hub-education-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 256px;
    grid-template-areas: "content sidebar";
    direction: ltr;
    align-items: start;
    gap: 24px;
    margin-bottom: 24px;
    min-width: 0;
    width: 100%;
}
.hub-education-layout__content { grid-area: content; direction: rtl; min-width: 0; }
.hub-education-layout__sidebar { grid-area: sidebar; direction: rtl; min-width: 0; }
.hub-education-sidebar { --topic-accent: #2166ae; width: 100%; min-width: 0; padding: 0; border: 1px solid #e5e9ef; border-radius: 4px; background: #f7f9fb; overflow: hidden; box-shadow: none; }
.hub-education-sidebar__heading { padding: 17px 20px 13px; border-bottom: 1px solid #e5e9ef; background: #f7f9fb; display: flex; align-items: center; justify-content: space-between; }
.hub-education-sidebar__heading h2 { margin: 0; color: #333a44; font-size: 14px; font-weight: 750; line-height: 1.8; }
.hub-education-sidebar__heading .hub-topic-sidebar__description { display: block; margin: 3px 0 0; color: #7c8692; font-size: 11px; line-height: 1.8; }
.hub-education-sidebar__scroll { display: block; max-height: min(60vh,580px); padding: 9px 12px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hub-education-sidebar__list, .hub-education-sidebar__children { margin: 0; padding: 0; list-style: none; }
.hub-education-sidebar__row, .hub-education-sidebar .hub-topic-sidebar__row { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; font: inherit; font-size: 12px; font-weight: 650; line-height: 1.8; text-align: right; background: transparent; border: 1px solid transparent; border-radius: 4px; color: #545f6d; text-decoration: none; cursor: pointer; }
.hub-education-sidebar .hub-topic-sidebar__row:is(:hover,.is-active), .hub-education-sidebar__group.is-current > summary { background: #fff; color: #2166ae; border-color: #d9e5f4; }
.hub-education-sidebar .hub-topic-sidebar__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hub-education-sidebar .hub-topic-sidebar__count { min-width: 23px; flex: 0 0 auto; text-align: center; color: #7c8692; font-size: 11px; }
.hub-education-sidebar__group > summary { list-style: none; }
.hub-education-sidebar__group > summary::-webkit-details-marker { display: none; }
.hub-education-sidebar .hub-topic-sidebar__chevron { flex: 0 0 15px; transition: transform .15s ease; color: #8b95a3; }
.hub-education-sidebar__group[open] .hub-topic-sidebar__chevron { transform: rotate(180deg); }
.hub-education-sidebar__children { padding: 3px 10px 7px 0; }
.hub-education-sidebar__child { display: block; border-radius: 4px; border-right: 2px solid transparent; padding: 8px 11px; text-decoration: none; color: #586678; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.hub-education-sidebar__child:is(:hover,.is-active) { background: #fff; color: #2166ae; border-right-color: #2166ae; }
/* FAQ's structure is the reference: the aside itself is a direct grid child.
   Do not insert a short-lived wrapper around a sticky element. */
.hub-education-page .hub-education-layout > .hub-education-sidebar {
    grid-area: sidebar;
    direction: rtl;
    min-width: 0;
}

@media (min-width: 768px) {
    .hub-education-page .hub-education-layout > .hub-education-sidebar {
        position: sticky;
        top: var(--hub-education-sticky-top);
        align-self: start;
        max-height: calc(100vh - 108px);
        max-height: calc(100dvh - 108px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

.hub-education-page .hub-education-layout > .hub-education-sidebar .hub-education-sidebar__scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 193px);
    max-height: calc(100dvh - 193px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd4df transparent;
}

/* Preserve the guide detail drawer/TOC behavior; skin is shared. */
#guidePage .hub-education-sidebar.guide-show-categories { border-radius: 4px; }
#guidePage .hub-education-sidebar__scroll { flex: 1 1 auto; min-height: 0; }
#guidePage .guide-show-categories__list > li { margin: 0; }
#guidePage .hub-education-sidebar__children { padding: 3px 10px 7px 0; }
#guidePage .hub-education-sidebar__child { border-radius: 4px; }
/* The guide detail keeps its existing mobile drawer. Only desktop uses sticky. */
@media (min-width: 992px) {
    #guidePage .guide-show-categories.hub-education-sidebar {
        position: sticky;
        top: var(--hub-education-sticky-top);
        max-height: calc(100dvh - 108px);
    }
    #guidePage .guide-toc-rail {
        top: var(--hub-education-sticky-top);
        max-height: calc(100dvh - 108px);
    }
}

/* Without JavaScript the guide categories follow the article on smaller screens.
   The guide-js-ready mobile drawer still uses its existing fixed positioning. */
@media (max-width: 991.98px) {
    #guidePage:not(.guide-js-ready) .guide-show-categories.hub-education-sidebar {
        position: static;
        top: auto;
        max-height: 320px;
    }
}

/* Documentation details: both category navigation and TOC follow the same offset. */
@media (min-width: 1200px) {
    .devdocs > .hub-education-sidebar {
        position: sticky;
        top: var(--hub-education-sticky-top);
        display: flex;
        flex-direction: column;
        max-height: calc(100dvh - 108px);
        overflow: hidden;
    }
    .devdocs > .hub-education-sidebar .hub-education-sidebar__scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        max-height: calc(100dvh - 193px);
    }
    .devdocs > .devdocs-toc {
        position: sticky;
        top: var(--hub-education-sticky-top);
    }
}
@media (max-width: 1199.98px) {
    .devdocs > .hub-education-sidebar {
        position: static;
    }
}


/* All educational cards: exactly 4px including mobile. */
:is(.learn-center,.hub-education-page,.guide-show-v16,.devdocs) :is(.lc-guide-card,.lc-dev-card,.lc-steps-card,.lc-video-card,.ga-guide-card,.card,.hc-faq__item,.faq-index-empty,.docs-empty-state,.devdocs-header,.guide-panel,.hub-skeleton__card) { border-radius: 4px !important; }

@media (max-width: 767.98px) {
    .hub-education-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "content" "sidebar";
        gap: 26px;
    }
    .hub-education-page .hub-education-layout__sidebar {
        position: static;
        display: block;
        align-self: auto;
        min-height: 0;
    }
    .hub-education-page .hub-education-layout > .hub-education-sidebar {
        position: static;
        top: auto;
        max-height: 300px;
        grid-area: sidebar;
    }
    .hub-education-page .hub-education-layout > .hub-education-sidebar .hub-education-sidebar__scroll {
        max-height: 220px;
    }
    .devdocs > .hub-education-sidebar { position: static; }
}
@media (max-width: 575.98px) {
    .hub-education-search { width: 100%; margin-bottom: 20px; }
    .hub-education-search__bar { gap: 7px; padding: 5px; }
    .hub-education-search__icon { flex-basis: 17px; width: 17px; }
    .hub-education-search input[type="search"] { font-size: 13px; }
    .hub-education-search__bar button { padding: 0 14px; min-height: 40px; }
    .hub-education-page__intro { margin-top: 12px; }
    .hub-education-sidebar__heading { padding: 12px 13px; }
    .hub-education-page .hub-education-layout > .hub-education-sidebar { max-height: 250px; }
}
@media (prefers-reduced-motion:reduce) { .hub-education-sidebar .hub-topic-sidebar__chevron { transition: none; } }

/* FAQ filtering uses the same sidebar partial; preserves its live filtering. */
.faq-index-page .hc-faq__category-buttons.hub-education-sidebar { padding: 0; display: block; width: 100%; max-height: none; overflow: hidden; }
.faq-index-page .hc-faq__category-buttons .hub-education-sidebar__heading { padding: 17px 20px 13px; border-bottom: 1px solid #e5e9ef; }
.faq-index-page .hc-faq__category-buttons .hub-education-sidebar__scroll { max-height: min(60vh,580px); padding: 9px 12px 12px; }
.faq-index-page .hc-faq__category-buttons .hub-education-sidebar__list { display: block; }
.faq-index-page .hc-faq__category-buttons .hc-faq__cat-btn { display: flex; width: 100%; margin: 0; }
.faq-index-page .hc-faq--content-first > .hub-education-sidebar { align-self: start; }
@media (max-width: 767.98px) {
    .faq-index-page .hc-faq--content-first > .hub-education-sidebar.hc-faq__category-buttons { display: block; padding: 0; }
    .faq-index-page .hc-faq__category-buttons .hub-education-sidebar__heading { display: flex; padding: 12px 13px; }
    .faq-index-page .hc-faq__category-buttons .hub-education-sidebar__scroll { max-height: 220px; }
    .faq-index-page .hc-faq__category-buttons .hub-education-sidebar__list { display: block; }
}
/* Match the FAQ's original sticky offset beneath the persistent site header. */
@media (min-width: 768px) {
    .faq-index-page .hc-faq--content-first > .hub-education-sidebar.hc-faq__category-buttons {
        position: sticky;
        top: var(--hub-education-sticky-top);
        max-height: calc(100dvh - 108px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .faq-index-page .hc-faq--content-first > .hub-education-sidebar .hub-education-sidebar__scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: calc(100dvh - 193px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* Documentation retains its content-first grid columns and TOC. */
@media (max-width:1199.98px) {
    .devdocs > .hub-education-sidebar { order: 3; }
    .devdocs > .devdocs-main { order: 2; }
    .devdocs > .devdocs-toc { order: 1; }
}

.sla-landing.hub-education-page :is(.widget-style-1, .filter-card) { border-radius: 4px !important; }
:is(.learn-center,.hub-education-page,.guide-show-v16,.devdocs) :is(.lc-hero-card,.endpoint,.devdocs-sidebar-box,.devdocs-toc-box,.guide-nav__item,.guide-show-feedback,.footer-guide,.faq-answer) { border-radius: 4px !important; }
.hub-education-page :is(.card,.ga-guide-card) { overflow: hidden; }
.hub-education-page .card { min-width: 0; }
.hub-education-page .card img { max-width: 100%; height: auto; }
.hub-education-page .promote-details { font-size: 12px; line-height: 1.9; }
/* Course archive card headings: one readable typography scale on all widths. */
.hub-education-page #courseLanding .card .card-title {
    font-size: clamp(14px, 1.15vw, 17px);
    line-height: 1.75;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.hub-education-page .faq-answer { overflow-wrap: anywhere; }
.hub-education-page .faq-answer :is(img,table,pre,iframe) { max-width: 100%; }
.hub-education-page .faq-answer :is(table,pre) { overflow-x: auto; }
@media(max-width:767.98px) {
    .hub-education-page .row > [class*="col-"] { min-width: 0; }
    .hub-education-page .hub-education-search__hint { line-height: 1.85; }
}

/* Keep FAQ categories on the same (right-hand) side as the other archives. */
@media (min-width: 768px) {
    .faq-index-page .hc-faq--content-first {
        grid-template-columns: 256px minmax(0,1fr);
        grid-template-areas: "topics answers";
    }
}

/* Archive header: exactly the plain, centered title + subtitle used by the FAQ index. */
.hub-education-page .hub-education-page__intro--plain {
    width: 100%;
    max-width: 720px;
    margin: 34px auto 22px;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center;
}
.hub-education-page .hub-education-page__intro--plain h1 {
    margin: 0;
    padding: 0;
    font-size: clamp(22px, 2.1vw, 28px);
    font-weight: 800;
    line-height: 1.65;
    color: #252c36;
    background: none;
    border: 0;
    box-shadow: none;
}
.hub-education-page .hub-education-page__intro--plain p {
    margin: 3px 0 0;
    padding: 0;
    color: #8993a0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.95;
}
.hub-education-page:not(.faq-index-page) .hub-education-search {
    margin-top: 0;
    margin-bottom: 0;
}
.hub-education-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-width: 0;
    margin: 49px 0 19px;
    padding: 0 0 14px;
    border-bottom: 1px solid #e5e9ef;
}
.hub-education-results-head h2 {
    margin: 0;
    color: #242c36;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.8;
}
.hub-education-results-head p {
    margin: 6px 0 0;
    color: #8590a0;
    font-size: 12px;
    line-height: 1.9;
}
.hub-education-results-head__categories {
    flex: 0 0 auto;
    white-space: nowrap;
    color: #2166ae;
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}
.hub-education-results-head__categories::after { content: " ↙"; }
.hub-education-page .hub-education-layout__content .row {
    max-width: calc(100% + var(--bs-gutter-x, 1.5rem));
}
@media (max-width: 767.98px) {
    .hub-education-page .hub-education-page__intro--plain {
        margin-top: 23px;
        margin-bottom: 19px;
    }
    .hub-education-page .hub-education-page__intro--plain p { padding: 0 6px; }
    .hub-education-results-head { margin-top: 32px; }
}
@media (max-width: 399.98px) {
    .hub-education-results-head { align-items: flex-start; }
    .hub-education-results-head__categories { white-space: normal; text-align: left; }
}

/* Only the main layout header stays visible while scrolling.
   main.css applies sticky to every `header`, so constrain its behavior here. */
#app > header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9;
}

/* Inner page/article headings must scroll with the content, not stick. */
#appContent header,
#appContent .devdocs-header {
    position: static !important;
    top: auto !important;
    backdrop-filter: none;
}


/* Guide archive: fewer cards per page than FAQ. A tall category list can
   consume nearly the full grid height and leave no room for CSS sticky.
   Constrain the panel itself; its navigation remains independently scrollable.
   Scope this rule to the guide archive so all other educational pages retain
   the confirmed v9 behavior. */
@media (min-width: 768px) {
    #appContent.hub-guide-archive .hub-education-layout > .hub-education-sidebar {
        position: sticky;
        top: var(--hub-education-sticky-top, 88px);
        align-self: start;
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: min(42dvh, 340px);
        overflow: hidden;
    }

    #appContent.hub-guide-archive .hub-education-layout > .hub-education-sidebar .hub-education-sidebar__scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* V11 — active parent/child hierarchy shared by guide and docs sidebars. */
.hub-education-sidebar .hub-education-sidebar__group.is-current > summary {
    background: #fff;
    color: #2166ae;
    border-color: #d9e5f4;
    font-weight: 750;
}
.hub-education-sidebar .hub-education-sidebar__group.is-current > summary .hub-topic-sidebar__label,
.hub-education-sidebar .hub-education-sidebar__group.is-current > summary .hub-topic-sidebar__chevron { color: #2166ae; }
.hub-education-sidebar .hub-education-sidebar__child.is-active {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #2166ae;
    background: #e7f2ff;
    border-right-color: #2166ae;
    font-weight: 700;
}
.hub-education-sidebar .hub-education-sidebar__child.is-active::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    align-self: center;
    border-radius: 50%;
    background: #2166ae;
}
.hub-education-sidebar .hub-topic-sidebar__row.is-active {
    color: #2166ae;
    background: #fff;
    border-color: #d9e5f4;
}
.hub-education-sidebar a.hub-topic-sidebar__row.is-active .hub-topic-sidebar__label::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    vertical-align: middle;
    margin-inline-end: 7px;
    border-radius: 50%;
    background: #2166ae;
}
/* FAQ uses buttons with selected categories; no pseudo dot there. */
.faq-index-page .hub-education-sidebar button.hub-topic-sidebar__row.is-active .hub-topic-sidebar__label::before { content: none; }
@media (max-width: 575.98px) {
    .hub-education-sidebar .hub-education-sidebar__child.is-active { gap: 6px; }
}
/* Guide details have a more specific legacy selector; keep the shared active state. */
#guidePage .hub-education-sidebar .guide-show-category__link.is-active {
    background: #e7f2ff;
    color: #2166ae;
    border: 1px solid #d9e5f4;
    border-right: 2px solid #2166ae;
    border-radius: 4px;
}
