/* Подключаем шрифт Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Удаляем дублирующие стили лоадера, так как они теперь в head */
/* ...existing code... */

/* Стили для лоадера */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.dark .page-loader {
  background: rgb(17 24 39);
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 200px;
  height: auto;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1); /* Изменено с 0.95 на 1.1 для увеличения */
  }
}

/* Скрываем контент до загрузки */
.content-wrapper {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.content-wrapper.loaded {
  opacity: 1;
}

html {
    /* Предотвращаем мелькание при загрузке темы */
    transition: background-color 0s !important;
}

html.dark {
    background-color: rgb(17 24 39); /* primary-dark */
}

/* Базовые стили */
html {
  font-family: 'Montserrat', sans-serif;
  scroll-behavior: smooth;
}

.toplogo {
  width: 150px;
  height: auto;
  max-height: 100%;
  /* ограничиваем высоту логотипа */
  margin-top: 8px;
}

/* Паттерн для фона hero секции */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f97316' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Стили для Hero секции */
.hero-video {
  filter: brightness(0.7);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-video.loaded {
  opacity: 1;
}

/* Анимации для Hero секции */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-content {
  animation: fadeIn 1s ease-out;
}

/* Hover эффекты для кнопок */
.hero-button {
  transition: all 0.3s ease;
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Стили для статистики */
.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.25rem;
  }
}

/* Дополнительные стили для темной темы */
.dark .hero-video {
  filter: brightness(0.6);
}

/* Анимации для секции About */
.about-card {
  transition: all 0.3s ease;
}

.about-card:hover {
  transform: translateY(-10px);
}

.about-icon {
  transition: all 0.3s ease;
}

.about-card:hover .about-icon {
  transform: scale(1.1);
  color: #f97316;
  /* orange-500 */
}

/* Анимации при прокрутке */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Задержка для каждой карточки */
.animate-delay-1 {
  transition-delay: 0.2s;
}

.animate-delay-2 {
  transition-delay: 0.4s;
}

.animate-delay-3 {
  transition-delay: 0.6s;
}

/* Стили для секции Programs */
.program-card {
  opacity: 1;
  /* Сразу показываем карточки */
  transform: none;
  /* Убираем начальное смещение */
  transition: all 0.3s ease-in-out;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}

.program-card:hover {
  transform: scale(1.02);
  /* Только легкое увеличение при наведении */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Удаляем старые стили анимации появления */
/* Новые стили для анимации появления программ */
/* .program-card.animate-on-scroll {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease-out;
}

.program-card.animate-on-scroll.animated {
    opacity: 1;
    transform: translateX(0);
}

.program-card.animate-delay-2.animate-on-scroll {
    transform: translateX(20px);
} */

.program-image {
  position: relative;
  overflow: hidden;
}

.program-image img {
  transition: transform 0.5s ease;
}

.program-card:hover .program-image img {
  transform: scale(1.1);
}

.program-price {
  background: linear-gradient(to right, #f97316, #fb923c);
  box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.2);
}

.program-feature {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.program-feature:hover {
  transform: translateX(5px);
}

.program-icon {
  transition: transform 0.2s ease;
}

.program-feature:hover .program-icon {
  transform: scale(1.2);
}

.program-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.program-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  transition: transform 0.5s ease;
}

.program-button:hover::before {
  transform: translate(-50%, -50%) scale(2);
}

/* Dark mode специфичные стили */
.dark .program-card {
  background: linear-gradient(to bottom, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 1));
}

/* Стили для секции Benefits */
.benefit-card {
  padding: 2rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
  background: none !important;
  /* background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); */
}

.benefit-card:hover {
  transform: translateY(-10px);
  /* background: linear-gradient(145deg, rgba(31, 41, 55, 0.8) 0%, rgba(31, 41, 55, 0.3) 50%, rgba(31, 41, 55, 0) 100%); */
}

.benefit-icon {
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
}

.dark .benefit-card {
  background: none !important;
}

/* Удалите или закомментируйте .benefit-card::after {...} */
/* .benefit-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 50%, rgba(249,115,22,0.1) 50%);
    background-size: 200% 200%;
    background-position: 100% 100%;
    transition: all 0.6s ease;
    border-radius: 1rem;
    z-index: -1;
}

.benefit-card:hover::after {
    background-position: 0% 0%;
} */

/* Стили для секции Testimonials */
.testimonial-card {
  transition: all 0.3s ease;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.dark .testimonial-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.1) 0%, rgba(17, 24, 39, 0.05) 100%);
}

.testimonial-card:hover {
  transform: translateY(-10px);
}

.testimonial-image {
  transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-image {
  transform: scale(1.05);
}

.testimonial-quote {
  position: relative;
}

.testimonial-quote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: 4rem;
  color: rgba(249, 115, 22, 0.2);
  font-family: serif;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 50;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.dark header {
  background: rgba(17, 24, 39, 0.9);
}

/* Стили для мобильного меню */
#mobile-menu {
  position: fixed;
  top: 64px;
  /* Высота header */
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem;
  z-index: 49;
}

.dark #mobile-menu {
  background: rgba(17, 24, 39, 0.98);
  /* primary-dark с небольшой прозрачностью */
}

/* Стили для загрузчика видео */
.video-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.video-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.video-container {
  position: relative;
  width: 100%;
  height: 35vh;
  overflow: hidden;
  transition: height 0.5s ease;
}

.video-container.expanded {
  height: 100vh;
}

.video {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  transform: translateY(-25vh);
  transition: transform 0.5s ease;
}

.video-container.expanded .video {
  transform: translateY(0);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.overlay-title {
  color: white;
  font-size: 24px;
  margin-bottom: 0px;
}

.youtube-icon {
  color: white;
}

/* Стили для для основного текста - по умолчанию */
.textarea h1,
.textarea h2,
.textarea h3,
.textarea h4,
.textarea h5,
.textarea h6,
.textarea p,
.textarea blockquote,
.textarea dl,
.textarea dd,
.textarea hr,
.textarea figure,
.textarea pre {
  margin: revert;
}

.textarea ul,
.textarea ol {
  list-style: revert;
  margin: revert;
  padding: revert;
}

/* Карусель программ */
.carousel-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 1rem;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(241, 145, 44, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.3s;
}

.carousel-button:hover {
  background-color: rgba(234, 88, 12, 0.9);
}

.carousel-button-prev {
  left: 1rem;
}

.carousel-button-next {
  right: 1rem;
}

.carousel-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

.max-w-170 {
  max-width: 170px;
  height: auto;
}

.max-w-720 {
  max-width: 720px;
  height: auto;
}

/* Карта Украины */

.map {
  max-width: 800px;
  margin: 0 auto;
  background-color: #374151;

}

.map svg {
  width: 100%;
  height: auto;
}

.city {
  fill: #ff9800;
  cursor: pointer;
}

.city:hover {
  fill: #f95c2c !important;
}

.city-label {
  font-size: 12px;
  font-family: Arial, sans-serif;
  fill: #fff;
  pointer-events: none;
}

.content-top {
  padding-top: 80px;
}

.content-top img {
  padding: 20px;
}



.textarea {
  /* Восстанавливаем стандартное поведение для текстового контента */
  h1, h2, h3, h4, h5, h6, p, blockquote, dl, dd, hr, figure, pre {
      margin: revert;
  }
  
  /* Восстанавливаем стандартное поведение для списков */
  ul, ol {
      list-style: revert;
      margin: revert;
      padding: revert;
  }
  
  /* Специальные стили для изображений и их контейнеров */
  p {
      text-align: inherit;  /* Позволяет работать text-align из HTML */
  }
  
  img {
      display: inline-block;  /* Позволяет center работать с text-align */
      max-width: 100%;      /* Делаем изображения отзывчивыми */
      height: auto;         /* Сохраняем пропорции */
      margin: revert;       /* Восстанавливаем отступы */
  }
  
  /* Стили для центрированных параграфов с изображениями */
  p[style*="text-align: center"] {
      text-align: center !important;
      
      img {
          display: inline-block;
          margin: 0 auto;
      }
  }

  /* Добавляем новые стили для iframe */
  iframe {
    max-width: 100%;
    width: 100%;
    margin: 1rem auto;
    display: block;
  }
  
  /* Создаем контейнер с пропорциями 16:9 для видео */
  iframe[src*="youtube.com"] {
    aspect-ratio: 16/9;
    height: auto;
  }

  /* Обновленные стили для iframe */
  iframe {
    max-width: 100% !important; /* Переопределяем инлайн стили */
    width: 100% !important;     /* Переопределяем инлайн стили */
    height: auto !important;    /* Переопределяем инлайн стили */
    margin: 1rem auto;
    display: block;
  }
  
  /* Создаем обертку для iframe с YouTube для сохранения пропорций */
  iframe[src*="youtube.com"] {
    aspect-ratio: 16/9;
    width: 100% !important;
    height: 100% !important;
  }

  /* Добавляем респонсивную обертку для iframe */
  p:has(iframe) {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
  }
}

.mr-2 {
  margin-right: 0.5rem;
}

.ml-4 {
  margin-left: 1rem;
}

.p-3 {
  padding: 1rem;
}