/* ============================================
   COMPONENTS.CSS — Cards, listas, carrusel
   ============================================ */

/* ===== CARRUSEL VERTICAL ===== */
.vcarousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}

.vcarousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.vslide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.vslide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.vslide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vslide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.4) 60%, 
        transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    gap: 0.4rem;
    color: #fff;
}

.vslide-live {
    align-self: flex-start;
    background: var(--color-rojo);
    color: #fff;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
}

.vslide-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0;
}

.vslide-host {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin: 0;
}

.vslide-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vslide-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

.vcarousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.5rem;
    z-index: 5;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.vcarousel-btn:hover {
    background: var(--color-azul);
    transform: translateY(-50%) scale(1.05);
}
.vcarousel-prev { left: 0.75rem; }
.vcarousel-next { right: 0.75rem; }

.vcarousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}
.vcarousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all var(--transition-fast);
    cursor: pointer;
}
.vcarousel-dot.is-active {
    background: #fff;
    width: 24px;
    border-radius: var(--radius-full);
}

/* ===== ON DEMAND - FILTROS ===== */
.ondemand-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.select-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-azul-light);
    font-size: 0.85rem;
}
#filter-podcast {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    font-size: 0.92rem;
    color: var(--text-on-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}
#filter-podcast:hover,
#filter-podcast:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 155, 0.3);
}

.search-wrapper {
    flex: 1;
    min-width: 200px;
}
#search-episodes {
    width: 100%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
#search-episodes::placeholder { color: var(--text-muted); }
#search-episodes:focus {
    outline: none;
    border-color: var(--color-azul-light);
    box-shadow: 0 0 0 3px rgba(0, 115, 212, 0.2);
}

/* ===== EPISODE LIST (estilo lista, no cards) ===== */
.episode-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: auto;
    height: 470px;
}

.episode-row {
    display: flex;
    gap: 1rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    align-items: center;
    color: inherit;
}
.episode-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-azul);
    transform: translateX(4px);
}

.episode-row-img {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}
.episode-row-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 82, 155, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.episode-row:hover .episode-play-overlay {
    opacity: 1;
}

.episode-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.episode-podcast {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-azul-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.episode-row-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.ep-featured {
    color: #ffb703 !important;
    font-weight: 600;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl);
    font-style: italic;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-medium);
}

/* ===== NEWS CARDS (grid inferior) ===== */
.news-card {
    background: var(--bg-card-solid);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    color: var(--text-on-light);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-img-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-azul), var(--color-azul-hover));
}
.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.news-card:hover .news-img {
    transform: scale(1.05);
}
.news-img-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
}

.news-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(8px);
}
.badge-noticia { background: rgba(0, 82, 155, 0.9); }
.badge-convenio { background: rgba(220, 38, 38, 0.9); }

.news-content {
    padding: 1rem 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.news-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-on-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-pretexto {
    font-size: 0.85rem;
    color: var(--text-on-light-soft);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--color-azul), var(--color-azul-hover));
    color: #fff;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: all var(--transition-slow);
    pointer-events: none;
    max-width: 90vw;
}
.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vcarousel { aspect-ratio: 4 / 3; }
    .episode-row-img { width: 64px; height: 64px; }
    .episode-row-title { font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .ondemand-filters { flex-direction: column; }
    .episode-row { padding: 0.6rem; gap: 0.75rem; }
    .episode-row-img { width: 56px; height: 56px; }
}


/* ===== Share bar ===== */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.share-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
    font-weight: 500;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.share-whatsapp { background: #25d366; }
.share-facebook { background: #1877f2; }
.share-twitter  { background: #000; }
.share-copy {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}
.share-copy:hover {
    background: var(--color-azul);
    border-color: var(--color-azul);
}


/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--color-azul-light);
    transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== LOAD MORE ===== */
.load-more-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--color-azul) 0%, var(--color-azul-light) 100%);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-azul);
    transition: all var(--transition-base);
    min-width: 220px;
}

.btn-load-more:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 12px 28px rgba(0, 82, 155, 0.5);
}

.btn-load-more:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-load-more-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.load-more-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}
.load-more-info span {
    color: var(--color-azul-light);
    font-weight: 600;
}

.episode-row-track {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.1rem 0 0.2rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}