/* ============================================
   LAYOUT.CSS — Estructura, header, secciones
   ============================================ */

/* ===== TOPBAR ===== */
.topbar {
    text-align: center;
    padding: 0.5rem 0;
    background: rgba(0, 0, 0, 0.3);
}
.topbar-link {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.topbar-link:hover { color: var(--text-primary); }

/* ===== HEADER / PLAYER ===== */
.player-header {
    padding: 1.25rem var(--space-lg);
    background: linear-gradient(135deg, rgba(0, 82, 155, 0.15) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.player-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-lg);
    align-items: center;
}

.player-logo img {
    height: 110px;
    width: auto;
    object-fit: contain;
}

/* Now Playing Card */
.now-playing-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    min-width: 0;
}

.now-art {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-azul), var(--color-azul-hover));
}
.now-art img { width: 100%; height: 100%; object-fit: cover; }
.art-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}

.now-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.now-status {
    display: flex; gap: 0.5rem; align-items: center;
}

.live-badge, .ondemand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    width: fit-content;
}
.live-badge {
    background: rgba(220, 38, 38, 0.15);
    color: #ff6b75;
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.ondemand-badge {
    background: rgba(255, 183, 3, 0.15);
    color: #ffb703;
    border: 1px solid rgba(255, 183, 3, 0.3);
}
.pulse-dot, .od-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    animation: pulse-anim 1.6s ease-in-out infinite;
}
.pulse-dot { background: var(--color-rojo); }
.od-dot { background: #ffb703; }

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

.now-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.now-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.now-meta { margin-top: 0.15rem; }
.listeners-badge {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Player Controls */
.player-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 200px;
}

.btn-play {
    background: linear-gradient(135deg, var(--color-rojo) 0%, var(--color-rojo-hover) 100%);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-rojo);
    transition: all var(--transition-base);
}
.btn-play:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.btn-play.is-playing {
    background: linear-gradient(135deg, #444 0%, #222 100%);
    box-shadow: var(--shadow-md);
}

.btn-back-live {
    background: linear-gradient(135deg, var(--color-azul), var(--color-azul-light));
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: var(--shadow-azul);
    transition: all var(--transition-base);
}
.btn-back-live:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.volume-control {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}
.volume-control input[type=range] {
    flex: 1;
    accent-color: var(--color-azul-light);
}

/* ===== SCHEDULE BAR ===== */
.schedule-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(0, 82, 155, 0.12);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.6rem var(--space-lg);
    position: relative;
}

.schedule-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}
.bar-dot {
    width: 8px; height: 8px;
    background: var(--color-rojo);
    border-radius: 50%;
    animation: pulse-anim 1.6s ease-in-out infinite;
}

.schedule-track {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    display: flex;
    gap: 1.5rem;
    scrollbar-width: none;
}
.schedule-track::-webkit-scrollbar { display: none; }

.schedule-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    white-space: nowrap;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}
.schedule-item.is-now {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--color-rojo);
    font-weight: 600;
}
.schedule-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}
.schedule-item.is-now .schedule-time { color: #ff6b75; }
.schedule-name {
    color: var(--text-primary);
    font-weight: 500;
}
.schedule-empty { color: var(--text-muted); font-style: italic; }

.schedule-arrows {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}
.bar-arrow {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}
.bar-arrow:hover {
    background: var(--color-azul);
    transform: scale(1.05);
}

/* ===== TICKER NOTICIAS ===== */
.news-ticker {
    display: flex;
    align-items: center;
    background: rgba(220, 38, 38, 0.08);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
    height: 38px;
}
.ticker-label {
    flex-shrink: 0;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-rojo);
    border-right: 1px solid var(--border-subtle);
    height: 100%;
    display: flex;
    align-items: center;
}
.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    height: 100%;
    align-items: center;
}
.ticker-inner {
    display: inline-flex;
    gap: 2rem;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
    padding-right: 2rem;
}
.ticker-track:hover .ticker-inner,
.news-ticker.is-paused .ticker-inner { animation-play-state: paused; }

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.ticker-source { font-weight: 700; }
.ticker-sep { color: var(--text-muted); margin: 0 0.5rem; }
.ticker-pause {
    width: 38px; height: 38px;
    background: transparent;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.ticker-pause:hover { color: var(--text-primary); }

/* ===== MAIN CONTENT (carrusel + ondemand) ===== */
.main-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) var(--space-lg);
    align-items: start;
}

/* ===== SECCIÓN NOTICIAS (grid) ===== */
.news-section {
    padding: var(--space-xl) var(--space-lg);
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: var(--space-2xl);
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}
.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.social-links {
    display: flex;
    gap: var(--space-md);
}
.social-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}
.social-links a:hover { color: var(--color-azul-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .player-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    .player-logo { display: flex; justify-content: center; }
    .now-playing-card { flex-direction: row; }
    .player-controls { min-width: 0; }
    
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .now-playing-card { flex-direction: column; text-align: center; }
    .now-art { width: 120px; height: 120px; }
    .live-badge, .ondemand-badge { margin: 0 auto; }
}

.footer-nav {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}
.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}
.footer-nav a:hover {
    background: var(--color-azul);
    border-color: var(--color-azul);
    color: #fff;
}