/* =========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
/* Variables de fuentes */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

/* Variables de colores principales */
:root { 
  --background-color: #ffffff;
  --default-color: #444444;
  --heading-color: #282828;
  --accent-color: #520099;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
}

/* Variantes de fondo */
.light-background {
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #060606;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #252525;
  --contrast-color: #ffffff;
}

/* =========================================
   PRELOADER
   ========================================= */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background-color: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid var(--accent-color);
  border-top-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =========================================
   ESTILOS BÁSICOS Y RESET
   ========================================= */
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

/* Control de scroll */
html.html-no-scroll {
  overflow: hidden;
}

body.body-no-scroll {
  overflow: hidden;
}

/* Estilos de enlaces */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

/* Estilos para encabezados */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* =========================================
   ESTRUCTURA DE SECCIONES
   ========================================= */
/* Secciones generales */
section, .section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  scroll-margin-top: 72px;
  overflow: hidden;
}

/* Títulos de sección con estilo mejorado */
.section-title {
  position: relative;
  background: linear-gradient(to right, rgba(82, 0, 153, 0.03), transparent);
  padding: 20px 30px 40px;
  border-radius: 15px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent-color);
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title h2:before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(82, 0, 153, 0.2);
  bottom: 10px;
  left: 0;
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 70px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: 0 0 10px rgba(82, 0, 153, 0.3);
}

.section-title p {
  margin-bottom: 0;
  color: color-mix(in srgb, var(--default-color) 90%, white 50%);
  max-width: 800px;
  position: relative;
  padding-left: 20px;
}

.section-title p:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-color), transparent);
  border-radius: 3px;
}

/* Para secciones con fondo oscuro */
.dark-background .section-title {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent);
  border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.dark-background .section-title h2:before {
  background: rgba(255, 255, 255, 0.1);
}

.dark-background .section-title h2:after {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.dark-background .section-title p:before {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
}

/* Efecto hover en los títulos de sección */
.section-title:hover h2:after,
.section-title.section-in-viewport h2:after {
  width: 100%;
  transition: width 0.5s ease;
}

/* Animación de entrada cuando la sección entra en el viewport */
@keyframes underline-grow {
  from {
    width: 70px;
  }
  to {
    width: 100%;
  }
}

.section-title.section-in-viewport h2:after {
  animation: underline-grow 0.8s ease forwards;
}

.section-title:hover h2:after {
  width: 100%;
  transition: width 0.5s ease;
}

/* En pantallas pequeñas, simplificar el diseño */
@media (max-width: 768px) {
  .section-title {
    padding: 15px 20px 40px;
  }
  
  .section-title p {
    padding-left: 15px;
  }
}

/* =========================================
   COMPONENTES GENERALES
   ========================================= */
/* Carga diferida de secciones secundarias */
[data-lazy-section] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
  min-height: 100px;
}
[data-lazy-section].lazy-section-visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s;
}

/* Botón de scroll top */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/* Iconos de redes sociales */
.icon-facebook:before { content: "\ea90"; }
.icon-twitter:before { content: "\ea96"; }
.icon-youtube:before { content: "\ea9d"; }
.icon-linkedin:before { content: "\eac9"; }

/* =========================================
   NAVEGACIÓN PRINCIPAL
   ========================================= */
nav {
  background-image: linear-gradient(90deg, #892C91 0%, #0075AD 100%);
  min-height: 40px;
  height: 115px;
  z-index: 10;
  display: flex;
  align-items: center;
  position: relative;
  width: 70%;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-top: 10px;
}

.enlace {
  position: relative;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 20px;
}

.logo {
  max-height: 120px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

nav ul {
  float: right;
  margin-right: 200px;
  display: flex;
  align-items: flex-end;
  height: 100%;
}

nav ul li {
  display: flex;
  align-items: flex-end;
  height: 100%;
  margin: 0 1vh;
  line-height: normal;
}

nav ul li a {
  color: #fff;
  font-size: min(25px, 2.2vw);
  padding: 5px 15px 30px;
  border-radius: 5px;
  font-family: arial;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón de menú hamburguesa */
.checkbtn {
  font-size: 30px;
  color: #fff;
  float: right;
  line-height: 80px;
  margin-right: 40px;
  cursor: pointer;
  display: none;
}

#check {
  display: none;
}

/* Iconos de redes sociales en la navegación */
.social-nav-container {
  margin-left: auto !important;
  height: 100%;
  display: none; /* Oculto por defecto en pantallas grandes */
  align-items: flex-end;
}

.social-nav {
  display: flex;
  gap: 8px;
  padding-bottom: 30px;
}

/* Estilos para iconos sociales de colores */
.social-nav a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  padding: 0 !important;
  font-size: 16px;
  margin: 0 5px;
}

.social-nav a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Colores específicos para cada red social */
.social-nav .bi-youtube {
  color: #FF0000;
}

.social-nav .bi-twitter-x {
  color: #1DA1F2;
}

.social-nav .bi-facebook {
  color: #4267B2;
}

.social-nav .bi-linkedin {
  color: #0A66C2;
}

.social-nav .bi-instagram {
  color: #E1306C;
}

/* =========================================
   BOTÓN EN VIVO
   ========================================= */
.en-vivo-btn {
  position: absolute;
  top: 23px;
  right: 0;
  background: linear-gradient(to right, #3DA4E6, #1D6B92);
  color: white;
  font-weight: bold;
  font-family: arial;
  font-size: 27px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 25px 50px;
  border-radius: 60px 0 0 60px;
  z-index: 9;
  text-decoration: none;
}

.en-vivo-btn .en-vivo-icon {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.en-vivo-btn .youtube-svg-icon {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.2em;
  color: #ff0000;
  animation: icon-blink 3s infinite;
}

.en-vivo-btn .en-vivo-text {
  animation: text-blink 3s infinite;
  color: #fff;
}

/* Animaciones para el botón En Vivo */
@keyframes icon-blink {
  0%, 100% {
    color: #ff0000;
  }
  50% {
    color: #fff;
  }
}

@keyframes text-blink {
  0%, 100% {
    color: #ff0000;
  }
  50% {
    color: #fff;
  }
}

.en-vivo-btn:hover {
  background: linear-gradient(to right, #2a93d5, #155a7c);
  color: white;
  text-decoration: none;
}

.en-vivo-btn:hover .youtube-svg-icon {
  color: #ff0000;
}

.en-vivo-btn:hover .en-vivo-text {
  color: #fff;
}

/* =========================================
   BARRA SOCIAL LATERAL
   ========================================= */
.social {
  position: fixed;
  left: 0;
  top: 35%;
  z-index: 100;
  transition: all 0.3s ease;
}

.social ul {
  background-color: #2188B8;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: left center;
  position: fixed;
  list-style: none;
  height: 40vh;
  width: 50px;
  border-bottom-right-radius: 20px;
  border-top-right-radius: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: flex-start;
  padding-left: 7px;
}

.social ul li {
  width: 100%;
  text-align: left;
}

.social ul li a {
  display: inline-block;
  color: white;
  font-size: clamp(16px, 3vw, 24px);
  transition: all 0.4s ease;
  text-align: center;
}

/* Efectos hover para barra social */
.social:hover {
  left: 0;
  top: 30%;
}

.social:hover ul {
  background-image: linear-gradient(to bottom, #2B2F81, #8A0554);
  height: 45vh;
  width: 50px;
}

.social ul li .icon-youtube:hover,
.social ul li .icon-twitter:hover,
.social ul li .icon-facebook:hover,
.social ul li .icon-linkedin:hover {
  transform: scale(1.3);
}

.social ul li .icon-youtube:hover {
  color: #bb0000;
}

.social ul li .icon-twitter:hover {
  color: #55acee;
}

.social ul li .icon-facebook:hover {
  color: #3b5998;
}

.social ul li .icon-linkedin:hover {
  color: #007bb5;
}

/* =========================================
   SECCIÓN HERO
   ========================================= */
.hero {
  position: relative;
  width: 100%;
  min-height: 1000px;
  height: auto;
  overflow: hidden;
}

.hero > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 500px;
  height: 100%;
  object-fit: cover;
  object-position: top;
  z-index: 1;
}

/* Overlay para el Hero */
.hero:before {
  content: "";
  background: color-mix(in srgb, var(--background-color), transparent 100%);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

/* Carrusel en Hero */
.hero .swiper {
  position: relative;
  width: 45vw; /* Ajustar el ancho del swiper*/
  max-width: 50vw;
  height: 100%;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  margin-left: auto;
  margin-right: 0;
  border-radius: 20px;
}

.hero .swiper-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
}

.hero .swiper-slide {
  width: 100%;
  height: 100%;
  display: flex;
  object-fit: contain;
}

.hero .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
}

/* =========================================
   COMPONENTES SWIPER GENERALES
   ========================================= */
/* Botones de navegación para slider */
.swiper-button-next,
.swiper-button-prev {
  top: 50%;
  color: white;
  background-color: rgba(0, 0, 0, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
}

/* Botones de navegación del swiper hero específicos */
.hero .swiper-button-next,
.hero .swiper-button-prev {
  display: flex;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: #fff;
  background-color: rgba(0,0,0,0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.hero .swiper-button-next {
  right: 10px;
  left: auto;
}

.hero .swiper-button-prev {
  left: 10px;
  right: auto;
}

.hero .swiper-button-next:after,
.hero .swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

.hero .swiper-button-next:hover,
.hero .swiper-button-prev:hover {
  background-color: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}

/* =========================================
   SECCIÓN ABOUT
   ========================================= */
.about ul {
  list-style: none;
  padding: 0;
}

.about ul li {
  padding-bottom: 5px;
  display: flex;
  align-items: center;
}

.about ul i {
  font-size: 20px;
  padding-right: 4px;
  color: var(--accent-color);
}

.about .read-more {
  background: var(--accent-color);
  color: var(--contrast-color);
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 10px 28px;
  border-radius: 50px;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about .read-more i {
  font-size: 18px;
  margin-left: 5px;
  line-height: 0;
  transition: 0.3s;
}

.about .read-more:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.about .read-more:hover i {
  transform: translate(5px, 0);
}

/* Ajustes de legibilidad para párrafos */
.about .content p {
  line-height: 1.7;
}

.about .content p:not(:last-child) {
  margin-bottom: 1.5rem;
}

/* =========================================
   SECCIÓN SERVICIOS
   ========================================= */
.services .service-item {
  background-color: var(--surface-color);
  box-shadow: 0px 5px 90px 0px rgba(0, 0, 0, 0.1);
  padding: 60px 30px;
  transition: all ease-in-out 0.3s;
  border-radius: 18px;
  border-bottom: 5px solid var(--surface-color);
  height: 100%;
}

.services .service-item .icon {
  color: var(--contrast-color);
  background: var(--accent-color);
  margin: 0;
  width: 64px;
  height: 64px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
  transition: ease-in-out 0.3s;
}

.services .service-item h3 {
  font-weight: 700;
  margin: 10px 0 15px 0;
  font-size: 22px;
  transition: ease-in-out 0.3s;
}

.services .service-item p {
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
}

.services .service-item:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
}

.services .service-item:hover h3 {
  color: var(--accent-color);
}

/* =========================================
   SECCIÓN CALL TO ACTION
   ========================================= */
.call-to-action {
  padding: 120px 0;
  position: relative;
  clip-path: inset(0);
}

.call-to-action img {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.call-to-action:before {
  content: "";
  background: color-mix(in srgb, var(--background-color), transparent 70%);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.call-to-action .container {
  position: relative;
  z-index: 3;
}

.call-to-action h3 {
  color: var(--default-color);
  font-size: 28px;
  font-weight: 700;
}

.call-to-action p {
  color: var(--default-color);
}

.call-to-action .cta-btn {
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  display: inline-block;
  padding: 12px 40px;
  border-radius: 50px;
  transition: 0.5s;
  margin: 10px;
  background: var(--accent-color);
  color: var(--contrast-color);
}

.call-to-action .cta-btn:hover {
  background: color-mix(in srgb, var(--accent-color) 90%, white 15%);
}

/* =========================================
   SECCIÓN FEATURES
   ========================================= */
.features .features-image {
  position: relative;
  min-height: 400px;
}

.features .features-image img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
  z-index: 1;
  border-radius: 10px;
}

.features .features-item {
  /* margin-top: 2rem; */ /* Eliminado para que funcione justify-content-between */
}

.features .features-item:first-child {
  margin-top: 0;
}

.features .features-item h4 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 5px 0;
}

.features .features-item i {
  font-size: 48px;
  color: var(--accent-color);
  margin-right: 20px;
  line-height: 0;
}

.features .features-item p {
  font-size: 15px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
}

/* =========================================
   PROGRAMS SECTION (formerly REVIEWS)
   ========================================= */
/* Nuevo diseño de tarjetas de programa */
.tv-program-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  height: 100%;
}

.tv-program-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.3) 10%, rgba(0, 0, 0, 0.2) 60%, rgba(0,0,0,0) 100%);
  border-radius: inherit;
  display: block;
  transition: background-color 0.3s ease; /* Añadir transición para suavizar el cambio */
}

/* Hacer el fondo más oscuro al pasar el mouse */
.tv-program-item:hover::after,
.touch-device .tv-program-item.touch-hover::after {
  background: linear-gradient(to right, rgba(0, 0, 0, .8) 10%, rgba(0, 0, 0, 0.6) 60%, rgba(0,0,0,0.5) 100%);
}

.tv-program-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.tv-program-details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  padding: 20px;
  color: #000000;
  transition: all 0.3s ease;
}

.program-title {
  margin: 0 0 15px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

/* Etiqueta de conteo de videos */
.tv-program-episode-count {
  display: inline-block;
  padding: 3px 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background-color: rgba(128, 128, 128, 0.5); /* Fondo gris transparente */
  border-radius: 4px;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.btn-playlist {
  display: none; /* Ocultar por defecto */
  padding: 8px 16px;
  background-color: #008CBA; /* Azul para el botón */
  color: white; /* Color de texto por defecto */
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: absolute; /* Posición absoluta para ubicarlo a la derecha */
  right: 20px; /* Alinear a la derecha */
  bottom: 20px; /* Alinear al fondo con margen */
  opacity: 0; /* Invisible inicialmente */
  transform: translateX(10px); /* Ligero desplazamiento para animación */
  display: flex; /* Usar flexbox para alinear texto e icono */
  align-items: center; /* Centrar verticalmente */
  justify-content: center; /* Centrar horizontalmente */
  gap: 6px; /* Espacio entre texto e icono */
}

.btn-playlist i {
  display: inline-block;
  font-size: 16px; /* Tamaño del icono */
}

/* Mostrar el botón al pasar el mouse sobre la tarjeta */
.tv-program-item:hover .btn-playlist,
.touch-device .tv-program-item.touch-hover .btn-playlist {
  display: flex; /* Mostrar como flexbox */
  opacity: 1;
  transform: translateX(0); /* Regresa a su posición normal */
}

/* Animación de parpadeo del botón cuando se pasa el mouse sobre la tarjeta */
@keyframes btn-blink {
  0% {
    background-color: #008CBA;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 140, 186, 0);
  }
  50% {
    background-color: #570d98;
    transform: scale(1.05); /* Reducido para que sea menos agresivo */
    box-shadow: 0 0 10px rgba(87, 13, 152, 0.6);
  }
  100% {
    background-color: #008CBA;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 140, 186, 0);
  }
}

.tv-program-item:hover .btn-playlist,
.touch-device .tv-program-item.touch-hover .btn-playlist {
  animation: btn-blink 1.5s infinite;
}

/* Detener la animación cuando el mouse está directamente sobre el botón */
.tv-program-item .btn-playlist:hover {
  animation-play-state: paused; /* Pausar la animación en vez de detenerla */
  background-color: #570d98; /* Color de fondo en hover */
  color: #ffffff; /* Asegurar que el texto siga siendo blanco en hover */
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 0.3);
}

/* Asegurar que el icono también sea visible en hover */
.tv-program-item .btn-playlist:hover i {
  color: #ffffff; /* Color del icono en hover */
}

.tv-program-item:hover,
.touch-device .tv-program-item.touch-hover {
  transform: translateY(-5px) scale(1.05); /* Aumento único de escala para toda la tarjeta */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  z-index: 2; /* Asegurar que la tarjeta agrandada aparezca por encima */
}

.tv-program-item:hover img,
.touch-device .tv-program-item.touch-hover img {
  transform: none; /* Eliminar el escalado adicional */
}

/* Eliminar los estilos anteriores del efecto de play */
#programs .portfolio-link::before,
#programs .portfolio-link::after {
  content: none;
}

#programs .portfolio-link:hover::before,
#programs .portfolio-link:hover::after {
  opacity: 0;
}

/* =========================================
   BOTÓN VER MÁS Y CONTROL DE ÍTEMS
   ========================================= */
/* Control de visibilidad de elementos */
.hidden-item {
  display: none ;
  visibility: hidden ;
  opacity: 0 ;
  height: 0 ;
  overflow: hidden ;
  margin: 0 ;
  padding: 0 ;
}

.show-item {
  display: block ;
  visibility: visible ;
  opacity: 1 ;
  height: auto ;
  overflow: visible !important;
}

/* Estilos para el botón Ver Más */
.btn-load-more {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 15px 40px;
  border-radius: 50px;
  font-family: var(--heading-font);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 25px 8px;
  font-size: 18px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* Animación de parpadeo para el botón Ver más */
@keyframes blink-button {
  0% {
    background-color: var(--accent-color);
    transform: scale(1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: normal;
  }
  50% {
    background-color: #6c0abf; /* Color más brillante e intenso */
    transform: scale(1.01); /* Mayor escala para un efecto más notorio */
    box-shadow: 0 0 5px #6c0abf; /* Resplandor intenso */
    letter-spacing: 1px; /* Efecto de expansión del texto */
  }
  100% {
    background-color: var(--accent-color);
    transform: scale(1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: normal;
  }
}

/* Aplicar animación solo al botón Ver más */
#load-more-programs {
  animation: blink-button 1.2s infinite; /* Velocidad aumentada para mayor impacto */
  position: relative; /* Para posicionar efectos adicionales */
  overflow: hidden; /* Contener efectos dentro del botón */
}

.btn-load-more:hover {
  background-color: color-mix(in srgb, var(--accent-color) 80%, white);
  transform: translateY(-5px); /* Aumentado: era -3px */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Mejorado: sombra más grande */
  animation: none; /* Detener la animación al pasar el cursor por encima */
}

.btn-load-more:active {
  transform: translateY(-2px); /* Aumentado: era -1px */
}

.btn-load-more.hidden {
  display: none;
}

/* Contenedor para los botones de programs */
.programs-buttons {
  display: flex;
  justify-content: center;
  gap: 15px; /* Aumentado: era 10px */
}

/* =========================================
   SECCIÓN ESTADÍSTICAS
   ========================================= */
.stats {
  position: relative;
}

.stats img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.stats:before {
  content: "";
  background: color-mix(in srgb, var(--background-color), transparent 20%);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.stats .container {
  position: relative;
  z-index: 3;
}

.stats .subheading {
  text-align: center;
}

.stats .subheading h3 {
  font-weight: 700;
  font-size: 36px;
}

.stats .stats-item {
  padding: 30px;
  width: 100%;
}

.stats .stats-item span {
  font-size: 48px;
  display: block;
  color: var(--default-color);
  font-weight: 700;
}

.stats .stats-item p {
  padding: 0;
  margin: 0;
  font-family: var(--heading-font);
  font-size: 16px;
  font-weight: 700;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
}
/* =========================================
   SECCIÓN PORTFOLIO
   ========================================= */
.portfolio .portfolio-filters {
  padding: 0;
  margin: 0 auto 20px auto;
  list-style: none;
  text-align: center;
}

.portfolio .portfolio-filters li {
  cursor: pointer;
  display: inline-block;
  padding: 8px 20px 10px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 5px;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  font-family: var(--heading-font);
}

.portfolio .portfolio-filters li:hover,
.portfolio .portfolio-filters li.filter-active {
  color: var(--contrast-color);
  background-color: var(--accent-color);
}

.portfolio .portfolio-filters li:first-child {
  margin-left: 0;
}

.portfolio .portfolio-filters li:last-child {
  margin-right: 0;
}

.portfolio .portfolio-section-item {
  position: relative;
  overflow: visible;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.portfolio .portfolio-section-item:hover {
  transform: translateY(-5px);
}

/* Añadir bordes redondeados a las imágenes del portfolio */
.portfolio .portfolio-section-item img {
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.portfolio .portfolio-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.portfolio .portfolio-section-item:hover img {
  opacity: 0.85;
  transform: scale(1.02);
}

/* NUEVO: Asegurar que el contenedor de Isotope tenga altura cuando muestra un error */
.portfolio .isotope-container.has-error {
  min-height: 150px; /* Altura mínima para que quepa el cuadro de alerta */
}

/* =========================================
   SECCIÓN ARTÍCULOS RECIENTES
   ========================================= */
.recent-posts article {
  background: var(--surface-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 30px;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.recent-posts .post-img {
  max-height: 240px;
  margin: -30px -30px 15px -30px;
  overflow: hidden;
}

.recent-posts .post-img a {
  display: block;
  width: 100%;
  height: auto; /* Coincide con max-height de .post-img para definir un área clara */
  position: relative; /* Para un contexto de posicionamiento si fuera necesario */
}

.recent-posts .post-img img {
  display: block; /* Elimina espacio extra debajo de la imagen si es inline */
  width: 100%;   /* Asegura que la imagen ocupe todo el ancho del enlace */
  height: 100%;  /* Asegura que la imagen ocupe toda la altura del enlace */
  object-fit: cover; /* Escala la imagen para mantener su relación de aspecto mientras llena el contenedor. Se recortará si es necesario. */
}

.recent-posts .post-category {
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin-bottom: 10px;
}

.recent-posts .title {
  font-size: 20px;
  font-weight: 700;
  padding: 0;
  margin: 0 0 20px 0;
}

.recent-posts .title a {
  color: var(--heading-color);
  transition: 0.3s;
}

.recent-posts .title a:hover {
  color: var(--accent-color);
}

.recent-posts .post-author-img {
  width: 50px;
  border-radius: 50%;
  margin-right: 15px;
}

.recent-posts .post-author {
  font-weight: 600;
  margin-bottom: 5px;
}

.recent-posts .post-date {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin-bottom: 0;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
  position: relative;
}

.footer h3 {
  font-size: 36px;
  font-weight: 700;
  position: relative;
  padding: 0;
  margin: 0 0 15px 0;
}

.footer p {
  font-size: 15px;
  font-style: italic;
  padding: 0;
  margin: 0 0 30px 0;
}

.footer .social-links {
  margin: 0 0 30px 0;
}

.footer .social-links a {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: var(--contrast-color);
  line-height: 1;
  margin: 0 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
  text-decoration: none;
}

.footer .copyright {
  padding-top: 25px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .credits {
  font-size: 13px;
  padding-top: 5px;
}

/* =========================================
   COMPONENTES DE TERCEROS / PLUGINS
   ========================================= */
/* GLightbox personalización */
.glightbox-clean .gslide-description {
  background: rgba(0, 0, 0, 0.01);
}

.glightbox-clean .gslide-title {
  color: #fff;
  font-weight: bold;
  font-size: 18px;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background-color: rgba(0, 0, 0, 0.01);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  z-index: 10;
}

.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

.goverlay {
  background-color: rgba(0, 0, 0, 0.8) !important; /* Reducción de opacidad del fondo */
  cursor: pointer; /* Indica que es clickeable */
  width: 100%;
  height: 100%;
  pointer-events: auto; /* Añadir evento de puntero a todo el overlay para asegurar que es clickeable */
}

/* Asegurar que el contenido del lightbox no cierre al hacer clic */
.gcontainer {
  z-index: 9999;
  position: relative;
}

.gslide-media {
  cursor: default; /* Cursor normal sobre la imagen */
}

/* Mejorar la visibilidad de los botones de navegación */
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
  opacity: 1;
}

/* =========================================
   MEDIA QUERIES
   ========================================= */

/* ---------- PANTALLAS GRANDES ---------- */
@media (max-width: 1440px) {
  /* Navegación */
  nav ul li a {
    font-size: min(22px, 2vw);
    padding: 5px 12px 30px;
  }

  nav ul {
    margin-right: 160px;
  }
}

@media (max-width: 1307px) {
  nav {
    min-height: 40px;
    height: 115px;
    width: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 0;
    margin-top: 0;
  }
  
  /* Hero */
  .hero {
    min-height: 350px;
    height: auto;
  }

  .hero > img {
    min-height: 350px;
  }

  /* Botón en vivo */
  .en-vivo-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    height: 38px;
    min-height: 38px;
    padding: 4px 14px;
    background: transparent !important;
    box-shadow: none !important;
    border: none;
    align-items: center;
    z-index: 20;
    display: flex;
    gap: 6px;
  }

  .en-vivo-btn .youtube-svg-icon,
  .en-vivo-btn img.youtube-logo {
    min-width: 22px;
    min-height: 22px;
    margin-right: 4px;
    vertical-align: middle;
  }

  .en-vivo-btn {
    top: 45px;
    right: 80px;
    padding: 6px 10px;
  }

  /* Menú móvil */
  .checkbtn {
    display: block;
    order: 1;
    width: 40px;
    text-align: center;
    padding: 0;
    margin-left: 7px;
    margin-right: 0;
  }

  .checkbtn:hover {
    color: #ff5252;
  }

  .enlace {
    order: 2;
    padding-right: 20px;
    padding-left: 0;
  }

  nav ul {
    position: fixed;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    background: black;
    background: rgba(30, 40, 51, 0.95);
    top: 115px;
    left: -100%;
    text-align: center;
    transition: all .5s;
    flex-direction: column;
    padding: 30px 0;
    margin-right: 0;
  }

  nav ul li {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 35px 0;
    line-height: 30px;
    height: auto;
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    justify-content: center;
    width: auto;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 8px;
  }

  #check:checked ~ ul {
    left: 0;
    z-index: 15;
  }

  #check:checked ~ .checkbtn {
    color: #ff5252;
  }

  .container {
    flex-direction: column;
    align-items: center;
    background-position: top center;
    min-height: auto;
    max-height: none;
  }

  /* Botón hamburguesa animado */
  .checkbtn .icon-menu,
  .checkbtn .icon-close {
    display: inline-block;
    vertical-align: middle;
  }
  
  .checkbtn .icon-close {
    display: none;
  }

  #check:checked ~ label.checkbtn .icon-menu {
    display: none;
  }

  #check:checked ~ label.checkbtn .icon-close {
    display: inline-block;
  }
}

@media (max-width: 1140px) {
  /* Footer, iframe y navegación */
  .footer p {
    font-size: 14px;
  }

  iframe {
    width: 100% !important;
    height: auto !important;
    min-height: 250px;
  }

  nav ul {
    margin-right: 80px;
  }


  nav ul li a {
    padding: 5px 8px 30px;
    font-size: min(18px, 1.6vw);
  }

  section, .section {
    scroll-margin-top: 57px;
  }
}


@media (max-width: 768px) {
  /* Desactivar retrasos AOS en móvil */
  [data-aos-delay] {
    transition-delay: 0s !important;
  }

  /* Botón en vivo, barra social, navegación */
  .en-vivo-btn {
    right: 15px;
    padding: 5px 8px;
  }

  .social {
    display: none;
  }

  .social ul {
    height: 35%;
    width: 40px;
    padding-left: 8px;
  }

  nav ul li a {
    font-size: 15px;
    padding: 5px 10px;
  }

  /* Específicamente para los botones del hero swiper */
  .hero .swiper-button-next,
  .hero .swiper-button-prev {
    width: 28px;
    height: 28px;
  }

  .hero .swiper-button-next:after,
  .hero .swiper-button-prev:after {
    font-size: 12px;
  }

  /* Iconos sociales en navegación responsiva */
  .social-nav-container {
    display: flex; /* Mostrar en resoluciones menores a 1307px */
    width: 100%;
    margin: 50px 0 !important;
    height: auto;
  }

  .social-nav {
    width: 100%;
    justify-content: center;
    padding-bottom: 0;
  }

  .social-nav a {
    width: 45px;
    height: 45px;
    font-size: 22px;
    margin: 0 10px;
  }
}

@media screen and (max-width: 550px) {
  /* Adaptaciones para tablets pequeñas y móviles grandes */
  html, body {
    font-size: 14px !important;
  }
  
  h1 { font-size: 26px !important; }
  h2 { font-size: 22px !important; }
  h3 { font-size: 18px !important; }
  h4, h5, h6 { font-size: 16px !important; }
  
  .footer, .footer p, .section-title, .recent-posts .title {
    font-size: 14px !important;
  }
  
  .portfolio .portfolio-filters li {
    font-size: 14px;
    margin: 0 0 0 0;
  }
  
  .programs-section .review-logo img { /* Assuming review-logo might exist or be a placeholder, now under programs-section */
    padding: 30px;
    max-width: 70%;
  }
  
  .footer {
    min-height: auto;
    padding: 15px 0;
  }

  .footer p {
    font-size: 12px;
    padding: 2px;
  }

  table.defaut {
    width: 100%;
  }

  table.defaut td:first-child {
    width: 100%;
    display: block;
    text-align: center;
    padding: 5px 10px 15px;
  }

  table.defaut td:not(:first-child) {
    width: 50%;
    display: inline-block;
    text-align: center;
    padding: 5px;
    float: left;
  }

  table.defaut img {
    max-width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
  }
}

@media screen and (max-width: 480px) {
  /* Móviles */
  nav ul li a {
    font-size: 14px;
    padding: 5px 6px;
  }

  nav ul {
    margin-right: 40px;
  }

  .logo {
    max-height: 90px;
    transition: max-height 0.3s ease;
  }

  .en-vivo-btn .youtube-svg-icon {
    width: 40px;
    height: 30px;
  }
}

@media screen and (max-width: 380px) {
  /* Móviles pequeños */
  .en-vivo-btn {
    font-size: 18px;
    top: 45px;
  }
  
  .en-vivo-btn .youtube-svg-icon {
    width: 25px;
    height: 25px;
  }
}

/* =========================================
   PROGRAMS SECTION (class .programs-section)
   ========================================= */
.programs-section .programs-filters { /* Changed from .portfolio-filters */
  padding: 0;
  margin: 0 auto 20px auto;
  list-style: none;
  text-align: center;
}

.programs-section .programs-filters li { /* Changed from .portfolio-filters */
  cursor: pointer;
  display: inline-block;
  padding: 8px 20px 10px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 5px;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  font-family: var(--heading-font);
}

.programs-section .programs-filters li:hover, /* Changed from .portfolio-filters */
.programs-section .programs-filters li.filter-active { /* Changed from .portfolio-filters */
  color: var(--contrast-color);
  background-color: var(--accent-color);
}

.programs-section .programs-filters li:first-child { /* Changed from .portfolio-filters */
  margin-left: 0;
}

.programs-section .programs-filters li:last-child { /* Changed from .portfolio-filters */
  margin-right: 0;
}

.programs-section .program-section-item { /* Changed from .portfolio-item */
  position: relative;
  overflow: visible;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.programs-section .program-section-item:hover { /* Changed from .portfolio-item */
  transform: translateY(-5px);
}

.programs-section .program-section-item img { /* Changed from .portfolio-item */
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.programs-section .portfolio-link { /* This class is on the <a> tag inside the item, can remain if structure is shared and styled generically */
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.programs-section .program-section-item:hover img { /* Changed from .portfolio-item */
  opacity: 0.85;
  transform: scale(1.02);
}

/* Asegura que los estilos de programs-section no afecten a portfolio y viceversa */
