/*
 * =========================================================
 * iActors — cast list
 * =========================================================
 */

.page__cast:empty {
    display: none;
}

.iactor-cast {
    --iac-line: rgba(127,127,127,.24);
    --iac-soft: rgba(127,127,127,.07);

    width: 100%;
    max-width: 100%;

    margin: 1.4rem 0 0;
    padding: 0;

    color: inherit;
    background: transparent;

    font: inherit;
    text-align: left;
}

.iactor-cast,
.iactor-cast * {
    box-sizing: border-box;
}

.iactor-cast a {
    color: inherit;
    text-decoration: none;
}

.iactor-cast a:hover {
    text-decoration: none;
}


/* =========================================================
   Заголовок
   ========================================================= */

.iactor-cast__header {
    margin: 0 0 14px;
    padding: 0;
}

.iactor-cast__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    min-width: 0;
}

.iactor-cast__header h2 {
    margin: 0;
    padding: 0;

    color: inherit;

    font: inherit;
    font-size: 20px;
    font-weight: 500;
}


/* =========================================================
   Количество актёров
   ========================================================= */

.iactor-cast__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 30px;

    padding: 0 8px;

    border: 1px solid var(--iac-line);
    border-radius: 50%;

    color: inherit;
    background: transparent;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    opacity: .72;
}


/* Описание скрываем */

.iactor-cast__header p {
    display: none;
}


/* =========================================================
   ДЕСКТОП
   8 актёров равномерно распределяются по ширине
   ========================================================= */

.iactor-cast__grid {
    display: grid;

    grid-template-columns: repeat(8, minmax(0, 1fr));

    gap: 14px;

    width: 100%;

    margin: 0;
    padding: 0 0 8px;

    overflow: visible;
}


/* =========================================================
   Карточка актёра
   ========================================================= */

.iactor-cast__person {
    display: flex;

    flex-direction: column;
    align-items: center;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    color: inherit;
    background: transparent;

    text-align: center;

    transition: none;
}


/* =========================================================
   Фото
   ========================================================= */

.iactor-cast__photo {
    display: block;

    width: min(100%, 140px);
    aspect-ratio: 102 / 140;

    min-height: 0;

    margin: 0 auto;

    overflow: hidden;

    border: 1px solid rgba(127,127,127,.30);
    border-radius: 5px;

    background: var(--iac-soft);
}

.iactor-cast__photo img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;

    margin: 0;
    padding: 0;

    border: 0;

    object-fit: cover;
    object-position: center top;

    transition: none;
}


/* =========================================================
   Имя
   ========================================================= */

.iactor-cast__copy {
    display: flex;

    flex-direction: column;
    align-items: center;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 8px 2px 0;

    text-align: center;
}

.iactor-cast__copy strong {
    display: -webkit-box;

    width: 100%;

    margin: 0;
    padding: 0;

    color: inherit;

    font-size: 16px;
    font-weight: 600;
    line-height: 21px;

    overflow: hidden;

    text-overflow: ellipsis;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* Роль скрываем */

.iactor-cast__copy small {
    display: none;
}


/* =========================================================
   Дополнительные актёры
   ========================================================= */

.iactor-cast__person--extra {
    display: none !important;
}

.iactor-cast--expanded .iactor-cast__person--extra {
    display: flex !important;
}


/* =========================================================
   Кнопка
   ========================================================= */

.iactor-cast__more {
    display: none;
}


/* =========================================================
   Hover
   ========================================================= */

.iactor-cast__person:hover {
    border: 0;
    background: transparent;
}

.iactor-cast__person:hover .iactor-cast__photo img {
    transform: none;
}

.iactor-cast__person:hover .iactor-cast__copy strong {
    text-decoration: underline;
}


/* =========================================================
   Focus
   ========================================================= */

.iactor-cast__person:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* =========================================================
   Небольшой компьютер / планшет
   ========================================================= */

@media (max-width: 1100px) {

    .iactor-cast__grid {
        gap: 12px;
    }

    .iactor-cast__photo {
        width: min(100%, 125px);
    }

    .iactor-cast__copy strong {
        font-size: 15px;
        line-height: 20px;
    }
}


/* =========================================================
   Планшет
   ========================================================= */

@media (max-width: 820px) {

    /*
     * Возвращаем горизонтальную ленту.
     * На небольших экранах это удобнее.
     */

    .iactor-cast__grid {
        display: flex;

        flex-wrap: nowrap;
        align-items: flex-start;

        gap: 10px;

        width: 100%;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 0 0 10px;

        scrollbar-width: thin;

        -webkit-overflow-scrolling: touch;
    }

    .iactor-cast__grid::-webkit-scrollbar {
        height: 5px;
    }

    .iactor-cast__grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .iactor-cast__grid::-webkit-scrollbar-thumb {
        background: rgba(127,127,127,.5);
        border-radius: 10px;
    }


    .iactor-cast__person {
        flex: 0 0 90px;

        width: 90px;
        min-width: 90px;
    }

    .iactor-cast__photo {
        width: 90px;
        height: 125px;

        aspect-ratio: auto;
    }

    .iactor-cast__copy {
        width: 90px;
        min-width: 90px;

        padding-top: 7px;
    }

    .iactor-cast__copy strong {
        font-size: 14px;
        line-height: 18px;
    }
}


/* =========================================================
   Телефон
   ========================================================= */

@media (max-width: 520px) {

    .iactor-cast__header {
        margin-bottom: 10px;
    }

    .iactor-cast__header h2 {
        font-size: 20px;
    }

    .iactor-cast__count {
        min-width: 27px;
        height: 27px;

        font-size: 13px;
    }

    .iactor-cast__grid {
        gap: 9px;

        padding-bottom: 8px;
    }

    .iactor-cast__person {
        flex: 0 0 82px;

        width: 82px;
        min-width: 82px;
    }

    .iactor-cast__photo {
        width: 82px;
        height: 115px;
    }

    .iactor-cast__copy {
        width: 82px;
        min-width: 82px;

        padding-top: 6px;
    }

    .iactor-cast__copy strong {
        font-size: 13px;
        line-height: 17px;
    }
}


/* =========================================================
   Очень маленькие телефоны
   ========================================================= */

@media (max-width: 380px) {

    .iactor-cast__grid {
        gap: 8px;
    }

    .iactor-cast__person {
        flex: 0 0 76px;

        width: 76px;
        min-width: 76px;
    }

    .iactor-cast__photo {
        width: 76px;
        height: 106px;
    }

    .iactor-cast__copy {
        width: 76px;
        min-width: 76px;
    }

    .iactor-cast__copy strong {
        font-size: 12px;
        line-height: 16px;
    }
}


/* =========================================================
   Уменьшение анимаций
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .iactor-cast__person,
    .iactor-cast__more,
    .iactor-cast__photo img {
        transition: none;
    }
}