/* =============================================
   MEJORAS DE PÁGINA DE INICIO
   ============================================= */

/* ------------ OCULTAR SCROLLBAR ------------ */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
html::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* ------------ APARICIÓN ESCALONADA IMÁGENES HERO ------------ */
@keyframes cellFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.wave-cell.cell-enter {
  opacity: 0;
  animation: cellFadeIn 0.5s ease-out forwards;
}

.wave-cell.cell-enter.wave-delay-0 { animation-delay: 0s; }
.wave-cell.cell-enter.wave-delay-1 { animation-delay: 0.12s; }
.wave-cell.cell-enter.wave-delay-2 { animation-delay: 0.24s; }
.wave-cell.cell-enter.wave-delay-3 { animation-delay: 0.36s; }
.wave-cell.cell-enter.wave-delay-4 { animation-delay: 0.48s; }

/* ------------ PARALLAX HERO ------------ */
.hero {
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background: transparent;
  z-index: -1;
  transform: translateY(var(--parallax-offset, 0));
  transition: transform 0.1s ease-out;
}

/* ------------ ANIMACIONES DE ENTRADA ------------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.hero-animate .hero_content {
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-animate .floating-badge {
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-animate .tittle_page {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-animate .text_page {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.hero-animate #boton_hero {
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

/* ------------ BOTÓN FLOTANTE NARANJA CON ROTACIÓN ------------ */
.floating-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
  animation: floatBadge 3s ease-in-out infinite;
  cursor: default;
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  white-space: nowrap;
}

.floating-badge.badge-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.floating-badge.badge-hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  filter: blur(4px);
}

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

/* ------------ EFECTO TYPING ------------ */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: #ff6b00;
  margin-left: 5px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ------------ EFECTO RIPPLE EN BOTONES ------------ */
.ripple-button {
  position: relative;
  overflow: hidden;
}

.ripple-button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ------------ INDICADOR DE PROGRESO SCROLL ------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #ff6b00, #ff8c00, #AE0000);
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* ------------ BOTÓN WHATSAPP FLOTANTE ------------ */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s ease;
  animation: pulseWhatsapp 2s infinite;
}

.whatsapp-float.shifted {
  bottom: 90px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

@keyframes pulseWhatsapp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* ------------ SCROLL TO TOP BUTTON ------------ */
.scroll-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

.scroll-top-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* ------------ MODAL COOKIES ------------ */
.cookie-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 20px 30px;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-modal.show {
  transform: translateY(0);
}

.cookie-modal-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-modal p {
  margin: 0;
  color: #333;
  font-size: 14px;
  flex: 1;
  min-width: 300px;
}

.cookie-modal a {
  color: #ff6b00;
  text-decoration: underline;
}

.cookie-modal-buttons {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cookie-btn.accept {
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  color: white;
}

.cookie-btn.accept:hover {
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
  transform: translateY(-2px);
}

.cookie-btn.reject {
  background: #f0f0f0;
  color: #666;
}

.cookie-btn.reject:hover {
  background: #e0e0e0;
}

/* ------------ TOGGLE MODO OSCURO ------------ */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 997;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.theme-toggle.dark {
  background: #333;
}

.theme-toggle.dark svg {
  fill: #ffd700;
}

/* ------------ MODO OSCURO ESTILOS ------------ */
body.dark-mode {
  background-color: #1a1a1a;
}

body.dark-mode .hero {
  background-color: #1a1a1a;
}

body.dark-mode .hero_left {
  background-color: #1a1a1a;
}

body.dark-mode .tittle_page {
  color: #ffffff;
}

body.dark-mode .text_page {
  color: #cccccc;
}

body.dark-mode .cookie-modal {
  background: #2a2a2a;
}

body.dark-mode .cookie-modal p {
  color: #e0e0e0;
}

body.dark-mode .cookie-btn.reject {
  background: #444;
  color: #ccc;
}

body.dark-mode .theme-toggle {
  background: #333;
}

/* ------------ RESPONSIVE ------------ */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 15px;
    width: 55px;
    height: 55px;
  }

  .whatsapp-float.shifted {
    bottom: 80px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 15px;
    width: 45px;
    height: 45px;
  }

  .theme-toggle {
    top: 90px;
    right: 15px;
    width: 45px;
    height: 45px;
  }

  .cookie-modal {
    padding: 15px 20px;
  }

  .cookie-modal-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-modal p {
    min-width: auto;
  }

  .floating-badge {
    font-size: 12px;
    padding: 6px 15px;
  }
}
