/* =========================== */
/*      МОБИЛЬНАЯ ВЕРСИЯ       */
/* =========================== */
@media screen and (max-width: 950px) {

    /* === ШАПКА === */
    .header {
        position: relative;
        padding: 0 !important;
    }

    .header-inner,
    header.header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 10px 15px !important;
        box-sizing: border-box !important;
    }

    .logo {
        margin-left: 15px !important;
        margin-right: auto !important;
        flex-shrink: 0 !important;
    }

    .btn-menu {
        order: 2 !important;
        display: block !important;
        font-size: 30px !important;
        color: #fff !important;
        cursor: pointer;
        background: none !important;
        border: none !important;
        padding: 10px !important;
        z-index: 10001;
    }

    /* === ШТОРКА (МЕНЮ) === */
    .main-nav {
        display: block;
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100%;
        background: #1a1e26;
        z-index: 10000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .main-nav.active {
        left: 0;
    }

       /* === КНОПКА ЗАКРЫТИЯ (ШАПКА ШТОРКИ) === */
    .main-nav .close-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 20px 25px !important;
        background: #242933 !important;
        color: #fff !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        list-style: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-bottom: 1px solid #242933 !important;
    }

    .main-nav .close-btn {
        background: none !important;
        border: none !important;
        color: #fff !important;
        font-size: 28px !important;
        cursor: pointer !important;
        line-height: 1 !important;
        padding: 10px 15px !important;
        margin: -10px -15px !important;
        opacity: 1 !important;
        text-shadow: none !important;
        font-weight: 400 !important;
        font-family: Arial, sans-serif !important;
    }

    .main-nav .close-btn:hover {
        opacity: 0.7 !important;
    }

    /* === МОБИЛЬНЫЙ ПОИСК ВНУТРИ ШТОРКИ === */
    .main-nav .search-item {
        display: block !important;
        padding: 12px 20px !important;
        background: #14171c;
        border-bottom: 1px solid #242933;
        list-style: none !important;
    }

    .main-nav .search-box-mobile {
        display: flex;
        background: #242933;
        border-radius: 4px;
        padding: 3px;
    }

    .main-nav .search-box-mobile input {
        background: transparent;
        border: none;
        color: #fff;
        padding: 8px;
        width: 100%;
        outline: none;
        font-size: 14px;
    }

    .main-nav .search-box-mobile button {
        background: transparent;
        border: none;
        color: #c6d7eb;
        font-size: 18px;
        padding: 0 10px;
        cursor: pointer;
    }

    /* === ПУНКТЫ МЕНЮ (БЛОЧНОЕ ОТОБРАЖЕНИЕ) === */
    .main-nav > li {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #242933;
        position: relative;
        list-style: none !important;
    }

    .main-nav > li > a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 15px 20px !important;
        color: #c6d7eb !important;
        text-decoration: none;
        font-size: 16px;
        white-space: normal;
        box-sizing: border-box !important;
    }

    .main-nav > li > a:hover {
        background: #242933;
        color: #fff !important;
        border-radius: 0;
    }

    /* === ВЫПАДАЮЩИЕ ПОДМЕНЮ (АККОРДЕОН) === */
    .submenu {
        display: none;
        position: static !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #14171c;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        min-width: auto !important;
    }

    .dropdown.open > .submenu {
        display: block;
    }

    .submenu li {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .submenu li a {
        display: block !important;
        padding: 12px 20px 12px 40px !important;
        font-size: 14px;
        color: #a0a8b4 !important;
        text-decoration: none;
        border-bottom: 1px solid #1a1e26;
        box-sizing: border-box !important;
    }

    .submenu li:last-child a {
        border-bottom: none;
    }

    .submenu li a:hover {
        color: #fff !important;
        background: #1a1e26;
    }

    /* === СТРЕЛКА ДЛЯ ВЫПАДАЮЩИХ === */
    .dropdown > a .arrow {
        font-size: 12px;
        transition: transform 0.3s ease;
        margin-left: auto;
    }

    .dropdown.open > a .arrow {
        transform: rotate(180deg);
    }

    /* === СКРЫВАЕМ ДЕСКТОПНЫЙ ПОИСК === */
    .desktop-search,
    .search-wrap {
        display: none !important;
    }

    /* === ОВЕРЛЕЙ === */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.75);
        z-index: 9999;
    }

    .overlay.active {
        display: block;
    }
}

/* =========================== */
/*      ДЕСКТОП (по умолчанию)  */
/* =========================== */
.mobile-only {
    display: none;
}

@media screen and (min-width: 951px) {
    .mobile-only {
        display: none !important;
    }

    .main-nav {
        display: flex !important;
    }

    .btn-menu {
        display: none !important;
    }

    .overlay {
        display: none !important;
    }
}


   @media screen and (min-width: 951px) {
    /* Отменяем мобильный статик, чтобы на десктопе меню не раздвигало хедер */
    .dropdown.open > .submenu {
        display: block;
        position: absolute; /* Обязательно абсолютное позиционирование */
        top: 100%;
        left: 0;
        z-index: 1000;
        background: #1a1e26;
    }

    /* Если вы используете клик на десктопе, уберите влияние мобильных стилей */
    .main-nav > li {
        position: relative; /* Чтобы submenu позиционировалось относительно родителя */
    }
}
 


            
/* ============================================ */
/* ===== КОНТЕЙНЕР СЛАЙДЕРА ===== */
/* ============================================ */
.swiper-container-wrapper {
    background: #1a1d23;
    padding: 20px 0;
      position: relative;
    border-radius: 0;
}

.hotSlider {
    position: relative;
    overflow: hidden;
}

/* ============================================ */
/* ===== КАРТОЧКА ===== */
/* ============================================ */
.swiper-slide {
    width: 322px; !important;
    padding: 0 8px;
}

.hot-card {
    background: #242933;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s;
}

.hot-card:hover {
    border-color: #ddd;
}

.hot-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #c6d7eb;
}

.hot-card-img {
    flex-shrink: 0;
    width: 50px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
}

.hot-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-card-body {
    flex: 1;
    min-width: 0;
}

.hot-card-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-card-meta {
    font-size: 12px;
    color: #93a0af;
    display: block;
    margin-bottom: 6px;
margin-top: 5px;

}

/* ============================================ */
/* ===== ПРОГРЕСС-БАР ===== */
/* ============================================ */
.hot-card-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
}

.hot-card-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff9800, #ff5722);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================ */
/* ===== СТРЕЛКИ ===== */
/* ============================================ */
.hot-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    border-radius: 0;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hot-nav-btn:hover {
    background: rgba(0,0,0,0.1);
}

.hot-nav-prev {
    left: 0;
}

.hot-nav-next {
    right: 0;
}

.hot-nav-btn svg {
    color: #c6d7eb;
    transition: color 0.2s;
}

.hot-nav-btn:hover svg {
    color: #000;
}

.swiper-button-next,
.swiper-button-prev {
    display: none !important;
}
    

.related-block {
    background: #222833;
    padding: 20px;
     
}

.related-header {
    color: #c6d7eb;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid #e64a19;

}

/* Основной контейнер */
.related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.rel-item {
    flex: 0 0 calc(16.66% - 13px);
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* Контейнер картинки с эффектом */
.rel-img {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden; /* Важно для зума */
    border-radius: 6px;
    background: #1a1a1a;
}

.rel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Плавный эффект */
}

.rel-item:hover .rel-img img {
    transform: scale(1.1); /* Увеличение картинки */
}

/* Блок текста */
.rel-title {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    height: 40px; /* Фикс высота, чтобы выровнять заголовки */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничение в 2 строки */
    -webkit-box-orient: vertical;
    transition: color 0.3s;
}

.rel-item:hover .rel-title {
    color: #ff0000; /* Цвет текста при наведении */
}

/* Адаптив: перестроение сетки */
@media (max-width: 1200px) { 
    .rel-item { flex: 0 0 calc(20% - 12px); } /* 5 в ряд */
}

@media (max-width: 992px) { 
    .rel-item { flex: 0 0 calc(25% - 12px); } /* 4 в ряд */
}

@media (max-width: 768px) { 
    .rel-item { flex: 0 0 calc(33.33% - 10px); } /* 3 в ряд */
}

/* Все устройства меньше 580px (телефоны) */
@media (max-width: 580px) { 
    .related-grid {
        gap: 10px; /* Уменьшаем расстояние между плитками на мобильных */
    }
    .rel-item { 
        flex: 0 0 calc(50% - 5px); /* Строго 2 в ряд */
        max-width: calc(50% - 5px);
    }
    .rel-title {
        font-size: 12px; /* Чуть уменьшаем шрифт для мобилок */
        height: 34px;    /* Корректируем высоту под шрифт */
    }
}

.series-wrapper {
    position: relative;
         font-family: sans-serif;
}

.series-carousel {
    background: #1a1d23;
    padding: 10px;
    position: relative;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 5px; /* Немного отступа от кнопок внутри */
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* Кнопки - делаем их узкими и ставим строго по краям */
.carousel-side-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35px;
    background: #1a1d2369; /* Цвет кнопок */
    color: #e94560;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 18px;
}
.carousel-side-btn:hover { background: #1f2d55; }
.carousel-side-btn.prev { left: 0; border-radius: 12px 0 0 12px; }
.carousel-side-btn.next { right: 0; border-radius: 0 12px 12px 0; }

/* Карточки серий */
.carousel-item {
    min-width: 110px; /* Сделали чуть компактнее */
    background: #2d333f;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}
.carousel-item:hover {
    border-color: #e64a19;
}

.episode-name {
    color: #fff;
    font-size: 13px;
}

.containers {
        
            margin: 0 auto;
                        padding: 40px 45px;
                  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
            color: #93a0af;
        }
       .h2new {
            font-size: 23px;
            font-weight: 700;
            margin-bottom: 28px;
            background: linear-gradient(135deg, #ffffff, #9eb6ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }
        .h2ne {
            font-size: 23px;
            font-weight: 600;
            margin: 36px 0 16px;
            border-left: 5px solid #e64a19;
            padding-left: 20px;
            color: #c6d7eb;
        }
      .containers  h3 {
            font-size: 20px;
            font-weight: 600;
            margin: 28px 0 12px;
                  }
       .containers p {
            margin-bottom: 20px;
            font-size: 16px;
           
        }
      .containers b {
                       font-weight: 600;
            color: #c6d7eb;
        
        
        }
        
       .containers strong {
                       font-weight: 600;
        }
        
       .containers ul, ol {
            padding-left: 28px;
            margin: 20px 0 25px;
        }
       .containers li {
            margin-bottom: 12px;
            font-size: 16px;
        }
       .containers li b {
           
        }
        .highlight-box {
            background: #6167741c;
            border-radius: 24px;
            padding: 18px 24px;
            margin: 30px 0;
           
        }
       
        .badge {
            display: inline-block;
            background: #1f2c58;
            padding: 4px 14px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 500;
            margin-right: 8px;
            margin-bottom: 8px;
            color: #c6d5ff;
        }
        .small-meta {
            font-size: 13px;
            color: #6e80b8;
            margin-top: 30px;
            text-align: center;
            border-top: 1px solid #1e264a;
            padding-top: 20px;
        }
        @media (max-width: 600px) {
            .container {
                padding: 24px 18px;
            }
           .containers h1 {
                font-size: 26px;
            }
        }