/* ===============================================
   INDUS CUP 2K26 - ANIMATIONS STYLESHEET
   Keyframes, Transitions & Interactive Effects
   =============================================== */

/* ===============================================
   KEYFRAME ANIMATIONS
   =============================================== */

/* Clean animations matching official poster design */

/* Title reveal animation */
@keyframes brush-stroke {
  0% {
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes text-glow {
  0%, 100% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 164, 27, 0.5);
  }
}

/* Button glow animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 164, 27, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 164, 27, 0.8), 0 0 40px rgba(255, 164, 27, 0.4);
  }
}

/* Prize counter animation */
@keyframes counter-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes prize-badge-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* QR code hover animation */
@keyframes qr-glow {
  0%, 100% {
    box-shadow: var(--shadow-md);
  }
  50% {
    box-shadow: var(--shadow-glow), 0 0 40px rgba(255, 164, 27, 0.3);
  }
}

/* Fade in animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  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 fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scale animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Rotation animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Bounce animations */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide animations */
@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* ===============================================
   HERO SECTION ANIMATIONS
   =============================================== */

.hero__title-main {
  animation: brush-stroke 1.2s ease-out 0.3s both;
  opacity: 1; /* Fallback visibility */
}

.hero__title-year {
  animation: fadeInUp 0.8s ease-out 0.8s both, text-glow 4s ease-in-out 1.5s infinite;
  opacity: 1; /* Fallback visibility */
}

.hero__subtitle {
  animation: fadeInUp 0.8s ease-out 1.2s both;
  opacity: 1; /* Fallback visibility */
}

.hero__dates {
  animation: fadeInUp 0.8s ease-out 1.6s both;
  opacity: 1; /* Fallback visibility */
}

.hero__cta {
  animation: fadeInUp 0.8s ease-out 2s both;
  opacity: 1; /* Fallback visibility */
}



/* ===============================================
   SCROLL-TRIGGERED ANIMATIONS
   =============================================== */

/* Base state for scroll animations - FIXED: Start visible, enhance with animation */
.animate-on-scroll {
  opacity: 1;
  transform: translateY(0px);
  transition: all 0.6s ease-out;
}

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

/* Different animation types - FIXED: Default to visible state */
.animate-fade-up {
  opacity: 1;
  transform: translateY(0px);
  transition: all 0.6s ease-out;
}

.animate-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-left {
  opacity: 1;
  transform: translateX(0px);
  transition: all 0.6s ease-out;
}

.animate-fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-fade-right {
  opacity: 1;
  transform: translateX(0px);
  transition: all 0.6s ease-out;
}

.animate-fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 1;
  transform: scale(1);
  transition: all 0.6s ease-out;
}

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

/* ===============================================
   NAVIGATION ANIMATIONS
   =============================================== */

.nav__link {
  position: relative;
  overflow: visible;
}

.nav__link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

.nav__link:hover::before {
  width: 100%;
}

/* Mobile menu item animations */
.nav__list--mobile .nav__item {
  animation: slideInFromTop 0.3s ease-out;
}

.nav__list--mobile .nav__item:nth-child(1) {
  animation-delay: 0.1s;
}

.nav__list--mobile .nav__item:nth-child(2) {
  animation-delay: 0.2s;
}

.nav__list--mobile .nav__item:nth-child(3) {
  animation-delay: 0.3s;
}

.nav__list--mobile .nav__item:nth-child(4) {
  animation-delay: 0.4s;
}

.nav__list--mobile .nav__item:nth-child(5) {
  animation-delay: 0.5s;
}

.nav__list--mobile .nav__item:nth-child(6) {
  animation-delay: 0.6s;
}

/* ===============================================
   SPORTS CARD ANIMATIONS
   =============================================== */

.sport__card {
  transition: all var(--transition-base);
}

.sport__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-accent);
  opacity: 0;
  z-index: -1;
  border-radius: var(--radius-xl);
  transition: opacity var(--transition-base);
}

.sport__card:hover::before {
  opacity: 0.1;
}

.sport__icon {
  transition: all var(--transition-base);
}

.sport__card:hover .sport__icon {
  transform: scale(1.2) rotateY(180deg);
}

/* Staggered animation for sports grid */
.sport__card:nth-child(1) {
  animation-delay: 0.1s;
}

.sport__card:nth-child(2) {
  animation-delay: 0.2s;
}

.sport__card:nth-child(3) {
  animation-delay: 0.3s;
}

.sport__card:nth-child(4) {
  animation-delay: 0.4s;
}

.sport__card:nth-child(5) {
  animation-delay: 0.5s;
}

.sport__card:nth-child(6) {
  animation-delay: 0.6s;
}

.sport__card:nth-child(7) {
  animation-delay: 0.7s;
}

.sport__card:nth-child(8) {
  animation-delay: 0.8s;
}

/* ===============================================
   PRIZE SECTION ANIMATIONS
   =============================================== */

.prizes__value {
  animation: counter-pulse 2s ease-in-out infinite;
}

.prize__badge {
  position: relative;
  animation: prize-badge-rotate 20s linear infinite;
}

.prize__badge::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: var(--radius-full);
  background: conic-gradient(var(--accent-start), var(--accent-end), var(--secondary-color), var(--accent-start));
  z-index: -1;
  animation: spin 3s linear infinite;
}

/* ===============================================
   QR CODE ANIMATIONS
   =============================================== */

.qr__container:hover {
  animation: qr-glow 1.5s ease-in-out infinite;
}

/* ===============================================
   TIMELINE ANIMATIONS
   =============================================== */

.timeline__item {
  opacity: 1;
  transform: translateX(0px);
  transition: all 0.6s ease-out;
}

.timeline__item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline__item:nth-child(1) {
  transition-delay: 0.1s;
}

.timeline__item:nth-child(2) {
  transition-delay: 0.3s;
}

.timeline__item:nth-child(3) {
  transition-delay: 0.5s;
}

.timeline__date {
  transition: all var(--transition-base);
}

.timeline__item:hover .timeline__date {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ===============================================
   GALLERY ANIMATIONS
   =============================================== */

.gallery__item {
  overflow: hidden;
}

.gallery__item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 164, 27, 0.2);
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%);
  transition: all 0.5s ease-out;
  z-index: 2;
}

.gallery__item:hover::before {
  width: 200%;
  height: 200%;
}

/* ===============================================
   CONTACT FORM ANIMATIONS
   =============================================== */

.form__input,
.form__textarea,
.form__select {
  transition: all var(--transition-base);
  position: relative;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(27, 59, 115, 0.1);
}

/* Coordinator card animations */
.coordinator__card {
  transition: all var(--transition-base);
}

.coordinator__card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-base);
}

.coordinator__card:hover::after {
  opacity: 0.05;
}

.coordinator__card:hover .coordinator__name {
  color: var(--primary-color);
}

/* ===============================================
   SCROLL INDICATOR
   =============================================== */

.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gray-200);
  z-index: var(--z-fixed);
}

.scroll-indicator__bar {
  height: 100%;
  background: var(--gradient-accent);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ===============================================
   LOADING ANIMATIONS
   =============================================== */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* ===============================================
   BUTTON HOVER EFFECTS
   =============================================== */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* ===============================================
   SECTION DIVIDERS
   =============================================== */

.section-divider {
  position: relative;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transform: skewX(-45deg);
  animation: slide-divider 3s ease-in-out infinite;
}

@keyframes slide-divider {
  0%, 100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

/* ===============================================
   FALLBACK FOR VISIBILITY ISSUES
   =============================================== */

/* Ensure all content is visible by default - JavaScript enhancement */
.sports__grid > *,
.prizes__grid > *,
.gallery__grid > *,
.timeline > *,
.form > *,
.coordinators__grid > * {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ===============================================
   RESPONSIVE ANIMATIONS
   =============================================== */

/* Reduce animations on mobile for performance */
@media screen and (max-width: 768px) {
  .prize__badge::before {
    animation: none;
  }
  
  .prizes__value {
    animation-duration: 3s;
  }
  
  /* Ensure mobile content visibility */
  * {
    opacity: 1 !important;
  }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* No floating elements to disable */
  
  .scroll-top,
  .sport__card,
  .gallery__item,
  .coordinator__card {
    transition: none;
  }
}

/* ===============================================
   INTERACTIVE STATES
   =============================================== */

/* Focus states for keyboard navigation */
.btn:focus-visible,
.nav__link:focus-visible,
.form__input:focus-visible,
.form__textarea:focus-visible,
.form__select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Active states */
.btn:active {
  transform: scale(0.98);
}

.sport__card:active {
  transform: scale(0.95);
}

/* Selection color */
::selection {
  background: var(--accent-start);
  color: var(--white);
}

::-moz-selection {
  background: var(--accent-start);
  color: var(--white);
}

/* ===============================================
   HERO BANNER DECORATIVE ANIMATIONS
   =============================================== */

/* Floating rotation for circles */
@keyframes float-rotate {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
  }
  50% {
    transform: translateY(0) rotate(180deg);
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
  }
}

/* Pulse animation for triangles */
@keyframes float-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-15px) scale(1.1);
    opacity: 0.25;
  }
}

/* Line sliding animation */
@keyframes line-slide {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.15;
  }
  50% {
    transform: translateX(30px);
    opacity: 0.3;
  }
}

/* Bouncing icons */
@keyframes bounce-icon {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Swinging animation for medal */
@keyframes swing {
  0%, 100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

/* Flickering fire effect */
@keyframes flicker {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1);
  }
  25% {
    opacity: 0.25;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.05);
  }
  75% {
    opacity: 0.3;
    transform: scale(0.98);
  }
}
