/* =========================================
   NEWS HUB · Página de noticias mejorada
   ========================================= */

/* Hero de noticias con imagen de fondo */
.page-hero.news-hero {
    background: 
        linear-gradient(135deg, rgba(0,56,147,0.95) 0%, rgba(59,130,246,0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23003893" width="1200" height="400"/><circle cx="600" cy="200" r="150" fill="%23fcd116" opacity="0.1"/><circle cx="900" cy="100" r="100" fill="%23ce1126" opacity="0.1"/></svg>');
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.page-hero.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0,0,0,0.4) 100%
    );
    pointer-events: none;
}

/* Timeline de noticias mejorado */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--co-yellow) 0%,
        var(--co-blue) 50%,
        var(--co-red) 100%
    );
    border-radius: 3px;
}

.timeline-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px 18px 18px 28px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 22px;
    width: 14px;
    height: 14px;
    background: var(--highlight);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(6px);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.08),
        0 0 0 1px rgba(59,130,246,0.1);
}

.timeline-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(59,130,246,0.2);
}

/* Noticias por candidato - color coding */
.timeline-item[data-candidate="paloma"] {
    border-left: 4px solid var(--c-paloma);
}

.timeline-item[data-candidate="paloma"]::before {
    background: var(--c-paloma);
}

.timeline-item[data-candidate="cepeda"] {
    border-left: 4px solid var(--c-cepeda);
}

.timeline-item[data-candidate="cepeda"]::before {
    background: var(--c-cepeda);
}

.timeline-item[data-candidate="tigre"] {
    border-left: 4px solid var(--c-tigre);
}

.timeline-item[data-candidate="tigre"]::before {
    background: var(--c-tigre);
}

/* News title con mejor tipografía */
.news-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(to right, currentColor 0%, currentColor 100%);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

.news-title a:hover {
    color: var(--highlight);
    background-size: 100% 1px;
}

/* News source badges mejorados */
.news-source {
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.news-source::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.2) 0%,
        transparent 100%
    );
    pointer-events: none;
}

/* News tags de sentimiento */
.news-tag.pos {
    background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.08) 100%);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.3);
}

.news-tag.neg {
    background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.08) 100%);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}

/* Filter chips mejorados */
.news-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--divider);
}

.chip {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 16px;
    background: var(--bar-bg);
    color: var(--text-light);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.1) 0%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
}

.chip:hover::before {
    opacity: 1;
}

.chip.active,
.chip:hover {
    background: var(--highlight);
    color: #fff;
    border-color: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* YouTube grid mejorado */
.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.yt-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.yt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--co-yellow),
        var(--co-blue),
        var(--co-red)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yt-card:hover::before {
    opacity: 1;
}

.yt-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 12px 32px rgba(0,0,0,0.12),
        0 0 0 1px rgba(59,130,246,0.1);
}

.yt-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #0f172a;
    overflow: hidden;
}

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

.yt-card:hover .yt-thumb img {
    transform: scale(1.08);
}

.yt-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.6) 100%
    );
    pointer-events: none;
}

.yt-play svg {
    background: rgba(220, 38, 38, 0.95);
    border-radius: 50%;
    padding: 12px 16px 12px 18px;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.4),
        0 0 0 4px rgba(220,38,38,0.2);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.yt-card:hover .yt-play svg {
    transform: scale(1.1);
}

/* Stats cards para noticias */
.news-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.news-stat-card {
    background: linear-gradient(
        135deg,
        rgba(59,130,246,0.08) 0%,
        rgba(168,85,247,0.08) 100%
    );
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.news-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.15);
}

.news-stat-value {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(
        135deg,
        var(--co-yellow),
        var(--co-blue),
        var(--co-red)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 6px;
}

.news-stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Social cards mejorados */
#candidatesSocial {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#candidatesSocial > div {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.3s ease;
}

#candidatesSocial > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Loading skeletons mejorados */
.yt-skel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 0 0 14px 0;
    overflow: hidden;
}

.yt-skel .skel-line {
    margin: 10px 14px;
}

/* Empty states */
.yt-empty,
.yt-error {
    grid-column: 1 / -1;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    border: 2px dashed var(--card-border);
    border-radius: 16px;
    background: var(--bar-bg);
}

.yt-error {
    color: var(--danger);
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.05);
}

/* Badge de "EN VIVO" animado */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* Timestamp relativo */
.news-time {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.news-time::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--highlight);
    border-radius: 50%;
}
