/* ============================================================
   MGC GROUP — Animation Library
   animation.css
   ============================================================ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(.9); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes bounceIn {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.12); }
  80%  { transform: scale(.96); }
  100% { transform: scale(1); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes pulse-ring {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(232,0,29,.4); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 14px rgba(232,0,29,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(232,0,29,0); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Animation Utility Classes ── */
.anim-fade-up    { animation: fadeInUp    .8s ease both; }
.anim-fade-left  { animation: fadeInLeft  .8s ease both; }
.anim-fade-right { animation: fadeInRight .8s ease both; }
.anim-fade-in    { animation: fadeIn      .8s ease both; }
.anim-zoom-in    { animation: zoomIn      .8s ease both; }
.anim-float      { animation: float       4s ease-in-out infinite; }
.anim-rotate-in  { animation: rotateIn    .8s ease both; }
.anim-bounce-in  { animation: bounceIn    .8s cubic-bezier(.4,0,.2,1) both; }
.anim-pulse-ring { animation: pulse-ring  2s infinite; }

/* Delay utilities */
.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
.delay-400 { animation-delay: .4s; }
.delay-500 { animation-delay: .5s; }
.delay-600 { animation-delay: .6s; }
.delay-700 { animation-delay: .7s; }
.delay-800 { animation-delay: .8s; }
.delay-900 { animation-delay: .9s; }
.delay-1000{ animation-delay: 1.0s; }

/* ── Hero Specific Animations ── */
.hero-badge    { animation: fadeInDown  .7s ease .4s both; }
.hero-heading  { animation: fadeInUp    .8s ease .6s both; }
.hero-sub      { animation: fadeInUp    .8s ease .8s both; }
.hero-btns     { animation: fadeInUp    .8s ease 1.0s both; }
.hero-stats    { animation: fadeInUp    .8s ease 1.2s both; }
.hero-scroll   { animation: fadeIn      1s ease 2s both; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Parallax Background ── */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  .parallax-bg { background-attachment: scroll; }
}

/* ── Card Hover Lift ── */
.hover-lift {
  transition: transform .3s ease, box-shadow .3s ease;
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

/* ── Image Zoom on Hover ── */
.img-zoom-wrap { overflow: hidden; border-radius: inherit; }
.img-zoom-wrap img {
  transition: transform .5s ease;
  width: 100%;
}
.img-zoom-wrap:hover img { transform: scale(1.07); }

/* ── Shimmer Loading Skeleton ── */
.shimmer {
  background: linear-gradient(90deg, var(--border) 25%, #F0F2F8 50%, var(--border) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animated Gradient Background ── */
.animated-gradient {
  background: linear-gradient(-45deg, var(--primary-dark), var(--primary), var(--accent-dark), var(--accent));
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

/* ── Number Counter ── */
.counter-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Scroll Progress ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--primary-light));
  z-index: 99999;
  width: 0%;
  transition: width .1s linear;
}

/* ── Ticker / Announcement Bar ── */
.ticker-wrap {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  color: var(--white);
  /* padding: 10px 0; */
  overflow: hidden;
  position: relative;
  z-index: 99;
}
.ticker-inner {
  display: flex;
  gap: 60px;
  animation: ticker 25s linear infinite;
  width: max-content;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-item {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticker-dot {
  width: 5px; height: 5px;
  background: rgba(255,255,255,.6);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Page Transition ── */
.page-transition {
  animation: fadeInUp .6s ease;
}

/* ── Glow Effects ── */
.glow-primary {
  box-shadow: 0 0 30px rgba(0,53,128,.3);
}
.glow-accent {
  box-shadow: 0 0 30px rgba(232,0,29,.3);
}

/* ── Stat Animated Numbers ── */
.stat-card-animated .stat-number {
  transition: none;
}

/* ── Icon Spin on Hover ── */
.icon-spin-hover:hover i {
  animation: rotateSpin .5s ease;
}
@keyframes rotateSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Morphing border ── */
@keyframes morphBorder {
  0%,100% { border-radius: var(--radius-md); }
  50%      { border-radius: var(--radius-xl); }
}
.morph-border-anim { animation: morphBorder 4s ease-in-out infinite; }

/* ── Partner logo hover color ── */
.partner-logo-colored:hover {
  filter: saturate(1.5) brightness(1.05);
}

/* ── Wavy Separator ── */
.wave-separator {
  width: 100%;
  height: 60px;
  background: inherit;
}
.wave-separator svg { display: block; }

/* ── Staggered Grid Animation ── */
.stagger-grid > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s ease, transform .5s ease;
}
.stagger-grid.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(2) { transition-delay: .1s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(3) { transition-delay: .2s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(4) { transition-delay: .3s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(5) { transition-delay: .4s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(6) { transition-delay: .5s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(7) { transition-delay: .6s;   opacity: 1; transform: none; }
.stagger-grid.visible > *:nth-child(8) { transition-delay: .7s;   opacity: 1; transform: none; }

/* ── Highlight underline animation ── */
.highlight-link {
  position: relative;
  display: inline;
}
.highlight-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}
.highlight-link:hover::after { width: 100%; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-bg-img { background-attachment: scroll; }
}
