/* Additional animations for the high school website */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate__fadeInDown {
  animation: fadeInDown 1s;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 1s;
}

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

/* Hover Animations */
.program-card:hover .program-icon,
.info-box:hover .icon {
  animation: pulse 1s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Card tilt effect */
.faculty-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.faculty-card:hover {
  transition: transform 0.5s ease;
}

/* Subtle icon rotation on hover */
.info-item i:hover,
.achievement-content li:hover:before {
  animation: rotateIcon 0.5s ease;
}

@keyframes rotateIcon {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(10deg);
  }
  75% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Button animation */
.btn-get-started:hover,
.btn-visit:hover,
.btn-cta:hover,
.btn-submit:hover,
.btn-primary-outline:hover {
  animation: buttonPulse 0.5s ease;
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(12, 46, 138, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(12, 46, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(12, 46, 138, 0);
  }
}

/* Loading animation for forms */
.btn-submit.loading {
  position: relative;
  color: transparent;
}

.btn-submit.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Page load animation */
.page-load {
  animation: fadeInPage 0.8s ease-in-out;
}

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

/* Smooth scroll highlighting */
.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-color);
  animation: expandWidth 0.3s ease-in-out;
}

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

/* Accessibility considerations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}