/* ==========================================================================
   Hero Eclipse Glassmorphic Stylesheet
   Theme: Pure Black (#000000) & Neon Lime/Olive (#6BA001)
   Performance: Hardware-accelerated, zero-overhead CSS
   ========================================================================== */

:root {
  --hero-accent: #6BA001;
  --hero-accent-rgb: 107, 160, 1;
  --hero-glow-soft: rgba(107, 160, 1, 0.25);
  --hero-glow-strong: rgba(107, 160, 1, 0.65);
  --hero-glass-bg: rgba(12, 14, 18, 0.55);
  --hero-glass-border: rgba(107, 160, 1, 0.22);
}

/* 1. Contenedor Maestro */
#inicio.eclipse-hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 85vh;
  background: #000000 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 90px;
  box-sizing: border-box;
}

#inicio.eclipse-hero-wrapper:before,
#inicio.eclipse-hero-wrapper:after {
  display: none !important;
  content: none !important;
}

/* 2. Fondo Multimedia Dinámico Detrás del Hero (Video WebM o GIF) */
.hero-bg-media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1; /* Detrás de la tarjeta de contenido (.eclipse-glass-card z-index: 10) */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.hero-bg-media-element {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  min-height: 100%;
  max-width: none;
  /* 3 veces más grande en PC, justificado y anclado desde la parte superior centrado */
  transform-origin: top center;
  transform: translateX(-50%) scale(2.7) translateZ(0);
  object-fit: cover;
  object-position: top center;
  opacity: 0.45;
  /* Eliminados mix-blend-mode y drop-shadow para liberar por completo la GPU y evitar sobrecalentamiento */
}

/* Desvanecido: nítido arriba y a partir de la última línea horizontal (80%) se degrada hacia negro puro */
.hero-bg-media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    transparent 15%,
    transparent 78%,
    rgba(0, 0, 0, 0.6) 83%,
    rgba(0, 0, 0, 0.9) 90%,
    #000000 98%,
    #000000 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* 3. Canvas de Partículas */
canvas#particleCanvasHero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* 3. Spotlights Conicos Suaves */
.eclipse-spotlight {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0 auto;
  height: 100%;
  width: 100%;
  overflow: hidden;
  z-index: 0;
}

.eclipse-spotlight > div {
  border-radius: 0 0 50% 50%;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  top: 0;
  width: 32em;
  height: 90vh;
  background-image: conic-gradient(
    from 0deg at 50% -5%,
    transparent 45%,
    rgba(107, 160, 1, 0.2) 49%,
    rgba(107, 160, 1, 0.45) 50%,
    rgba(107, 160, 1, 0.2) 51%,
    transparent 55%
  );
  transform-origin: 50% 0;
  filter: blur(20px) opacity(0.5);
  animation: none;
  transform: translateZ(0);
}

.eclipse-spotlight > div:nth-child(1) {
  transform: rotate(16deg) translateZ(0);
  animation: none;
}

.eclipse-spotlight > div:nth-child(2) {
  transform: rotate(-16deg) translateZ(0);
  animation: none;
}

@keyframes spotlightCycle {
  0%, 100% {
    transform: rotateZ(0deg) scale(1) translateZ(0);
    opacity: 0.5;
  }
  35% {
    transform: rotateZ(-2deg) scale(1.1) translateZ(0);
    opacity: 0.65;
  }
  75% {
    transform: rotateZ(2deg) scale(1.15) translateZ(0);
    opacity: 0.55;
  }
}

/* En dispositivos táctiles y móviles/tablets (iPad, iPhone): detener la animación continua y sustituir por resplandor estático */
@media (max-width: 991px), (pointer: coarse) {
  .eclipse-spotlight > div {
    animation: none !important;
    filter: blur(16px) opacity(0.4) !important;
    will-change: auto !important;
  }
  .eclipse-spotlight > div:nth-child(1) {
    transform: rotate(12deg) translateZ(0) !important;
    animation: none !important;
  }
  .eclipse-spotlight > div:nth-child(2) {
    transform: rotate(-12deg) translateZ(0) !important;
    animation: none !important;
  }
}

/* 4. Líneas de Acento y Puntos Brillantes */
.eclipse-accent-lines {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.eclipse-accent-lines > div:nth-child(1) > div {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--hero-glow-soft) 50%, transparent 95%);
}

.eclipse-accent-lines > div:nth-child(1) > div:nth-child(1) { top: 16%; }
.eclipse-accent-lines > div:nth-child(1) > div:nth-child(2) { top: 36%; }
.eclipse-accent-lines > div:nth-child(1) > div:nth-child(3) { top: 58%; }
.eclipse-accent-lines > div:nth-child(1) > div:nth-child(4) { top: 80%; }

.eclipse-accent-lines > div:nth-child(2) > div {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--hero-glow-soft) 30%, var(--hero-glow-soft) 70%, transparent 100%);
}

.eclipse-accent-lines > div:nth-child(2) > div:nth-child(1) { left: 16%; }
.eclipse-accent-lines > div:nth-child(2) > div:nth-child(2) { left: 32%; }
.eclipse-accent-lines > div:nth-child(2) > div:nth-child(3) { right: 32%; }
.eclipse-accent-lines > div:nth-child(2) > div:nth-child(4) { right: 16%; }

.eclipse-accent-lines > div:nth-child(1) > div::before,
.eclipse-accent-lines > div:nth-child(1) > div::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hero-accent);
  box-shadow: 0 0 10px 2px var(--hero-accent), 0 0 20px 4px var(--hero-glow-strong);
  top: -2px;
}
.eclipse-accent-lines > div:nth-child(1) > div::before { left: 32%; }
.eclipse-accent-lines > div:nth-child(1) > div::after { right: 32%; }

/* 5. Contenedor Glassmorphism Central (Optimizado a Cero Coste de GPU) */
.eclipse-glass-card {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 92%;
  margin: 0 auto;
  padding: 45px 35px 35px 35px;
  border-radius: 28px;
  background: rgba(12, 14, 18, 0.93);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: translateZ(0);
  border: 1px solid var(--hero-glass-border);
  border-top: 1px solid rgba(107, 160, 1, 0.45);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(107, 160, 1, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(107, 160, 1, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.eclipse-glass-card:hover {
  border-color: rgba(107, 160, 1, 0.4);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(107, 160, 1, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* 6. Animación de Aparición Escalonada de Abajo hacia Arriba */
.hero-anim-up {
  opacity: 0;
  transform: translateY(35px);
  animation: heroFadeSlideUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.hero-anim-delay-1 { animation-delay: 0.1s; }
.hero-anim-delay-2 { animation-delay: 0.25s; }
.hero-anim-delay-3 { animation-delay: 0.4s; }
.hero-anim-delay-4 { animation-delay: 0.55s; }
.hero-anim-delay-5 { animation-delay: 0.7s; }

@keyframes heroFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(35px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 7. Subtítulo / Badge */
.eclipse-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: rgba(107, 160, 1, 0.09);
  border: 1px solid rgba(107, 160, 1, 0.3);
  margin-bottom: 22px;
  box-shadow: inset 0 0 12px rgba(107, 160, 1, 0.1);
}

.eclipse-badge span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hero-accent);
  text-shadow: 0 0 10px rgba(107, 160, 1, 0.5);
}

/* 8. Título Principal */
.eclipse-title {
  font-family: 'Hubot-Sans', sans-serif, -apple-system;
  font-size: clamp(2.2rem, 5.2vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 18px 0;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 30%, #e6ffd6 70%, var(--hero-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px rgba(107, 160, 1, 0.35);
  letter-spacing: -0.03em;
}

/* 9. Descripción */
.eclipse-desc {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 30px auto;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* 10. Botón de Acción con Glow */
.eclipse-btn-holder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

button.eclipse-contact-btn,
a.eclipse-contact-btn {
  position: relative;
  padding: 14px 42px;
  cursor: pointer;
  border-radius: 9999px;
  border: 1px solid rgba(107, 160, 1, 0.45);
  background: rgba(8, 10, 12, 0.85);
  transition: all 0.35s ease;
  box-shadow: 0 0 25px rgba(107, 160, 1, 0.3), inset 0 0 15px rgba(107, 160, 1, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

button.eclipse-contact-btn:hover,
a.eclipse-contact-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--hero-accent);
  box-shadow: 0 0 40px rgba(107, 160, 1, 0.7), inset 0 0 20px rgba(107, 160, 1, 0.35);
  text-decoration: none !important;
}

.eclipse-btn-content {
  background: linear-gradient(180deg, #ffffff 0%, #b8ff33 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Hubot-Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 11. Stores e Iconos NFC */
.eclipse-stores {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.eclipse-stores li a i {
  font-size: 1.5rem;
  color: var(--hero-accent);
  opacity: 0.85;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(107, 160, 1, 0.5));
}

.eclipse-stores li a:hover i {
  opacity: 1;
  transform: translateY(-2px);
  color: #9aff00;
  filter: drop-shadow(0 0 14px rgba(107, 160, 1, 0.9));
}

/* 12. Desvanecido y Separación Inferior con Fusión hacia la siguiente sección */
.eclipse-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 40%, #000000 100%);
  pointer-events: none;
  z-index: 5;
}

/* Línea sutil de acento y resplandor para separar claramente el Hero de la siguiente sección */
.eclipse-bottom-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(107, 160, 1, 0.45) 50%, transparent 95%);
  box-shadow: 0 0 16px rgba(107, 160, 1, 0.5);
}

/* Separación holgada y degradado superior en la sección de counters para que no estén pegados */
section.bg-gray:not(#testimonios) {
  position: relative !important;
  padding-top: 85px !important;
  padding-bottom: 50px !important;
  background: linear-gradient(180deg, #000000 0%, #0b0d10 25%, #181b22 55%, #f6f6f6 100%) !important;
}

/* Sombra y elevación elegante a las tarjetas de los contadores */
section.bg-gray:not(#testimonios) .count .item {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section.bg-gray .count .item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.14) !important;
}

/* 13. Responsive Breakpoints */
@media (max-width: 1024px), (pointer: coarse) {
  #inicio.eclipse-hero-wrapper {
    padding-top: 105px;
    padding-bottom: 40px;
    min-height: auto;
  }

  /* Fondo multimedia en tablets y iPad Pro: acelerado por GPU, nítido y sin filtros pesados */
  .hero-bg-media-element {
    height: 100% !important;
    width: auto !important;
    min-height: 100% !important;
    max-width: none !important;
    top: 0 !important;
    transform-origin: top center !important;
    transform: translateX(-50%) scale(1.4) translateZ(0) !important;
    will-change: transform;
    opacity: 0.42 !important;
    object-fit: contain !important;
    object-position: top center !important;
    filter: none !important;
    -webkit-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  .eclipse-glass-card {
    padding: 35px 22px 25px 22px;
    border-radius: 22px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(12, 14, 18, 0.92) !important;
  }

  .eclipse-accent-lines > div:nth-child(2) > div:nth-child(1),
  .eclipse-accent-lines > div:nth-child(2) > div:nth-child(4) {
    display: none;
  }

  section.bg-gray:not(#testimonios) {
    padding-top: 60px !important;
    padding-bottom: 35px !important;
  }
}

@media (max-width: 576px) {
  /* En móviles: ajustado al 85% de su proporción centrado para verse completo y perfectamente proporcionado */
  .hero-bg-media-element {
    height: auto !important;
    width: 85% !important;
    max-width: 380px !important;
    min-height: auto !important;
    top: 50% !important;
    left: 50% !important;
    transform-origin: center center !important;
    transform: translate(-50%, -50%) scale(0.85) translateZ(0) !important;
    will-change: transform;
    opacity: 0.40 !important;
    object-fit: contain !important;
    object-position: center center !important;
    filter: none !important;
    -webkit-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  .hero-bg-media-overlay {
    background: radial-gradient(
      circle at 50% 50%,
      transparent 20%,
      rgba(0, 0, 0, 0.45) 65%,
      #000000 95%
    ) !important;
  }

  .eclipse-glass-card {
    padding: 30px 18px 20px 18px;
    border-radius: 18px;
  }
  .eclipse-badge {
    padding: 5px 14px;
    margin-bottom: 18px;
  }
  .eclipse-badge span {
    font-size: 0.75rem;
  }
  .eclipse-desc {
    font-size: 0.95rem;
  }
  button.eclipse-contact-btn,
  a.eclipse-contact-btn {
    padding: 12px 32px;
  }
  .eclipse-btn-content {
    font-size: 1.05rem;
  }
}
