/*
 * RUSERIALS CATEGORY LANDINGS V1
 * Isolated first-page category presentation.
 */

.rs-category-hero,
.rs-category-catalog-head,
.rs-category-actors,
.rs-category-description {
    box-sizing: border-box;
}

.rs-category-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(54, 145, 116, 0.18);
    border-radius: 16px;
    background:
        radial-gradient(
            circle at 92% 10%,
            rgba(236, 197, 75, 0.18),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            rgba(239, 250, 247, 0.96),
            rgba(255, 255, 255, 0.98)
        );
    box-shadow: 0 10px 28px rgba(36, 65, 57, 0.07);
}

.rs-category-hero::after {
    content: "";
    position: absolute;
    right: -54px;
    bottom: -72px;
    width: 180px;
    height: 180px;
    border: 28px solid rgba(65, 158, 129, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.rs-category-hero__copy,
.rs-category-hero__actions {
    position: relative;
    z-index: 1;
}

.rs-category-hero__copy {
    min-width: 0;
    max-width: 650px;
}

.rs-category-hero__eyebrow,
.rs-category-section-head__eyebrow {
    display: block;
    margin: 0 0 7px;
    color: #2e846b;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.rs-category-hero h1 {
    margin: 0;
    color: #18231f;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 550;
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.rs-category-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.rs-category-hero__meta span,
.rs-category-catalog-head__count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(54, 145, 116, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #557068;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.2;
}

.rs-category-hero__actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.rs-category-share {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.rs-category-share__label {
    color: #6b7d77;
    font-size: 12px;
    font-weight: 550;
    letter-spacing: 0.03em;
}

.rs-category-share__buttons {
    display: flex;
    align-items: center;
    gap: 7px;
}

.rs-category-share .rs-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(34, 58, 51, 0.12);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.rs-category-share .rs-share-button:hover,
.rs-category-share .rs-share-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(34, 58, 51, 0.17);
}

.rs-category-share .rs-share-button svg {
    width: 17px;
    height: 17px;
}

.rs-category-collections-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(54, 145, 116, 0.25);
    border-radius: 10px;
    background: #ffffff;
    color: #23725b;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(34, 58, 51, 0.07);
    transition:
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.rs-category-collections-link:hover,
.rs-category-collections-link:focus-visible {
    border-color: rgba(54, 145, 116, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(34, 58, 51, 0.1);
}

.rs-category-catalog-head,
.rs-category-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.rs-category-catalog-head {
    margin: 0 0 16px;
    padding: 0 2px;
}

.rs-category-catalog-head h2,
.rs-category-section-head h2,
.rs-category-description h2 {
    margin: 0;
    color: #1a2421;
    font-size: 21px;
    font-weight: 550;
    line-height: 1.28;
}

.rs-category-catalog-head + .items {
    margin-top: 0;
}

.rs-category-actors {
    margin: 30px 0 0;
    padding: 20px;
    border: 1px solid rgba(54, 145, 116, 0.17);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(36, 65, 57, 0.06);
}

.rs-category-section-head {
    margin-bottom: 15px;
}

.rs-category-actors__carousel {
    position: relative;
}

.rs-category-actors__track {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.rs-category-actors__grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(124px, 144px)
    );
    gap: 12px;
}

.rs-category-actor-card {
    position: relative;
    flex: 0 0 137px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(38, 65, 57, 0.11);
    border-radius: 12px;
    background: #f9fbfa;
    color: #1c2723;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.rs-category-actor-card:hover,
.rs-category-actor-card:focus-visible {
    border-color: rgba(54, 145, 116, 0.36);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(34, 58, 51, 0.12);
}

.rs-category-actor-card__rank {
    position: absolute;
    z-index: 2;
    top: 7px;
    left: 7px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 7px;
    background: #3c8f73;
    color: #ffffff;
    font-size: 12px;
    font-weight: 550;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(24, 58, 47, 0.2);
}

.rs-category-actor-card__photo {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e9efec;
}

.rs-category-actor-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rs-category-actor-card__name {
    display: block;
    min-height: 42px;
    padding: 10px 9px 2px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.25;
}

.rs-category-actor-card__works {
    display: block;
    padding: 0 9px 11px;
    color: #778781;
    font-size: 12px;
    line-height: 1.2;
}

.rs-category-description {
    position: relative;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    gap: 18px;
    margin: 20px 0 4px;
    padding: 21px 22px;
    overflow: hidden;
    border: 1px solid rgba(54, 145, 116, 0.17);
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            rgba(247, 252, 250, 0.98),
            rgba(255, 255, 255, 1)
        );
    box-shadow: 0 8px 24px rgba(36, 65, 57, 0.05);
}

.rs-category-description__accent {
    width: 4px;
    min-height: 100%;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        #3c9678,
        #e8bf45
    );
}

.rs-category-description__body {
    display: grid;
    gap: 9px;
    margin-top: 12px;
    color: #52645e;
    font-size: 14px;
    line-height: 1.68;
}

.rs-category-description__body p {
    margin: 0;
}

.rs-category-index-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: auto;
}

.rs-collections-index__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.rs-collections-index__header > div:first-child {
    min-width: 0;
    max-width: 690px;
}

.rs-collections-index > .rs-category-catalog-head {
    margin-top: 21px;
}

.rs-collections-index > .rs-category-description {
    margin-top: 25px;
}

@media screen and (max-width: 900px) {
    .rs-category-hero {
        gap: 18px;
        padding: 21px;
    }

    .rs-category-actor-card {
        flex-basis: 132px;
    }
}

@media screen and (max-width: 700px) {
    .rs-category-hero,
    .rs-collections-index__header {
        flex-direction: column;
    }

    .rs-category-hero {
        gap: 17px;
        margin-bottom: 20px;
        padding: 18px;
        border-radius: 14px;
    }

    .rs-category-hero h1 {
        font-size: 24px;
    }

    .rs-category-hero__actions,
    .rs-category-share,
    .rs-category-index-actions {
        width: 100%;
        align-items: flex-start;
    }

    .rs-category-hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .rs-category-share__label {
        display: none;
    }

    .rs-category-share .rs-share-button {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 9px;
    }

    .rs-category-catalog-head {
        align-items: flex-start;
    }

    .rs-category-catalog-head h2,
    .rs-category-section-head h2,
    .rs-category-description h2 {
        font-size: 19px;
    }

    .rs-category-catalog-head__count {
        display: none;
    }

    .rs-category-actors {
        margin-top: 24px;
        padding: 16px;
        border-radius: 13px;
    }

    .rs-category-actors__track {
        gap: 10px;
    }

    .rs-category-actor-card {
        flex-basis: 126px;
    }

    .rs-category-description {
        grid-template-columns: 3px minmax(0, 1fr);
        gap: 14px;
        margin-top: 17px;
        padding: 18px 17px;
        border-radius: 13px;
    }

    .rs-category-description__body {
        font-size: 13.5px;
        line-height: 1.62;
    }
}

@media screen and (max-width: 430px) {
    .rs-category-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .rs-category-share {
        width: auto;
    }

    .rs-collections-index__header .rs-category-index-actions {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        justify-content: flex-start;
    }

    .rs-collections-index__header .rs-category-share {
        width: 100%;
        min-width: 0;
    }

    .rs-collections-index__header .rs-category-share__buttons {
        display: grid;
        grid-template-columns: repeat(4, 34px);
        justify-content: start;
        width: 100%;
        max-width: 100%;
        gap: 7px;
        box-sizing: border-box;
    }

    .rs-category-collections-link {
        width: 100%;
    }

    .rs-category-actors__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rs-category-actor-card {
        flex-basis: 118px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs-category-share .rs-share-button,
    .rs-category-collections-link,
    .rs-category-actor-card {
        transition: none;
    }
}
