/* ===========================
   ANIMACIONES PREMIUM
   =========================== */

/* Shiny Text */
.shiny-text {
  background: linear-gradient(90deg, #6c4027, #ec6426, #6c4027);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Wobble Card */
.wobble-card {
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.wobble-card:hover {
  box-shadow: 0 20px 40px rgba(108, 64, 39, 0.2);
}

/* Castina Mascot */
.castina-mascot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 100;
  animation: float 3s ease-in-out infinite;
}

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

/* Fade animations */
[data-animate="fadeIn"] {
  opacity: 0;
}

[data-animate="slideUp"] {
  opacity: 0;
  transform: translateY(30px);
}

[data-animate="slideDown"] {
  opacity: 0;
  transform: translateY(-30px);
}

[data-animate="slideLeft"] {
  opacity: 0;
  transform: translateX(-50px);
}

[data-animate="slideRight"] {
  opacity: 0;
  transform: translateX(50px);
}

[data-animate="zoomIn"] {
  opacity: 0;
  transform: scale(0.8);
}

/* Hover scale effect */
[data-hover-scale] {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Button animations */
button,
.btn,
a[class*="btn"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button::before,
.btn::before,
a[class*="btn"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

button:active::before,
.btn:active::before,
a[class*="btn"]:active::before {
  width: 300px;
  height: 300px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Transiciones suaves de página */
@media (prefers-reduced-motion: no-preference) {
  * {
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  a {
    transition: color 0.2s ease;
  }
}

/* Para pantallas pequeñas */
@media (max-width: 768px) {
  .castina-mascot {
    width: 60px;
    height: 60px;
    bottom: 10px;
    right: 10px;
  }

  [data-animate] {
    animation-duration: 0.4s !important;
  }
}

/* Accesibilidad: respetar reduce-motion.
   Anula animaciones decorativas (castina-idle, pulse, fade-anim, mapa…),
   transiciones largas y el smooth-scroll para usuarios que lo piden. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Asegurar que el contenido revelado por scroll quede visible sin animar */
  .fade-anim,
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}
