/* ================================================================
   PROGRAMAS.CSS — Estilos exclusivos de la página Programas
   Reutiliza variables CSS de index.css (:root) y clases de layout
   genéricas (.app-shell, .sidebar, .main-content, etc.)
   ================================================================ */

/* ── HERO ──────────────────────────────────────────────────────── */
.pg-hero {
    margin-bottom: 28px;
}

.pg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rojo);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.pg-hero-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1.05;
    color: var(--negro);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.pg-hero-accent {
    color: var(--rojo);
}

.pg-hero-sub {
    font-size: 0.97rem;
    color: var(--gris-texto);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 22px;
}

/* ── FILTROS ───────────────────────────────────────────────────── */
.pg-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pg-filter-btn {
    padding: 9px 20px;
    border-radius: 999px;
    border: 1.5px solid #ddd;
    background-color: #fff;
    color: var(--negro);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.pg-filter-btn:hover {
    border-color: var(--rojo);
    color: var(--rojo);
}

.pg-filter-active {
    background-color: var(--rojo);
    color: #fff !important;
    border-color: var(--rojo);
}

/* ── LAYOUT PRINCIPAL: TARJETAS + LATERAL ──────────────────────── */
.pg-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.pg-cards-wrap {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── GRID DE TARJETAS DE PROGRAMA ──────────────────────────────── */
.pg-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pg-card {
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}

.pg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

/* Clase para ocultar tarjetas filtradas */
.pg-card.pg-hidden {
    display: none;
}

.pg-card-img {
    height: 140px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fondos degradado por defecto si imagen no carga */
.pg-img-1 { background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro)); }
.pg-img-2 { background: linear-gradient(135deg, #ff8a00, var(--rojo)); }
.pg-img-3 { background: linear-gradient(135deg, var(--negro), #2a2a2a); }
.pg-img-4 { background: linear-gradient(135deg, var(--azul), #1a6fa8); }
.pg-img-5 { background: linear-gradient(135deg, #00b894, #006655); }
.pg-img-6 { background: linear-gradient(135deg, var(--dorado), #cc8800); }

.pg-live-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--rojo);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pg-live-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    background-color: #fff;
    border-radius: 50%;
    animation: pulseDot 1.4s infinite;
}

.pg-card-body {
    padding: 14px 16px;
}

.pg-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 5px;
    line-height: 1.25;
}

.pg-card-desc {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 10px;
}

.pg-card-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--rojo);
    font-weight: 600;
}

/* ── CABECERAS DE SECCIÓN ──────────────────────────────────────── */
.pg-section-header {
    margin-bottom: 16px;
}

.pg-section-header h2 {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--negro);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ev-icon {
    color: var(--rojo);
}

/* ── TABLA PROGRAMACIÓN SEMANAL ────────────────────────────────── */
.pg-schedule-wrap {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.pg-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pg-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.pg-table thead th {
    background-color: #f7f7f7;
    color: var(--negro);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
    padding: 10px 8px;
    text-align: left;
    border-bottom: 2px solid #eee;
}

.pg-table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.pg-table tbody tr:last-child td {
    border-bottom: none;
}

.pg-slot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: #fff5f5;
    border-left: 3px solid var(--rojo);
    border-radius: 6px;
    padding: 5px 8px;
}

.pg-slot-live {
    background-color: #ffede6;
    border-left-color: #ff4500;
}

.pg-slot-always {
    background-color: #eaf6ff;
    border-left-color: var(--azul);
}

.pg-slot-time {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--rojo);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pg-slot-live .pg-slot-time {
    color: #ff4500;
}

.pg-slot-always .pg-slot-time {
    color: var(--azul);
}

.pg-slot-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--negro);
    line-height: 1.3;
}

.pg-slot-empty {
    color: #ddd;
    text-align: center;
    font-size: 0.8rem;
}

.pg-table-footer {
    margin-top: 16px;
    text-align: right;
}

.pg-see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--rojo);
    transition: gap 0.2s;
}

.pg-see-all:hover {
    gap: 10px;
}

/* ── COLUMNA LATERAL DERECHA ───────────────────────────────────── */
.pg-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Programa destacado */
.pg-featured {
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.pg-featured-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--negro);
}

.pg-featured-live-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background-color: var(--rojo);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.pg-featured-img {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.pg-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    display: block;
}

.pg-featured-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pg-featured-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #fff;
    line-height: 1.25;
}

.pg-featured-desc {
    font-size: 0.78rem;
    color: #ccc;
    line-height: 1.45;
}

.pg-featured-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--dorado);
    font-weight: 600;
}

.pg-featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    background-color: var(--rojo);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 11px 16px;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}

.pg-featured-btn:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-1px);
}

/* Próxima transmisión */
.pg-next-broadcast {
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.pg-next-card {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-left: 4px solid var(--rojo);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pg-next-when {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--rojo);
}

.pg-next-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--negro);
}

.pg-next-desc {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}

.pg-next-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--negro);
    margin-top: 4px;
    transition: color 0.2s, gap 0.2s;
}

.pg-next-link:hover {
    color: var(--rojo);
    gap: 10px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .pg-layout {
        grid-template-columns: 1fr;
    }
    .pg-sidebar-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .pg-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pg-sidebar-right {
        grid-template-columns: 1fr;
    }
    .pg-hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 500px) {
    .pg-cards-grid {
        grid-template-columns: 1fr;
    }
    .pg-filters {
        gap: 6px;
    }
    .pg-filter-btn {
        padding: 7px 14px;
        font-size: 0.78rem;
    }
}