/* =========================================================
   ConscienTV – base styles (mobile first)
   ========================================================= */

:root {
    --color-bg: #050814;
    --color-bg-alt: #0b1020;
    --color-card: #11182b;
    --color-accent: #31B8BD;
    --color-accent-strong: #23538D;
    --color-text: #f5f7ff;
    --color-muted: #9ba4c4;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
    --max-width: 1200px;

    /* Parrilla (JS la lee) */
    --tv-day-col-w: 140px;
    --tv-slot-w: 80;   /* número (JS lo lee) */
    --tv-slot-gap: 8;  /* número (JS lo lee) */
}

/* Reset básico */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #101939 0, #050814 50%, #02040a 100%);
    color: var(--color-text);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* =========================================================
   Layout general
   ========================================================= */

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 70vh;
}

/* =========================================================
   HEADER / NAVBAR conscienTV
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #071424;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

.site-header__logo {
    height: 60px;
    width: auto;
    display: block;
}

.main-nav__list {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: flex-end;
}

.main-nav__item {
    margin: 0;
    padding: 0;
}

.main-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    text-decoration: none;
    color: #c2d2f0;
    background: transparent;
    border: 0;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav__link--active,
.main-nav__link:hover,
.main-nav__link:focus-visible {
    background: rgba(18, 60, 104, 0.90);
    color: #ffffff;
    text-decoration: none;
}

.main-nav__link::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #31B8BD, #23538D);
    bottom: -4px;
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav__link--active::after,
.main-nav__link:hover::after,
.main-nav__link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

@media (max-width: 768px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .main-nav__list {
        flex-wrap: wrap;
        gap: 0.75rem 1.25rem;
    }
}

/* =========================================================
   HERO y secciones de home
   ========================================================= */

.hero {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero__title {
    font-size: 1.9rem;
    margin: 0 0 0.75rem;
}

.hero__subtitle {
    margin: 0 0 0.75rem;
    color: var(--color-muted);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    width: auto;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
    color: #fff;
}

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.18);
    color: var(--color-text);
}

.btn:hover {
    filter: brightness(1.05);
    text-decoration: none;
}

/* Botón pequeno */
.btn-sm { padding: 8px 12px; font-size: 0.9rem; line-height: 1.2; }

/* =========================================================
   SECCIÓN EN VIVO
   ========================================================= */

.live-section {
    padding: 2rem 0 3rem;
    background: radial-gradient(circle at top, #163a5c 0, #050b11 60%);
}

.live-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.live-section__header {
    margin-bottom: 1rem;
}

.live-section__title {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
}

.live-section__subtitle {
    margin: 0;
    color: #c4d4e8;
    font-size: 0.95rem;
}

/* ===== Home: split player + ficha (DEPURADO) ===== */
.live-split {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
}

.live-split__left,
.live-split__right {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.live-split__left  { flex: 0 0 68%; min-width: 0; }
.live-split__right { flex: 0 0 32%; min-width: 0; }

@media (max-width: 900px) {
    .live-split {
        flex-direction: column;
    }
    .live-split__left,
    .live-split__right {
        flex: 1 1 auto;
    }
}

/* Player */
.live-player {
    margin-top: 1rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    background: #000;
    flex: 1;
    display: flex;
}

.live-player__video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 70vh;
    background: #000;
    object-fit: cover;
}

/* Card del programa (EN VIVO) – se conserva tal cual */
.program-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.program-card__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.program-card__logo img {
    max-width: 180px;
    height: auto;
    display: block;
}

.program-card__title {
    margin: 0 0 8px 0;
}

.program-card__desc {
    margin: 0 0 10px 0;
    color: var(--color-muted);
}

.program-card__host {
    margin: 0 0 10px 0;
    color: #cfd8ff;
    font-size: 0.9rem;
}

.program-card__meta {
    margin-top: auto;
    opacity: 0.9;
}

.program-card__live {
    margin: 10px 0 0 0;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(49,184,189,0.18);
    border: 1px solid rgba(49,184,189,0.35);
}

/* =========================================================
   SECCIONES GENERALES
   ========================================================= */

.section {
    margin-bottom: 2.5rem;
}

.section__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section__title {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}

.section__subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 1.15rem;
}

.section__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.program-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Separador reutilizable */
.divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}

/* =========================================================
   GRID DE PROGRAMAS
   ========================================================= */

.section-programs {
    margin-top: 1.5rem;
}

.program-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

/* La card del grid ES el <a> */
.program-card-inner {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(11,16,32,0.96), rgba(16,28,56,0.96));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    color: var(--color-text);
}

.program-card:hover{
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.program-card-inner:hover {
    filter: brightness(1.03);
}

.program-card-inner:focus-visible {
    outline: 3px solid rgba(49,184,189,0.55);
    outline-offset: 3px;
}

.program-card-thumb {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: radial-gradient(circle at top, #22335f, #060814);
}

.program-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

/* =========================================================
   COMUNICADORES – avatar circular dentro del grid
   (override del thumb 16:9 y del img absolute)
   ========================================================= */

.program-card-thumb.communicator-card-avatar{
    padding-top: 0 !important;     /* mata el 16:9 */
    width: 140px;
    height: 140px;
    margin: 18px auto 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
}

/* OJO: aquí está la clave: anulamos el img absoluto */
.program-card-thumb.communicator-card-avatar img{
    position: static !important;   /* anula el absolute global */
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 999px;
}

/* Si cae al placeholder, también circular */
.program-card-thumb.communicator-card-avatar .program-placeholder{
    position: static;
    width: 100%;
    height: 100%;
    border-radius: 999px;
}


/* Placeholder base (no muestra texto) */
.program-placeholder {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, #22335f, #060814);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* Logo dentro del thumb (100% ancho, centrado, sin deformar) */
.program-card-logo-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.program-card-logo-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.program-card-body {
    padding: 0.9rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

.program-card-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.program-card-summary {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.program-card-schedule {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-accent);
    opacity: 0.95;
}

/* =========================================================
   PÁGINA DE PROGRAMA
   ========================================================= */

.program-hero {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.program-hero-media img,
.program-placeholder-big {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.program-placeholder-big {
    min-height: 180px;
    background: radial-gradient(circle at top, #22335f, #060814);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
}

/* ==== FIX: logo gigante en program.php (sin tocar HTML/PHP) ==== */
.program-hero-logo {
    width: 200px;       /* bloque del logo */
    max-width: 45%;     /* evita que se coma el texto en pantallas angostas */
}

.program-hero-logo img {
    width: 100%;
    max-width: 200px;   /* tope duro */
    height: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 720px) {
    .program-hero-logo {
        width: 160px;
        max-width: 60%;
    }
    .program-hero-logo img {
        max-width: 160px;
    }
}

.program-hero-copy h1 {
    margin: 0 0 0.5rem;
}

.program-tagline {
    margin: 0 0 0.75rem;
    color: var(--color-muted);
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--color-accent);
}

.program-meta span {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(35,83,141,0.25);
}

.program-categories {
    margin: 0 0 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(49,184,189,0.18);
    color: var(--color-accent);
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

/* =========================================================
   COMUNICADORES
   ========================================================= */

.communicator-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.communicator-card {
    display: flex;
    gap: 0.9rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(11,16,32,0.85);
    box-shadow: var(--shadow-soft);
}

.communicator-avatar img,
.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    color: var(--color-accent);
    font-weight: 600;
}

.communicator-body h3 {
    margin: 0 0 0.25rem;
}

.communicator-bio {
    margin: 0 0 0.5rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.communicator-meta,
.communicator-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.communicator-meta a,
.communicator-social a {
    color: var(--color-accent);
}



/* =========================================================
   EPISODIOS
   ========================================================= */

.episode-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.episode-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(11,16,32,0.9);
    box-shadow: var(--shadow-soft);
}

.episode-body h3 {
    margin: 0 0 0.4rem;
}

.episode-summary {
    margin: 0 0 0.5rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.episode-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-muted);
    display: flex;
    gap: 0.5rem;
}

/* Embed responsivo (YouTube, etc.) */
.responsive-iframe {
    position: relative;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.responsive-iframe iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 1.25rem 1.25rem 1.75rem;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.8rem;
}

/* =========================================================
   BREAKPOINTS
   ========================================================= */

@media (min-width: 720px) {
    .hero {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .program-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .program-hero {
        grid-template-columns: 5fr 6fr;
        align-items: center;
    }

    .communicator-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .episode-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (min-width: 1024px) {
    .program-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .episode-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

/* ================= ADMIN UI ===================== */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-card {
    background: rgba(11,16,32,0.95);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.admin-table-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    color: #cfd8ff;
    background: rgba(255,255,255,0.03);
}

.admin-table tr:hover {
    background: rgba(255,255,255,0.03);
}

.admin-form {
    max-width: 580px;
    margin-top: 1rem;
}

.form-field {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-field label {
    font-size: 0.85rem;
    color: #cfd8ff;
}

.form-field input,
.form-field select,
.form-field textarea {
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.35);
    padding: 0.4rem 0.55rem;
    color: #f5f7ff;
}

/* Acciones del formulario (la usas en programs_edit.php, aquí queda definida) */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.form-error {
    margin-top: 0.5rem;
    color: #ff8a80;
}

.form-error-list {
    margin-top: 0.5rem;
    color: #ff8a80;
}

/* Mensajes de sistema sin inline */
.notice {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: var(--shadow-soft);
}

.notice--success {
    border-color: rgba(49,184,189,0.35);
    background: rgba(49,184,189,0.12);
    color: #e8feff;
}

.notice--error {
    border-color: rgba(255,138,128,0.35);
    background: rgba(255,138,128,0.10);
    color: #ffe9e7;
}

/* =========================================================
   Dropdown Admin (nav) – FIX sin huecos
   ========================================================= */

.nav-dropdown {
    position: relative;
}

.nav-dropdown__menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    min-width: 220px;
    background: rgba(7, 20, 36, 0.98);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    padding: 0.5rem;
    display: none;
    z-index: 2000;
}

.nav-dropdown__menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.nav-dropdown__item {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    color: #e4f0ff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.nav-dropdown__item:hover,
.nav-dropdown__item:focus-visible {
    background: rgba(49,184,189,0.14);
    color: #ffffff;
    text-decoration: none;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
    display: block;
}

/* ===== Parrilla semanal (FIX Chrome: días fijos fuera del scroller) ===== */

.tv-guide{
  width: 100%;
}

/* Contenedor overlay de flechas */
.tv-guide--arrows{
  position: relative;
}

/* Layout 2 columnas: izquierda fija + derecha scrolleable */
.tv-guide__layout{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: start;
}

/* Columna izquierda (NO scrollea) */
.tv-guide__left{
  display: grid;
  grid-auto-rows: min-content;
  gap: 10px;
}

.tv-guide__corner,
.tv-guide__day{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  opacity: .95;

  background: rgba(7, 20, 36, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px 12px;
}

/* Header de "Día" */
.tv-guide__corner{
  padding: 8px 12px;
}

/* Para que la altura de cada día coincida con la altura mínima de un bloque */
.tv-guide__day{
  min-height: 64px;
}

/* Columna derecha scrolleable */
.tv-guide__scroller{
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

/* Ocultar scrollbar sin romper scroll */
.tv-guide__scroller::-webkit-scrollbar{ height: 0; }
.tv-guide__scroller{ scrollbar-width: none; }
.tv-guide__scroller{ -ms-overflow-style: none; }

/* Dentro del scroller */
.tv-guide__right{
  display: grid;
  grid-auto-rows: min-content;
  gap: 10px;
  min-width: 0;
}

/* Tiempos */
.tv-guide__times{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 80px;
  gap: 8px;
  align-items: center;
}

.tv-guide__time{
  font-size: 12px;
  opacity: .75;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  text-align:center;
  white-space: nowrap;
}

/* Celdas por día */
.tv-guide__cells{
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: 80px;
  gap: 8px;
}

/* Bloques */
.tv-guide__block{
  display:block;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.03);
}

.tv-guide__block--available{ opacity: .55; }

.tv-guide__block--program:hover{
  border-color: rgba(49,184,189,0.45);
  text-decoration: none;
}

.tv-guide__block-title{
  font-weight: 700;
  margin-bottom: 6px;
}

.tv-guide__block-meta{
  font-size: 12px;
  opacity: .85;
}

.tv-guide__block.is-live{
  background: rgba(49,184,189,0.16);
  border-color: rgba(49,184,189,0.55);
}

/* Flechas overlay */
.tv-guide__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(7,20,36,0.72);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 5;
}

.tv-guide__nav--left{ left: 10px; }
.tv-guide__nav--right{ right: 10px; }

.tv-guide--arrows:hover .tv-guide__nav{
  opacity: 1;
  pointer-events: auto;
}

/* En móvil, mejor siempre visibles */
@media (max-width: 900px){
  .tv-guide__layout{ grid-template-columns: 120px 1fr; }
  .tv-guide__nav{
    opacity: 1;
    pointer-events: auto;
  }
}

/* Utilidad de ocultamiento */
.is-hidden { display: none !important; }

/* Episodios: 5 por fila en desktop (sin tocar el grid normal) */
@media (min-width: 1024px) {
  .episode-grid.episode-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* En pantallas medianas, 3 por fila es una buena base */
@media (min-width: 720px) and (max-width: 1023px) {
  .episode-grid.episode-grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* =========================================================
   PÁGINA DE PROGRAMA – estilo Netflix (full-bleed + overlay)
   ========================================================= */

/* El main normal tiene max-width + padding; aquí liberamos el hero */
.program-page{
    max-width: none;
    padding: 0;              /* quita el espacio arriba para que pegue al menú */
}

/* Lo demás de secciones sigue centrado con .section__inner */
.program-page .section{
    padding: 0 1.25rem;
    margin-top: 2rem;
}

/* HERO full-bleed */
.program-hero--netflix{
    position: relative;
    width: 100%;
    min-height: 420px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

/* HERO full-bleed real (100% viewport) */
.program-hero--netflix{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
}


/* fondo */
.program-hero__bg{
    position: absolute;
    inset: 0;
    z-index: 0;
}

.program-hero__bg-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.program-hero__bg-fallback{
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, #22335f, #060814);
}

/* overlay tipo Netflix: oscurece para que el texto se lea */
.program-hero__bg-overlay{
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5,8,20,0.95) 0%, rgba(5,8,20,0.75) 42%, rgba(5,8,20,0.10) 100%),
        linear-gradient(180deg, rgba(5,8,20,0.15) 0%, rgba(5,8,20,0.90) 100%);
}

/* contenido */
.program-hero__inner{
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 86px 1.25rem 2.25rem; /* 86px para despegar del header sticky */
}

.program-hero__copy{
    max-width: 560px;
}

.program-hero__logo img{
    max-width: 170px;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.program-hero__title{
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
}

.program-hero__tagline{
    margin: 0 0 0.85rem;
    color: rgba(245,247,255,0.85);
}

.program-hero__actions{
    margin-top: 0.85rem;
}

/* =========================================================
   Conductores – una sola fila, centrada, más compacta
   ========================================================= */

.section__inner--narrow{
    max-width: 980px;
    margin: 0 auto;
}

.hosts-row{
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: stretch;
    overflow-x: auto;
    padding: 12px 2px 4px;
    scrollbar-width: none;
}
.hosts-row::-webkit-scrollbar{ height: 0; }

.host-chip{
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 220px;
    max-width: 260px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(11,16,32,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: var(--color-text);
}
.host-chip:hover{
    transform: translateY(-2px);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
    text-decoration: none;
}

.host-chip__avatar img,
.host-chip__avatar .avatar-placeholder{
    width: 58px;
    height: 58px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.host-chip__name{
    font-weight: 700;
    line-height: 1.15;
}

.host-chip__bio{
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 2px;
}

.host-chip__meta{
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--color-accent);
    display: flex;
    gap: 10px;
}

/* =========================================================
   Episodios – cinco por línea en desktop
   ========================================================= */

@media (min-width: 1024px){
    .episode-grid--five{
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* =========================================================
   AUTOSUICIDIO – Grid RSS (4 por fila, cuadrado, sin texto)
   ========================================================= */

.auto-episodes-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 720px){
    .auto-episodes-grid{
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (min-width: 1024px){
    .auto-episodes-grid{
        grid-template-columns: repeat(4, minmax(0,1fr));
    }
}

.auto-ep-card{
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(11,16,32,0.90);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.08);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auto-ep-card:hover{
    transform: translateY(-2px);
    filter: brightness(1.03);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
    text-decoration: none;
}

.auto-ep-card:focus-visible{
    outline: 3px solid rgba(49,184,189,0.55);
    outline-offset: 3px;
}

/* Card deshabilitada cuando no hay link/audio */
.auto-ep-card--disabled{
    cursor: default;
    opacity: 0.8;
}

.auto-ep-card__media{
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* CUADRADA para que salga completa */
    background: radial-gradient(circle at top, #22335f, #060814);
    overflow: hidden;
}

.auto-ep-card__media img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* IMPORTANTE: no recorta, muestra completa */
    display: block;
    background: rgba(0,0,0,0.35);
}

.auto-ep-card__fallback{
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, #22335f, #060814);
}

/* Oculta texto pero lo deja accesible (no se muestra el título) */
.sr-only{
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.auto-ep-card {
    max-width: 100%;
    overflow: hidden;
}

.auto-ep-card__audio {
    width: 100%;
    max-width: 100%;
    display: block;
}
