/* =========================================================
   Learn - Root Explorer
   ========================================================= */

.roots-learn-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.roots-learn-hero,
.roots-learn-sidebar,
.roots-learn-detail {
    box-sizing: border-box;

    border: 1px solid #dfe8ef;
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 7px 20px
        rgba(31, 60, 90, 0.07);
}

.roots-learn-hero {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 24px;

    padding: 30px 32px;

    background:
        radial-gradient(
            circle at 92% 20%,
            rgba(16, 156, 155, 0.13),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #ffffff,
            #f8fcff
        );
}

.roots-learn-back {
    display: inline-flex;

    margin-bottom: 17px;

    color: #60758a !important;

    font-size: 0.85rem;
    font-weight: 850;

    text-decoration: none !important;
}

.roots-learn-back:hover {
    color: #109c9b !important;
}

.roots-learn-kicker {
    margin-bottom: 5px;

    color: #109c9b;

    font-size: 0.78rem;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.roots-learn-hero h1 {
    margin: 0;

    color: #102b56;

    font-size: clamp(
        2rem,
        4vw,
        3rem
    );

    font-weight: 950;
    line-height: 1.08;
}

.roots-learn-hero p {
    max-width: 760px;

    margin: 11px 0 0;

    color: #536579;

    line-height: 1.55;
}

.roots-learn-hero-arabic {
    min-width: 190px;

    color: #102b56;

    font-size: clamp(
        2.8rem,
        7vw,
        4.8rem
    );

    font-weight: 900;

    text-align: center;
}

.roots-learn-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 18px;
}

.roots-learn-primary-link,
.roots-learn-secondary-link {
    display: inline-flex;
    align-items: center;

    min-height: 40px;

    padding: 0 14px;

    border-radius: 11px;

    font-size: 0.84rem;
    font-weight: 900;

    text-decoration: none !important;
}

.roots-learn-primary-link {
    background: #109c9b;

    color: #ffffff !important;
}

.roots-learn-secondary-link {
    border: 1px solid #d6e3ea;

    background: #ffffff;

    color: #40566d !important;
}

.roots-learn-layout {
    display: grid;
    grid-template-columns:
        minmax(260px, 320px)
        minmax(0, 1fr);

    align-items: start;
    gap: 20px;
}

.roots-learn-sidebar {
    position: sticky;
    top: 148px;

    max-height: calc(100vh - 168px);

    display: flex;
    flex-direction: column;

    padding: 20px;

    overflow: hidden;
}

.roots-learn-search-label {
    display: block;

    margin-bottom: 7px;

    color: #40566d;

    font-size: 0.8rem;
    font-weight: 850;
}

.roots-learn-search {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 11px;

    border: 1px solid #cfdce5;
    border-radius: 11px;

    font: inherit;
}

.roots-learn-search:focus {
    outline:
        2px solid
        rgba(16, 156, 155, 0.14);

    border-color: #109c9b;
}

.roots-learn-count {
    margin: 11px 0;

    color: #8996a4;

    font-size: 0.75rem;
    font-weight: 850;
}

.roots-learn-list {
    min-height: 0;

    display: flex;
    flex-direction: column;
    gap: 8px;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding-right: 4px;
}

.roots-learn-item {
    width: 100%;

    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 10px;

    padding: 10px 11px;

    border: 1px solid #dce6ed;
    border-radius: 12px;

    background: #ffffff;
    color: #40566d;

    font: inherit;

    text-align: left;

    cursor: pointer;
}

.roots-learn-item:hover,
.roots-learn-item.active {
    border-color: #109c9b;

    background: #effafa;
}

.roots-learn-item-arabic {
    color: #102b56;

    font-size: 1.05rem;
    font-weight: 900;

    white-space: nowrap;
}

.roots-learn-item-content {
    min-width: 0;
}

.roots-learn-item-content strong,
.roots-learn-item-content small {
    display: block;
}

.roots-learn-item-content strong {
    overflow: hidden;

    font-size: 0.82rem;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.roots-learn-item-content small {
    margin-top: 2px;

    color: #8b99a7;

    font-size: 0.68rem;
}

.roots-learn-item-count {
    min-width: 25px;
    height: 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 5px;

    border-radius: 999px;

    background: #eef4f7;

    color: #607286;

    font-size: 0.7rem;
    font-weight: 900;
}

.roots-learn-detail {
    min-height: 480px;

    padding: 26px 28px;

    scroll-margin-top: 148px;
}

.roots-learn-detail-header {
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr);

    gap: 22px;

    padding-bottom: 20px;

    border-bottom: 1px solid #e5edf2;
}

.roots-learn-detail-root {
    min-width: 160px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px 22px;

    border: 1px solid #dce8ee;
    border-radius: 18px;

    background: #f3fbfb;

    color: #102b56;

    font-size: clamp(
        2rem,
        5vw,
        3rem
    );

    font-weight: 950;

    text-align: center;
}

.roots-learn-detail-header h2 {
    margin: 0;

    color: #102b56;

    font-size: 1.55rem;
}

.roots-learn-detail-header p {
    margin: 8px 0 0;

    color: #607286;

    line-height: 1.55;
}

.roots-learn-section {
    margin-top: 24px;
}

.roots-learn-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 12px;
}

.roots-learn-section-head h3 {
    margin: 0;

    color: #102b56;

    font-size: 1rem;
}

.roots-learn-section-head span {
    color: #8996a4;

    font-size: 0.74rem;
    font-weight: 850;
}

.roots-learn-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.roots-learn-card {
    min-width: 0;

    padding: 14px;

    border: 1px solid #dfe8ee;
    border-radius: 15px;

    background: #fbfdfe;
}

.roots-learn-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.roots-learn-card-arabic {
    color: #102b56;

    font-size: 1.5rem;
    font-weight: 900;
}

.roots-learn-form-badge {
    padding: 4px 7px;

    border-radius: 999px;

    background: #edf8f8;
    color: #0c8584;

    font-size: 0.67rem;
    font-weight: 900;
}

.roots-learn-card-french {
    margin-top: 4px;

    color: #52677b;

    font-size: 0.84rem;
    font-weight: 800;
}

.roots-learn-derivatives {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin-top: 10px;
    padding-top: 9px;

    border-top: 1px solid #e8eef2;
}

.roots-learn-derivative {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap: 8px;

    color: #718196;

    font-size: 0.72rem;
}

.roots-learn-derivative strong {
    color: #102b56;

    font-size: 0.95rem;
}

.roots-learn-word {
    display: grid;
    grid-template-columns:
        74px
        minmax(0, 1fr);

    gap: 11px;
    align-items: center;
}

.roots-learn-word img {
    width: 74px;
    height: 64px;

    object-fit: contain;

    border-radius: 10px;

    background: #f6fafb;
}

.roots-learn-word-arabic {
    color: #102b56;

    font-size: 1.35rem;
    font-weight: 900;
}

.roots-learn-empty {
    padding: 40px 20px;

    color: #8190a0;

    text-align: center;
}

@media (max-width: 1050px) {

    .roots-learn-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {

    .roots-learn-sidebar {
        top: 88px;

        max-height: calc(100vh - 108px);
    }

    .roots-learn-detail {
        scroll-margin-top: 88px;
    }
}


@media (max-width: 820px) {

    .roots-learn-layout {
        grid-template-columns: 1fr;
    }

    .roots-learn-sidebar {
        position: static;

        max-height: none;

        overflow: visible;
    }

    .roots-learn-list {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        overflow: visible;

        padding-right: 0;
    }

    .roots-learn-detail {
        scroll-margin-top: 88px;
    }
}

@media (max-width: 650px) {

    .roots-learn-hero {
        grid-template-columns: 1fr;

        padding: 21px;
    }

    .roots-learn-hero-arabic {
        display: none;
    }

    .roots-learn-detail {
        padding: 19px;
    }

    .roots-learn-detail-header {
        grid-template-columns: 1fr;
    }

    .roots-learn-list,
    .roots-learn-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Root explorer - internal list scrolling
   ========================================================= */

.roots-learn-list {
    scrollbar-width: thin;
    scrollbar-color: #c9d6df transparent;
}

.roots-learn-list::-webkit-scrollbar {
    width: 8px;
}

.roots-learn-list::-webkit-scrollbar-track {
    background: transparent;
}

.roots-learn-list::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: #c9d6df;
}
