/*
Theme Name: Pachamama Radio App
Author: Tu Nombre
Description: Interfaz profesional para Radio AM/FM estilo Single Page Application.
Version: 1.0
*/

/* App... */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    height: 100vh;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Fondo color sólido - se sobrescribe con PHP en header */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #feffd7;
    z-index: -1;
}

.background {
    position: relative;
    z-index: 1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Barra de navegación superior con nombres */
.top-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.nav-link {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #e74c3c;
    border-radius: 2px;
}

/* Contenedores de señales - AM y FM CON espacio abajo */
.signal-container {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    width: 100%;
    height: calc(100vh - 125px);
    overflow-y: auto;
    animation: fadeIn 0.5s ease;
    padding-bottom: 90px;
}

.signal-container.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout principal: 2 columnas CENTRADO */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    height: auto;
}

/* Columna del reproductor */
.player-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo img,
.logo .custom-logo,
.logo .custom-logo-link img {
    max-width: 262px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.signal-title {
    font-size: 32px;
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    color: #2c3e50;
}

.program-card {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.program-card:hover {
    transform: scale(1.02);
}

.program-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.broadcaster-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    z-index: 5;
    pointer-events: none;
}

.program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 1;
}

.program-card:hover .program-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.play-icon {
    font-size: 70px;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 0 30px rgba(231, 76, 60, 1);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    opacity: 0.7;
}

.program-card:hover .play-icon {
    transform: scale(1.2);
    opacity: 1;
}

.program-overlay.playing {
    opacity: 0;
}

.program-card:hover .program-overlay.playing {
    opacity: 1;
}

/* Columna de programación - CENTRADA Y RESPONSIVE */
.schedule-column {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 500px;
    margin: 0 auto;
    width: 93%;
    max-width: 100%;
}

.schedule-title {
    font-size: 26px;
    margin: 0 0 20px 0;
    text-align: center;
    color: #2c3e50;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.schedule-iframe-container {
    flex: 1;
    min-height: 450px;
    border-radius: 15px;
    overflow: hidden;
}

.schedule-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ESTILOS PARA PROGRAMACIÓN DESDE WORDPRESS */
.schedule-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 450px;
}

.loading-schedule,
.no-programs {
    text-align: center;
    padding: 40px 20px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.program-item,
.program-item-now {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.program-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.program-item-now {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.program-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    font-weight: bold;
    color: #2c3e50;
}

.program-item-now .program-time {
    color: white;
}

.time-start,
.time-end {
    font-size: 15px;
    line-height: 1.3;
}

.time-separator {
    margin: 2px 0;
    opacity: 0.6;
    font-size: 12px;
}

.program-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.program-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    line-height: 1.3;
}

.program-item-now .program-title {
    color: white;
}

.program-conductors {
    font-size: 13px;
    opacity: 0.8;
    font-style: italic;
    color: #555;
    line-height: 1.4;
}

.program-item-now .program-conductors {
    color: rgba(255, 255, 255, 0.95);
}

.on-air-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Páginas (WEB y CONTACTO) */
.page-container {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    width: 100%;
    min-height: calc(100vh - 55px);
    overflow-y: auto;
    overflow-x: hidden;
    animation: fadeIn 0.5s ease;
}

.page-container.active {
    display: block;
}

/* Página WEB - SIN padding-bottom */
.page-container#webPage {
    padding-bottom: 0;
}

/* Página CONTACTO - CON padding-bottom para la barra + extra */
.page-container#contactPage {
    padding-bottom: 100px;
}

/* Página WEB - 100% sin título */
.web-iframe-fullscreen {
    width: 100%;
    min-height: calc(100vh - 55px);
    height: 100%;
    border: none;
    background: white;
}

/* Página CONTACTO - CENTRADA */
.page-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 30px 20px;
}

.page-title {
    text-align: center;
    font-size: 36px;
    margin: 0 0 30px 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    color: #2c3e50;
}

/* CONTACTO - Grid centrado que muestra 3 tarjetas */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
    align-items: start;
}

.contact-card {
    background: rgba(0, 0, 0, 0.65);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.3);
}

.contact-card h3 {
    font-size: 22px;
    margin: 0 0 15px 0;
    color: #e74c3c;
}

.contact-card p {
    margin: 10px 0;
    line-height: 1.8;
    font-size: 15px;
}

.contact-card a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-card a:hover {
    color: #e74c3c;
}

/* BARRA REPRODUCTORA - SIEMPRE VISIBLE */
.custom-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(30, 30, 30, 0.95));
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.7);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    backdrop-filter: blur(15px);
}

.player-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.player-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.player-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-signal {
    margin: 0;
    font-size: 12px;
    color: #e74c3c;
    font-weight: bold;
}

.player-program {
    margin: 0;
    font-size: 14px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-center {
    display: flex;
    align-items: center;
}

.player-control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

.player-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.7);
}

.player-control-btn:active {
    transform: scale(0.95);
}

.player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.player-volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px;
}

.player-volume-btn:hover {
    color: #e74c3c;
}

.volume-slider {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }
    
    .schedule-column {
        min-height: 500px;
        padding: 20px 15px;
    }
    
    .schedule-content {
        min-height: 450px;
    }
    
    .signal-title {
        font-size: 26px;
    }
    
    .program-card {
        max-width: 100%;
    }
    
    .page-content {
        padding: 30px 15px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .top-navigation {
        height: 50px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .signal-container {
        top: 50px;
        height: calc(100vh - 120px);
        padding-bottom: 90px;
    }
    
    .page-container {
        top: 50px;
    }
    
    .page-container#webPage {
        min-height: calc(100vh - 50px);
        padding-bottom: 0;
    }
    
    .page-container#contactPage {
        min-height: calc(100vh - 50px);
        padding-bottom: 100px;
    }
    
    .web-iframe-fullscreen {
        min-height: calc(100vh - 50px);
    }
    
    .logo img,
    .logo .custom-logo {
        max-width: 140px;
    }
    
    .signal-title {
        font-size: 22px;
    }
    
    .play-icon {
        font-size: 60px;
    }
    
    .schedule-column {
        min-height: 550px;
        padding: 20px 15px;
    }
    
    .schedule-content {
        min-height: 500px;
    }
    
    .page-content {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .custom-player-bar {
        padding: 0 15px;
    }
    
    .player-thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .player-control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .program-item,
    .program-item-now {
        padding: 12px;
        gap: 12px;
    }
    
    .program-time {
        min-width: 60px;
    }
    
    .time-start,
    .time-end {
        font-size: 14px;
    }
    
    .program-title {
        font-size: 15px;
    }
    
    .program-conductors {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nav-link {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .signal-container {
        padding-bottom: 90px;
    }
    
    .signal-title {
        font-size: 20px;
    }
    
    .play-icon {
        font-size: 50px;
    }
    
    .schedule-column {
        min-height: 600px;
        padding: 15px 10px;
    }
    
    .schedule-content {
        min-height: 550px;
    }
    
    .page-content {
        padding: 20px 10px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .custom-player-bar {
        padding: 0 10px;
    }
    
    .player-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .player-info-text {
        max-width: 100px;
    }
    
    .player-signal {
        font-size: 11px;
    }
    
    .player-program {
        font-size: 12px;
    }
    
    .player-control-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .volume-slider {
        display: none;
    }
    
    .program-item,
    .program-item-now {
        padding: 10px;
        gap: 10px;
    }
    
    .program-time {
        min-width: 55px;
    }
    
    .time-start,
    .time-end {
        font-size: 13px;
    }
    
    .program-title {
        font-size: 14px;
    }
    
    .program-conductors {
        font-size: 11px;
    }
    
    .on-air-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}