/**
 * Универсальная карусель обновлений - работает во всех файлах
 */

/* Базовые стили для карусели */
.updates-carousel {
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
}

.theme-section.updates-carousel {
  grid-row-gap: 0.1rem !important;
}

/* Стили для заголовка карусели */
.updates-carousel .carousel-header-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 2rem;
}

.updates-carousel .carousel-header-wrapper .theme-title.large {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 .5rem #ffffff80;
  font-family: Ruberoid, Arial, sans-serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 120%;
  text-decoration: none;
  max-width: 80rem;
}

/* Стили для цветного акцента в заголовке */
.updates-carousel .carousel-header-wrapper .color-main {
  background-image: linear-gradient(270deg, #fccb68, white);
  text-shadow: 0 .2rem .5rem #f8820099;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Дополнительные фиксы для Safari */
@supports (-webkit-appearance: none) {
  .updates-carousel .carousel-header-wrapper {
    -webkit-box-align: center;
    -webkit-box-pack: center;
    -webkit-align-items: center;
    -webkit-justify-content: center;
  }
  
  .updates-carousel .carousel-header-wrapper .theme-title.large {
    -webkit-text-align-last: center;
  }
}

/* Контейнер карусели */
.carousel-container {
  position: relative;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 50%;
}

/* Кнопки карусели */
.updates-carousel .carousel-container .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  padding: 0;
  outline: none;
}

.carousel-btn svg {
  width: 10px;
  height: 16px;
  transition: transform 0.2s ease;
}

.updates-carousel .carousel-container .carousel-btn.prev {
  left: 1rem;
}

.updates-carousel .carousel-container .carousel-btn.next {
  right: 1rem;
}

.updates-carousel .carousel-container .carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  border: 2px solid transparent !important;
  background-image: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), linear-gradient(to right, #fccb68, #dc882f) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.updates-carousel .carousel-container .carousel-btn:hover svg {
  transform: scale(1.1) !important;
}

.updates-carousel .carousel-container .carousel-btn:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.carousel-container img {
  transition: opacity 0.3s ease;
}

/* Прогресс-бары в стиле Instagram */
.updates-carousel .progress-bars-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 2rem;
  max-width: 70%;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 10;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar:hover {
  background: rgba(255, 255, 255, 0.4);
}

.progress-bar.active {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(252, 203, 104, 0.3);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #fccb68, #dc882f);
  border-radius: 2px;
  transition: width 0ms linear, box-shadow 0.3s ease;
}

/* Яркое свечение для заполненной части активного бара */
.progress-bar.active .progress-fill {
  box-shadow: 
    0 0 8px rgba(252, 203, 104, 1),
    0 0 16px rgba(252, 203, 104, 1),
    0 0 24px rgba(252, 203, 104, 0.9),
    0 0 32px rgba(220, 136, 47, 0.8),
    0 0 40px rgba(252, 203, 104, 0.7),
    0 0 50px rgba(220, 136, 47, 0.5);
}

/* Баннер-ссылка для решения проблемы с pointer-events */
.banner-link-wrapper {
  display: block;
  cursor: pointer;
  position: relative;
}

.banner-link-wrapper img {
  pointer-events: none; /* Отключаем события на изображении */
}

/* Информация о карусели */
.carousel-info {
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.carousel-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-family: 'Ruberoid', Arial, sans-serif;
}

.carousel-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-family: 'Ruberoid', Arial, sans-serif;
  text-shadow: 0 0 0.3rem rgba(255, 255, 255, 0.5);
}

.carousel-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto;
  min-height: 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding-top: 0.1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Специфичные стили для autumn-update-2024.html */
.top-section.op .updates-carousel {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Универсальные стили для banner-wrapper */
.banner-wrapper {
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
}

/* Стили для карусели внутри banner-wrapper */
.banner-wrapper .updates-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.banner-wrapper .carousel-container {
  margin: 0 auto;
  text-align: center;
}

/* Safari-специфичные стили для центрирования */
@supports (-webkit-appearance: none) {
  .banner-wrapper {
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -webkit-justify-content: center;
    -webkit-align-items: center;
  }
  
  .banner-wrapper .carousel-container {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
  }
}

.top-section.op .updates-carousel .carousel-container {
  background: transparent;
  border: none;
  box-shadow: none;
}

.top-section.op .updates-carousel .carousel-header-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.top-section.op .updates-carousel .carousel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.top-section.op .updates-carousel .carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .updates-carousel .progress-bars-container {
    gap: 0.4rem;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    padding: 0.4rem 0;
    max-width: 75%;
    width: 75%;
  }
  
  .progress-bar {
    height: 3px;
  }
  
  .updates-carousel .carousel-container .carousel-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .updates-carousel .carousel-container .carousel-btn svg {
    width: 8px;
    height: 14px;
  }
  
  .carousel-title {
    font-size: 1.1rem;
  }
  
  .carousel-description {
    font-size: 0.9rem;
    min-height: 3rem;
  }
  
  .updates-carousel .carousel-header-wrapper .theme-title.large {
    font-size: 1.5rem;
  }
}

@media (max-width: 479px) {
  .carousel-container {
    max-width: 90%;
  }
  
  .theme-section.updates-carousel {
    grid-row-gap: 0rem !important;
  }
  
  .updates-carousel .progress-bars-container {
    gap: 0.3rem;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    padding: 0.3rem 0;
    max-width: 85%;
    width: 85%;
  }
  
  .progress-bar {
    height: 2.5px;
  }
  
  .updates-carousel .carousel-container .carousel-btn {
    width: 2rem;
    height: 2rem;
  }
  
  .updates-carousel .carousel-container .carousel-btn svg {
    width: 7px;
    height: 12px;
  }
  
  .carousel-title {
    font-size: 1rem;
  }
  
  .carousel-description {
    font-size: 0.85rem;
    min-height: 3rem;
  }
  
}

