/* ===== ANIMACIONES CUSTOM ===== */

/* Animación de hojas cayendo en el hero */
.leaf-animation {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40">🍃</text></svg>');
  background-size: 100px 100px;
  animation: fall 20s linear infinite;
  width: 100%;
  height: 100%;
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Patrón de árbol en sección Mapamave */
.tree-pattern {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="60">🌳</text></svg>');
  background-size: 200px 200px;
  width: 100%;
  height: 100%;
}

/* Pulse animation para logo Mapamave */
.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(201, 169, 97, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(201, 169, 97, 0.8));
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Transiciones suaves en botones */
button, a {
  transition: all 0.3s ease;
}

/* Hover effect en cards de productos */
.transform:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada para el navbar */
header {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Efecto parallax suave en hero */
#inicio {
  background-attachment: fixed;
  background-size: cover;
}

/* Animación de fade para elementos al hacer hover */
.hover\:scale-105:hover {
  transform: scale(1.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow effect en botones principales */
.bg-mapamave-gold:hover {
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.6);
}

/* Animación de aparición gradual */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive: ajustes para móvil */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ===== ANIMACIONES CUSTOM ===== */

/* Animación de hojas cayendo en el hero */
.leaf-animation {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40">🍃</text></svg>');
  background-size: 100px 100px;
  animation: fall 20s linear infinite;
  width: 100%;
  height: 100%;
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Patrón de árbol en sección Mapamave */
.tree-pattern {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="60">🌳</text></svg>');
  background-size: 200px 200px;
  width: 100%;
  height: 100%;
}

/* Pulse animation para logo Mapamave */
.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(201, 169, 97, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(201, 169, 97, 0.8));
  }
}

/* ===== HERO VIDEO ANIMATIONS ===== */

/* Video overlay que se difumina GRADUALMENTE */
#videoOverlay {
  backdrop-filter: blur(0px);
  opacity: 0; /* Empieza más oscuro */
  transition: all 2s ease-out; /* IMPORTANTE: transición suave */
}

#videoOverlay.blur-active {
  backdrop-filter: blur(5px); /* Menos blur */
  opacity: 0.3; /* Más transparente para que se vea el video */
}


/* Animación de letras desde abajo */
.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  animation: letterSlideUp 0.6s ease-out forwards;
}

@keyframes letterSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delay progresivo para cada letra */
.hero-letter:nth-child(1) { animation-delay: 0.1s; }
.hero-letter:nth-child(2) { animation-delay: 0.15s; }
.hero-letter:nth-child(3) { animation-delay: 0.2s; }
.hero-letter:nth-child(4) { animation-delay: 0.25s; }
.hero-letter:nth-child(5) { animation-delay: 0.3s; }
.hero-letter:nth-child(6) { animation-delay: 0.35s; }
.hero-letter:nth-child(7) { animation-delay: 0.4s; }
.hero-letter:nth-child(8) { animation-delay: 0.45s; }
.hero-letter:nth-child(9) { animation-delay: 0.5s; }
.hero-letter:nth-child(10) { animation-delay: 0.55s; }
.hero-letter:nth-child(11) { animation-delay: 0.6s; }
.hero-letter:nth-child(12) { animation-delay: 0.65s; }
.hero-letter:nth-child(13) { animation-delay: 0.7s; }
.hero-letter:nth-child(14) { animation-delay: 0.75s; }
.hero-letter:nth-child(15) { animation-delay: 0.8s; }

/* Animación del subtítulo */
.hero-subtitle {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

/* Animación del botón */
.hero-button {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.6s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Transiciones suaves en botones */
button, a {
  transition: all 0.3s ease;
}

/* Hover effect en cards de productos */
.transform:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada para el navbar */
header {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Glow effect en botones principales */
.bg-mapamave-gold:hover {
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.6);
}

/* Responsive: ajustes para móvil */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ===== MODAL ANIMATION ===== */
.animate-modal {
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== SEGURIDAD CSS ===== */

/* Bloquear selección de texto en toda la página */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Permitir selección SOLO en inputs y textareas */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Bloquear arrastre de imágenes */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Permitir clicks en imágenes que son botones/links */
a img, button img {
  pointer-events: auto;
}

/* Ocultar cursor en imágenes */
img {
  cursor: default;
}

/* Anti-screenshot overlay sutil (dificulta capturas en algunos navegadores) */
@media print {
  body {
    display: none !important;
  }
}
