/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ffb347);
  z-index: 1100;
  width: 0;
  transition: width 0.1s linear;
}

/* Hero Ken Burns (background only) */
.swiper-slide-active .hero-slide {
  animation: kenBurns 14s ease-in-out infinite alternate;
}
@keyframes kenBurns {
  from { background-size: 100% 100%; }
  to { background-size: 108% 108%; }
}

.hero-content h1 {
  animation: fadeUp 1s ease 0.2s both;
}
.hero-content .lead {
  animation: fadeUp 1s ease 0.4s both;
}
.hero-content .btn {
  animation: fadeUp 1s ease 0.6s both;
}

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

/* Floating decor — keep inside viewport */
.hero-section {
  overflow: hidden;
}
.hero-section::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 130, 32, 0.12), transparent 70%);
  inset-inline-end: -60px;
  bottom: 10%;
  z-index: 1;
  animation: floatOrb 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.05); }
}

/* Cards hover shine */
.card-premium {
  position: relative;
  overflow: hidden;
}
.card-premium::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: rotate(25deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.card-premium:hover::after {
  left: 120%;
}

/* Stat counter pulse */
.stat-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 48px rgba(15, 39, 64, 0.25);
}
.stat-card .value {
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section title underline */
.section-title {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: expandLine 1s ease 0.5s both;
}
html[dir="rtl"] .section-title::after {
  left: auto;
  right: 0;
}
@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to { width: 60px; opacity: 1; }
}

/* Image zoom on hover */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: var(--radius);
}
.img-zoom-wrap img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.img-zoom-wrap:hover img {
  transform: scale(1.08);
}

/* CTA pulse */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(245,130,32,0.2), transparent 50%);
  animation: ctaGlow 4s ease-in-out infinite alternate;
}
@keyframes ctaGlow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Stagger children — visible by default; animate when revealed */
.stagger-children > * {
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.stagger-ready:not(.is-visible) > * {
  opacity: 0;
  transform: translateY(20px);
}
.stagger-children.is-visible > * {
  animation: staggerIn 0.6s ease forwards;
}
.stagger-children.is-visible > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { animation-delay: 0.15s; }
.stagger-children.is-visible > *:nth-child(3) { animation-delay: 0.25s; }
.stagger-children.is-visible > *:nth-child(4) { animation-delay: 0.35s; }
.stagger-children.is-visible > *:nth-child(5) { animation-delay: 0.45s; }
.stagger-children.is-visible > *:nth-child(6) { animation-delay: 0.55s; }
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Navbar link hover */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Page enter */
main {
  animation: pageIn 0.5s ease;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Testimonial swiper */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.swiper-slide-active .testimonial-card {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

/* Btn ripple feel */
.btn-accent {
  position: relative;
  overflow: hidden;
}
.btn-accent:active {
  transform: scale(0.97);
}

/* Respect 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-slide { animation: none; }
}
