/* =========================================
   ESTILOS ORIGINALES PREMIUM (css_inicio.css)
   ========================================= */

:root {
    --primary: #fdd835;
    --bg-dark: #05050b;
    --bg-card: #111118;
    --text-muted: #b9b9bd;
}

.wrap-radio {
    width: 100%;
    max-width: none;
    margin: 40px auto;
}

.layout-principal {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

/* Columna Izquierda (Carousel) */
.col-izquierda {
    flex: 1;
    min-width: 0;
}

/* Columna Derecha (Sidebar) */
.col-derecha {
    width: 320px;
    flex-shrink: 0;
}

/* CARRUSEL PRINCIPAL */
.carrusel-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: #000;
    border: 1px solid rgba(255,255,255,0.05);
}

.carrusel { width: 100%; height: 100%; position: relative; }

.carrusel picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.carrusel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.carrusel-img.activa { opacity: 1; z-index: 2; }

/* Botones Carrusel Premium */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.carrusel-btn:hover { background: var(--primary); color: #000; transform: translateY(-50%) scale(1.1); box-shadow: 0 0 20px rgba(253, 216, 53, 0.3); }
.anterior { left: 25px; }
.siguiente { right: 25px; }

/* SECCIÓN MEDIOS (Radio & TV) */
.contenedor-general.seccion-medios {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.radio-section h2, .tv-section h2 {
    font-size: 1.7rem;
    font-weight: 850;
    color: var(--primary);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Tarjetas Radio/TV Premium */
.radio-player-card, .tv-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 26px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.radio-player-card:hover, .tv-card:hover {
    transform: translateY(-5px);
    border-color: rgba(253, 216, 53, 0.2);
}

.radio-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-row-main {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.radio-logo-img {
    width: 70px;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    background: #000;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    object-fit: contain;
}

.radio-name-txt { margin: 0; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.radio-loc-txt { margin: 0; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

/* RADIO CONTROLS */
.radio-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.radio-play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(253, 216, 53, 0.3);
    flex-shrink: 0;
}

.radio-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(253, 216, 53, 0.4);
}

/* Icono de Play (CSS puro) */
.radio-play-btn .icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #000;
    margin-left: 5px;
    transition: all 0.2s ease;
}

/* Icono de Pausa cuando tiene clase .paused */
.radio-play-btn.paused .icon {
    width: 18px;
    height: 22px;
    border: none;
    background: transparent;
    display: flex;
    justify-content: space-between;
    margin-left: 0;
}

.radio-play-btn.paused .icon:before,
.radio-play-btn.paused .icon:after {
    content: '';
    width: 6px;
    height: 100%;
    background: #000;
    border-radius: 2px;
}

.radio-vol-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.05);
    padding: 10px 18px;
    border-radius: 12px;
}

.radio-volume-icon {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.radio-vol-slider {
    flex: 1;
    appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.radio-vol-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.radio-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.radio-fill-el {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* TV PLAYER */
.tv-player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

video { width: 100%; height: 100%; }

.tv-start-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    background: var(--primary);
    color: #000;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

/* PUBLICIDAD */
.publicidad {
    width: 100%;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.publicidad img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* POPUP PUBLICITARIO */
#popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Se activa con JS */
    justify-content: center;
    align-items: center;
    z-index: 300000;
    backdrop-filter: blur(8px);
}

#popup-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    object-fit: contain;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
}

#popup .cerrar {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 300001;
}

#popup .cerrar:hover {
    background: var(--primary);
    color: #000;
    transform: rotate(90deg);
}

/* RESPONSIVO */
@media (max-width: 1200px) {
    .col-derecha { display: none; }
    .contenedor-general.seccion-medios { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .carrusel-container { border-radius: 20px; }
    .wrap-radio { width: 94%; margin-top: 25px; }
    .radio-player-card, .tv-card { padding: 20px; }
    .radio-logo-img { width: 65px; height: auto; }
}

@media (max-width: 480px) {
    .radio-name-txt { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    #popup {
        padding: 18px;
        align-items: center;
    }

    #popup-img {
        max-width: calc(100vw - 36px);
        max-height: calc(100vh - 120px);
        border-radius: 16px;
    }

    #popup .cerrar {
        top: max(78px, calc(50vh - min(42vh, 280px) - 46px));
        right: 22px;
        width: 42px;
        height: 42px;
        font-size: 30px;
        z-index: 300001;
    }
}
