/* =========================================================
   EN VIVO — panel de transmisión (solo aparece cuando hay una activa)
   Va debajo del menú, con estilo de televisión deportiva: miniatura de
   YouTube, etiqueta EN VIVO, título y un botón grande. Sin reproducción
   automática: el botón abre YouTube. Animaciones suaves y solo con
   transform/opacidad; se apagan con "reducir movimiento".
   ========================================================= */
.envivo {
  position: relative; margin-top: var(--header-h); isolation: isolate; overflow: hidden;
  background: linear-gradient(100deg, #240004 0%, #0a0a0a 60%);
  border-bottom: 3px solid var(--red);
  animation: envivoEntra .55s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes envivoEntra { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
/* Franjas diagonales muy sutiles */
.envivo::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(227, 6, 19, .055) 26px 52px);
}
/* Resplandor rojo que respira despacio */
.envivo::after {
  content: ""; position: absolute; z-index: -1; left: -12%; top: -50%; width: 62%; height: 200%;
  background: radial-gradient(closest-side, rgba(227, 6, 19, .38), transparent);
  animation: resplandor 7s ease-in-out infinite alternate;
}
@keyframes resplandor { from { opacity: .55; transform: translateX(0); } to { opacity: 1; transform: translateX(8%); } }

.envivo__inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;
  gap: clamp(1.25rem, 4vw, 3.25rem); padding-block: clamp(1.25rem, 3.2vw, 2.5rem);
}

/* ----- Miniatura ----- */
.envivo__media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; color: var(--white);
  box-shadow: 0 0 0 2px var(--red), 0 18px 48px rgba(227, 6, 19, .28);
  text-decoration: none;
}
.envivo__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.envivo__media::after { /* degradado para que lean la etiqueta y el play */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, .55), transparent 55%), linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 35%);
}
.envivo__sinfoto { /* sin miniatura: marca de la web */
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 12vw, 6rem); color: rgba(227, 6, 19, .85);
  background: repeating-linear-gradient(-45deg, #111 0 18px, #161616 18px 36px);
}
.envivo__bug {
  position: absolute; z-index: 2; left: 0; top: 0; display: flex; align-items: center; gap: .55em;
  padding: .32em 1.5em .32em .85em; background: var(--red);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.15rem, 2.6vw, 1.7rem); letter-spacing: .1em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
.envivo__punto { width: .6em; height: .6em; border-radius: 50%; background: var(--white); animation: latido 2.4s ease-in-out infinite; }
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.envivo__play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: clamp(64px, 11vw, 96px); aspect-ratio: 1; margin: calc(clamp(64px, 11vw, 96px) / -2) 0 0 calc(clamp(64px, 11vw, 96px) / -2);
  display: grid; place-items: center; border-radius: 50%; background: var(--red); box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
  transition: transform .3s var(--ease);
}
.envivo__play::before { /* aro que se expande despacio */
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .7);
  animation: aro 3s ease-out infinite;
}
@keyframes aro { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
.envivo__play svg { width: 42%; height: 42%; margin-left: 6%; fill: var(--white); }
@media (hover: hover) {
  .envivo__media:hover img { transform: scale(1.04); }
  .envivo__media:hover .envivo__play { transform: scale(1.08); }
}

/* ----- Texto y botón ----- */
.envivo__info { display: grid; gap: .75rem; justify-items: start; }
.envivo__etiqueta {
  margin: 0; color: #ff8a90; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .14em; text-transform: uppercase;
}
.envivo__titulo { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; line-height: .98; overflow-wrap: anywhere; }
.envivo__texto { margin: 0; color: #d8d8d8; font-size: 1.05rem; max-width: 34ch; }
.envivo__boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em; margin-top: .5rem;
  min-height: 68px; padding: 0 2.4rem 0 2rem; background: var(--red); color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 2.8vw, 1.75rem); letter-spacing: .05em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  box-shadow: 0 10px 30px rgba(227, 6, 19, .35); transition: background .2s, color .2s, transform .25s var(--ease);
}
.envivo__boton svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.envivo__boton:hover, .envivo__boton:focus-visible { background: var(--white); color: var(--black); transform: translateX(4px); }
.envivo__boton:focus-visible, .envivo__media:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* ----- El resto de la página se acomoda debajo del panel ----- */
.hay-envivo .hero { padding-top: 0; min-height: min(92svh, 820px); }
.hay-envivo .pub { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

@media (max-width: 820px) {
  .envivo__inner { grid-template-columns: 1fr; gap: 1rem; padding-block: 1rem 1.5rem; }
  .envivo__boton { width: 100%; justify-content: center; min-height: 64px; clip-path: none; }
  .envivo__texto { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .envivo, .envivo::after, .envivo__punto, .envivo__play::before { animation: none; }
  .envivo__media:hover img, .envivo__boton:hover { transform: none; }
}
