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

/* Основні стилі для about hero секції */
.about-hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Стилі для анімованих елементів */
.about-hero-title {
  position: relative;
  z-index: 30;
  will-change: transform, opacity;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.decoration-circle-1 {
  top: 10%;
  right: 15%;
  animation: float-slow 6s ease-in-out infinite;
}

.decoration-circle-2 {
  bottom: 20%;
  left: 10%;
  animation: float-medium 4s ease-in-out infinite reverse;
}

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

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

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

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

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

.about-hero-section.animation-typewriter .about-hero-title {
  overflow: hidden;
  border-right: 3px solid;
  white-space: nowrap;
  width: 0;
  animation: typing 0.1s steps(1, end) forwards,
    blink-caret 1s step-end infinite;
}

/* Parallax ефекти */
.about-hero-section.parallax-enabled {
  transform-style: preserve-3d;
}

/* Hover ефекти для інтерактивних елементів */
.about-hero-section:hover .decoration-circle-1 {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.about-hero-section:hover .decoration-circle-2 {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}

.about-hero-section:hover .decoration-circle-3 {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

/* Адаптивність */
@media (max-width: 1024px) {
  .about-hero-section {
    min-height: 60vh;
    background-attachment: scroll; /* Відключаємо parallax на планшетах */
  }

  .decoration-circle-1 {
    width: 24px;
    height: 24px;
  }

  .decoration-circle-2 {
    width: 20px;
    height: 20px;
  }

  .decoration-circle-3 {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 768px) {
  .about-hero-section {
    min-height: 50vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .about-hero-title.animation-typewriter {
    white-space: normal;
    border-right: none;
    animation: none;
    width: auto;
    overflow: visible;
  }

  /* Спрощуємо анімації на мобільних */
  .decoration-circle-1,
  .decoration-circle-2,
  .decoration-circle-3 {
    animation-duration: 8s;
  }
}

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

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

  .about-hero-section.animation-typewriter .about-hero-title {
    animation: none;
    border-right: none;
    width: auto;
    overflow: visible;
    white-space: normal;
  }

  .about-hero-section {
    background-attachment: scroll !important;
  }
}

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

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

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

/* Dark mode підтримка */
@media (prefers-color-scheme: dark) {
  .about-hero-section:not([style*="background-image"]) {
    background-color: #1a1a1a;
  }

  .about-hero-section:not([style*="background-image"]) .about-hero-title {
    color: white;
  }

  .about-hero-section:not([style*="background-image"]) .about-hero-description {
    color: #e5e5e5;
  }
}

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

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

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

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

.about-hero-title,
.about-hero-description {
  contain: layout style;
}

/* Підтримка високої щільності пікселів */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .about-hero-section {
    background-size: cover;
  }
}
