/* =========================================
   EDUCORE EDUCATIONAL SYSTEMS — Animations
   css/animations.css
   ========================================= */

/* =========================================
   KEYFRAME DEFINITIONS
   ========================================= */

@keyframes meshFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(50px, -35px) scale(1.06); }
  66%       { transform: translate(-25px, 45px) scale(0.96); }
}

@keyframes meshFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-55px, 30px) scale(1.09); }
  66%       { transform: translate(35px, -45px) scale(0.94); }
}

@keyframes meshFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-30px, -20px); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(10px); opacity: 0.65; }
}

@keyframes scrollDot {
  0%        { transform: translateX(-50%) translateY(0); opacity: 1; }
  70%       { transform: translateX(-50%) translateY(14px); opacity: 0.25; }
  100%      { transform: translateX(-50%) translateY(0); opacity: 1; }
}

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

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

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

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

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(26, 110, 216, 0.25); }
  50%       { box-shadow: 0 0 35px rgba(26, 110, 216, 0.65), 0 0 70px rgba(26, 110, 216, 0.25); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

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

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

@keyframes particleRise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes countPop {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

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

@keyframes tealPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 194, 168, 0.3); }
  50%       { box-shadow: 0 0 28px rgba(0, 194, 168, 0.7); }
}

/* =========================================
   HERO — AUTO-PLAY ENTRANCE ANIMATIONS
   ========================================= */
.hero-eyebrow  { animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both; }
.hero-headline { animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.22s both; }
.hero-subheadline { animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.38s both; }
.hero-cta-group { animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.52s both; }
.scroll-indicator { animation: fadeIn 0.7s ease 0.9s both; }

.page-hero-content .breadcrumb { animation: fadeInUp 0.6s ease 0.1s both; }
.page-hero-content h1 { animation: fadeInUp 0.7s ease 0.2s both; }
.page-hero-content p  { animation: fadeInUp 0.7s ease 0.32s both; }

/* =========================================
   FLOATING DECORATION
   ========================================= */
.float-element   { animation: float 4.5s ease-in-out infinite; }
.float-element-2 { animation: float 5.5s ease-in-out 1.2s infinite; }
.float-element-3 { animation: float 6.5s ease-in-out 2.4s infinite; }

/* =========================================
   GLOW PULSE
   ========================================= */
.glow-pulse      { animation: pulseGlow 3s ease-in-out infinite; }
.teal-glow-pulse { animation: tealPulse 3s ease-in-out infinite; }

/* =========================================
   SHIMMER
   ========================================= */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* =========================================
   SCROLL-TRIGGERED BASE CLASSES
   ========================================= */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-from-left {
  opacity: 0;
  transform: translateX(-38px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-from-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-from-right {
  opacity: 0;
  transform: translateX(38px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-from-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
  opacity: 1;
  transform: scale(1);
}

/* =========================================
   STAGGER DELAY HELPERS
   ========================================= */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="150"] { transition-delay: 150ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }
[data-delay="700"] { transition-delay: 700ms; }
[data-delay="800"] { transition-delay: 800ms; }

/* =========================================
   PARALLAX LAYER
   ========================================= */
.parallax-layer {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* =========================================
   ANIMATED GRADIENT TEXT
   ========================================= */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-teal) 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

/* =========================================
   ANIMATED BORDER CARD
   ========================================= */
.animated-border-card {
  position: relative;
  border-radius: 14px;
  padding: 2px;
}

.animated-border-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-teal), var(--accent-gold), var(--accent));
  background-size: 300% 100%;
  animation: borderGlow 4s linear infinite;
  z-index: -1;
}

.animated-border-inner {
  background: var(--primary);
  border-radius: 12px;
  padding: 2rem;
  height: 100%;
}

/* =========================================
   HOVER EFFECTS
   ========================================= */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(10, 22, 40, 0.55);
}

/* =========================================
   BLOG CARD IMAGE OVERLAY
   ========================================= */
.blog-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.55) 0%, transparent 55%);
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-image::after { opacity: 0.85; }

/* =========================================
   EXAM CARD HOVER
   ========================================= */
.exam-card:hover {
  border-top-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(26, 110, 216, 0.2), var(--shadow);
}

/* =========================================
   NAV ENTRANCE (page load)
   ========================================= */
.navbar {
  animation: navSlideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* =========================================
   STAT NUMBER POP
   ========================================= */
.stat-number.pop { animation: countPop 0.5s ease both; }

/* =========================================
   REDUCE MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
