/* Estilos para la sección de canales y carruseles */

/* Animaciones y efectos hover para canales */
.channel-card:hover {
    background-color: rgba(255,255,255,0.09) !important;
    border-color: rgba(255,255,255,0.15) !important;
    transform: scale(1.02);
}

.plan-filter-btn:hover:not(.active), .filter-btn:hover:not(.active) {
    background-color: rgba(255,255,255,0.1) !important;
    color: white !important;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.object-fit-contain {
    object-fit: contain;
}

.compat-item:hover .compat-icon {
    border-color: rgba(221, 0, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(221, 0, 255, 0.2);
}

.compat-item:hover .material-icons {
    color: #dd00ff !important;
}

.canales-section {
  position: relative;
  overflow: visible; /* Cambiar para permitir las animaciones de hover */
  padding: 2rem 0;
  background-color: #0d0220;
}

.canales-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #ffffff;
}

.canales-subtitle {
  font-size: 1.125rem;
  color: #bbbbbb;
  max-width: 36rem;
  margin: 0 auto 3rem;
  text-align: center;
}

/* Contenedor principal de carruseles */
.canales-carruseles {
  margin-bottom: 2rem;
  overflow: visible;
  position: relative;
  z-index: 1;
}

/* Estilos para los carruseles */
.canales-carousel-container {
  position: relative;
  overflow: visible;
  margin-bottom: 1.5rem;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 150px;
  padding: 15px 0;
}

.canales-carousel {
  display: flex;
  align-items: center;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  overflow: visible;
  will-change: transform;
}

.carousel-hacia-derecha {
  animation-name: slideRight;
  animation-duration: 70s;
  position: relative;
  left: 0;
  width: auto;
}

.carousel-hacia-izquierda {
  animation-name: slideLeft;
  animation-duration: 70s;
  position: relative;
  left: 0;
  width: auto;
}

@keyframes slideRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes slideLeft {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Canal Logo Styles */
.canal-logo {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 200px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canal-logo:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(221, 0, 255, 0.2);
  z-index: 10;
  border-color: rgba(221, 0, 255, 0.5);
}

.canal-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: brightness(1.3) contrast(1.2);
}

.canal-logo:hover img {
  transform: scale(1.08);
  filter: brightness(1.4) contrast(1.25) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Estilos para los planes de canales */
.canales-planes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1000px;
}

.canales-plan {
  background: rgba(26, 9, 64, 0.6);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(221, 0, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 280px;
  max-height: 320px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.canales-plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px -5px rgba(221, 0, 255, 0.4);
  border-color: rgba(221, 0, 255, 0.5);
}

.canales-plan-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.canales-plan-count {
  display: inline-block;
  background: linear-gradient(135deg, #dd00ff, #aa00ff);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  margin: 1.25rem 0;
  width: 80%;
  box-shadow: 0 4px 15px rgba(221, 0, 255, 0.3);
}

.canales-plan-btn {
  display: inline-block;
  background: linear-gradient(135deg, rgba(221, 0, 255, 0.15), rgba(170, 0, 255, 0.15));
  color: #ffffff;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(221, 0, 255, 0.3);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  text-align: center;
  width: 60%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.canales-plan-btn:hover {
  background: linear-gradient(135deg, rgba(221, 0, 255, 0.3), rgba(170, 0, 255, 0.3));
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border-color: rgba(221, 0, 255, 0.6);
}

/* Estilos para el modal de canales */
.canales-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.canales-modal-content {
  background: #1a0940;
  border-radius: 1rem;
  max-width: 800px;
  margin: 4rem auto 2rem auto;
  padding: 2rem;
  position: relative;
  animation: modalFadeIn 0.3s ease;
  border: 1px solid rgba(221, 0, 255, 0.3);
  box-shadow: 0 25px 50px -12px rgba(221, 0, 255, 0.25);
}

/* Grid para los canales */
.canales-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  width: 100%;
}

@media (max-width: 480px) {
  .canales-modal-content {
    padding: 1.5rem 1rem;
    margin: 1rem auto;
    width: 92%;
  }
  
  .canales-modal-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .canales-modal-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .canales-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.canales-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.canales-modal-close:hover {
  color: #dd00ff;
}

.canales-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.canales-modal-subtitle {
  color: #aaaaaa;
  margin-bottom: 2rem;
}

.canales-lista {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem 0;
}

/* Estilos para las categorías en el modal */
.categorias-container {
  margin-bottom: 2rem;
}

.canales-categoria {
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInCategory 0.4s ease forwards;
}

@keyframes fadeInCategory {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.categoria-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #dd00ff;
  border-bottom: 1px solid rgba(221, 0, 255, 0.3);
  padding-bottom: 0.5rem;
  position: relative;
}

.categoria-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #dd00ff, #aa00ff);
  animation: expandLine 0.8s ease 0.3s forwards;
}

@keyframes expandLine {
  to {
    width: 100%;
  }
}

.canal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInCanal 0.5s ease forwards;
  position: relative;
  overflow: hidden;
}

@keyframes fadeInCanal {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.canal-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(221, 0, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.canal-item:hover::before {
  left: 100%;
}

@media (max-width: 480px) {
  .canal-item {
    padding: 0.5rem;
  }
  
  .canal-item-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 0.375rem;
  }
  
  .canal-item-name {
    font-size: 0.75rem;
  }
  
  .canal-item-logo img {
    transform: scale(1.5); /* Mantener proporción aumentada en móvil */
  }
}

.canal-item:hover {
  background-color: rgba(221, 0, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(221, 0, 255, 0.2);
}

.canal-item-logo {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
  transition: all 0.3s ease;
}

.canal-item:hover .canal-item-logo {
  transform: scale(1.1);
  background-color: rgba(221, 0, 255, 0.15);
}

.canal-item-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(1.5); /* Aumentado en 50% */
  transition: transform 0.3s ease;
}

.canal-item:hover .canal-item-logo img {
  transform: scale(1.6);
}

.canal-item-name {
  font-size: 0.875rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.canal-item:hover .canal-item-name {
  color: #dd00ff;
}

/* Botón Ver Plan */
.ver-plan-button-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(221, 0, 255, 0.3);
}

.ver-plan-btn.animated-btn {
  background: linear-gradient(45deg, #dd00ff, #aa00ff, #7700cc, #5e00b3);
  background-size: 300% 300%;
  animation: gradient-animation 3s ease infinite;
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(221, 0, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 1px;
}

.ver-plan-btn.animated-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(221, 0, 255, 0.5);
}

.ver-plan-btn.animated-btn:active {
  transform: translateY(-2px);
}

.ver-plan-btn.animated-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.7s;
}

.ver-plan-btn.animated-btn:hover::before {
  left: 100%;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes logoGlow {
  0% {
    box-shadow: 0 15px 20px -5px rgba(221, 0, 255, 0.4);
  }
  100% {
    box-shadow: 0 20px 30px -5px rgba(221, 0, 255, 0.8);
  }
}

/* Media queries para responsividad */
@media (max-width: 768px) {
  .canales-section {
    padding: 1.5rem 0;
  }
  
  .canales-title {
    font-size: 2rem;
  }
  
  .canales-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .canales-carousel-container {
    width: 100%;
    margin-left: 0;
    margin-bottom: 1rem;
    padding: 5px 0;
    overflow: visible;
    height: auto;
  }
  
  .canal-logo {
    width: 160px !important;
    height: 120px !important;
    margin: 0 !important;
    padding: 0.2rem !important;
    min-width: auto !important;
    min-height: auto !important;
    flex-shrink: 0;
  }
  
  .canal-logo img {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain;
  }
  
  .canales-carousel {
    overflow: visible;
  }
  
  .carousel-hacia-derecha,
  .carousel-hacia-izquierda {
    animation-duration: 20s;
  }
  
  .canales-modal-content {
    padding: 1.5rem;
  }
  
  .canales-planes {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin: 2rem auto;
    gap: 1.5rem;
  }
  
  .canales-plan {
    padding: 1.5rem;
    min-height: 260px;
    max-height: 300px;
  }
  
  .canales-plan-count {
    font-size: 1.125rem;
    padding: 0.625rem 1.75rem;
    width: 85%;
  }
  
  .canales-plan-btn {
    font-size: 0.7rem;
    padding: 0.45rem 0.9rem;
    width: 65%;
  }
}

@media (max-width: 480px) {
  .canales-planes {
    grid-template-columns: 1fr;
    margin: 1.5rem auto;
  }
  
  .canal-logo {
    width: 65px;
    height: 65px;
    margin: 0 0.4rem;
    padding: 0.5rem;
  }
  
  .canales-carousel-container {
    margin-bottom: 0.75rem;
    padding: 8px 0;
    height: 85px;
  }
  
  .canales-plan {
    padding: 1.25rem;
    min-height: 240px;
    max-height: 260px;
    aspect-ratio: auto;
  }
  
  .canales-plan-count {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    width: 90%;
    margin: 1rem 0;
  }
  
  .canales-plan-btn {
    width: 70%;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
}