/* ===== RESET Y BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* FONDOS */
    --bg-primary:       #00529b;          /* Azul corporativo */
    --bg-secondary:     #003d74;          /* Azul oscuro */
    --bg-card:          #ffffff;          /* Blanco */
    --bg-card-hover:    #f0f6ff;          /* Blanco con tinte azul */

    /* ACENTO → ROJO corporativo */
    --accent:           #b91c1c;
    --accent-light:     #dc2626;
    --accent-glow:      rgba(185, 28, 28, 0.35);

    /* TEXTOS */
    --text-primary:     #ffffff;          /* Blanco — sobre fondos azules */
    --text-on-card:     #0a1f35;          /* Azul muy oscuro — dentro de cards */
    --text-secondary:   #2d5f8a;          /* Azul medio */
    --text-muted:       #6a9bc3;          /* Azul apagado */

    /* ESTADOS */
    --success:          #00c48c;
    --warning:          #f59e0b;          /* Ámbar — badge PRÓXIMO */
    --danger:           #b91c1c;          /* Rojo corporativo — AL AIRE */

    /* BORDES Y SOMBRAS */
    --border:           rgba(0, 82, 155, 0.15);
    --border-card:      rgba(0, 82, 155, 0.12);
    --radius:           16px;
    --radius-sm:        8px;
    --shadow:           0 8px 32px rgba(0, 0, 0, 0.25);
    --font:             'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ===== PLAYER HEADER ===== */
.player-wrapper {
    /* Degradado de azul muy oscuro hacia el azul corporativo */
    background: linear-gradient(135deg, #001f3d 0%, #003d74 50%, #00529b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.player-card {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* Logo y nombre */
.radio-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    /* Azul corporativo → Rojo corporativo */
    background: linear-gradient(135deg, #003d74, #b91c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 20px rgba(185, 28, 28, 0.4);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(185, 28, 28, 0.4); }
    50%       { box-shadow: 0 0 35px rgba(185, 28, 28, 0.7); }
}

.radio-name {
    font-size: 1.4rem;
    font-weight: 700;
    /* Blanco → azul muy claro */
    background: linear-gradient(135deg, #ffffff, #bdd4ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.radio-slogan {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

/* Now Playing */
.now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 12px 20px;
    flex: 1;
    max-width: 450px;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(185, 28, 28, 0);
    }
}

.label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #ff6b6b;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.song-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.song-artist {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Controles */
.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    /* Azul oscuro → azul corporativo */
    background: linear-gradient(135deg, #003d74, #0066c0);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Al estar reproduciendo → rojo corporativo */
.play-btn.playing {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(185, 28, 28, 0.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 90px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #bdd4ec;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

/* ===== HEADERS DE SECCIÓN ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);       /* Blanco sobre fondo azul */
}

.section-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 50px;
}

/* ===== PROGRAMACIÓN ===== */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.program-card {
    background: var(--bg-card);               /* Blanco */
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 20px;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.program-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 82, 155, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Card programa ACTIVO — azul corporativo */
.active-program {
    border-color: rgba(0, 82, 155, 0.6) !important;
    background: linear-gradient(135deg, #e8f1fb, #dceeff) !important;
    box-shadow: 0 0 30px rgba(0, 82, 155, 0.2),
                0 2px 12px rgba(0, 0, 0, 0.1) !important;
}

.program-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.day {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);                      /* Rojo */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(185, 28, 28, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.hours {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);             /* Azul medio */
}

.hours-sep {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1;
}

.program-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-on-card);               /* Azul muy oscuro */
    margin-bottom: 4px;
}

.program-host {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.program-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Badge de estado genérico */
.program-status {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(0, 82, 155, 0.06);
    border: 1px solid rgba(0, 82, 155, 0.15);
    padding: 4px 10px;
    border-radius: 50px;
    white-space: nowrap;
    text-align: center;
}

/* Badge AL AIRE — rojo corporativo */
.on-air {
    color: #b91c1c !important;
    background: rgba(185, 28, 28, 0.1) !important;
    border: 1px solid rgba(185, 28, 28, 0.35) !important;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* ===== PROGRAMA PRÓXIMO ===== */
/* Mantiene el brillo ámbar original */
.next-program {
    border-color: rgba(245, 158, 11, 0.4) !important;
    background: linear-gradient(
        135deg,
        #fffdf0,
        #fff8e1
    ) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15),
                0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

.next-up {
    color: #b45309 !important;
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    /* Brillo pulsante ámbar */
    animation: glowAmber 2s ease-in-out infinite;
}

@keyframes glowAmber {
    0%, 100% {
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
    }
}

/* ===== SECCIÓN CHAT/COMUNIDAD ===== */
.chat-section {
    position: sticky;
    top: 130px;
}

/* Discord Widget */
.discord-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.discord-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #5865F2;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.discord-logo {
    width: 24px;
    height: 24px;
    color: white;
}

.discord-placeholder {
    padding: 32px 24px;
    text-align: center;
}

.discord-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.discord-placeholder h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-on-card);
}

.discord-placeholder p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.discord-btn {
    display: inline-block;
    background: #5865F2;
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

/* Formulario de mensajes */
.message-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.message-form-wrapper h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-on-card);
}

.form-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-form input,
.message-form textarea {
    background: #f4f8fd;
    border: 1px solid rgba(0, 82, 155, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-on-card);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 155, 0.15);
}

.message-form input::placeholder,
.message-form textarea::placeholder {
    color: var(--text-muted);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Botón enviar — rojo corporativo */
.send-btn {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
}

.message-success {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0, 196, 140, 0.1);
    border: 1px solid rgba(0, 196, 140, 0.3);
    border-radius: var(--radius-sm);
    color: #007a5a;
    font-size: 0.85rem;
    text-align: center;
}

/* ===== CARÁTULA DEL ÁLBUM ===== */
.album-art-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

#album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: opacity 0.5s ease;
}

.art-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #003d74, #00529b);
}

/* ===== LIVE BADGE ===== */
.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* ===== OYENTES ===== */
.listeners-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 3px 10px;
    width: fit-content;
}

.listeners-badge .listeners-icon {
    font-size: 0.8rem;
}

#listener-count {
    font-weight: 700;
    color: #ffffff;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .player-wrapper {
        padding: 16px 20px;
    }

    .player-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .now-playing {
        max-width: 100%;
        width: 100%;
    }

    .chat-section {
        position: static;
    }

    .program-card {
        grid-template-columns: 80px 1fr;
    }

    .program-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .radio-name { font-size: 1.1rem; }
    .section-header h2 { font-size: 1rem; }
    .footer {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

/* ===== NOTICIAS ===== */
.news-section {
    position: sticky;
    top: 130px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Card de noticia */
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 82, 155, 0.3);
}

/* Imagen */
.news-img-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #e8f1fb;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #e8f1fb, #dceeff);
}

/* Badge sobre la imagen */
.news-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 50px;
}

.badge-noticia {
    background: rgba(0, 82, 155, 0.85);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.badge-convenio {
    background: rgba(185, 28, 28, 0.85);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

/* Contenido de la card */
.news-content {
    padding: 16px;
}

.news-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-on-card);
    margin-bottom: 8px;
    line-height: 1.4;

    /* Limita a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-pretexto {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;

    /* Limita a 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sin noticias */
.news-empty {
    background: var(--bg-card);
    border: 1px dashed var(--border-card);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
}

.news-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.news-empty p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ================================================
   GRILLA INFERIOR DE NOTICIAS
   ================================================ */
.news-grid-section {
    max-width: 1200px;
    margin: 0 auto 48px auto;
    padding: 0 40px;
}

.news-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.news-grid-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);       /* Blanco sobre fondo azul */
}

/* Grilla responsiva: 4 columnas en desktop */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ================================================
   VARIANTE: card en modo GRID (más compacta)
   ================================================ */
.news-card--grid .news-img-wrapper {
    height: 140px;                    /* Imagen más pequeña que en lateral */
}

.news-card--grid .news-title {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
}

.news-card--grid .news-pretexto {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
}

.news-card--grid .news-content {
    padding: 12px;
}

/* ================================================
   VARIANTE: card en modo LATERAL (ya existente,
   solo se refuerza el nombre de clase)
   ================================================ */
.news-card--lateral .news-img-wrapper {
    height: 160px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1100px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);  /* 3 columnas en tablet grande */
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columnas en tablet */
    }

    .news-grid-section {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;             /* 1 columna en móvil */
    }
}

/* ================================================
   WIDGET RSS — TABS DE PORTALES
   ================================================ */
.rss-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.rss-tab {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font);
    white-space: nowrap;
}

.rss-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.rss-tab.active {
    background: #ffffff;
    color: var(--bg-primary);
    border-color: #ffffff;
    font-weight: 700;
}

/* ================================================
   LISTA RSS
   ================================================ */
.rss-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 4px;

    /* Scrollbar interna */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.rss-list::-webkit-scrollbar       { width: 4px; }
.rss-list::-webkit-scrollbar-track { background: transparent; }
.rss-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* ================================================
   CARD RSS
   ================================================ */
.rss-card {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    align-items: flex-start;
}

.rss-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

/* Imagen RSS */
.rss-img-wrapper {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.rss-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenido RSS */
.rss-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;          /* Evita overflow del texto */
}

/* Badge del portal */
.rss-source-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 50px;
    border: 1px solid;
    width: fit-content;
}

/* Título */
.rss-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;

    /* Máximo 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Descripción */
.rss-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fecha */
.rss-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* Icono de enlace externo al hacer hover */
.rss-card::after {
    content: '↗';
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.rss-card {
    position: relative;
}

.rss-card:hover::after {
    opacity: 1;
}
/* ================================================
   BARRA DE PROGRAMACIÓN HORIZONTAL
   ================================================ */
.schedule-bar-wrapper {
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    position: sticky;
    top: 105px;          /* Justo debajo del player */
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Etiqueta izquierda "Programación" */
.schedule-bar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 16px;
    min-width: 80px;
    height: 100%;
    background: var(--accent);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    border-right: none;
    align-self: stretch;
}

.bar-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Track scrolleable */
.schedule-bar-track {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    gap: 2px;
    padding: 6px 8px;

    /* Oculta el scrollbar (se navega con flechas) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.schedule-bar-track::-webkit-scrollbar {
    display: none;
}

/* Flechas de navegación */
.schedule-bar-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.2);
    align-self: stretch;
    justify-content: center;
}

.bar-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    width: 28px;
    height: 24px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: var(--font);
}

.bar-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ================================================
   ITEM DE LA BARRA
   ================================================ */
.bar-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 150px;
    max-width: 200px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.bar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hora */
.bar-item-time {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bar-item-end {
    font-weight: 400;
    font-size: 0.6rem;
}

/* Cuerpo */
.bar-item-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Nombre del programa */
.bar-item-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Host */
.bar-host {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tiempo restante */
.bar-time-info {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1px;
}

/* ================================================
   ESTADOS
   ================================================ */

/* AL AIRE (automático) */
.bar-item--current {
    background: rgba(0, 82, 155, 0.35) !important;
    border-color: rgba(0, 82, 155, 0.7) !important;
    box-shadow: 0 0 16px rgba(0, 82, 155, 0.3);
}

.bar-item--current .bar-item-name {
    color: #ffffff;
}

.bar-item--current .bar-item-time {
    color: rgba(255, 255, 255, 0.7);
}

/* EN VIVO (programa con conductor) */
.bar-item--live {
    border-color: rgba(251, 191, 36, 0.3) !important;
}

.bar-item--live .bar-item-name {
    color: #fde68a;
}

/* EN VIVO + AL AIRE */
.bar-item--current.bar-item--live {
    background: rgba(120, 53, 15, 0.5) !important;
    border-color: rgba(251, 191, 36, 0.6) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25) !important;
    animation: liveBarGlow 2s ease-in-out infinite;
}

@keyframes liveBarGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(251, 191, 36, 0.2); }
    50%       { box-shadow: 0 0 24px rgba(251, 191, 36, 0.45); }
}

/* Pasado (ya terminó) */
.bar-item--past {
    opacity: 0.35;
    filter: grayscale(0.5);
}

/* Próximo */
.bar-item--upcoming {
    background: rgba(255, 255, 255, 0.03);
}

/* ================================================
   BADGES DE LA BARRA
   ================================================ */
.bar-badge {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 2px;
}

.bar-badge--onair {
    background: rgba(185, 28, 28, 0.8);
    color: #ffffff;
    animation: blink 1.5s ease-in-out infinite;
}

.bar-badge--current {
    background: rgba(0, 82, 155, 0.6);
    color: #ffffff;
}

.bar-badge--next {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Sin programación */
.bar-empty {
    padding: 16px 24px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .schedule-bar-wrapper {
        top: 0;
        position: relative;
    }

    .schedule-bar-label {
        min-width: 60px;
        padding: 0 10px;
        font-size: 0.55rem;
    }

    .bar-item {
        min-width: 130px;
    }
}
/* ================================================
   CARRUSEL DE PROGRAMAS EN VIVO
   ================================================ */
.carousel-section {
    display: flex;
    flex-direction: column;
}

.carousel-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-card);

    /* Altura fija para el carrusel */
    height: 480px;
}

/* Track que se desliza */
.carousel-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

/* Cada slide */
.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

/* Imagen del slide */
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay con degradado */
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 20, 50, 0.95)  0%,
        rgba(0, 20, 50, 0.5)   50%,
        rgba(0, 0, 0, 0.1)     100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    gap: 8px;
}

/* Badge EN VIVO */
.slide-live-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(185, 28, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    width: fit-content;
    backdrop-filter: blur(4px);
}

/* Cuando está al aire ahora */
.slide-live-badge--onair {
    background: var(--accent) !important;
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(185, 28, 28, 0.6);
}

/* Nombre del programa */
.slide-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Conductor */
.slide-host {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Descripción */
.slide-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    max-width: 380px;
}

/* Horario */
.slide-schedule {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 50px;
    width: fit-content;
    backdrop-filter: blur(4px);
}

/* ================================================
   BOTONES DE NAVEGACIÓN
   ================================================ */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
    line-height: 1;
}

.carousel-btn--prev { left: 14px; }
.carousel-btn--next { right: 14px; }

.carousel-btn:hover {
    background: rgba(185, 28, 28, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

/* ================================================
   DOTS INDICADORES
   ================================================ */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #ffffff;
    width: 24px;                   /* Se alarga el dot activo */
    border-radius: 4px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
    .carousel-wrapper {
        height: 360px;
    }

    .slide-name {
        font-size: 1.2rem;
    }

    .slide-overlay {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        height: 300px;
    }

    .slide-name {
        font-size: 1rem;
    }

    .slide-desc {
        display: none;    /* Oculta la descripción en móvil pequeño */
    }
}

/* ================================================
   BARRA DE TITULARES (TICKER)
   ================================================ */
.news-ticker-wrapper {
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    position: sticky;
    top: 145px;         /* Debajo del player y la barra de programación */
    z-index: 85;
}

/* Etiqueta izquierda */
.news-ticker-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    height: 100%;
    background: #003d74;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

/* Track del ticker */
.news-ticker-track {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 100%;
    /* Degradado en los bordes para efecto de fundido */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 4%,
        black 96%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 4%,
        black 96%,
        transparent 100%
    );
}

/* Contenedor interior que se mueve */
.news-ticker-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerScroll 100s linear infinite;
    flex-shrink: 0;
}

/* Clon para el loop continuo */
.news-ticker-inner--clone {
    animation: tickerScroll 100s linear infinite;
}

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Pausa la animación */
.news-ticker-track.paused .news-ticker-inner,
.news-ticker-track.paused .news-ticker-inner--clone {
    animation-play-state: paused;
}

/* Cada titular */
.ticker-item {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 8px;
    cursor: default;
    transition: color 0.2s ease;
}

.ticker-item:hover {
    color: #ffffff;
}

/* Separador entre titulares */
.ticker-sep {
    color: var(--accent);
    margin-left: 8px;
    font-size: 0.5rem;
    vertical-align: middle;
    opacity: 0.6;
}

/* Botón de pausa */
.ticker-pause-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0 12px;
    height: 100%;
    transition: color 0.2s;
    flex-shrink: 0;
}

.ticker-pause-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Portal de origen dentro del ticker */
.ticker-source {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 5px;
    opacity: 0.9;
}

/* ================================================
   IMAGEN PROMO LATERAL (reemplaza el aside)
   ================================================ */
.news-section {
    position: sticky;
    top: 230px;           /* Ajusta según la altura del player + barras */
}

.promo-image-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
}

.promo-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    transition: transform 0.4s ease;
}

.promo-image:hover {
    transform: scale(1.02);
}

/* Si la imagen falla, oculta el wrapper */
.promo-image-wrapper:has(img[style*="display:none"]) {
    display: none;
}

/* ================================================
   RESPONSIVE TICKER
   ================================================ */
@media (max-width: 768px) {
    .news-ticker-wrapper {
        top: 0;
        position: relative;
    }

    .news-ticker-label {
        padding: 0 10px;
        font-size: 0.65rem;
    }

    .ticker-item {
        font-size: 0.72rem;
    }

    /* Imagen promo en móvil no es sticky */
    .news-section {
        position: static;
    }
}