/* Importamos la fuente para asegurar consistencia */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;800&display=swap');

:root {
    --primary: #ff9800;
    --secondary: #6d1b36;
    --accent: #ffe082;
    --text: #ffffff;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Opcional: Textura de fondo sutil si la imagen existe */
body::before {
    display: none;
}

/* HEADER: Limpio y espaciado */
.top-header {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    box-sizing: border-box;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-link {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.header-link:hover { color: var(--primary); }

.header-link::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: -5px; left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}
.header-link:hover::after { width: 100%; }

.header-button {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-button:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(109, 27, 54, 0.4);
}

/* CONTENEDOR CENTRAL */
.center-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    z-index: 1;
    box-sizing: border-box;
    align-items: start;
}

/* === CAJA IZQUIERDA: REPRODUCTOR (OSCURO) === */
.player-section {
    background: var(--secondary); /* Color oscuro de la marca */
    color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 2;
    text-align: center;
    width: auto;
}

.radio-logo {
    width: 140px;
    height: auto;
    margin-bottom: 2rem;
    transition: transform 0.3s;
}
.player-section:hover .radio-logo { transform: scale(1.05); }

/* Info Clima/Hora (elementos del JS) ahora en header */
#horaParaguay, #tempParaguay {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    padding: 0;
}
#horaParaguay i, #tempParaguay i { color: var(--primary); }


/* AUDIO PLAYER & WAVE */
.audio-player { width: 100%; }

.wave-animation {
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 2rem;
    opacity: 0.3; /* Estado base */
    transition: opacity 0.3s;
}

.wave-animation .bar {
    width: 4px;
    height: 100%;
    background: #fff; /* Ondas blancas sobre fondo oscuro */
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.wave-animation .bar:nth-child(even) { 
    background: var(--primary); 
    animation-duration: 1.2s;
}

@keyframes wave {
    0%, 100% { height: 15%; }
    50% { height: 80%; }
}

/* NUEVA INTERFAZ DE REPRODUCTOR (Play + Info) */
.player-interface {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 16px;
}

.play-btn {
    width: 70px; height: 70px;
    min-width: 70px;
    border-radius: 50%; border: none;
    background: #fff; color: var(--secondary); /* Invertido para resaltar */
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: grid; place-items: center;
    margin: 0;
}
.play-btn:hover {
    transform: scale(1.15);
    background: var(--primary); color: #fff;
}

.program-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-live {
    font-size: 0.7rem;
    background: #e53935;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    font-weight: 700;
}

#currentProgramTitle {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

#currentProgramTime {
    font-size: 0.9rem;
    opacity: 0.8;
    display: block;
}

.next-prog-container {
    margin-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 5px;
    font-size: 0.8rem;
    opacity: 0.6;
}
.next-prog-container strong { opacity: 1; }

/* Controles secundarios (Volumen) */
.secondary-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.mute-btn {
    background: none; border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer; font-size: 1.2rem;
    transition: color 0.2s;
}
.mute-btn:hover, .mute-btn.muted { color: #fff; }

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff; cursor: pointer;
    transition: transform 0.2s;
}
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.5); }

/* === CAJA DERECHA: PROGRAMACIÓN (CLARO) === */
.programacion-section {
    background: #f4f4f4;
    color: #333;
    padding: 2rem;
    border-radius: 20px;
    box-sizing: border-box;
    max-height: 600px;
    overflow-y: auto;
    width: auto;
    margin: 0;
}

.section-title {
    font-size: 1rem;
    color: var(--secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: left;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.programacion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.programacion-dia {
    display: none;
    background: transparent;
    border: none;
    padding: 0;
}
.programacion-dia.active-day {
    display: block;
}

.programacion-dia h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--secondary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    display: block;
}

.programacion-dia ul { list-style: none; padding: 0; margin: 0; }

.programacion-dia li {
    font-size: 0.85rem;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-left: 3px solid #ddd;
    background: #fff;
    border-radius: 4px;
    transition: all 0.2s;
}

.on-air {
    background: #fff5e6 !important; /* Fondo naranja muy suave */
    border-left-color: var(--primary) !important;
    color: #000 !important;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    opacity: 1 !important;
}

.footer-title {
    font-size: 1rem;
    color: var(--secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.main-footer {
    width: 100%;
    padding: 2rem;
    margin-top: auto;
    background: #fff;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

.social-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: #333;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid #111;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.social-handle {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.social-links a:hover .social-handle {
    color: #fff;
    font-weight: 600;
    transform: none;
}

.main-footer p {
    margin: 0.5rem 0 0 0;
}

.footer-credit {
    margin-top: 1rem;
}

.footer-credit-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.footer-credit-link:hover { color: var(--primary); }

.codef-credit {
    margin-top: 1.5rem;
}

.codef-credit-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: 'Courier New', Courier, monospace;
    text-decoration: none;
    color: #777;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.codef-credit-link:hover {
    background: #222;
    border-color: #222;
    color: #fff;
}

@media (max-width: 900px) {
    .center-container {
        grid-template-columns: 1fr; /* Una columna en movil */
        padding: 1rem;
        max-width: 500px;
        gap: 1.5rem;
        height: auto;
    }
    .player-section {
        border-radius: 20px;
        padding: 1.5rem;
    }
    .programacion-section {
        max-height: 400px;
    }
    .top-header {
        flex-direction: column;
        gap: 1rem;
    }
}