/**
 * Nevilix shared public catalogue UI.
 * Canonical styles for Listening, Grammar, and Practice catalogue pages.
 */

.listen-categories-page {
    --listen-ink: #12213d;
    --listen-muted: #63728a;
    --listen-line: #dce5f0;
    width: min(100%, 1440px);
    margin: 0 auto;
    padding-bottom: 2rem;
    color: var(--listen-ink);
}

.listen-categories-page,
.listen-categories-page * {
    box-sizing: border-box;
}

.listen-categories-page a {
    text-decoration: none;
}

.listen-categories-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr)
        minmax(340px, .95fr)
        300px;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid #cbdcf0;
    border-radius: 0 0 28px 28px;
    background: radial-gradient(circle at 72% 20%, rgba(92, 164, 255, .18), transparent 30%),
        radial-gradient(circle at 18% 92%, rgba(171, 217, 255, .25), transparent 34%),
        linear-gradient(135deg, #f8fbff 0%, #edf5ff 54%, #f8fbff 100%);
    box-shadow: 0 20px 50px rgba(32, 72, 130, .1);
}

.listen-categories-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2.6rem 1rem 2.6rem 4rem;
}

.listen-categories-hero__eyebrow,
.listen-categories-hero__bubble {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid #c8ddfb;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #1055d2;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(34, 84, 164, .1);
}

.listen-categories-hero__eyebrow {
    margin-bottom: 1rem;
    padding: .55rem .9rem;
    font-size: .75rem;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.listen-categories-hero__eyebrow-icon,
.listen-categories-hero__bubble > span {
    display: inline-grid;
    width: 21px;
    height: 21px;
    place-items: center;
}

.listen-categories-hero__eyebrow-icon svg,
.listen-categories-hero__bubble svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listen-categories-hero h1 {
    margin: 0;
    color: #0d1d3d;
    font-size: clamp(2.55rem, 4.5vw, 4.3rem);
    font-weight: 950;
    letter-spacing: -.055em;
    line-height: .98;
}

.listen-categories-hero__content > p {
    max-width: 560px;
    margin: 1.2rem 0 0;
    color: #3f506c;
    font-size: 1.04rem;
    line-height: 1.72;
}

.listen-categories-hero__visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
}

.listen-categories-illustration {
    display: block;
    width: min(100%, 520px);
    height: auto;
    filter: drop-shadow(0 20px 26px rgba(27, 66, 127, .15));
}

.listen-categories-hero__bubble {
    position: absolute;
    z-index: 4;
    padding: .58rem .9rem;
    color: #203354;
    font-size: .76rem;
}

.listen-categories-hero__bubble--listening {
    top: 62px;
    left: -10px;
}

.listen-categories-hero__bubble--practice {
    top: 100px;
    right: -6px;
}

.listen-categories-ad {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .3rem;
    margin: 2rem 2rem 2rem 1.2rem;
    border: 1px dashed #bfcfe2;
    border-radius: 18px;
    background: rgba(255, 255, 255, .62);
    color: #7b879a;
    text-align: center;
}

.listen-categories-ad strong {
    color: #426292;
    font-size: 1.08rem;
}

.listen-categories-ad span {
    font-size: .92rem;
}

.listen-categories-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.4rem;
    padding: 1.5rem 1.5rem 0;
}

.listen-categories-main {
    min-width: 0;
}

.listen-categories-heading {
    margin-bottom: 1rem;
    padding: 0 .15rem;
}

.listen-categories-heading__kicker {
    display: block;
    margin-bottom: .35rem;
    color: #4776c4;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.listen-categories-heading h2 {
    margin: 0;
    color: #182641;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -.035em;
}

.listen-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.listen-category-card::after {
    position: absolute;
    right: -38px;
    bottom: -50px;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: var(--category-accent);
    content: "";
    opacity: .08;
}

.listen-category-card:hover,
.listen-category-card:focus-visible {
    border-color: var(--category-accent);
    color: inherit;
    box-shadow: 0 18px 38px rgba(28, 67, 132, .15);
    transform: translateY(-4px);
    outline: none;
}

.listen-category-card__icon svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listen-categories-sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
}

.listen-sidebar-card {
    border: 1px solid #dbe5f0;
    border-radius: 18px;
    padding: 1.25rem;
    background: linear-gradient(145deg, #fff 0%, #f9fbfe 100%);
    box-shadow: 0 10px 28px rgba(28, 57, 100, .08);
}

.listen-sidebar-card__title-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 96, 235, .22);
}

.listen-sidebar-card__title-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listen-sidebar-card h2 {
    margin: 0;
    color: #172640;
    font-size: 1rem;
    font-weight: 900;
}

.listen-tips {
    display: grid;
    gap: .75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.listen-progress {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.listen-progress__ring::after {
    position: absolute;
    inset: 9px;
    border: 1px solid #edf1f6;
    border-radius: 50%;
    content: "";
}

.listen-progress__ring strong,
.listen-progress__ring small {
    position: relative;
    z-index: 2;
}

.listen-progress__ring small {
    align-self: start;
    margin-top: .25rem;
    color: #64748b;
    font-size: .66rem;
}

.listen-progress dl {
    display: grid;
    gap: .8rem;
    margin: 0;
}

.listen-progress dl > div {
    display: flex;
    flex-direction: column;
}

.listen-progress dt {
    order: 2;
    margin-top: .25rem;
    color: #59677b;
    font-size: .72rem;
    font-weight: 650;
}

.listen-progress__button:hover,
.listen-progress__button:focus-visible {
    background: #edf4ff;
    color: #154fc6;
}

.listen-categories-empty {
    border: 1px dashed #cbd8e8;
    border-radius: 16px;
    padding: 2rem;
    background: #f8fbff;
    color: #68768a;
    text-align: center;
}

@media (max-width: 1240px) {
    .listen-categories-hero {
        grid-template-columns: minmax(330px, 1fr)
                minmax(320px, .9fr)
                260px;
    }

    .listen-categories-hero__content {
        padding-left: 2.4rem;
    }

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

@media (max-width: 991.98px) {
    .listen-categories-hero {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
    }

    .listen-categories-ad {
        display: none;
    }

    .listen-categories-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .listen-categories-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .listen-categories-hero {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 0 0 20px 20px;
    }

    .listen-categories-hero__content {
        align-items: center;
        padding: 2rem 1.25rem .4rem;
        text-align: center;
    }

    .listen-categories-hero__visual {
        min-height: 230px;
    }

    .listen-categories-hero__bubble {
        display: none;
    }

    .listen-categories-layout {
        padding: 1rem .75rem 0;
    }

    .listen-categories-grid,
    .listen-categories-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .listen-categories-hero h1 {
        font-size: 2.45rem;
    }

    .listen-categories-hero__content > p {
        font-size: .92rem;
    }

    .listen-category-card {
        grid-template-columns: 54px minmax(0, 1fr) 24px;
        min-height: 142px;
        gap: .75rem;
        padding: .9rem;
    }

    .listen-category-card__icon {
        width: 50px;
        height: 50px;
    }

    .listen-category-card__icon svg {
        width: 26px;
        height: 26px;
    }

    .listen-progress {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .listen-progress__ring {
        width: 98px;
        height: 98px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .listen-category-card,
    .listen-category-card__arrow {
        transition: none;
    }
}

.listen-progress__ring {
    --progress: 0;
    position: relative;
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at center, #fff 0 63%, transparent 64%),
        conic-gradient(
            #3476ef calc(var(--progress) * 1%),
            #e8edf5 0
        );
    box-shadow: inset 0 0 0 1px #e7edf6,
        0 10px 24px rgba(36, 90, 190, .10);
}

.listen-progress__ring strong {
    align-self: end;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    color: #0f214a;
}

.listen-progress dd {
    order: 1;
    margin: 0;
    line-height: 1;
    color: #a83a0a;
    font-size: 1.45rem;
    font-weight: 950;
}

.listen-progress__button {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-top: 1rem;
    border: 1px solid #2f6ff0;
    border-radius: 11px;
    font-size: .78rem;
    border-width: 1.5px;
    color: #1556e8;
    font-weight: 900;
}

.listen-category-card__book {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--category-accent);
}

.listen-category-card__book svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listen-category-card__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listen-category-card:hover .listen-category-card__arrow {
    transform: translateX(2px);
}

.listen-category-card {
    --category-accent: #2F6FE4;
    --category-dark: #1C4FAF;
    --category-soft: #EEF4FF;
    --category-border: #CFDDFA;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--category-border);
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, var(--category-soft) 100%);
    color: inherit;
    box-shadow: 0 8px 22px rgba(28, 56, 99, .07);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    display: flex;
    min-height: 174px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.05rem 1.15rem .9rem;
}

.listen-category-card__top {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-height: 104px;
}

.listen-category-card__icon {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--category-accent);
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--category-accent) 24%, transparent);
    width: 54px;
    height: 54px;
}

.listen-category-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    align-self: auto;
    justify-content: center;
    flex-direction: column;
}

.listen-category-card__body > strong {
    overflow: hidden;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--category-dark);
    font-size: 1rem;
}

.listen-category-card__body > small {
    display: -webkit-box;
    overflow: hidden;
    color: #5d6b80;
    font-size: .77rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 3em;
    margin-top: .42rem;
}

.listen-category-card__footer {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .35rem;
    padding-top: .72rem;
    border-top: 1px solid #dce5ef;
}

.listen-category-card__meta {
    margin-top: .68rem;
    position: relative;
    padding-top: .72rem;
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    color: var(--category-accent);
    font-size: .74rem;
    font-weight: 850;
    line-height: 1;
    margin: 0;
    padding: 0;
}


.listen-category-card__arrow {
    position: relative;
    z-index: 2;
    place-items: center;
    transition: transform .2s ease;
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--category-accent);
    box-shadow: none;
    margin-left: auto;
}

@media (max-width: 575.98px) {
    .listen-category-card {
        min-height: 158px;
        padding: .95rem;
    }

    .listen-category-card__top {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: .8rem;
        min-height: 92px;
    }
}

.listen-sidebar-card__title {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.listen-sidebar-card__title-icon--tips {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #2f6ff0;
}

.listen-sidebar-card__title-icon--tips svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.9;
}

.listen-sidebar-card__title-icon--progress {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, #4d84ff 0%, #1e5dea 100%);
    box-shadow: 0 10px 20px rgba(31, 96, 235, .24);
    color: #fff;
}

.listen-sidebar-card__title-icon--progress svg {
    width: 22px;
    height: 22px;
}

.listen-sidebar-card__title-icon--progress svg rect {
    fill: currentColor;
    stroke: none;
}

.listen-sidebar-card__title h2 {
    color: #12213d;
    font-size: 1.03rem;
    font-weight: 900;
}

.listen-tips li {
    display: grid;
    color: #526177;
    font-size: .78rem;
    line-height: 1.45;
    grid-template-columns: 23px minmax(0, 1fr);
    gap: .6rem;
}

.listen-tips li > span {
    font-size: .7rem;
    font-weight: 900;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: linear-gradient(180deg, #4d84ff 0%, #1f62ed 100%);
    box-shadow: 0 7px 14px rgba(31, 96, 235, .18);
}

.listen-tips li > span svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.listen-category-card__icon svg .fill-current {
    fill: currentColor;
    stroke: none;
}

.listen-category-card__icon > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
}

.listen-category-card__icon > .category-icon-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    line-height: 1;
}

.listen-category-card__icon > svg.category-icon-svg-file {
    display: block;
    width: 28px;
    height: 28px;
    color: currentColor;
}

.listen-category-card__icon > svg.category-icon-svg-file [fill="currentColor"] {
    fill: currentColor;
}

.listen-category-card__icon > svg.category-icon-svg-file [stroke="currentColor"] {
    stroke: currentColor;
}
