/* ═══════════════════════════════════════════
   IE TELEVISION — television.css
═══════════════════════════════════════════ */

/* ─── PAGE BASE ─── */
.tv-page {
  background: #050505;
}

/* ─── NAV LIVE INDICATOR (shared, also used in index) ─── */
.nav__live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white) !important;
}
.nav__live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulseDot 1.6s ease-in-out infinite;
}
.nav__live--active {
  color: var(--red) !important;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ─── TV HERO ─── */
.tv-hero {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 3rem;
  padding-left: clamp(1.5rem, 4vw, 3.5rem);
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--gray-3);
  position: relative;
  overflow: hidden;
}

/* Subtle bg grid */
.tv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.tv-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(200,16,46,0.35);
  padding: 0.3rem 0.9rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}
.tv-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.tv-hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 0.02em;
}
.tv-hero__title span { color: var(--red); }

.tv-hero__sub {
  font-size: 1rem;
  color: var(--gray-5);
  max-width: 420px;
  margin-top: 1.25rem;
  line-height: 1.7;
}

.tv-hero__right {
  flex-shrink: 0;
  width: 180px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-3);
  overflow: hidden;
}
.tv-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(255,255,255,0.02) 3px,
    rgba(255,255,255,0.02) 4px
  );
}
.tv-hero__right::after {
  content: '📺';
  font-size: 2.5rem;
  opacity: 0.12;
  position: relative;
  z-index: 1;
}

/* ─── MAIN ─── */
.tv-main {
  padding: 3rem 0 4rem;
}

/* ─── PLAYER WRAP ─── */
.tv-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--gray-3);
  overflow: hidden;
}

.tv-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Live badge */
.tv-badge {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-cond);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--white);
  background: var(--red);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}
.tv-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  animation: pulseDot 1.4s ease-in-out infinite;
}

/* Loader */
.tv-loader {
  position: absolute;
  inset: 0;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 20;
  transition: opacity 0.5s ease;
}
.tv-loader__spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--gray-3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.tv-loader__text {
  font-family: var(--font-cond);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-5);
}
.tv-loader__sub {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gray-3);
  letter-spacing: 0.1em;
  margin-top: -0.5rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error overlay */
.tv-error {
  position: absolute;
  inset: 0;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 20;
}
.tv-error__icon {
  font-size: 2.5rem;
  opacity: 0.5;
}
.tv-error__text {
  font-family: var(--font-cond);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-4);
}

/* Corner decorations */
.tv-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--red);
  border-style: solid;
  z-index: 5;
  opacity: 0.6;
}
.tv-corner--tl { top: 0; left: 0;   border-width: 2px 0 0 2px; }
.tv-corner--tr { top: 0; right: 0;  border-width: 2px 2px 0 0; }
.tv-corner--bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.tv-corner--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* ─── INFO BAR ─── */
.tv-infobar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-3);
  margin-top: 0;
}
.tv-infobar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-cond);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tv-infobar__channel { color: var(--red); font-weight: 500; }
.tv-infobar__sep { color: var(--gray-4); }
.tv-infobar__status { color: var(--gray-5); }
.tv-infobar__status.connected { color: #3ab86a; }

.tv-infobar__time {
  font-family: var(--font-cond);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gray-4);
}

/* ─── EN VIVO SECTION (index.html preview) ─── */
.envivo {
  padding: 8rem 0 0;
  border-top: 1px solid var(--gray-3);
}
.envivo .container { margin-bottom: 3rem; }

.envivo__inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: center;
  padding-bottom: 8rem;
}

.envivo__player-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--gray-3);
  overflow: hidden;
}

.envivo__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-cond);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--white);
  background: var(--red);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
}
.envivo__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--white);
  animation: pulseDot 1.4s ease-in-out infinite;
}

#livePlayerHome video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  position: absolute;
  inset: 0;
}

.envivo__loader {
  position: absolute;
  inset: 0;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 5;
}
.envivo__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gray-3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.envivo__loader p {
  font-family: var(--font-cond);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-5);
}

.envivo__channel {
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.envivo__title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.envivo__desc {
  font-size: 0.95rem;
  color: var(--gray-5);
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* ─── TV FOOTER ─── */
.tv-footer {
  margin-top: 4rem;
}
.tv-footer .footer__bottom {
  border-top: 1px solid var(--gray-3);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .envivo__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .tv-hero { flex-direction: column; align-items: flex-start; }
  .tv-hero__right { display: none; }
}