@charset "UTF-8";

/*
 * Главная страница: баннер-карусель и блок «Популярное»
 *
 * Файл выделен из общего style.css: правило для одной зоны ответственности.
 */

/*===================================================================================================================
    Баннер с популярной новинкой
===================================================================================================================*/
.hero-banner {
    position: relative;
    display: grid;
    margin: 0;
    background-color: #000000; 
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-grow: 1;
    position: relative;
}

.hero-left {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px 40px 40px;
    z-index: 2;
}

.anime-logo-title {
    font-size: 72px;
    font-weight: 900;
    color: #cc1d1d;
    margin: 0 0 15px 0;
    letter-spacing: -2px;
    text-transform: uppercase;
}

/* Длинные названия в баннере не должны занимать пол-экрана */
.anime-logo-title.is-long {
    font-size: 52px;
    letter-spacing: -1.5px;
}

@media (max-width: 900px) {
    .anime-logo-title {
            font-size: 52px;
    }

    .anime-logo-title.is-long {
            font-size: 38px;
    }
}

.anime-description {
    font-size: 15px;
    line-height: 1.6;
    color: #d5d5d7;
    margin: 0 0 35px 0;
    max-width: 480px;
    /* Описания Shikimori длинные — в баннере показываем только первые строки */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%; 
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center; 
    background-size: cover; 
    z-index: 1;
    
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/*
 * Полукруглая тень — 1:1 как была запечена в SVG-фонах (radialGradient cx=1 cy=0.5 r=0.92):
 * прозрачно в центре справа, к левому краю уходит в чёрный.
 * Центр сдвинут с 100% на 75%: тень прижата к текстовой колонке, разрыв убран.
 */
.hero-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 92% 92% at 75% 50%,
        rgba(0, 0, 0, 0) 42%,
        rgba(0, 0, 0, 0.55) 66%,
        rgba(0, 0, 0, 0.94) 86%,
        #000000 100%);
}

/*===================================================================================================================
    Карусель баннера
===================================================================================================================*/
.hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide .hero-content {
    height: 100%;
}

.hero-controls {
    position: absolute;
    right: 4%;
    bottom: 26px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    position: relative;
    width: 26px;
    height: 4px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.25);
    overflow: hidden;
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.hero-dot:not(.is-active):hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.hero-dot.is-active {
    width: 42px;
    background-color: rgba(255, 255, 255, 0.22);
}

/* заполнение активной «палки»: сколько осталось до следующего слайда */
.hero-dot-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: #cc1d1d;
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.hero-dot.is-active .hero-dot-fill {
    opacity: 1;
}

.hero-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0 0 3px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background-color: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible {
    outline: 2px solid #cc1d1d;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .hero-controls {
            bottom: 16px;
            gap: 10px;
    }

    .hero-dot {
            width: 18px;
    }

    .hero-dot.is-active {
            width: 28px;
    }

    .hero-arrow {
            width: 34px;
            height: 34px;
            font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
            transition: none;
    }

    .hero-dot-fill {
            display: none;
    }
}

/*===================================================================================================================
    Популярное сейчас
===================================================================================================================*/
.popular-section {
    margin-top: 50px; 
    margin-bottom: 60px;
}

/* Дополнительные подборки идут плотнее: отступ уже даёт предыдущий блок */
.home-rows .popular-section {
    margin-top: 0;
    margin-bottom: 40px;
}

.home-rows .popular-section:last-child {
    margin-bottom: 60px;
}

/* «Показать ещё жанры» в конце главной */
.home-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 70px;
}

.home-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.02);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #e6e6e9;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.home-more-btn:hover {
    border-color: rgba(204, 29, 29, 0.55);
    background-color: rgba(204, 29, 29, 0.12);
    color: #ffffff;
}

.home-more-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.home-more-btn svg {
    transition: transform 0.2s ease;
}

.home-more-btn:hover svg {
    transform: translateY(2px);
}

.home-more-hint {
    margin: 0;
    font-size: 13px;
    color: #8f8f94;
    text-align: center;
}

.home-more-hint a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/*===================================================================================================================
    Анонсы и «Скоро серия»
===================================================================================================================*/
.home-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.panel {
    display: flex;
    flex-direction: column;
    padding: 20px 22px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background-color: #0b0b0d;
    /* Якоря «Анонсы» / «Расписание» из меню шапки не должны уезжать под неё */
    scroll-margin-top: 100px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
}

.panel-title {
    position: relative;
    margin: 0;
    padding-bottom: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.panel-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 3px;
    border-radius: 2px;
    background-color: #cc1d1d;
}

.panel-head .section-link {
    gap: 6px;
    padding-bottom: 0;
    font-size: 13px;
}

.panel-head .section-link span {
    font-size: 15px;
}

.panel-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.panel-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 -8px;
    padding: 11px 8px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.panel-list li + li .panel-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.panel-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.panel-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.06);
    line-height: 1.15;
}

.panel-date-day {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.panel-date-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #9a9a9e;
}

.panel-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.panel-name,
.panel-note {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
}

.panel-note {
    font-size: 12.5px;
    color: #a5a5a5;
}

.panel-tag {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    color: #ffffff;
}

.panel-tag--announce {
    background-color: rgba(204, 29, 29, 0.16);
    color: #ff6b6b;
}

.panel-empty {
    padding: 16px 0 22px;
    font-size: 13px;
    color: #a5a5a5;
}

@media (max-width: 900px) {
    .home-panels {
            grid-template-columns: 1fr;
            gap: 16px;
            margin-bottom: 40px;
    }

    .panel {
            padding: 16px 16px 8px;
    }

    .panel-row {
            grid-template-columns: 44px minmax(0, 1fr) auto;
            gap: 12px;
    }

    .panel-date {
            width: 44px;
            height: 44px;
    }
}

@media (max-width: 520px) {
    .panel-tag {
            padding: 3px 8px;
            font-size: 10.5px;
    }

    .panel-name {
            font-size: 13.5px;
    }
}
