/* ==========================================================================
   HERO AREAS — carrusel de 5 paneles temáticos por área, sin fotografías.
   Cada panel tiene su propio fondo dinámico (CSS puro, salvo Tecnología
   que usa un <canvas> con red de partículas). Cada panel es clickeable
   y lleva directo a WhatsApp con un mensaje distinto según el área.
   Independiente de hero-kenburns.css/js — no se cargan ambos a la vez.
   ========================================================================== */

.hero-areas {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: #0b1120;
}

.hero-area-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease;
  z-index: 1;
}

.hero-area-panel.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-area-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-area-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 0 24px;
}

.hero-area-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .3s ease;
}

.hero-area-panel.active .hero-area-link:hover { transform: scale(1.02); }

.hero-area-eyebrow {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
}

.hero-area-title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 600;
  color: #fff;
  max-width: 640px;
  line-height: 1.25;
}

.hero-area-desc {
  font-size: .95rem;
  color: rgba(255,255,255,.78);
  max-width: 480px;
}

.hero-area-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  color: #0b1120;
  background: #fff;
}

.hero-area-cta i { font-size: 1.05rem; }

/* ── Controles y navegación (comparten estilo con el resto del sitio) ── */
.hero-area-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.55);
  color: #f9fafb;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  transition: background .2s;
}
.hero-area-control:hover { background: rgba(15, 23, 42, 0.85); }
.hero-area-control.prev { left: 14px; }
.hero-area-control.next { right: 14px; }

.hero-area-tabs {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 6;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90%;
}

.hero-area-tab {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(255,255,255,.85);
  font-size: .74rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.hero-area-tab.active {
  background: #fff;
  color: #0b1120;
  border-color: #fff;
}

@media (max-width: 768px) {
  .hero-areas { height: 480px; }
  .hero-area-control { width: 36px; height: 36px; font-size: 1.25rem; }
  .hero-area-tabs { bottom: 12px; gap: .35rem; }
  .hero-area-tab { font-size: .68rem; padding: 5px 10px; }
}

/* ==========================================================================
   ÁREA 1 — SALUD / FARMACIA — cruces y cápsulas flotando, línea de pulso
   ========================================================================== */
.hero-area-bg--salud { background: linear-gradient(150deg, #062421, #0b1120 75%); }

.hero-area-bg--salud .hs-cross {
  position: absolute;
  background: rgba(29, 158, 117, .28);
  border-radius: 3px;
  animation: hsFloat 8s ease-in-out infinite;
}
.hero-area-bg--salud .hs-cross::before,
.hero-area-bg--salud .hs-cross::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 3px;
}
.hero-area-bg--salud .hs-cross { width: 46px; height: 14px; }
.hero-area-bg--salud .hs-cross::before { width: 14px; height: 46px; left: 16px; top: -16px; }

.hero-area-bg--salud .hs-pill {
  position: absolute;
  width: 60px; height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(93, 202, 165, .4);
  animation: hsFloat 10s ease-in-out infinite;
}

@keyframes hsFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .6; }
  50% { transform: translateY(-22px) rotate(8deg); opacity: 1; }
}

.hero-area-bg--salud .hs-pulse {
  position: absolute;
  bottom: 22%;
  left: 0;
  width: 100%;
  height: 60px;
  opacity: .45;
}

/* ==========================================================================
   ÁREA 2 — ESTÉTICA Y BELLEZA — chispas doradas y blobs suaves
   ========================================================================== */
.hero-area-bg--belleza { background: linear-gradient(150deg, #2b0f1a, #0b1120 78%); }

.hero-area-bg--belleza .hb-blob {
  position: absolute;
  border-radius: 42% 58% 55% 45% / 45% 42% 58% 55%;
  opacity: .3;
  animation: hbFloat 12s ease-in-out infinite;
}

@keyframes hbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(18px) scale(1.06); }
}

.hero-area-bg--belleza .hb-spark {
  position: absolute;
  width: 5px; height: 5px;
  background: #f5c16c;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(245, 193, 108, .8);
  animation: hbTwinkle 2.4s ease-in-out infinite;
}

@keyframes hbTwinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ==========================================================================
   ÁREA 3 — CRIMINALÍSTICA — tono dark, reflector, huellas, cinta amarilla
   ========================================================================== */
.hero-area-bg--crimen { background: radial-gradient(circle at 50% 40%, #1a0505, #050505 75%); }

.hero-area-bg--crimen .hc-spotlight {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 40%, rgba(220, 38, 38, .18), transparent 55%);
  animation: hcSweep 9s ease-in-out infinite;
}

@keyframes hcSweep {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 30%; }
}

.hero-area-bg--crimen .hc-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 1px,
    transparent 1px, transparent 3px
  );
}

.hero-area-bg--crimen .hc-ring {
  position: absolute;
  border: 1px solid rgba(220, 38, 38, .35);
  border-radius: 50%;
  animation: hcPulseRing 5s ease-in-out infinite;
}

@keyframes hcPulseRing {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.15); opacity: .15; }
}

.hero-area-bg--crimen .hc-tape {
  position: absolute;
  top: 0; left: -10%;
  width: 130%;
  height: 26px;
  background: repeating-linear-gradient(
    -45deg, #ffcc00, #ffcc00 16px, #111 16px, #111 32px
  );
  opacity: .85;
  transform: rotate(-3deg) translateY(-10px);
}

/* ==========================================================================
   ÁREA 4 — ADMINISTRACIÓN — grid tipo Excel + fórmulas flotando
   ========================================================================== */
.hero-area-bg--admin { background: linear-gradient(150deg, #0d1f14, #0b1120 78%); }

.hero-area-bg--admin .ha-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 153, 34, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 153, 34, .16) 1px, transparent 1px);
  background-size: 44px 32px;
  opacity: .5;
}

.hero-area-bg--admin .ha-tag {
  position: absolute;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(151, 196, 89, .55);
  font-family: 'Courier New', monospace;
  animation: haDrift 11s linear infinite;
}

@keyframes haDrift {
  0% { transform: translateY(20px); opacity: 0; }
  10% { opacity: .8; }
  90% { opacity: .8; }
  100% { transform: translateY(-260px); opacity: 0; }
}

/* ==========================================================================
   ÁREA 5 — PUBLICIDAD Y TECNOLOGÍA — red de partículas animada (canvas)
   ========================================================================== */
.hero-area-bg--tech { background: linear-gradient(150deg, #020617, #0b1120 80%); }

.hero-area-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero-area-bg--salud .hs-cross,
  .hero-area-bg--salud .hs-pill,
  .hero-area-bg--belleza .hb-blob,
  .hero-area-bg--belleza .hb-spark,
  .hero-area-bg--crimen .hc-spotlight,
  .hero-area-bg--crimen .hc-ring,
  .hero-area-bg--admin .ha-tag {
    animation: none !important;
  }
  .hero-area-panel { transition: none; }
}
