/**
 * SDC MUJ - Animations
 * Hero earth, scroll reveals, hovers
 */

/* ===== HERO GLOBE ANIMATION ===== */
.hero-globe img {
  animation: floatEarth 8s ease-in-out infinite;
}

/* ===== HERO EARTH ANIMATIONS (legacy) ===== */
.hero-header .hero-earth {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(50vw, 480px);
  height: auto;
  opacity: 0.4;
  animation: floatEarth 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero-earth-floating {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(40vw, 450px);
  height: auto;
  opacity: 0.3;
  animation: floatEarth 10s ease-in-out infinite 1s;
  pointer-events: none;
}

@keyframes floatEarth {

  0%,
  100% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }

  25% {
    transform: translateY(-55%) translateX(-10px) rotate(2deg);
  }

  50% {
    transform: translateY(-50%) translateX(5px) rotate(-1deg);
  }

  75% {
    transform: translateY(-45%) translateX(-5px) rotate(1deg);
  }
}

@keyframes slowRotate {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.hero-earth-rotate {
  animation: slowRotate 60s linear infinite;
}

/* Hero content fade-in on load */
.hero-content {
  animation: heroFadeIn 1s ease-out forwards;
}

.hero-logo {
  animation: heroFadeIn 0.8s ease-out 0.2s both;
}

.hero-header h1 {
  animation: heroFadeInUp 0.9s ease-out 0.3s both;
}

.hero-header .subtitle {
  animation: heroFadeInUp 0.9s ease-out 0.45s both;
}

.hero-header .btn {
  animation: heroFadeInUp 0.9s ease-out 0.6s both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SCROLL REVEAL (applied via JS) ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

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

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

/* Stagger children */
.stagger-children>* {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.visible>*:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-children.visible>*:nth-child(2) {
  transition-delay: 0.15s;
}

.stagger-children.visible>*:nth-child(3) {
  transition-delay: 0.2s;
}

.stagger-children.visible>*:nth-child(4) {
  transition-delay: 0.25s;
}

.stagger-children.visible>*:nth-child(5) {
  transition-delay: 0.3s;
}

.stagger-children.visible>*:nth-child(6) {
  transition-delay: 0.35s;
}

.stagger-children.visible>*:nth-child(7) {
  transition-delay: 0.4s;
}

.stagger-children.visible>*:nth-child(8) {
  transition-delay: 0.45s;
}

.stagger-children.visible>*:nth-child(9) {
  transition-delay: 0.5s;
}

.stagger-children.visible>*:nth-child(10) {
  transition-delay: 0.55s;
}

.stagger-children.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ENHANCED HOVER ANIMATIONS ===== */
.nav-links a {
  transition: color 0.2s, transform 0.2s;
}

.nav-links a:hover {
  transform: translateY(-2px);
}

.btn {
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.expertise-card {
  transition: box-shadow 0.3s, transform 0.3s;
}

.expertise-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.2);
}

.founder-card {
  transition: transform 0.3s;
}

.founder-card:hover {
  transform: scale(1.03);
}

.founder-card img {
  transition: transform 0.3s, box-shadow 0.3s;
}

.founder-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.gallery-grid img {
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.faq-list li {
  transition: transform 0.2s, background 0.2s;
}

.faq-list li:hover {
  transform: translateX(8px);
  background: #e2e8f0;
}

.contact-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
}

/* SDG wheel subtle animation */
.sdg-wheel {
  transition: transform 0.5s ease;
}

.sdg-wheel:hover {
  transform: rotate(15deg) scale(1.05);
}

/* Portfolio section fade */
.portfolio-hero .section-title,
.portfolio-hero .section-subtitle,
.portfolio-hero p,
.portfolio-hero .sdg-wheel,
.portfolio-hero .btn {
  animation: heroFadeInUp 0.8s ease-out both;
}

.portfolio-hero .section-title {
  animation-delay: 0.1s;
}

.portfolio-hero .section-subtitle {
  animation-delay: 0.2s;
}

.portfolio-hero p {
  animation-delay: 0.3s;
}

.portfolio-hero .sdg-wheel {
  animation-delay: 0.4s;
}

.portfolio-hero .text-center .btn {
  animation-delay: 0.5s;
}