/* =============================================
   eTechBuddies — animations.css
   ============================================= */

/* ===== KEYFRAMES ===== */
@keyframes floatShape {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-20px) rotate(2deg); }
  66%       { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,59,114,0.3); }
  50%       { box-shadow: 0 0 0 16px rgba(20,59,114,0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(0.95); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50%       { border-color: var(--white); }
}

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

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
}

@keyframes blob {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%       { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%       { border-radius: 50% 60% 30% 40% / 40% 30% 70% 60%; }
  75%       { border-radius: 40% 50% 60% 30% / 70% 40% 50% 30%; }
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  25%       { transform: translateY(-15px) rotate(5deg); opacity: 1; }
  75%       { transform: translateY(-8px) rotate(-3deg); opacity: 0.85; }
}

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

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===== HERO SLIDE ANIMATIONS ===== */
.hero-slide .hero-label    { animation: fadeInUp 0.7s ease 0.2s both; }
.hero-slide .hero-heading  { animation: fadeInUp 0.7s ease 0.4s both; }
.hero-slide .hero-desc     { animation: fadeInUp 0.7s ease 0.6s both; }
.hero-slide .hero-btns     { animation: fadeInUp 0.7s ease 0.8s both; }
.hero-slide .hero-visual   { animation: fadeInRight 0.8s ease 0.5s both; }

/* Swiper resets animation on slide change */
.swiper-slide-active .hero-label    { animation: fadeInUp 0.7s ease 0.2s both; }
.swiper-slide-active .hero-heading  { animation: fadeInUp 0.7s ease 0.4s both; }
.swiper-slide-active .hero-desc     { animation: fadeInUp 0.7s ease 0.6s both; }
.swiper-slide-active .hero-btns     { animation: fadeInUp 0.7s ease 0.8s both; }
.swiper-slide-active .hero-visual   { animation: fadeInRight 0.8s ease 0.5s both; }

/* Non-active slides hide content */
.swiper-slide:not(.swiper-slide-active) .hero-content > *,
.swiper-slide:not(.swiper-slide-active) .hero-visual {
  opacity: 0;
}

/* ===== FLOATING TECH ICONS IN HERO ===== */
.floating-icons-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fi {
  position: absolute;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.15);
  animation: float-icon linear infinite;
}

.fi:nth-child(1)  { top: 15%; left: 10%; animation-duration: 7s;  animation-delay: 0s;   font-size: 1.5rem; }
.fi:nth-child(2)  { top: 70%; left: 5%;  animation-duration: 9s;  animation-delay: 1s; }
.fi:nth-child(3)  { top: 20%; left: 80%; animation-duration: 8s;  animation-delay: 2s;   font-size: 2.2rem; }
.fi:nth-child(4)  { top: 60%; left: 75%; animation-duration: 11s; animation-delay: 0.5s; font-size: 1.4rem; }
.fi:nth-child(5)  { top: 40%; left: 90%; animation-duration: 6s;  animation-delay: 3s; }
.fi:nth-child(6)  { top: 85%; left: 55%; animation-duration: 10s; animation-delay: 1.5s; font-size: 2rem; }
.fi:nth-child(7)  { top: 10%; left: 45%; animation-duration: 12s; animation-delay: 4s;   font-size: 1.3rem; }
.fi:nth-child(8)  { top: 50%; left: 20%; animation-duration: 8s;  animation-delay: 2.5s; font-size: 2.5rem; color: rgba(255,255,255,0.08); }

/* ===== GRADIENT ANIMATED BG ===== */
.gradient-animated {
  background: linear-gradient(-45deg, #0d2d5e, #143B72, #1e5ba8, #2563EB);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

/* ===== BLOB ===== */
.blob {
  animation: blob 10s ease-in-out infinite;
}

/* ===== PULSE RING ===== */
.pulse-ring {
  position: relative;
  display: inline-flex;
}

.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(20,59,114,0.2);
  animation: ripple 2.5s ease-out infinite;
}

.pulse-ring::after {
  animation-delay: 1.25s;
}

/* ===== SCROLL REVEAL HELPERS ===== */
[data-aos="fade-up-custom"] {
  opacity: 0;
  transform: translateY(40px);
  transition-property: opacity, transform;
}

[data-aos="fade-up-custom"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== COUNTER NUMBER ===== */
.counter-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ===== TYPING CURSOR ===== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: currentColor;
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

/* ===== SHIMMER LOADING ===== */
.shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ===== HOVER UNDERLINE ===== */
.hover-underline {
  position: relative;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.hover-underline:hover::after { transform: scaleX(1); }

/* ===== ICON ORBIT ===== */
.orbit-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  box-shadow: 0 8px 32px rgba(20,59,114,0.4);
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
}

/* ===== PROGRESS RING ===== */
.progress-ring { transform: rotate(-90deg); }

.progress-ring-circle {
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.5s ease;
}

/* ===== SECTION FADE ===== */
.section-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== STAGGER CHILDREN ===== */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.in-view > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.0s; }
.stagger-children.in-view > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.stagger-children.in-view > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.stagger-children.in-view > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.stagger-children.in-view > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.stagger-children.in-view > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }
.stagger-children.in-view > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.6s; }
.stagger-children.in-view > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.7s; }

/* ===== 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;
  }
}
