/* ===== НОВЫЙ СТАБИЛЬНЫЙ СЛАЙДЕР АНИМАТОРОВ ===== */

/* Подключение шрифта Sophiecomic */
/* Определение удалено - шрифт объявлен в animators.html */

/* Контейнер секции */
.hero-slider-section {
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
  overflow: hidden; /* Убираем горизонтальный скролл */
}

/* Обертка слайдера */
.hero-slider-box {
  background: linear-gradient(145deg, #fff7fa, #ffe6ef);
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

/* Заголовок сверху по центру */
.hero-slider-title {
  text-align: center;
  margin: 0 0 24px 0;
  color: #2f214d;
  font-weight: 800;
  font-size: clamp(24px, 2vw, 32px);
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

/* Сцена слайдера */
.hero-slider-stage {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 70px;
  overflow: hidden;
}

/* Обертка с 3D перспективой */
.hero-slider-wrapper {
  perspective: 1200px;
  overflow: visible;
  border-radius: 16px;
  position: relative;
  padding: 40px 0;
}

/* Трек со слайдами - 3D контейнер */
.hero-slider-track {
  position: relative;
  height: 520px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Отдельный слайд - абсолютное позиционирование для 3D */
.hero-slider-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 20px;
  box-sizing: border-box;
  min-height: 520px;
  transform: translate(-50%, -50%) translateZ(-300px) scale(0.7);
  transition: transform 0.7s cubic-bezier(0.34, 0.46, 0.29, 0.94), 
              opacity 0.7s ease, 
              filter 0.7s ease;
  opacity: 0;
  pointer-events: none;
  filter: blur(1px);
}

/* Текущий (центральный) слайд */
.hero-slider-slide.slide-current {
  transform: translate(-50%, -50%) translateZ(0) rotateY(0deg) scale(1);
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
  filter: blur(0);
}

/* Левый слайд */
.hero-slider-slide.slide-left {
  transform: translate(-50%, -50%) translateX(-45%) translateZ(-180px) rotateY(28deg) scale(0.88);
  opacity: 0.5;
  pointer-events: auto;
  z-index: 2;
  filter: blur(0.4px);
  cursor: pointer;
}

/* Правый слайд */
.hero-slider-slide.slide-right {
  transform: translate(-50%, -50%) translateX(45%) translateZ(-180px) rotateY(-28deg) scale(0.88);
  opacity: 0.5;
  pointer-events: auto;
  z-index: 2;
  filter: blur(0.4px);
  cursor: pointer;
}

/* Скрытые слайды */
.hero-slider-slide.slide-hidden {
  transform: translate(-50%, -50%) translateZ(-300px) scale(0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  filter: blur(1px);
}

/* Контейнер изображения с фиксированной высотой */
.hero-slider-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 380px; /* ФИКСИРОВАННАЯ высота для всех изображений */
  flex-shrink: 0;
  margin-bottom: 16px;
}

/* Само изображение */
.hero-slider-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
  transition: filter 0.7s ease;
}

/* Тень для текущего слайда */
.hero-slider-slide.slide-current .hero-slider-img {
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.3));
}

/* Название персонажа - показываем только на текущем */
.hero-slider-name {
  margin: 12px 0 8px 0;
  font-weight: 800;
  font-size: 1.1rem;
  color: #2f214d;
  text-align: center;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slider-slide.slide-current .hero-slider-name {
  opacity: 1;
}

/* Кнопка "Подробнее" - показываем только на текущем слайде */
.hero-slider-btn {
  margin-top: auto;
  padding: 12px 24px;
  background: linear-gradient(180deg, #ff8fb3, #ff7aa5);
  color: #fff !important;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 122, 165, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.7s ease;
  text-decoration: none;
  display: inline-block;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.hero-slider-slide.slide-current .hero-slider-btn {
  opacity: 1;
  pointer-events: auto;
}

.hero-slider-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(255, 122, 165, 0.5);
  color: #fff !important;
}

/* Стрелки навигации */
.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #2f214d;
  font-size: 32px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
}

.hero-slider-arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 12px 28px rgba(255, 150, 190, 0.4);
}

.hero-slider-arrow:active {
  transform: translateY(-50%) scale(0.98);
}

.hero-slider-arrow--prev {
  left: 0;
}

.hero-slider-arrow--next {
  right: 0;
}

/* Индикаторы (точки) */
.hero-slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(47, 33, 77, 0.2);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}

.hero-slider-dot.active {
  background: #ff7aa5;
  transform: scale(1.2);
}

.hero-slider-dot:hover {
  background: rgba(255, 122, 165, 0.6);
}

/* ===== АДАПТИВ ===== */

@media (max-width: 900px) {
  .hero-slider-stage {
    padding: 0 60px;
  }
  
  .hero-slider-arrow {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
  
  .hero-slider-slide {
    min-height: 480px;
  }
  
  .hero-slider-img-container {
    height: 340px;
  }
}

@media (max-width: 640px) {
  .hero-slider-section {
    padding: 0 12px;
  }
  
  .hero-slider-box {
    padding: 24px 16px;
  }
  
  .hero-slider-stage {
    padding: 0 50px;
  }
  
  .hero-slider-wrapper {
    padding: 30px 0;
    perspective: 1000px;
  }
  
  .hero-slider-track {
    height: 460px;
  }
  
  .hero-slider-arrow {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  
  .hero-slider-slide {
    width: 80%;
    min-height: 440px;
    padding: 20px 12px;
  }
  
  .hero-slider-slide.slide-left {
    transform: translate(-50%, -50%) translateX(-55%) translateZ(-200px) rotateY(20deg) scale(0.82);
  }
  
  .hero-slider-slide.slide-right {
    transform: translate(-50%, -50%) translateX(55%) translateZ(-200px) rotateY(-20deg) scale(0.82);
  }
  
  .hero-slider-img-container {
    height: 300px;
  }
  
  .hero-slider-name {
    font-size: 1rem;
  }
  
  .hero-slider-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-slider-stage {
    padding: 0 45px;
  }
  
  .hero-slider-wrapper {
    padding: 20px 0;
    perspective: 800px;
  }
  
  .hero-slider-track {
    height: 420px;
  }
  
  .hero-slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  
  .hero-slider-slide {
    width: 88%;
    min-height: 400px;
    padding: 16px 8px;
  }
  
  .hero-slider-slide.slide-left {
    transform: translate(-50%, -50%) translateX(-65%) translateZ(-240px) rotateY(18deg) scale(0.78);
  }
  
  .hero-slider-slide.slide-right {
    transform: translate(-50%, -50%) translateX(65%) translateZ(-240px) rotateY(-18deg) scale(0.78);
  }
  
  .hero-slider-img-container {
    height: 260px;
  }
  
  .hero-slider-title {
    font-size: 22px;
    margin-bottom: 16px;
  }
}

/* ===== КАТЕГОРИИ И ОПИСАНИЯ ПРОГРАММ ===== */

.programs-categories-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.programs-section-title {
  margin: 0 0 24px;
  color: #2f214d;
  font-size: clamp(20px, 1.2vw, 26px);
  font-weight: 800;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.programs-categories-list {
  display: grid;
  gap: 24px;
}

.ap-cat-item {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  background: linear-gradient(180deg, #ffffff, #fff7fa);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.06);
  padding: 24px;
  scroll-margin-top: 100px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s, transform 0.3s;
}

.ap-cat-item:hover {
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.ap-cat-media {
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ap-cat-media img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.18));
}

.ap-cat-title {
  margin: 2px 0 8px;
  color: #2f214d;
  font-weight: 800;
  font-size: 1.125rem;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-cat-text {
  margin: 0 0 12px;
  color: #4b3b6f;
  line-height: 1.6;
  font-size: 0.95rem;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-cat-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ap-btn {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  background: linear-gradient(180deg, #ff8fb3, #ff7aa5);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 38px rgba(255, 122, 165, 0.35);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(255, 106, 152, 0.45);
}

.ap-btn--light {
  background: #fff;
  color: #2f214d;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.ap-btn--light:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

/* Адаптив для категорий */
@media (max-width: 900px) {
  .ap-cat-item {
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .ap-cat-media img {
    max-height: 320px;
  }
}

@media (max-width: 640px) {
  .programs-categories-section {
    padding: 0 12px;
  }
  
  .ap-cat-item {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }
  
  .ap-cat-media {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 1;
    width: 100%;
  }
  
  .ap-cat-media img {
    max-height: 280px;
    max-width: 100%;
    width: auto;
  }
  
  .ap-cat-item > div:not(.ap-cat-media) {
    order: 2;
  }
  
  .ap-cat-actions {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .ap-btn {
    flex: none;
    width: auto;
    padding: 11px 20px;
    font-size: 0.9rem;
  }
  
  .ap-cat-title {
    font-size: 1.125rem;
  }
  
  .ap-cat-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .ap-cat-item {
    padding: 16px;
    gap: 14px;
  }
  
  .ap-cat-media img {
    max-height: 240px;
  }
  
  .ap-cat-actions {
    flex-direction: row;
    gap: 8px;
    justify-content: center;
  }
  
  .ap-btn {
    flex: none;
    width: auto;
    padding: 11px 18px;
    font-size: 0.85rem;
  }
}

/* ===== МОДАЛКА ===== */

.ap-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(49, 41, 55, 0.55);
  backdrop-filter: blur(4px);
  z-index: 10000;
  padding: 20px;
}

.ap-modal.is-open {
  display: flex;
}

.ap-modal-dlg {
  width: min(980px, 92vw);
  max-height: 88vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ap-modal-h {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #fff7fa, #ffffff);
}

.ap-modal-title {
  margin: 0;
  font-weight: 800;
  color: #2f214d;
  font-size: 24px;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-close {
  background: transparent;
  border: 0;
  font-size: 32px;
  cursor: pointer;
  color: #4b3b6f;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.ap-close:hover {
  background: rgba(255, 122, 165, 0.1);
  color: #ff7aa5;
}

.ap-modal-b {
  padding: 0;
  overflow: auto;
}

.ap-modal-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
}

.ap-modal-fig {
  background: linear-gradient(180deg, #fff7fa, #ffe6ef);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin: 0;
}

.ap-modal-fig img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.22));
}

.ap-modal-text {
  padding: 24px;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-modal-text h3 {
  margin: 16px 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: #2f214d;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-modal-text p {
  margin: 10px 0;
  line-height: 1.75;
  color: #4b3b6f;
  font-size: 16px;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

.ap-modal-text ul {
  margin: 10px 0 10px 20px;
  padding: 0;
}

.ap-modal-text li {
  margin: 8px 0;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  font-size: 15px;
  color: #4b3b6f;
}

.ap-modal-text strong {
  font-weight: 700;
  color: #2f214d;
  font-family: 'Quicksand', 'Nunito', 'Comic Sans MS', cursive, system-ui, -apple-system, sans-serif;
}

/* Адаптив для модалки */
@media (max-width: 780px) {
  .ap-modal-grid {
    grid-template-columns: 1fr;
  }
  
  .ap-modal-fig {
    max-height: 300px;
  }
  
  .ap-modal-title {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .ap-modal {
    padding: 10px;
  }
  
  .ap-modal-dlg {
    max-height: 92vh;
  }
  
  .ap-modal-h {
    padding: 14px 16px;
  }
  
  .ap-modal-title {
    font-size: 18px;
  }
  
  .ap-modal-text {
    padding: 20px;
  }
  
  .ap-modal-text h3 {
    font-size: 18px;
  }
  
  .ap-modal-text p,
  .ap-modal-text li {
    font-size: 14px;
  }
}

