/* Кастомные анимации для проекта */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Утилиты для анимаций */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Задержки для последовательных анимаций */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* Плавное появление при скролле */
.fade-in-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Эффект градиента для текста */
.text-gradient {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Эффект свечения для акцентных элементов */
.glow-effect {
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
  transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.5);
}

/* Плавные переходы для интерактивных элементов */
.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Стили для статистики с анимацией чисел */
.counter-animate {
  transition: transform 0.3s ease;
}

/* Бургер-меню анимация */
.burger-line {
  transition: all 0.3s ease;
}

.burger-active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Мобильное меню */
.burger-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.burger-menu.active {
  max-height: 500px;
  transition: max-height 0.3s ease-in;
}

/* Swiper навигация */
.swiper-button-next,
.swiper-button-prev {
  color: #f43f5e;
  background: #1a2540;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #2a3658;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #121a2f;
  border-color: #f43f5e;
}

/* Cookie banner стили */
#cookie-consent-banner {
  backdrop-filter: blur(10px);
}

#cookie-consent-banner input[type='checkbox']:checked {
  background-color: #f43f5e;
  border-color: #f43f5e;
}

/* Активная ссылка навигации */
.nav-link-active {
  color: #f43f5e;
}

.nav-link-active:hover {
  color: #e11d48;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  #cookie-consent-banner .flex-col {
    gap: 1rem;
  }

  #cookie-consent-banner button {
    width: 100%;
  }
}

/* Логотип на узких экранах не растягивать */
header a[href='/'] img {
  max-height: 2.5rem;
}
@media (min-width: 640px) {
  header a[href='/'] img {
    max-height: 2.5rem;
  }
}

/* Футер: колонки в один столбец на мобильных */
@media (max-width: 767px) {
  footer .grid.md\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  footer address {
    text-align: center;
  }

  footer address a {
    display: inline-block;
  }
}

/* Hero карточка: меньше отступы на мобильных */
@media (max-width: 640px) {
  .hero-stats-card .grid.grid-cols-2 {
    gap: 1rem;
  }

  .hero-stats-card .text-3xl {
    font-size: 1.5rem;
  }
}

/* Секции: уменьшенные отступы на мобильных */
@media (max-width: 640px) {
  section.py-20 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  section.py-16 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Swiper кнопки: не перекрывать контент на мобильных */
@media (max-width: 640px) {
  .testimonials-swiper .swiper-button-next,
  .testimonials-swiper .swiper-button-prev {
    width: 36px;
    height: 36px;
  }

  .testimonials-swiper .swiper-button-next:after,
  .testimonials-swiper .swiper-button-prev:after {
    font-size: 16px;
  }
}

/* Валидация формы */
.form-field-error {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 1px #f43f5e;
}

.form-field-message,
p.text-sm.mt-1[role='alert'] {
  color: #f43f5e;
}

/* FAQ */
.faq-answer[hidden] {
  display: none;
}

.faq-question {
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-item-open .faq-question-icon {
  transform: rotate(180deg);
}

/* Адаптивная обёртка для карты (iframe) */
.map-embed-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 */
}

.map-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .map-embed-wrapper {
    padding-bottom: 75%; /* выше на мобильных для удобства */
  }
}
