/* ============================================
   TEXTSCORE RESOURCE HUB - Core Styles
   Created: March 2026
   Scope: Sidebar navigation, breadcrumbs, search,
   hub card grid, accordions, content blocks.
   Extracted from main.css + new styles.
   ============================================ */

/* ----- LAYOUT ----- */

.resources__row {
    display: grid;
    grid-template-columns: .7fr 1fr;
    gap: 45px;
}

.resources__toc {
    padding: 16px;
    position: sticky;
    top: 100px;
}

.toc__inner {
    padding: 24px 16px 24px 0px;
    border-radius: 16px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* ----- CONTENT BLOCKS ----- */

.content_block-wrap {
    margin-bottom: 70px;
}

.resources__content-head {
    margin-bottom: 64px;
}

.resources__content-block {
    margin-bottom: 36px;
}

.resources__content-block ul {
    list-style: disc;
    padding-left: 26px;
    margin-top: 16px;
}

.resources__desc {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    margin-top: 16px;
}

.resources__desc.lg {
    font-size: 20px;
    line-height: 30px;
}

.resources__desc.sm {
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
}

/* ----- SIDEBAR DROPDOWNS ----- */

.dropdown {
    margin-bottom: 12px;
    text-align: left;
}

.dropdown__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(12, 12, 12, 0.12);
    font-size: 19px;
    line-height: 26px;
    font-weight: 700;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown__link {
    padding: 16px 40px 16px 50px;
    width: 100%;
    border-radius: 8px;
    margin-top: 12px;
    transition: .3s ease all;
    font-size: 20px;
    line-height: 26px;
    position: relative;
    color: var(--dark);
    display: block;
    text-decoration: none;
}

.dropdown__link:hover {
    box-shadow: 0 1px 2px 0 rgba(12, 12, 12, 0.12);
    background-color: var(--danger-300);
}

.dropdown__link::before {
    content: ".";
    position: absolute;
    font-size: 50px;
    left: 25px;
    height: 100%;
    top: 0;
}

.dropdown__link.is-active {
    background-color: var(--danger-300);
    font-weight: 700;
}

.dropdown--collapsed .dropdown__menu {
    display: none;
}

.dropdown__btn svg {
    transition: transform 0.3s ease;
}

.dropdown--collapsed .dropdown__btn svg {
    transform: rotate(-90deg);
}

.dropdown__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ----- ACCORDIONS ----- */

.accordion {
    border-radius: 8px;
    border: 1px solid var(--grey-500);
    margin-bottom: 16px;
    background-color: var(--white);
    overflow: hidden;
}

.accordion.active .accordion__body {
    display: block;
}

.accordion.active .accordion__icon {
    transform: rotate(-180deg);
}

.accordion.active .accordion__head {
    background-color: var(--grey-200);
}

.accordion__head {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-left: 8px solid;
}

.accordion__title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
}

.accordion__icon {
    transition: .3s ease all;
}

.accordion__body {
    display: none;
}

.accordion__body-inner {
    padding: 32px;
}

/* ----- BREADCRUMBS ----- */

.resource-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--grey-700);
    flex-wrap: wrap;
}

.resource-breadcrumbs a {
    color: var(--grey-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.resource-breadcrumbs a:hover {
    color: var(--dark);
    text-decoration: underline;
}

.resource-breadcrumbs__separator {
    color: var(--grey-400);
    font-size: 12px;
}

.resource-breadcrumbs__middle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resource-breadcrumbs__current {
    color: var(--dark);
    font-weight: 600;
}

.resource-breadcrumbs__ellipsis {
    display: none;
    background: none;
    border: none;
    color: var(--grey-700);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    font-family: "Inter", sans-serif;
}

/* ----- MOBILE ON-THIS-PAGE (collapsible, below breadcrumbs) ----- */

.resource-on-this-page-mobile {
    display: none;
}

.resource-on-this-page-mobile__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--grey-500);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-700);
    cursor: pointer;
    width: 100%;
    font-family: "Inter", sans-serif;
}

.resource-on-this-page-mobile__toggle svg {
    transition: transform 0.2s ease;
}

.resource-on-this-page-mobile.is-expanded .resource-on-this-page-mobile__toggle svg {
    transform: rotate(180deg);
}

.resource-on-this-page-mobile__list {
    display: none;
    list-style: none;
    padding: 8px 0 0 0;
    margin: 0;
}

.resource-on-this-page-mobile.is-expanded .resource-on-this-page-mobile__list {
    display: block;
}

/* ----- SEARCH ----- */

.resource-search {
    position: relative;
    margin-bottom: 24px;
}

.resource-search__input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--grey-500);
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
    font-family: "Inter", sans-serif;
    background-color: var(--white);
    color: var(--dark);
    outline: none;
    transition: border-color 0.2s ease;
}

.resource-search__input:focus {
    border-color: var(--grey-400);
}

.resource-search__input::placeholder {
    color: var(--grey-400);
}

.resource-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-400);
    pointer-events: none;
}

.resource-search__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--grey-500);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(12, 12, 12, 0.1);
    display: none;
}

.resource-search__results.is-open {
    display: block;
}

.resource-search__result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--grey-300);
    text-decoration: none;
    display: block;
    color: var(--dark);
}

.resource-search__result-item:last-child {
    border-bottom: none;
}

.resource-search__result-item:hover {
    background-color: var(--grey-50);
}

.resource-search__result-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.resource-search__result-category {
    font-size: 12px;
    color: var(--grey-700);
    margin-top: 2px;
}

.resource-search__result-desc {
    font-size: 13px;
    color: var(--grey-800);
    margin-top: 4px;
    line-height: 18px;
}

.resource-search__empty {
    padding: 16px;
    text-align: center;
    color: var(--grey-700);
    font-size: 14px;
}

/* ----- HUB PAGE ----- */

.resource-hub__filters {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.resource-hub__filter-pill {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--grey-500);
    background: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--dark);
    font-family: "Inter", sans-serif;
}

.resource-hub__filter-pill:hover {
    border-color: var(--grey-400);
}

.resource-hub__filter-pill.is-active {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.resource-hub__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.resource-hub__category {
    margin-bottom: 48px;
}

.resource-hub__category-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
}

.resource-hub__card {
    padding: 24px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--grey-300);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    display: block;
    color: var(--dark);
}

.resource-hub__card:hover {
    box-shadow: 0 4px 12px rgba(12, 12, 12, 0.08);
    border-color: var(--grey-400);
}

.resource-hub__card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    margin-bottom: 8px;
}

.resource-hub__card-desc {
    font-size: 14px;
    line-height: 20px;
    color: var(--grey-800);
}

/* ----- ON THIS PAGE (in-page anchor nav) ----- */

.resource-on-this-page {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-300);
}

.resource-on-this-page__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-700);
    margin-bottom: 12px;
}

.resource-on-this-page__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-on-this-page__link {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--grey-800);
    text-decoration: none;
    transition: color 0.15s ease;
}

.resource-on-this-page__link:hover {
    color: var(--dark);
}

/* ----- RELATED RESOURCES ----- */

.related-resources {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--grey-300);
}

.related-resources__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.related-resources__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-resources__card {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--grey-300);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: border-color 0.2s ease;
}

.related-resources__card:hover {
    border-color: var(--grey-400);
}

.related-resources__card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.related-resources__card-desc {
    font-size: 13px;
    color: var(--grey-700);
    line-height: 18px;
}

/* ----- MOBILE DRAWER ----- */

.resource-drawer-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--grey-500);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 16px;
    color: var(--dark);
    font-family: "Inter", sans-serif;
}

.resource-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 12, 0.4);
    z-index: 90;
}

.resource-drawer-backdrop.is-open {
    display: block;
}

.resources__toc.is-drawer-open {
    transform: translateX(0);
}
