/* ===== ANIMACIONES Y EFECTOS MODERNOS ===== */

/* Animaciones de entrada al hacer scroll - Más suaves */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Animación fade-in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animación slide-in desde abajo */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación slide-in desde la izquierda */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animación slide-in desde la derecha */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animación de escala */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animación de rotación suave */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Animación de partículas flotantes */
@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(90deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-40px) translateX(-10px) rotate(180deg);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-20px) translateX(5px) rotate(270deg);
    opacity: 0.6;
  }
}

/* Animación de pulso para elementos importantes */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247, 165, 74, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(247, 165, 74, 0);
  }
}

/* Animación de brillo deslizante */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Efecto de brillo en hover */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::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;
}

.shimmer-effect:hover::before {
  left: 100%;
}

/* Animación de gradiente animado */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Efecto de ondas */
@keyframes wave {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  33% {
    transform: translateX(30px) translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateX(-20px) translateY(20px) rotate(240deg);
  }
  100% {
    transform: translateX(0) translateY(0) rotate(360deg);
  }
}

/* Animación de entrada para modales */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal {
  animation: modalFadeIn 0.3s ease-out;
}

/* Animación de entrada para imágenes */
.image-zoom-in {
  transition: transform 0.5s ease;
}

.image-zoom-in:hover {
  transform: scale(1.1);
}

/* Efecto de parallax */
.parallax {
  will-change: transform;
}

/* Cursor personalizado elegante - Reemplaza la "manita" */
.custom-cursor {
  width: 24px;
  height: 24px;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease;
  display: none;
  transform: translate(-50%, -50%);
}

/* Círculo exterior con borde elegante */
.custom-cursor::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 2.5px solid var(--secondary-color);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 165, 74, 0.15) 0%, rgba(247, 165, 74, 0.05) 100%);
  box-shadow: 
    0 0 18px rgba(247, 165, 74, 0.7),
    0 0 30px rgba(247, 165, 74, 0.4),
    inset 0 0 12px rgba(247, 165, 74, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Punto central brillante */
.custom-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: var(--secondary-color);
  border-radius: 50%;
  box-shadow: 
    0 0 12px var(--secondary-color),
    0 0 20px rgba(247, 165, 74, 0.9),
    0 0 30px rgba(247, 165, 74, 0.6);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efecto hover - se expande y brilla (reemplaza la "manita") */
.custom-cursor.cursor-hover {
  width: 55px;
  height: 55px;
}

.custom-cursor.cursor-hover::before {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(247, 165, 74, 0.25) 0%, rgba(247, 165, 74, 0.1) 100%);
  border-width: 2.5px;
  box-shadow: 
    0 0 28px rgba(247, 165, 74, 1),
    0 0 45px rgba(247, 165, 74, 0.7),
    0 0 65px rgba(247, 165, 74, 0.4),
    inset 0 0 18px rgba(247, 165, 74, 0.3);
  animation: cursor-pulse 1.5s ease-in-out infinite;
}

.custom-cursor.cursor-hover::after {
  width: 12px;
  height: 12px;
  box-shadow: 
    0 0 18px var(--secondary-color),
    0 0 30px rgba(247, 165, 74, 1),
    0 0 45px rgba(247, 165, 74, 0.8);
}

@keyframes cursor-pulse {
  0%, 100% {
    box-shadow: 
      0 0 28px rgba(247, 165, 74, 1),
      0 0 45px rgba(247, 165, 74, 0.7),
      0 0 65px rgba(247, 165, 74, 0.4),
      inset 0 0 18px rgba(247, 165, 74, 0.3);
  }
  50% {
    box-shadow: 
      0 0 38px rgba(247, 165, 74, 1),
      0 0 60px rgba(247, 165, 74, 0.9),
      0 0 85px rgba(247, 165, 74, 0.6),
      inset 0 0 25px rgba(247, 165, 74, 0.4);
  }
}

/* Efecto click - se contrae */
.custom-cursor.cursor-click {
  width: 15px;
  height: 15px;
}

.custom-cursor.cursor-click::before {
  width: 100%;
  height: 100%;
  background: rgba(247, 165, 74, 0.3);
  box-shadow: 0 0 30px rgba(247, 165, 74, 1),
              0 0 50px rgba(247, 165, 74, 0.8),
              inset 0 0 12px rgba(247, 165, 74, 0.4);
}

.custom-cursor.cursor-click::after {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 20px var(--secondary-color),
              0 0 30px rgba(247, 165, 74, 1);
}

/* Efecto especial para botones - círculo expandido con brillo */
.custom-cursor.cursor-button {
  width: 60px;
  height: 60px;
}

.custom-cursor.cursor-button::before {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(247, 165, 74, 0.3) 0%, rgba(247, 165, 74, 0.15) 100%);
  border-width: 3px;
  box-shadow: 
    0 0 32px rgba(247, 165, 74, 1),
    0 0 55px rgba(247, 165, 74, 0.8),
    0 0 80px rgba(247, 165, 74, 0.5),
    inset 0 0 22px rgba(247, 165, 74, 0.35);
  animation: button-glow-pulse 1.2s ease-in-out infinite;
}

.custom-cursor.cursor-button::after {
  width: 14px;
  height: 14px;
  box-shadow: 
    0 0 22px var(--secondary-color),
    0 0 38px rgba(247, 165, 74, 1),
    0 0 55px rgba(247, 165, 74, 0.9);
}

/* Anillo de expansión para botones */
.custom-cursor.cursor-button {
  background-image: 
    radial-gradient(circle, transparent 0%, rgba(247, 165, 74, 0.35) 40%, transparent 70%);
  background-size: 60px 60px;
  background-position: center;
  background-repeat: no-repeat;
  animation: button-ring-expand 2s ease-out infinite;
}

@keyframes button-glow-pulse {
  0%, 100% {
    box-shadow: 
      0 0 32px rgba(247, 165, 74, 1),
      0 0 55px rgba(247, 165, 74, 0.8),
      0 0 80px rgba(247, 165, 74, 0.5),
      inset 0 0 22px rgba(247, 165, 74, 0.35);
  }
  50% {
    box-shadow: 
      0 0 42px rgba(247, 165, 74, 1),
      0 0 70px rgba(247, 165, 74, 0.9),
      0 0 100px rgba(247, 165, 74, 0.6),
      inset 0 0 28px rgba(247, 165, 74, 0.45);
  }
}

@keyframes button-ring-expand {
  0% {
    background-size: 45px 45px;
    opacity: 0.9;
  }
  100% {
    background-size: 95px 95px;
    opacity: 0;
  }
}

/* Efecto especial para campos de texto - forma de lápiz/pluma */
.custom-cursor.cursor-text {
  width: 30px;
  height: 30px;
}

.custom-cursor.cursor-text::before {
  width: 0;
  height: 0;
  border: none;
  background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(247, 165, 74, 0.8) 100%);
  width: 4px;
  height: 20px;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 15px rgba(247, 165, 74, 0.8),
              2px 2px 8px rgba(0, 0, 0, 0.4);
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 50% 100%, 0% 85%);
}

.custom-cursor.cursor-text::after {
  width: 0;
  height: 0;
  border: none;
  background: var(--secondary-color);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -8px;
  left: -4px;
  box-shadow: 0 0 12px var(--secondary-color);
  transform: translate(-50%, -50%);
}

/* Cursor personalizado para tema claro */
body.theme-light .custom-cursor::before {
  border-color: var(--secondary-color);
  background: rgba(201, 169, 97, 0.1);
  box-shadow: 0 0 15px rgba(201, 169, 97, 0.6),
              inset 0 0 10px rgba(201, 169, 97, 0.2);
}

body.theme-light .custom-cursor::after {
  background: var(--secondary-color);
  box-shadow: 0 0 10px var(--secondary-color),
              0 0 15px rgba(201, 169, 97, 0.8);
}

body.theme-light .custom-cursor.cursor-hover::before {
  background: rgba(201, 169, 97, 0.2);
  box-shadow: 0 0 25px rgba(201, 169, 97, 0.9),
              0 0 40px rgba(201, 169, 97, 0.6),
              inset 0 0 15px rgba(201, 169, 97, 0.3);
}

body.theme-light .custom-cursor.cursor-hover::after {
  box-shadow: 0 0 15px var(--secondary-color),
              0 0 25px rgba(201, 169, 97, 1);
}

body.theme-light .custom-cursor.cursor-button::before {
  background: var(--secondary-color);
  box-shadow: 0 0 25px rgba(201, 169, 97, 1),
              0 0 45px rgba(201, 169, 97, 0.7),
              inset 0 0 15px rgba(107, 91, 61, 0.3);
  filter: drop-shadow(0 0 15px var(--secondary-color));
}

body.theme-light .custom-cursor.cursor-button::after {
  background: radial-gradient(circle, rgba(201, 169, 97, 0.4) 0%, transparent 70%);
  box-shadow: 0 0 30px rgba(201, 169, 97, 0.6),
              0 0 50px rgba(201, 169, 97, 0.3);
}

body.theme-light .custom-cursor.cursor-text::before {
  background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(201, 169, 97, 0.8) 100%);
  box-shadow: 0 0 15px rgba(201, 169, 97, 0.8),
              2px 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-light .custom-cursor.cursor-text::after {
  background: var(--secondary-color);
  box-shadow: 0 0 12px var(--secondary-color);
}

/* Mostrar cursor personalizado solo en desktop */
@media (min-width: 769px) {
  .custom-cursor {
    display: block;
  }
}

/* En móviles, restaurar cursor normal */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  
  button, a, [onclick], .btn, .prev, .next {
    cursor: pointer;
  }
}

/* Animación de carga suave */
@keyframes skeleton {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  background-size: 200px 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

/* Efecto de hover 3D - Removido para evitar movimiento excesivo */

/* Animación de texto que aparece letra por letra */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Efecto de neón suave - Removido para evitar movimiento excesivo */

/* Animación de rebote suave - Removida para evitar movimiento excesivo */

/* Efecto de glassmorphism mejorado */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Animación de entrada escalonada para listas */
.stagger-animation {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s ease forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }

/* Efecto de hover con elevación - Más suave */
.elevate-on-hover {
  transition: all 0.3s ease;
}

.elevate-on-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Animación de rotación continua (para iconos) */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  animation: spin 3s linear infinite;
}

/* Efecto de desvanecimiento al hacer scroll */
.fade-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-on-scroll.visible {
  opacity: 1;
}

/* Animación de carga con puntos */
@keyframes loadingDots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

.loading::after {
  content: '...';
  animation: loadingDots 1.5s steps(4, end) infinite;
}

