/* ═══════════════════════════════════════════════════════════════
   Beauty Room Agnes — Animation System
   Elegant, professional animations for agnieszkasarnecka.pl
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. SCROLL REVEAL ANIMATIONS ──────────────────────────── */

/* Base: elements start hidden, animate when .revealed is added */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 1s ease;
}
.reveal-fade.revealed {
  opacity: 1;
}

/* Stagger delays for children */
.stagger-1 { transition-delay: 0.1s !important; }
.stagger-2 { transition-delay: 0.2s !important; }
.stagger-3 { transition-delay: 0.3s !important; }
.stagger-4 { transition-delay: 0.4s !important; }
.stagger-5 { transition-delay: 0.5s !important; }
.stagger-6 { transition-delay: 0.6s !important; }


/* ── 2. HERO ENTRANCE ANIMATION ───────────────────────────── */

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

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

#hero .hero-animated {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero .hero-delay-1 { animation-delay: 0.1s; }
#hero .hero-delay-2 { animation-delay: 0.25s; }
#hero .hero-delay-3 { animation-delay: 0.4s; }
#hero .hero-delay-4 { animation-delay: 0.55s; }
#hero .hero-delay-5 { animation-delay: 0.7s; }
#hero .hero-delay-6 { animation-delay: 0.85s; }


/* ── 3. COUNTER ANIMATION ────────────────────────────────── */

.counter-value {
  display: inline-block;
  transition: transform 0.3s ease;
}
.counter-value.counting {
  transform: scale(1.05);
}


/* ── 4. SUBTLE PARALLAX (handled in JS, just smooth out) ── */

.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}


/* ── 5. CARD HOVER EFFECTS ────────────────────────────────── */

/* Training cards */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.card-hover:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 40px rgba(45, 80, 100, 0.12),
              0 8px 16px rgba(45, 80, 100, 0.08) !important;
}

/* Feature cards (Dlaczego ja) */
.feature-card-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease !important;
}
.feature-card-hover:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 32px rgba(45, 80, 100, 0.1),
              0 4px 12px rgba(45, 80, 100, 0.06) !important;
  border-color: rgba(45, 80, 100, 0.15) !important;
}

/* Icon bounce on card hover */
.feature-card-hover:hover .icon-container {
  animation: iconBounce 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iconBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* ── 6. IMAGE HOVER ZOOM ─────────────────────────────────── */

.img-zoom-wrapper {
  overflow: hidden !important;
}
.img-zoom-wrapper img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.img-zoom-wrapper:hover img {
  transform: scale(1.05) !important;
}


/* ── 7. SECTION HEADING ANIMATIONS ────────────────────────── */

@keyframes lineExpand {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

.heading-line.revealed {
  animation: lineExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}


/* ── 8. BUTTON SHIMMER EFFECT ─────────────────────────────── */

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.btn-shimmer {
  position: relative;
  overflow: hidden !important;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}


/* ── 9. FLOATING DECORATIVE ELEMENTS ──────────────────────── */

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.03); }
}

.float-element {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.07;
  z-index: 0;
}
.float-1 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #2D5064, transparent 70%);
  animation: float1 8s ease-in-out infinite;
}
.float-2 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #C0C0C0, transparent 70%);
  animation: float2 10s ease-in-out infinite 2s;
}
.float-3 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #2D5064, transparent 70%);
  animation: float3 7s ease-in-out infinite 1s;
}


/* ── 10. DECORATIVE DIVIDER ANIMATION ─────────────────────── */

@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

.divider-sparkle {
  animation: sparkle 3s ease-in-out infinite;
  display: inline-block;
}


/* ── 11. SMOOTH SCROLL INDICATOR (hero) ───────────────────── */

@keyframes scrollIndicator {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollIndicator 2s ease-in-out infinite;
  color: rgba(45, 80, 100, 0.4);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}
.scroll-indicator:hover {
  color: rgba(45, 80, 100, 0.7);
}


/* ── 12. OPINION CARDS SUBTLE HOVER ───────────────────────── */

.opinion-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.opinion-card-hover:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 24px rgba(45, 80, 100, 0.08) !important;
}


/* ── 13. FAQ SMOOTH ACCORDION ─────────────────────────────── */

.faq-item {
  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.faq-item:hover {
  box-shadow: 0 4px 12px rgba(45, 80, 100, 0.06) !important;
}


/* ── 14. NAVBAR SCROLL EFFECT (handled via JS class) ──────── */

.nav-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 2px 20px rgba(45, 80, 100, 0.08) !important;
}


/* ── 15. GRADIENT TEXT SHIMMER (for special headings) ──────── */

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

.text-gradient-animated {
  background: linear-gradient(90deg, #2D5064, #5A8FA8, #C0C0C0, #5A8FA8, #2D5064);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}


/* ── 16. CONTACT FORM FOCUS EFFECTS ───────────────────────── */

#kontakt input:focus,
#kontakt textarea:focus {
  box-shadow: 0 0 0 3px rgba(45, 80, 100, 0.1) !important;
  border-color: #2D5064 !important;
  transition: all 0.3s ease !important;
}


/* ── 17. STATS NUMBER GLOW ────────────────────────────────── */

@keyframes numberGlow {
  0%, 100% { text-shadow: 0 0 0px transparent; }
  50% { text-shadow: 0 0 20px rgba(45, 80, 100, 0.15); }
}

.stat-number-glow {
  animation: numberGlow 3s ease-in-out infinite;
}


/* ── PREFERS-REDUCED-MOTION ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .reveal-fade {
    opacity: 1 !important;
    transform: none !important;
  }
}
