/* ==========================================================================
   VISTA DE PARRILLA DE PROGRAMAS (ESTILO FIDELIDAD AL DISEÑO)
   ========================================================================== */
.page-programas-view {
  padding: 2rem 0 5rem;
  min-height: 70vh;
}

/* Breadcrumb */
.sched-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 1.75rem;
}
.sched-breadcrumb a {
  color: #17152b;
  text-decoration: none;
  transition: color 0.2s ease;
}
.sched-breadcrumb a:hover {
  color: #7B00FF;
}
.sched-breadcrumb .sep {
  opacity: 0.4;
}

/* Encabezado Principal */
.sched-header {
  margin-bottom: 2.25rem;
}
.sched-header-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #240047;
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sched-header-title i {
  color: #240047;
}
.sched-header-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

/* Barra de Pestañas / Filtros por Día */
.sched-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.sched-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  outline: none;
  user-select: none;
}

/* Estado Inactivo */
.sched-tab-btn {
  background: rgb(234 236 250);
  color: #4018d6;
  border-color: rgb(165 180 252);
}
.sched-tab-btn:hover {
  background: linear-gradient(135deg, #532cf2 0%, #3e16d4 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Estado Activo */
.sched-tab-btn.active {
  background: #4924ea;
  background: linear-gradient(135deg, #532cf2 0%, #3e16d4 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(73, 36, 234, 0.45);
  transform: translateY(-1px);
}

.sched-tab-btn .tab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

/* Grid de Programas */
.sched-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .sched-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

@media (max-width: 768px) {
  .sched-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .sched-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .sched-tabs-container {
    gap: 0.5rem;
  }
  .sched-tab-btn {
    padding: 0.65rem 1.15rem;
    font-size: 0.82rem;
    width: 100%;
    justify-content: center;
  }
}

/* Tarjeta de Programa */
.sched-program-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: radial-gradient(circle at 50% 30%, #2f128e 0%, #150849 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 500 / 500;
}

.sched-program-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--brand-cyan-electric, #00e5e5);
  box-shadow: 0 14px 35px rgba(73, 36, 234, 0.45), 0 0 18px rgba(0, 229, 229, 0.25);
}

/* Imagen de Fondo */
.sched-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sched-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sched-program-card:hover .sched-card-img {
  transform: scale(1.05);
}

/* Degradado Inferior */
.sched-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 4, 34, 0.95) 0%,
    rgba(10, 4, 34, 0.6) 28%,
    rgba(10, 4, 34, 0.15) 45%,
    rgba(10, 4, 34, 0) 65%
  );
  pointer-events: none;
}

/* Información del Programa */
.sched-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 1rem;
  z-index: 2;
  pointer-events: none;
}

.sched-card-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0 0 0.25rem 0;
  line-height: 1.22;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sched-card-time {
  font-family: var(--font-mono, monospace, sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.sched-card-time i {
  color: var(--brand-cyan-electric, #00e5e5);
  font-size: 0.78rem;
}

/* Badge de "Al Aire Ahora" */
.sched-live-pill {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  backdrop-filter: blur(4px);
}

.sched-live-dot {
  width: 7px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: schedPulse 1.5s infinite;
}

@keyframes schedPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Estado Vacío */
.sched-empty-state {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: var(--text-muted, #94a3b8);
}
.sched-empty-state i {
  font-size: 2.5rem;
  color: #6366f1;
  margin-bottom: 1rem;
  display: block;
}
.sched-empty-state h3 {
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

/* Animación de entrada de tarjetas */
@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sched-program-card.show-card {
  display: block;
  animation: fadeInCard 0.3s ease forwards;
}
.sched-program-card.hide-card {
  display: none !important;
}
