.carrusel {
  position: relative;
  width: 100%;
  height: 90vh;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  padding: 4rem;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.slide.activo {
  opacity: 1;
  z-index: 1;
}

.contenido {
  position: relative;
  max-width: 600px;
  z-index: 2;
}

.contenido h1 {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.contenido p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn {
  background-color: #f9c72f;
  color: #111;
  font-weight: bold;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #fff;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s;
}

.nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.95) 0%,    /* casi negro a la izquierda */
    rgba(0, 0, 0, 0.85) 25%,   /* muy oscuro al principio */
    rgba(0, 0, 0, 0.65) 45%,   /* se va aclarando */
    rgba(0, 0, 0, 0.35) 65%,   /* más translúcido hacia el centro */
    transparent 100%           /* completamente visible al final */
  );
  z-index: 1;
  transition: opacity 0.8s ease-in-out;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #111;
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}



/* === SECCIONES ON DEMAND === */
.on-demand-section {
  margin: 60px 40px;
  position: relative;
}

.on-demand-section h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 18px;
  border-left: 4px solid #f2c300;
  padding-left: 10px;
}

/* === CONTENEDOR DEL SLIDER === */
.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* === SLIDER HORIZONTAL === */
.slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.slider::-webkit-scrollbar {
  display: none;
}

.item {
  min-width: 200px;   /* más angosto */
  max-width: 220px;
  height: 340px;      /* más alto */
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* llena el espacio sin deformarse */
  object-position: center;
  border-radius: 10px;
}

/* === TEXTO ABAJO DE CADA MINIATURA === */
.item p {
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  margin: 8px 0 14px;
}

/* === EFECTO HOVER === */
.item:hover {
  transform: scale(1.04);
  box-shadow: 0 0 18px rgba(242, 195, 0, 0.6);
  cursor: pointer;
}

/* === FLECHAS ESTÉTICAS === */
.arrow {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #f2c300;
  font-size: 1.6rem;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 3;
}

.arrow:hover {
  background: rgba(242, 195, 0, 0.9);
  color: #111;
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px rgba(242, 195, 0, 0.7);
}

/* Posiciones */
.arrow.left {
  left: 10px;
}
.arrow.right {
  right: 10px;
}

.on-demand-section .item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-width: 180px;
  height: 300px;
  flex: 0 0 auto;
}

.on-demand-section .item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fuerza a llenar el rectángulo */
  transition: transform 0.4s ease;
}

.on-demand-section .item:hover img {
  transform: scale(1.05);
}

/* Degradado y texto */
.on-demand-section .item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  transition: opacity 0.3s ease;
}

.on-demand-section .item p {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  z-index: 2;
  transition: transform 0.3s ease;
}

.on-demand-section .item:hover p {
  transform: translateY(-4px);
}


.detalle-header {
  text-align: center;
  margin-top: 40px;
}

.detalle-imagen {
  width: 80%;
  max-width: 600px;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.detalle-header h1 {
  margin-top: 20px;
  font-size: 2rem;
  color: #f2c300;
}

.botones-compartir {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-share {
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: all 0.3s;
}

.facebook { background-color: #3b5998; }
.whatsapp { background-color: #25D366; }
.telegram { background-color: #0088cc; }
.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }

.btn-share:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.episodios {
  text-align: center;
  margin: 40px auto;
}

.episodio-item {
  display: inline-block;
  text-align: center;
  margin: 20px;
}

.episodio-item img {
  width: 280px;
  border-radius: 14px;
  transition: transform 0.3s;
}

.episodio-item img:hover {
  transform: scale(1.05);
}

.regresar {
  text-align: center;
  margin: 40px 0;
}

.btn-regresar {
  text-decoration: none;
  background: #f2c300;
  color: #111;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-regresar:hover {
  background: white;
  color: black;
}

.episodios {
      text-align: center;
      padding: 40px 0;
    }

    .episodio-item img {
      width: 250px;
      border-radius: 10px;
      cursor: pointer;
      transition: transform 0.3s ease;
    }

    .episodio-item img:hover {
      transform: scale(1.05);
    }

    /* Overlay oscuro */
    .video-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0,0,0,0.9);
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    /* Contenedor del video (para meter el botón dentro) */
    .video-container {
      position: relative;
      width: 90%;
      max-width: 900px;
    }

    .video-container video {
      width: 100%;
      border-radius: 12px;
      outline: none;
      display: block;
    }

    /* Botón cerrar (afuera) */
    .cerrar-video {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 35px;
      color: #fff;
      cursor: pointer;
      font-weight: bold;
      z-index: 10000;
    }

    .cerrar-video:hover {
      color: red;
    }

    /* Botón de omitir (ahora dentro del video) */
    .boton-omitir {
      display: none;
      position: absolute;
      bottom: 20px;
      right: 20px;
      padding: 8px 16px;
      background-color: rgba(0,0,0,0.6);
      color: #fff;
      border: 1px solid #ccc;
      border-radius: 5px;
      cursor: pointer;
      font-weight: bold;
      font-size: 14px;
      transition: all 0.3s ease;
      z-index: 10;
    }

    .boton-omitir:hover {
      background-color: rgba(255,255,255,0.3);
    }









/* FOOTER */
.footer {
  position: relative;
  color: #ddd;
  background: #000;
  padding: 36px 0 24px;
  margin-top: 40px;
}
.footer::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, #f7e755, #ecdb48);
  opacity:.7;
}
.footer-inner{
  width: min(1200px, 92%);
  margin: 0 auto;
}
.footer-columns{
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.footer-col h3{
  color: #fff;
  font-size: 22px;
  margin: 8px 0 12px;
}
.footer-col ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li{
  margin: 8px 0;
}
.footer-col a{
  color: #cfd2d6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
  font-size: 14px;
}
.footer-col a:hover{
  color: #ffcc00;
  border-color: rgba(255,204,0,.4);
}
.footer-col.social{
  margin-left: auto;
}

.social-list {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 6px 0 0;
  margin: 0;
  justify-content: flex-end;
}

.social-list a {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  text-decoration: none;
  transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}

.social-list a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
  border-color: #ffcc00;
}

.social-list svg {
  width: 20px; height: 20px;
  fill: #fff;
}

/* Línea legal */
.footer-legal {
  text-align: center;
  font-size: 13px;
  color: #b9bdc2;
  margin-top: 32px;
}

.footer-legal a {
  color: #cfd2d6;
  text-decoration: underline;
}

.footer-legal a:hover {
  color: #ffcc00;
}

.footer-legal .sep {
  margin: 0 10px;
  opacity: .6;
}

/* Responsivo */
@media (max-width: 768px) {
  .footer-columns {
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
  }

  .footer-col.social {
    margin-left: 0;
    justify-content: flex-start;
  }

  .social-list {
    justify-content: flex-start;
  }
}


/* ================================
   📱 RESPONSIVIDAD GENERAL
   ================================ */

/* Teléfonos (máximo 768px) */
@media (max-width: 768px) {

  /* === CARRUSEL === */
  .carrusel {
    height: 55vh;
  }

  .slide {
    padding: 1.5rem;
    justify-content: center;
    text-align: center;
  }

  .contenido h1 {
    font-size: 2rem;
  }

  .contenido p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .nav-btn {
    font-size: 1.4rem;
    padding: 0.4rem 0.7rem;
  }

  /* === HEADER === */
  header {
    flex-direction: column;
    padding: 12px;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li {
    margin: 5px 0;
  }

  /* === ON DEMAND === */
  .on-demand-section {
    margin: 40px 10px;
  }

  .slider {
    gap: 10px;
  }

  .item {
    min-width: 140px;
    height: 220px;
  }

  .item p {
    font-size: 0.8rem;
  }

  /* Flechas del slider */
  .arrow {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  /* === DETALLE === */
  .detalle-imagen {
    width: 95%;
    max-width: 450px;
  }

  .detalle-header h1 {
    font-size: 1.6rem;
  }

  .botones-compartir {
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn-share {
    font-size: 0.9rem;
    padding: 8px 14px;
  }

  /* === EPISODIOS === */
  .episodio-item img {
    width: 180px;
  }

  /* === VIDEO OVERLAY === */
  .video-container {
    width: 95%;
  }

  .boton-omitir {
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    padding: 6px 12px;
  }

  .cerrar-video {
    font-size: 30px;
    top: 10px;
    right: 20px;
  }

  /* === FOOTER === */
  .footer {
    padding: 40px 0 25px;
    text-align: left;
  }

  .footer-columns {
    gap: 30px;
  }

  .social-list {
    justify-content: flex-start;
  }
}


/* Extra pequeño (máximo 480px) */
@media (max-width: 480px) {

  .contenido h1 {
    font-size: 1.5rem;
  }

  .contenido p {
    font-size: 0.9rem;
  }

  .item {
    min-width: 120px;
    height: 180px;
  }

  .episodio-item img {
    width: 150px;
  }

  .detalle-header h1 {
    font-size: 1.3rem;
  }

  .btn-share {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
}


/* Ocultar botón en PC */
.menu-toggle {
  display: none;
}

/* Móvil */
@media (max-width: 768px) {

  /* Botón hamburguesa */
  .menu-toggle {
    display: block;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-top: 10px;
  }

  /* Ocultar menú por defecto */
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 12px;
    margin-top: 15px;
    padding-bottom: 15px;
  }

  /* Mostrar menú cuando activado */
  nav ul.activo {
    display: flex;
  }

  /* Espaciado para que no se sature */
  nav ul li a,
  nav ul li span {
    font-size: 1.2rem;
    padding: 10px 0;
  }
}


/* Panel lateral completo */
.menu-lateral {
  position: fixed;
  top: 0;
  left: -100%;   /* OCULTO FUERA DE LA PANTALLA */
  width: 80%;
  height: 100vh;
  background-color: #111;
  padding: 30px 20px;
  transition: left 0.35s ease;
  z-index: 99999;
}

/* Cuando está activo */
.menu-lateral.activo {
  left: 0;    /* APARECE DESLIZANDO */
}

/* Botón cerrar estilo SIPSE */
.btn-cerrar {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
}

.menu-lateral ul {
  list-style: none;
  margin-top: 80px;
  padding: 0;
}

.menu-lateral ul li {
  margin: 18px 0;
}

.menu-lateral ul li a {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}

/* =========================================
   VARIABLES NECESARIAS PARA EL HEADER
   ========================================= */
:root {
    --header-height: 70px;
    --header-bg: #000000; /* Fondo negro sólido para evitar transparencias raras */
    --header-text: #eaeaea;
    --header-accent: #ffcc00;
}

/* =========================================
   ESTILOS DE LA BARRA DE NAVEGACIÓN
   ========================================= */

/* Contenedor del Header */
body > header {
    background: var(--header-bg);
    display: flex;
    justify-content: space-between; /* CLAVE: Separa los elementos a los extremos */
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    
    /* CORRECCIONES PARA ALINEACIÓN */
    width: 100%;            /* Asegura que ocupe toda la pantalla */
    box-sizing: border-box; /* Evita que el padding rompa el ancho */
}

/* Logo */
body > header .logo { 
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
    display: block; /* Asegura que el logo ocupe espacio */
}
body > header .logo:hover { 
    transform: scale(1.05); 
}

/* Botón de Hamburguesa (Desktop: Oculto) */
.header-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

/* =========================================
   NAVEGACIÓN DE ESCRITORIO (PC)
   ========================================= */
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li { margin: 0 10px; position: relative; }

.main-nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    display: block;
}

.main-nav ul li a:hover { 
    color: var(--header-accent); 
    background-color: rgba(255, 204, 0, 0.1);
}

/* ===========================
   HEADER (MÓVIL - RESPONSIVO)
   =========================== */
@media (max-width: 992px) {
    
    .header-toggle {
        display: block;
        z-index: 1002;
        margin-left: auto; /* Empuja a la derecha */
        margin-top: 0;     
        margin-bottom: 0;

        transform: translateY(-30px); 
    }


   

    /* 2. Ocultar la navegación de escritorio y preparar la móvil */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: #1E1E1E;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        z-index: 1001;
        padding-top: var(--header-height);
        
        /* Animación */
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%); /* Oculto a la derecha */
    }

    /* Clase activa para mostrar menú */
    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }

    .main-nav li {
        margin: 10px 0;
        width: 100%;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}