/* ============================================
   HOME SLIDER STYLES
   Премиальный слайдер уровня Кинопоиска
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Размеры - стриминговый стандарт */
  --slider-height: clamp(55vh, 62vh, 720px);
  --slider-max-height: 720px;
  
  /* Эффекты фона - DESKTOP: размытие и затемнение */
  --slider-overlay-opacity: 0.72;
  --slider-blur-amount: 6px;
  
  /* Типографика */
  --slider-title-size: clamp(1.75rem, 3.2vw, 3.25rem);
  --slider-description-size: clamp(0.875rem, 1vw, 1.125rem);
  --slider-button-size: clamp(1.25rem, 2vw, 2.5rem);
}

/* Mobile переменные - БЕЗ размытия, ЯРКИЙ фон */
@media (max-width: 768px) {
  :root {
    --slider-height: clamp(48vh, 52vh, 580px);
    --slider-max-height: 580px;
    /* Мобильная версия - без размытия, полная яркость */
    --slider-blur-amount: 0px;
    --slider-overlay-opacity: 1;
    --slider-title-size: clamp(1.5rem, 5vw, 2rem);
    --slider-description-size: clamp(0.8rem, 2.5vw, 0.95rem);
    --slider-button-size: clamp(1rem, 3.5vw, 1.35rem);
  }
}

/* ============================================
   BASE LAYOUT
   ============================================ */

.banner.style-1 {
  position: relative;
  min-height: var(--slider-height);
  max-height: var(--slider-max-height);
  margin-top: 0;
  padding-top: 0;
}

.banner.style-1 .banner-block {
  position: relative;
  overflow: hidden;
  background: transparent !important;
  min-height: var(--slider-height) !important;
  max-height: var(--slider-max-height) !important;
  height: auto !important;
  padding: clamp(1.25rem, 2.8vh, 2.25rem) 0;
  display: flex;
  align-items: center;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(1.25rem, 2.8vh, 2.25rem) 0;
}

.banner-content {
  width: 100%;
}

/* ============================================
   BACKGROUND & OVERLAY
   ============================================ */

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: blur(var(--slider-blur-amount)) brightness(var(--slider-overlay-opacity));
  transform: scale(1.04);
}

/* Светлая тема: фон виден чётко */
html[data-theme="light"] .hero-bg-img,
html[data-theme="light_japan"] .hero-bg-img {
  filter: brightness(0.75) contrast(1.02);
}

/* Премиальный градиент - DESKTOP: слева темно, справа светло */
.banner.style-1 .banner-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.72) 28%,
      rgba(0, 0, 0, 0.38) 52%,
      rgba(0, 0, 0, 0.00) 75%
    ),
    linear-gradient(to top,
      rgba(0, 0, 0, 0.52) 0%,
      rgba(0, 0, 0, 0.18) 38%,
      rgba(0, 0, 0, 0.00) 100%
    );
}

/* MOBILE: градиент снизу вверх - внизу темно для текста, вверху ЧИСТО для картинки */
@media (max-width: 768px) {
  .banner.style-1 .banner-block::before {
    background:
      linear-gradient(to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 25%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.0) 55%
      ) !important;
  }
}

.hero-overlay {
  display: none !important;
}

/* ============================================
   CONTENT LAYOUT
   ============================================ */

#mainSlider.banner-slider {
  margin-top: 0 !important;
}

#mainSlider .banner-block {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Slick Carousel */
#mainSlider.slick-initialized .slick-track {
  display: flex !important;
}

#mainSlider.slick-initialized .slick-slide {
  height: auto !important;
  display: flex !important;
}

#mainSlider.slick-initialized .slick-slide > div {
  width: 100%;
  display: flex;
}

/* Левая колонка: текст */
.banner-content .col-lg-6:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.65rem, 1.3vh, 1.05rem);
}

/* Правая колонка: постер */
.col-lg-6.d-none.d-lg-block {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
}

.hero-right-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 0;
  transition: opacity 0.22s ease;
}

.hero-right-img:hover {
  opacity: 0.88;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.banner-content .title,
.banner-content h2.title {
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: clamp(0.45rem, 0.85vh, 0.65rem);
  line-height: 1.15;
  text-shadow: 2px 2px 14px rgba(0, 0, 0, 0.82);
}

#mainSlider .banner-content .slider-title {
  font-size: var(--slider-title-size) !important;
  line-height: 1.15;
}

.banner-content .hero-description {
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--slider-description-size);
  margin-bottom: clamp(0.65rem, 1.25vh, 0.9rem);
  line-height: 1.6;
  text-shadow: 1px 1px 7px rgba(0, 0, 0, 0.72);
}

/* Desktop: ограничение строк */
@media (min-width: 992px) {
  .banner-content .hero-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
}

/* Mobile: ограничение строк */
@media (max-width: 768px) {
  .banner-content .slider-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  
  .banner-content .hero-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
}

/* ============================================
   BUTTONS & BADGES
   ============================================ */

.banner-content .hero-status-year {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.52rem, 0.92vw, 0.65rem);
  align-items: center;
  margin-bottom: clamp(0.65rem, 1.25vh, 1.05rem);
}

.banner-content .hero-status-year .badge-tag {
  display: inline-block;
  padding: 0.48em 0.95em;
  border-radius: 0.45em;
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.52);
  transition: all 0.22s ease;
}

.banner-content .btn-toggle.btn-toggle--status {
  display: inline-block;
  padding: 0.48em 0.95em;
  border-radius: 0.45em;
  font-size: clamp(0.75rem, 0.9vw, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.52);
  transition: all 0.22s ease;
}

.banner-content .btn-toggle.btn-toggle--status:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.banner-content .hero-year {
  display: inline-block;
  padding: 0.28em 0.72em;
  border-radius: 0.28em;
  font-size: clamp(0.875rem, 1vw, 1rem);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.52);
}

/* Кнопка "СМОТРЕТЬ" */
.banner-content .play-butn {
  display: inline-block;
  margin-top: clamp(0.55rem, 1.05vh, 0.9rem);
  font-size: var(--slider-button-size) !important;
  line-height: 1.2 !important;
  padding: 0.52em 2.45em !important;
  border-radius: 0.48em;
  text-transform: uppercase;
  text-align: center;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: #ffffff;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  transition: all 0.22s ease;
  text-decoration: none;
}

.banner-content .play-butn:hover {
  transform: translateY(-2px);
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.38);
}

/* ============================================
   THEME: LIGHT (Премиальная читаемость)
   ============================================ */

/* СВЕТЛАЯ ТЕМА: Desktop - усиленный градиент слева */
html[data-theme="light"] #mainSlider .banner-block::before,
html[data-theme="light_japan"] #mainSlider .banner-block::before {
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.82) 22%,
      rgba(0, 0, 0, 0.58) 45%,
      rgba(0, 0, 0, 0.00) 72%
    ),
    linear-gradient(to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.38) 32%,
      rgba(0, 0, 0, 0.00) 100%
    );
}

/* Текст - БЕЛЫЙ с усиленными тенями для светлой темы */
html[data-theme="light"] #mainSlider .banner-content .title,
html[data-theme="light"] #mainSlider .banner-content h2.title,
html[data-theme="light_japan"] #mainSlider .banner-content .title,
html[data-theme="light_japan"] #mainSlider .banner-content h2.title {
  color: #ffffff !important;
  text-shadow: 
    3px 3px 20px rgba(0, 0, 0, 0.95),
    0 0 32px rgba(0, 0, 0, 0.88),
    0 0 14px rgba(0, 0, 0, 0.82);
}

html[data-theme="light"] #mainSlider .banner-content .hero-description,
html[data-theme="light_japan"] #mainSlider .banner-content .hero-description {
  color: #ffffff !important;
  text-shadow: 
    2px 2px 16px rgba(0, 0, 0, 0.92),
    0 0 24px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(0, 0, 0, 0.78);
}

/* Бейджи - контрастные для светлой темы */
html[data-theme="light"] #mainSlider .banner-content .hero-status-year .badge-tag,
html[data-theme="light_japan"] #mainSlider .banner-content .hero-status-year .badge-tag {
  background: rgba(0, 0, 0, 0.62) !important;
  color: #ffffff !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="light"] #mainSlider .banner-content .hero-status-year .badge-tag:hover,
html[data-theme="light_japan"] #mainSlider .banner-content .hero-status-year .badge-tag:hover {
  background: rgba(0, 0, 0, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.88) !important;
  transform: translateY(-1px);
}

/* Статус - контрастный для светлой темы */
html[data-theme="light"] #mainSlider .banner-content .btn-toggle.btn-toggle--status,
html[data-theme="light_japan"] #mainSlider .banner-content .btn-toggle.btn-toggle--status {
  background: rgba(0, 0, 0, 0.58) !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  color: #ffffff !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
}

html[data-theme="light"] #mainSlider .banner-content .btn-toggle.btn-toggle--status:hover,
html[data-theme="light_japan"] #mainSlider .banner-content .btn-toggle.btn-toggle--status:hover {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
}

/* Год - контрастный для светлой темы */
html[data-theme="light"] #mainSlider .banner-content .hero-year,
html[data-theme="light_japan"] #mainSlider .banner-content .hero-year {
  background: rgba(0, 0, 0, 0.58) !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  color: #ffffff !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
}

/* Кнопка "СМОТРЕТЬ" - контрастная для светлой темы */
html[data-theme="light"] #mainSlider .banner-content .play-butn,
html[data-theme="light_japan"] #mainSlider .banner-content .play-butn {
  background: rgba(0, 0, 0, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.82) !important;
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.42);
}

html[data-theme="light"] #mainSlider .banner-content .play-butn:hover,
html[data-theme="light_japan"] #mainSlider .banner-content .play-butn:hover {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.48);
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */
@media (max-width: 768px) {
  .banner.style-1 {
    min-height: clamp(48vh, 52vh, 580px) !important;
    max-height: 580px !important;
  }

  .banner.style-1 .banner-block {
    padding: 0 clamp(1rem, 3vw, 1.5rem) !important;
    align-items: flex-end !important;
    min-height: clamp(48vh, 52vh, 580px) !important;
    max-height: 580px !important;
  }

  .hero-content-wrapper {
    padding: 0 0 clamp(1.2rem, 2.8vh, 2rem) 0 !important;
    width: 100%;
  }

  /* Фон: БЕЗ размытия, ЯРКАЯ картинка */
  .hero-bg-img {
    filter: brightness(1) !important;
    transform: scale(1) !important;
  }

  /* MOBILE градиент: снизу темно для текста, сверху ЧИСТО для картинки */
  .banner.style-1 .banner-block::before {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.75) 20%,
      rgba(0, 0, 0, 0.4) 40%,
      rgba(0, 0, 0, 0.0) 60%
    ) !important;
  }

  /* СВЕТЛАЯ ТЕМА Mobile: градиент снизу вверх */
  html[data-theme="light"] #mainSlider .banner-block::before,
  html[data-theme="light_japan"] #mainSlider .banner-block::before {
    background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.7) 25%,
      rgba(255, 255, 255, 0.3) 45%,
      rgba(255, 255, 255, 0.0) 65%
    ) !important;
  }

  /* СВЕТЛАЯ ТЕМА Mobile: фон яркий */
  html[data-theme="light"] .hero-bg-img,
  html[data-theme="light_japan"] .hero-bg-img {
    filter: brightness(1) contrast(1.05) !important;
  }

  /* Скрыть постер */
  .col-lg-6.d-none.d-lg-block {
    display: none !important;
  }

  /* Контент: ЦЕНТРИРОВАНИЕ + компактные отступы */
  .banner-content .col-lg-6:first-child {
    gap: clamp(0.35rem, 0.75vh, 0.5rem) !important;
    text-align: center !important;
    align-items: center !important;
  }

  /* Заголовок: меньше */
  #mainSlider .banner-content .slider-title {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }

  /* Описание: меньше */
  .banner-content .hero-description {
    font-size: clamp(0.8rem, 2.5vw, 0.95rem) !important;
  }

  /* Бейджи: КОМПАКТНЫЕ + центр */
  .banner-content .hero-status-year {
    gap: 6px !important;
    margin-bottom: 8px !important;
    justify-content: center !important;
  }

  /* Озвучки - СКРЫТЬ на мобильных */
  .banner-content .hero-status-year .badge-tag {
    display: none !important;
  }

  /* Статус и год - КОМПАКТНЫЕ */
  .banner-content .btn-toggle.btn-toggle--status {
    font-size: 9px !important;
    padding: 4px 8px !important;
    border-width: 1px !important;
  }

  .banner-content .hero-year {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }

  /* Кнопка: удобная для тапа, компактнее, центр */
  .banner-content .play-butn {
    min-width: clamp(10rem, 45vw, 13rem) !important;
    padding: 0.58em 1.8em !important;
    margin-top: clamp(0.6rem, 1.2vh, 0.85rem) !important;
    font-size: clamp(1rem, 3.5vw, 1.35rem) !important;
  }
}
