/* ==========================================================================
   PANOSOCOSSIO — inicio.css
   Hero con monitor y ECG animado, franja de capacidades, módulos.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--tinta);
  color: var(--blanco);
  padding: calc(var(--alto-header) + 90px) 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--linea);
}

.hero__halo-1 { top: -140px; left: -100px; }
.hero__halo-2 { bottom: -180px; right: -60px; }

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  color: var(--blanco);
  font-size: clamp(2.8rem, 6.4vw, 4.6rem);
  margin-bottom: 24px;
}

/* Línea de tecleo tipo terminal */
.hero__tecleo {
  font-family: var(--fuente-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--verde-claro);
  margin-bottom: 26px;
  min-height: 1.8em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__prefijo {
  color: rgba(255, 255, 255, 0.35);
}

.hero__cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--verde-claro);
  animation: parpadear 1s steps(2) infinite;
}

@keyframes parpadear {
  50% { opacity: 0; }
}

.hero__descripcion {
  color: var(--texto-oscuro-suave);
  font-size: 1.06rem;
  max-width: 520px;
  margin-bottom: 38px;
}

.hero__botones {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Panel monitor ---------- */
.monitor {
  background: rgba(16, 49, 74, 0.55);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.monitor__barra {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--linea);
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.monitor__punto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde-claro);
  box-shadow: 0 0 10px var(--verde-claro);
  animation: latir 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.monitor__titulo {
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
}

.monitor__estado {
  color: var(--verde-claro);
}

/* ---------- ECG animado ---------- */
.ecg {
  padding: 8px 0;
  background: rgba(8, 24, 36, 0.6);
}

.ecg svg {
  width: 100%;
  height: 130px;
  display: block;
}

/* El trazo se "dibuja" en bucle, como un monitor real */
.ecg__trazo {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  filter: drop-shadow(0 0 6px rgba(69, 196, 111, 0.8));
  animation: dibujar-ecg 3.2s linear infinite;
}

@keyframes dibujar-ecg {
  0%   { stroke-dashoffset: 900; }
  70%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -900; }
}

/* ---------- Lecturas ---------- */
.monitor__lecturas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--linea);
}

.lectura {
  padding: 22px 18px;
  text-align: center;
}

.lectura + .lectura {
  border-left: 1px solid var(--linea);
}

.lectura__valor {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--verde-claro);
  line-height: 1;
  margin-bottom: 6px;
}

.lectura__nombre {
  font-family: var(--fuente-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Franja de capacidades ---------- */
.franja {
  background: var(--azul);
  color: var(--blanco);
}

.franja__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.franja__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px;
  font-family: var(--fuente-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.franja__item:first-child {
  padding-left: 0;
}

.franja__item:last-child {
  border-right: none;
}

.franja__num {
  color: var(--verde-claro);
  font-size: 0.78rem;
}

/* ---------- Servicios (módulos) ---------- */
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gris-borde);
  border: 1px solid var(--gris-borde);
}

.modulo {
  position: relative;
  display: block;
  background: var(--blanco);
  padding: 44px 40px 56px;
  transition: var(--transicion);
  overflow: hidden;
}

/* Barra verde que crece desde la izquierda al pasar el mouse */
.modulo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--verde);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.modulo:hover {
  background: var(--nieve);
}

.modulo:hover::before {
  transform: scaleY(1);
}

.modulo__indice {
  display: block;
  font-family: var(--fuente-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--verde);
  margin-bottom: 20px;
}

.modulo h3 {
  font-size: 1.28rem;
  margin-bottom: 14px;
  max-width: 420px;
}

.modulo p {
  font-size: 0.95rem;
  max-width: 440px;
}

.modulo__flecha {
  position: absolute;
  right: 40px;
  bottom: 40px;
  font-size: 1.3rem;
  color: var(--verde);
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transicion);
}

.modulo:hover .modulo__flecha {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Quiénes somos ---------- */
.quienes {
  background: var(--nieve);
}

.quienes__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 70px;
  align-items: center;
}

.quienes__texto p {
  margin-bottom: 30px;
}

.quienes__tarjetas {
  display: grid;
  gap: 18px;
}

.tarjeta-datos {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-left: 3px solid var(--verde);
  border-radius: var(--radio);
  padding: 30px 32px;
  transition: var(--transicion);
}

.tarjeta-datos:hover {
  box-shadow: var(--sombra);
  transform: translateX(6px);
}

.tarjeta-datos__clave {
  display: block;
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 12px;
}

.tarjeta-datos p {
  font-size: 0.96rem;
}

/* ---------- Novedades ---------- */
.novedad {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  transition: var(--transicion);
}

.novedad:hover {
  box-shadow: var(--sombra);
  border-color: var(--verde);
}

.novedad__imagen {
  overflow: hidden;
}

.novedad__imagen img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.novedad:hover .novedad__imagen img {
  transform: scale(1.05);
}

.novedad__cuerpo {
  padding: 40px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.novedad__fecha {
  font-family: var(--fuente-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--verde);
  margin-bottom: 14px;
}

.novedad__cuerpo h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.novedad__cuerpo p {
  margin-bottom: 18px;
}

.novedad__enlace {
  font-family: var(--fuente-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--verde);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .franja__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .franja__item:nth-child(2) {
    border-right: none;
  }

  .franja__item:nth-child(3) {
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .servicios__grid {
    grid-template-columns: 1fr;
  }

  .quienes__grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .novedad {
    grid-template-columns: 1fr;
  }

  .novedad__imagen img {
    min-height: 200px;
  }
}

@media (max-width: 600px) {
  .franja__grid {
    grid-template-columns: 1fr;
  }

  .franja__item {
    padding-left: 0 !important;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .modulo {
    padding: 34px 26px 48px;
  }

  .modulo__flecha {
    right: 26px;
    bottom: 26px;
  }
}
