/**
 * Стилі для About CTA Section з GSAP анімаціями
 */

/* Основні стилі для about CTA секції */
.about-cta-section {
  position: relative;
  will-change: transform, opacity;
}

/* Кольори тексту */
.about-cta-section.text-white {
  color: #ffffff;
}

.about-cta-section.text-dark {
  color: #1e293b;
}

/* Стилі для анімованих елементів */
.cta-title {
  will-change: transform, opacity;
  position: relative;
  z-index: 30;
}

.cta-description {
  will-change: transform, opacity;
  position: relative;
  z-index: 30;
}

.cta-button-wrapper {
  will-change: transform, opacity;
  position: relative;
  z-index: 30;
  text-align: left;
}

/* Декоративні елементи */
.cta-decoration {
  z-index: 10;
}

.decoration-shape-1 {
  top: 10%;
  right: 15%;
  background: currentColor;
  animation: float-slow 8s ease-in-out infinite;
}

.decoration-shape-2 {
  bottom: 20%;
  left: 10%;
  background: currentColor;
  animation: float-medium 6s ease-in-out infinite reverse;
}

.decoration-shape-3 {
  top: 60%;
  right: 8%;
  background: currentColor;
  animation: float-fast 4s ease-in-out infinite;
}

/* Стилі кнопок */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Розміри кнопок */
.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-medium {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Стилі кнопок */
.btn-solid {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-solid:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid currentColor;
  background: transparent;
}

.btn-outline:hover {
  background: currentColor;
  color: #ffffff;
}

.btn-gradient {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  color: white;
}

.btn-gradient:hover {
  background: linear-gradient(45deg, #2563eb, #7c3aed);
}

/* Стилі для різних типів анімацій початкового стану */
.about-cta-section.animation-fade-up .cta-title,
.about-cta-section.animation-fade-up .cta-description,
.about-cta-section.animation-fade-up .cta-button-wrapper {
  opacity: 0;
  transform: translateY(50px);
}

.about-cta-section.animation-fade-in .cta-title,
.about-cta-section.animation-fade-in .cta-description,
.about-cta-section.animation-fade-in .cta-button-wrapper {
  opacity: 0;
}

.about-cta-section.animation-slide-left .cta-title,
.about-cta-section.animation-slide-left .cta-description,
.about-cta-section.animation-slide-left .cta-button-wrapper {
  opacity: 0;
  transform: translateX(-100px);
}

.about-cta-section.animation-slide-right .cta-title,
.about-cta-section.animation-slide-right .cta-description,
.about-cta-section.animation-slide-right .cta-button-wrapper {
  opacity: 0;
  transform: translateX(100px);
}

.about-cta-section.animation-scale-in .cta-title,
.about-cta-section.animation-scale-in .cta-description,
.about-cta-section.animation-scale-in .cta-button-wrapper {
  opacity: 0;
  transform: scale(0.8);
}

.about-cta-section.animation-bounce .cta-title,
.about-cta-section.animation-bounce .cta-description,
.about-cta-section.animation-bounce .cta-button-wrapper {
  opacity: 0;
  transform: translateY(-30px);
}

/* Hover ефекти для декоративних елементів */
.about-cta-section:hover .decoration-shape-1 {
  transform: scale(1.1) rotate(10deg);
  transition: transform 0.5s ease;
}

.about-cta-section:hover .decoration-shape-2 {
  transform: scale(1.2) rotate(-10deg);
  transition: transform 0.5s ease;
}

.about-cta-section:hover .decoration-shape-3 {
  transform: scale(1.15) rotate(15deg);
  transition: transform 0.5s ease;
}

/* Floating анімації */
@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(5deg);
  }
  50% {
    transform: translateY(-20px) rotate(0deg);
  }
  75% {
    transform: translateY(-10px) rotate(-5deg);
  }
}

@keyframes float-medium {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-15px) rotate(10deg);
  }
  66% {
    transform: translateY(-8px) rotate(-5deg);
  }
}

@keyframes float-fast {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(8deg);
  }
}

/* Адаптивність */
@media (max-width: 1024px) {
  .about-cta-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .decoration-shape-1 {
    width: 80px;
    height: 80px;
  }

  .decoration-shape-2 {
    width: 60px;
    height: 60px;
  }

  .decoration-shape-3 {
    width: 40px;
    height: 40px;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-description {
    font-size: 1.125rem;
  }
}

@media (max-width: 768px) {
  .about-cta-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .cta-content {
    gap: 2rem;
  }

  .cta-title {
    font-size: 1.875rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  /* Спрощуємо анімації декоративних елементів */
  .decoration-shape-1,
  .decoration-shape-2,
  .decoration-shape-3 {
    animation-duration: 10s;
  }
}

@media (max-width: 640px) {
  .about-cta-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  .decoration-shape-1 {
    width: 60px;
    height: 60px;
  }

  .decoration-shape-2 {
    width: 40px;
    height: 40px;
  }

  .decoration-shape-3 {
    width: 30px;
    height: 30px;
  }
}

/* Доступність */
@media (prefers-reduced-motion: reduce) {
  .about-cta-section *,
  .decoration-shape-1,
  .decoration-shape-2,
  .decoration-shape-3 {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn::before {
    display: none;
  }
}

/* Стан завантаження */
.about-cta-section.loaded {
  opacity: 1;
}

.about-cta-section.animations-completed {
  --animation-completed: true;
}

/* Visibility стани */
.about-cta-section.cta-visible {
  --section-visible: true;
}

/* Focus стилі для доступності */
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Dark mode підтримка */
@media (prefers-color-scheme: dark) {
  .about-cta-section.bg-white {
    background-color: #1a1a1a;
    color: white;
  }

  .about-cta-section.bg-light {
    background-color: #2a2a2a;
    color: white;
  }

  .about-cta-section.text-dark {
    color: #e5e5e5;
  }
}

/* Стилі для розробки */
.about-cta-section[data-debug="true"] {
  border: 2px dashed #ff0000;
}

.about-cta-section[data-debug="true"] .cta-title {
  background-color: rgba(255, 0, 0, 0.1);
}

.about-cta-section[data-debug="true"] .cta-description {
  background-color: rgba(0, 255, 0, 0.1);
}

.about-cta-section[data-debug="true"] .cta-button-wrapper {
  background-color: rgba(0, 0, 255, 0.1);
}

/* Performance оптимізації */
.about-cta-section {
  contain: layout style paint;
}

.cta-title,
.cta-description,
.cta-button-wrapper {
  contain: layout style;
}

/* High DPI підтримка */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Стилі для анімацій завершення */
.about-cta-section.animations-completed .cta-title,
.about-cta-section.animations-completed .cta-description,
.about-cta-section.animations-completed .cta-button-wrapper {
  opacity: 1;
  transform: none;
}
