/**
 * 7 Ключа Варна — Custom Animations
 * Supplements AOS library with site-specific effects.
 */

/* ========================================
   1. Hero Background Zoom
   ======================================== */
.hero-zoom-bg {
  animation: heroZoom 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.05);
    opacity: 0.85;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========================================
   2. CTA Gold Glow Pulse
   ======================================== */
.cta-glow {
  animation: ctaGlow 2.5s ease-in-out 1.5s infinite;
}

@keyframes ctaGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(200, 164, 92, 0);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(200, 164, 92, 0.3);
  }
}

/* ========================================
   3. Gold Underline Reveal
   ======================================== */
.gold-line-reveal {
  position: relative;
  display: inline-block;
}

.gold-line-reveal::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--color-gold, #C8A45C);
  margin-top: 8px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gold-line-reveal.aos-animate::after {
  width: 60px;
}

/* ========================================
   4. Card Hover Effects
   ======================================== */
.card-hover-enabled .course-card,
.card-hover-enabled .event-card,
.card-hover-enabled .pricing-card,
.card-hover-enabled .feature-card,
.card-hover-enabled .benefit-card,
.card-hover-enabled .principle-card,
.card-hover-enabled .language-card,
.card-hover-enabled .value-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-enabled .course-card:hover,
.card-hover-enabled .event-card:hover,
.card-hover-enabled .pricing-card:hover,
.card-hover-enabled .feature-card:hover,
.card-hover-enabled .benefit-card:hover,
.card-hover-enabled .principle-card:hover,
.card-hover-enabled .language-card:hover,
.card-hover-enabled .value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* ========================================
   5. Button Micro-interactions
   ======================================== */
.btn-animated,
.card-hover-enabled .btn,
.card-hover-enabled .btn-primary,
.card-hover-enabled .btn-secondary {
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-animated:hover,
.card-hover-enabled .btn:hover,
.card-hover-enabled .btn-primary:hover,
.card-hover-enabled .btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-animated:active,
.card-hover-enabled .btn:active,
.card-hover-enabled .btn-primary:active,
.card-hover-enabled .btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* ========================================
   6. Counter Animation (visible state)
   ======================================== */
.counter-animated {
  display: inline-block;
  min-width: 1.5em;
}

/* ========================================
   7. Form Focus Glow
   ======================================== */
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: var(--color-gold, #C8A45C);
  box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.15);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   8. FAQ Smooth Accordion
   ======================================== */
.faq-answer-animated {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer-animated {
  max-height: 500px;
  padding-top: 12px;
}

/* ========================================
   9. Team Member Hover
   ======================================== */
.card-hover-enabled .team-card {
  transition: transform 0.3s ease;
}

.card-hover-enabled .team-card:hover {
  transform: scale(1.03);
}

.card-hover-enabled .team-card img {
  transition: filter 0.3s ease;
}

.card-hover-enabled .team-card:hover img {
  filter: brightness(1.05);
}

/* ========================================
   10. Process Step Connector
   ======================================== */
.process-step-connector {
  position: relative;
}

.process-step-connector::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--color-gold, #C8A45C);
  transition: height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.process-step-connector.aos-animate::before {
  height: 100%;
}

/* ========================================
   11. Nav Link Underline Sweep
   ======================================== */
.nav-animated .nav-link {
  position: relative;
}

.nav-animated .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-gold, #C8A45C);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-animated .nav-link:hover::after {
  transform: scaleX(1);
}

/* ========================================
   ACCESSIBILITY: Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-zoom-bg {
    animation: none;
    opacity: 1;
  }

  .cta-glow {
    animation: none;
  }

  [data-aos] {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ========================================
   MOBILE: Simplified animations
   ======================================== */
@media (max-width: 768px) {
  .hero-zoom-bg {
    animation: none;
    opacity: 1;
  }

  /* Convert horizontal to vertical on mobile */
  [data-aos="fade-left"],
  [data-aos="fade-right"] {
    transform: translateY(20px) !important;
  }

  [data-aos="fade-left"].aos-animate,
  [data-aos="fade-right"].aos-animate {
    transform: translateY(0) !important;
  }
}
