/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.3));
    transition: all 0.3s ease;
}

.logo img:hover {
    filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.5));
    transform: scale(1.05);
}

/* Radio Controls */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b35;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #666;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Navigation Styles */
.nav {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: var(--header-h, 80px); /* MODIFICADO 2026-07: altura real del header medida por JS */
    width: 100%;
    z-index: 999;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: #ff6b35;
}

/* Main Content */
.main-content {
    margin-top: calc(var(--header-h, 80px) + var(--nav-h, 60px)); /* MODIFICADO 2026-07 */
    min-height: calc(100vh - 160px);
    padding: 2rem;
}

.page {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* MODIFICADO 2026-07: proporción fija en vez de altura fija.
   El marco mantiene la forma de los banners (1200x500) en cualquier
   pantalla, así el banner completo se ve igual en desktop y en móvil. */
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 500;
    height: auto;
    overflow: hidden;
}

/* MODIFICADO 2026-07: banners de imagen limpia y clicables (sin cortina ni texto encima) */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: block;            /* ahora es un <a> */
    text-decoration: none;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
}

/* MODIFICADO 2026-07: 'contain' en vez de 'cover' — el banner se ve COMPLETO,
   sin recortarle los lados. Como el marco ya tiene la misma proporción que
   los banners (1200x500), encaja exacto y no sobra borde. */
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
/* ELIMINADO 2026-07: cortina oscura (::before) y estilos de texto/botón encima
   del banner. Ahora el texto va pintado dentro de la propia imagen. */

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ff6b35;
    transform: scale(1.2);
}

/* Content Pages */
.content-section {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 15px;
    padding: 3rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
}

.content-section h2 {
    color: #ff6b35;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.content-section p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #cccccc;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Page Header for Dynamic Pages */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.page-header p {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

/* Language Selector */
.language-selector {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    text-align: center;
}

.language-selector h3 {
    color: #ff6b35;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.language-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    color: #cccccc;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.lang-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    color: #ff6b35;
}

.lang-btn.active {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Schedule Container */
.schedule-container {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
}

.schedule-content {
    display: none;
}

.schedule-content.active {
    display: block;
}

/* Day Schedule */
.day-schedule {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid #ff6b35;
}

.day-schedule h3 {
    color: #ff6b35;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.programs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.program {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.program:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: translateX(5px);
}

.time {
    font-weight: bold;
    color: #ff6b35;
    font-size: 1rem;
    min-width: 140px;
}

.name {
    color: #cccccc;
    font-size: 1rem;
    flex: 1;
    margin-left: 1rem;
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 3rem;
    color: #cccccc;
}

.coming-soon h3 {
    color: #ff6b35;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.coming-soon p {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Contact Section */
.contact-section {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 15px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    text-align: center;
}

.contact-section h2 {
    color: #ff6b35;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    color: #cccccc;
    font-size: 1rem;
    font-weight: bold;
}

.contact-link {
    color: #ff6b35;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #f7931e;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .logo img {
        height: 30px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .main-content {
        margin-top: calc(var(--header-h, 80px) + var(--nav-h, 60px)); /* MODIFICADO 2026-07 */
        padding: 1rem;
    }

    .carousel {
        height: auto; /* MODIFICADO 2026-07: manda el aspect-ratio */
    }

    .slide-title {
        font-size: 1.8rem;
    }

    .slide-description {
        font-size: 1rem;
    }

    .slide-content {
        padding: 1rem;
    }

    .content-section {
        padding: 2rem;
    }
}



/* Estilos adicionales para optimización iOS */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    color: white;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 15px;
    border: 1px solid #333;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Modal */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
}

.error-content {
    background: rgba(26, 26, 26, 0.95);
    border-radius: 15px;
    border: 1px solid #333;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    color: white;
}

.error-content h3 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.error-content p {
    margin-bottom: 2rem;
    color: #cccccc;
    line-height: 1.5;
}

.error-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-button,
.dismiss-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.retry-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.dismiss-button {
    background: rgba(255, 255, 255, 0.1);
    color: #cccccc;
    border: 1px solid #333;
}

.dismiss-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid #333;
    padding: 1.5rem;
    z-index: 9999;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-content {
    text-align: center;
    color: white;
}

.install-content h3 {
    color: #ff6b35;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.install-content p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.install-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.install-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.install-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* iOS Safari specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* Solo aplicar en iOS Safari */
    
    .play-button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .volume-slider {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .volume-slider::-webkit-slider-track {
        background: #333;
        height: 4px;
        border-radius: 2px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #ff6b35;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Mejorar el comportamiento táctil */
    .nav-item,
    .dot,
    .slide-button,
    button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Prevenir zoom en iOS cuando se toca input */
    input[type="range"] {
        font-size: 16px;
    }
    
    /* Mejorar la experiencia en landscape */
    @media screen and (orientation: landscape) and (max-height: 500px) {
        .header {
            padding: 0.5rem 0;
        }
        
        .header-content {
            flex-direction: row;
            gap: 1rem;
        }
        
        .main-content {
            margin-top: calc(var(--header-h, 80px) + var(--nav-h, 60px)); /* MODIFICADO 2026-07 */
        }
        
        .carousel {
            height: auto; /* MODIFICADO 2026-07: manda el aspect-ratio */
        }
        
        .slide-title {
            font-size: 1.5rem;
        }
        
        .slide-description {
            font-size: 0.9rem;
        }
    }
}

/* PWA Display optimizations */
@media (display-mode: standalone) {
    /* Cuando se ejecuta como PWA */
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    .main-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Ocultar el prompt de instalación si ya está instalado */
    .install-prompt {
        display: none !important;
    }
}

/* Status indicator improvements for iOS */
.status-indicator {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced play button for iOS */
.play-button {
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.play-button:active::before {
    width: 100px;
    height: 100px;
}

/* Connection status indicators */
.status-dot.loading {
    background: #f7931e;
    animation: pulse 1s infinite;
}

.status-dot.error {
    background: #ff4444;
    animation: none;
}

.status-dot.connecting {
    background: #ffaa00;
    animation: pulse 0.5s infinite;
}

/* Audio loading states */
.radio-controls.loading .play-button {
    background: linear-gradient(45deg, #666, #888);
    cursor: not-allowed;
}

.radio-controls.loading .status-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '...'; }
    40% { content: '..'; }
    60% { content: '.'; }
    80%, 100% { content: ''; }
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .volume-slider {
        width: 80px;
    }
    
    .radio-controls {
        gap: 0.75rem;
    }
    
    .status-indicator {
        font-size: 0.8rem;
    }
    
    /* Larger touch targets */
    .nav-item {
        padding: 0.75rem 1.25rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dot {
        width: 16px;
        height: 16px;
        margin: 0 2px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .status-dot {
        border: 2px solid white;
    }
    
    .play-button {
        border: 2px solid white;
    }
    
    .nav-item.active {
        background: #ff6b35;
        color: black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .status-dot,
    .loading-spinner,
    .play-button::before {
        animation: none;
    }
    
    .carousel-slide {
        transition: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}


/* Estilos adicionales para optimización iOS V2 */

/* Mejorar el comportamiento táctil en iOS */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

input, button, select, textarea {
    -webkit-appearance: none;
    border-radius: 0;
}

/* Loading Overlay mejorado */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    border: 2px solid #ff6b35;
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.3);
    max-width: 300px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #333;
    border-top: 5px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Modal mejorado para iOS */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.error-modal[style*="flex"] {
    opacity: 1;
    visibility: visible;
}

.error-content {
    background: rgba(26, 26, 26, 0.98);
    border-radius: 20px;
    border: 2px solid #ff4444;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    color: white;
    box-shadow: 0 10px 40px rgba(255, 68, 68, 0.3);
    animation: errorSlideUp 0.4s ease-out;
}

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

.error-content h3 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.error-content p {
    margin-bottom: 2rem;
    color: #cccccc;
    line-height: 1.6;
    font-size: 1rem;
}

.error-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-button,
.dismiss-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.retry-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.retry-button:hover,
.retry-button:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.dismiss-button {
    background: rgba(255, 255, 255, 0.1);
    color: #cccccc;
    border: 2px solid #666;
}

.dismiss-button:hover,
.dismiss-button:active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: #999;
}

/* PWA Install Prompt mejorado */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid #ff6b35;
    padding: 1.5rem;
    z-index: 9999;
    animation: slideUpBounce 0.6s ease-out;
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.3);
}

@keyframes slideUpBounce {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    60% {
        transform: translateY(-10px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-content {
    text-align: center;
    color: white;
}

.install-content h3 {
    color: #ff6b35;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.install-content p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.install-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.install-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.install-button:hover,
.install-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* Mejoras específicas para iOS Safari */
@supports (-webkit-touch-callout: none) {
    /* Solo aplicar en iOS Safari */
    
    body {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mejor scroll en iOS */
    .main-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    /* Botón de reproducción optimizado para iOS */
    .play-button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
        background-attachment: fixed;
    }
    
    .play-button:active {
        transform: scale(0.95);
    }
    
    /* Volume slider optimizado para iOS */
    .volume-slider {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        background: transparent;
    }
    
    .volume-slider::-webkit-slider-track {
        background: #333;
        height: 6px;
        border-radius: 3px;
        border: none;
    }
    
    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #ff6b35;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        border: 2px solid white;
    }
    
    .volume-slider:active::-webkit-slider-thumb {
        transform: scale(1.2);
    }
    
    /* Mejorar navegación táctil */
    .nav-item,
    .dot,
    .slide-button,
    .lang-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
    
    .nav-item:active,
    .dot:active,
    .slide-button:active,
    .lang-btn:active {
        transform: scale(0.95);
    }
    
    /* Prevenir zoom en inputs */
    input[type="range"] {
        font-size: 16px;
        transform: scale(1);
    }
    
    /* Optimizar para notch de iPhone */
    @media screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
        .header {
            padding-top: max(1rem, env(safe-area-inset-top));
        }
        
        .main-content {
            padding-bottom: max(2rem, env(safe-area-inset-bottom));
        }
    }
    
    /* iPhone Pro Max */
    @media screen and (device-width: 414px) and (device-height: 896px) {
        .header {
            padding-top: max(1rem, env(safe-area-inset-top));
        }
    }
    
    /* Mejorar experiencia en landscape en iPhone */
    @media screen and (orientation: landscape) and (max-height: 500px) {
        .header {
            padding: 0.5rem 0;
        }
        
        .header-content {
            flex-direction: row;
            gap: 1rem;
        }
        
        .main-content {
            margin-top: calc(var(--header-h, 80px) + var(--nav-h, 60px)); /* MODIFICADO 2026-07 */
        }
        
        .carousel {
            height: auto; /* MODIFICADO 2026-07: manda el aspect-ratio */
        }
        
        .slide-title {
            font-size: 1.3rem;
        }
        
        .slide-description {
            font-size: 0.8rem;
            margin-bottom: 1rem;
        }
    }
}

/* PWA modo standalone */
@media (display-mode: standalone) {
    .header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
    
    .main-content {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    .install-prompt {
        display: none !important;
    }
}

/* Status indicator mejorado */
.status-indicator {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.status-dot {
    box-shadow: 0 0 10px currentColor;
}

/* Loading states para controles */
.radio-controls.loading .play-button {
    background: linear-gradient(45deg, #666, #888);
    cursor: not-allowed;
    animation: loadingPulse 1.5s infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.radio-controls.loading .status-text::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b35;
    animation: loadingDots 1.5s infinite;
    margin-left: 4px;
}

@keyframes loadingDots {
    0%, 20% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    80%, 100% { transform: scale(1); opacity: 1; }
}

/* Mejores touch targets para móvil */
@media (max-width: 768px) {
    .play-button {
        min-width: 50px;
        min-height: 50px;
        font-size: 1.2rem;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .volume-slider {
        width: 80px;
        height: 6px;
    }
    
    .radio-controls {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-indicator {
        font-size: 0.8rem;
        order: 3;
        width: 100%;
        text-align: center;
    }
    
    /* Navegación más grande en móvil */
    .nav-item {
        padding: 1rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    /* Dots más grandes */
    .dot {
        width: 18px;
        height: 18px;
        margin: 0 3px;
    }
    
    /* Botones de error más grandes */
    .retry-button,
    .dismiss-button {
        min-height: 48px;
        font-size: 1rem;
    }
}

/* Soporte para modo alto contraste */
@media (prefers-contrast: high) {
    .status-dot {
        border: 3px solid white;
    }
    
    .play-button {
        border: 3px solid white;
    }
    
    .nav-item.active {
        background: #ff6b35;
        color: black;
        border: 2px solid white;
    }
    
    .error-modal,
    .loading-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* Soporte para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .status-dot,
    .loading-spinner,
    .play-button::before,
    .carousel-slide {
        animation: none !important;
        transition: none !important;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
    
    .loading-spinner {
        border: 5px solid #ff6b35;
        border-radius: 50%;
    }
}

/* Estilos para debug en desarrollo */
.debug-ios {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ff6b35;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    z-index: 9998;
    display: none;
}

.debug-ios.show {
    display: block;
    2rem;
    color: #cccccc;
    line-height: 1.5;
}

.error-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-button,
.dismiss-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.retry-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.dismiss-button {
    background: rgba(255, 255, 255, 0.1);
    color: #cccccc;
    border: 1px solid #333;
}

.dismiss-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid #333;
    padding: 1.5rem;
    z-index: 9999;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-content {
    text-align: center;
    color: white;
}

.install-content h3 {
    color: #ff6b35;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.install-content p {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.install-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.install-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.install-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* iOS Safari specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* Solo aplicar en iOS Safari */
    
    .play-button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .volume-slider {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .volume-slider::-webkit-slider-track {
        background: #333;
        height: 4px;
        border-radius: 2px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #ff6b35;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Mejorar el comportamiento táctil */
    .nav-item,
    .dot,
    .slide-button,
    button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Prevenir zoom en iOS cuando se toca input */
    input[type="range"] {
        font-size: 16px;
    }
    
    /* Mejorar la experiencia en landscape */
    @media screen and (orientation: landscape) and (max-height: 500px) {
        .header {
            padding: 0.5rem 0;
        }
        
        .header-content {
            flex-direction: row;
            gap: 1rem;
        }
        
        .main-content {
            margin-top: calc(var(--header-h, 80px) + var(--nav-h, 60px)); /* MODIFICADO 2026-07 */
        }
        
        .carousel {
            height: auto; /* MODIFICADO 2026-07: manda el aspect-ratio */
        }
        
        .slide-title {
            font-size: 1.5rem;
        }
        
        .slide-description {
            font-size: 0.9rem;
        }
    }
}

/* PWA Display optimizations */
@media (display-mode: standalone) {
    /* Cuando se ejecuta como PWA */
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    .main-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Ocultar el prompt de instalación si ya está instalado */
    .install-prompt {
        display: none !important;
    }
}

/* Status indicator improvements for iOS */
.status-indicator {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced play button for iOS */
.play-button {
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.play-button:active::before {
    width: 100px;
    height: 100px;
}

/* Connection status indicators */
.status-dot.loading {
    background: #f7931e;
    animation: pulse 1s infinite;
}

.status-dot.error {
    background: #ff4444;
    animation: none;
}

.status-dot.connecting {
    background: #ffaa00;
    animation: pulse 0.5s infinite;
}

/* Audio loading states */
.radio-controls.loading .play-button {
    background: linear-gradient(45deg, #666, #888);
    cursor: not-allowed;
}

.radio-controls.loading .status-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '...'; }
    40% { content: '..'; }
    60% { content: '.'; }
    80%, 100% { content: ''; }
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    .volume-slider {
        width: 80px;
    }
    
    .radio-controls {
        gap: 0.75rem;
    }
    
    .status-indicator {
        font-size: 0.8rem;
    }
    
    /* Larger touch targets */
    .nav-item {
        padding: 0.75rem 1.25rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dot {
        width: 16px;
        height: 16px;
        margin: 0 2px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .status-dot {
        border: 2px solid white;
    }
    
    .play-button {
        border: 2px solid white;
    }
    
    .nav-item.active {
        background: #ff6b35;
        color: black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .status-dot,
    .loading-spinner,
    .play-button::before {
        animation: none;
    }
    
    .carousel-slide {
        transition: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}


/* Estilos para Programa Actual - Agregar al styles.css */

/* Contenedor del Programa Actual */
.programa-actual {
    flex: 1;
    max-width: 500px;
    margin: 0 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s ease;
}

.programa-actual.activo {
    opacity: 1;
    transform: translateY(0);
}

/* Info del Programa */
.programa-info {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.programa-info:hover {
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* Label Superior */
.programa-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.label-icon {
    font-size: 1rem;
    animation: pulseIcon 2s ease-in-out infinite;
}

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

.label-text {
    font-size: 0.75rem;
    color: #ff6b35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nombre del Programa */
.programa-nombre {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Horario */
.programa-horario {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #cccccc;
}

.horario-icon {
    font-size: 0.9rem;
    color: #ff6b35;
}

/* Ajustes al Header para acomodar el programa actual */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .programa-actual {
        max-width: 400px;
        margin: 0 1rem;
    }
    
    .programa-nombre {
        font-size: 0.9rem;
    }
    
    .programa-info {
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .programa-actual {
        max-width: 100%;
        margin: 1rem 0;
        order: 2;
    }
    
    .logo {
        order: 1;
    }
    
    .radio-controls {
        order: 3;
    }
    
    .programa-info {
        text-align: center;
    }
    
    .programa-label,
    .programa-horario {
        justify-content: center;
    }
    
    .programa-nombre {
        font-size: 1rem;
    }
}

/* Animación de entrada */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.programa-actual.activo .programa-info {
    animation: slideInDown 0.6s ease-out;
}

/* Estado de carga */
.programa-actual.loading .programa-info {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.programa-actual.loading .programa-nombre {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 1.2rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Efecto de brillo sutil */
.programa-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 107, 53, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.programa-info:hover::before {
    left: 100%;
}

/* Soporte para modo alto contraste */
@media (prefers-contrast: high) {
    .programa-info {
        border: 2px solid #ff6b35;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .programa-nombre {
        color: #ffffff;
        font-weight: 900;
    }
}

/* Soporte para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .programa-actual,
    .programa-info,
    .label-icon {
        animation: none !important;
        transition: none !important;
    }
    
    .programa-info::before {
        display: none;
    }
}

/* Optimización para iOS */
@supports (-webkit-touch-callout: none) {
    .programa-info {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* PWA Display Mode */
@media (display-mode: standalone) {
    .programa-actual {
        margin-top: env(safe-area-inset-top);
    }
}



/* ========================================
   ESTILOS PARA PROGRAMA ACTUAL
   ======================================== */

/* Contenedor del Programa Actual */
.programa-actual {
    flex: 1;
    max-width: 500px;
    margin: 0 1.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* Info del Programa */
.programa-info {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.programa-info:hover {
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* Label Superior */
.programa-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.label-icon {
    font-size: 1rem;
    animation: pulseIcon 2s ease-in-out infinite;
}

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

.label-text {
    font-size: 0.75rem;
    color: #ff6b35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nombre del Programa */
.programa-nombre {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Horario */
.programa-horario {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #cccccc;
}

.horario-icon {
    font-size: 0.9rem;
    color: #ff6b35;
}

/* Ajustes al Header para acomodar el programa actual */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .programa-actual {
        max-width: 400px;
        margin: 0 1rem;
    }
    
    .programa-nombre {
        font-size: 0.9rem;
    }
    
    .programa-info {
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .programa-actual {
        max-width: 100%;
        margin: 1rem 0;
        order: 2;
    }
    
    .logo {
        order: 1;
    }
    
    .radio-controls {
        order: 3;
    }
    
    .programa-info {
        text-align: center;
    }
    
    .programa-label,
    .programa-horario {
        justify-content: center;
    }
    
    .programa-nombre {
        font-size: 1rem;
    }
}

/* Animación de entrada */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.programa-actual .programa-info {
    animation: slideInDown 0.6s ease-out;
}

/* Efecto de brillo sutil */
.programa-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 107, 53, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.programa-info:hover::before {
    left: 100%;
}

/* Soporte para modo alto contraste */
@media (prefers-contrast: high) {
    .programa-info {
        border: 2px solid #ff6b35;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .programa-nombre {
        color: #ffffff;
        font-weight: 900;
    }
}

/* Soporte para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .programa-actual,
    .programa-info,
    .label-icon {
        animation: none !important;
        transition: none !important;
    }
    
    .programa-info::before {
        display: none;
    }
}

/* Optimización para iOS */
@supports (-webkit-touch-callout: none) {
    .programa-info {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* PWA Display Mode */
@media (display-mode: standalone) {
    .programa-actual {
        margin-top: env(safe-area-inset-top);
    }
}


/* Estilos para el logo */

.logo {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.logo:active {
    transform: scale(0.95);
}

/* =========================================
   TOGGLE DE IDIOMA GLOBAL — HEADER
   ========================================= */

.wcgo-lang-toggle {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.wcgo-lang-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
    border: 1.5px solid #444;
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.03em;
}

.wcgo-lang-btn:hover {
    border-color: #ff6b35;
    color: #fff;
}

.wcgo-lang-btn.active {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

/* En móvil reducir un poco */
@media (max-width: 480px) {
    .wcgo-lang-btn {
        padding: 0.25rem 0.55rem;
        font-size: 0.72rem;
    }
}

/* =========================================
   AGREGADO 2026-07 - PIE DE PÁGINA Y MODAL
   ========================================= */

.footer-links {
    text-align: center;
    padding: 2rem 1rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff6b35;
}

.foot-sep {
    color: #444;
}

.footer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10005; /* por encima del header (1000) y modales existentes */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.footer-modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.3s ease-out;
}

.footer-modal-content h3 {
    color: #ff6b35;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.footer-modal-content div {
    color: #ddd;
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-modal-content a {
    color: #ffb84d;
    text-decoration: none;
}

.footer-modal-content a:hover {
    text-decoration: underline;
}

.footer-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #999;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.footer-modal-close:hover {
    color: #ff6b35;
}

@media (max-width: 480px) {
    .footer-modal-content {
        padding: 1.5rem;
    }
    .footer-links {
        font-size: 0.85rem;
    }
}

/* =========================================
   AGREGADO 2026-07 - MENÚ HAMBURGUESA MÓVIL
   ========================================= */

/* En desktop el botón no existe y el menú queda como siempre */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.3s ease;
}

.nav-hamburger:hover {
    color: #ff6b35;
}

@media (max-width: 768px) {
    /* La barra del nav se reduce a solo el botón ☰ */
    .nav-hamburger {
        display: block;
        margin: 0 auto;
    }

    /* El menú vive oculto y se despliega como cortina ENCIMA
       del contenido (position absolute = no empuja la página) */
    .nav .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        text-align: center;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        padding: 0.5rem 0 1rem;
        border-bottom: 2px solid rgba(255, 107, 53, 0.4);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55);
    }

    .nav.menu-abierto .nav-menu {
        display: flex;
        animation: menuDespliega 0.25s ease-out;
    }

    .nav .nav-item {
        padding: 0.95rem 1rem;
        border-radius: 0;
    }

    /* La rayita del item activo estorba dentro de la cortina */
    .nav .nav-item.active::after {
        display: none;
    }
}

@keyframes menuDespliega {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .nav.menu-abierto .nav-menu { animation: none; }
}

/* =========================================
   AGREGADO 2026-07 - HEADER COMPACTO EN MÓVIL
   (va al final del archivo para ganar a las reglas anteriores)
   ========================================= */

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 0;
    }

    /* Fila 1: logo a la izquierda, idioma a la derecha.
       Fila 2: programa en una línea. Fila 3: controles. */
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem;
        padding: 0 1rem;
    }

    .logo { order: 1; }
    .logo img { height: 26px; }

    .wcgo-lang-toggle { order: 2; }

    /* Tarjeta del programa: de 3 renglones a UNA línea delgadita */
    .programa-actual {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .programa-info {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.35rem 0.75rem;
        border-radius: 8px;
    }

    .programa-info:hover { transform: none; }

    /* El label "📻 WCGO 1590 AM" es redundante: el logo ya lo dice */
    .programa-label { display: none; }

    .programa-nombre {
        margin-bottom: 0;
        font-size: 0.9rem;
        display: block;
        flex: 0 1 auto;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: unset;
    }

    .programa-horario {
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    /* Controles en fila compacta y centrada */
    .radio-controls {
        order: 4;
        width: 100%;
        justify-content: center;
        gap: 0.8rem;
    }

    .play-button {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    /* El volumen se controla con los botones físicos del teléfono
       (iOS ignora el volumen por software de todos modos) */
    .volume-control { display: none; }

    .status-indicator { font-size: 0.8rem; }
}

/* =========================================
   AGREGADO 2026-07 - VENTAJAS EN CONTACTO Y VENTAS
   ========================================= */

.cto-ventajas {
    max-width: 500px;
    margin: 1.5rem auto 0.5rem;
    background: rgba(255, 184, 77, 0.06);
    border: 1px solid rgba(255, 184, 77, 0.3);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
}

.cto-vent-intro {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

.cto-vent {
    color: #ddd;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0.55rem;
}

.cto-vent b { color: #FFB84D; }

.cto-star { color: #FFB84D; margin-right: 0.25rem; }

@media (max-width: 480px) {
    .cto-ventajas { padding: 1rem 1.1rem; }
}

/* =========================================
   AGREGADO 2026-07 - HORARIO SEMANAL (Página Programas)
   ========================================= */

.horario-semanal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.horario-dia {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
}

.horario-dia-titulo {
    color: #ff6b35;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 1.1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 107, 53, 0.25);
}

.horario-slot {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.horario-slot:last-child { border-bottom: none; }

.slot-hora {
    color: #FFB84D;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.slot-prog {
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
}

.slot-lang {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.25rem;
    border: 1px solid;
}

/* Etiquetas de idioma con los colores de la casa */
.lang-es { color: #FFB84D; border-color: rgba(255,184,77,0.5);  background: rgba(255,184,77,0.1); }
.lang-ko { color: #2A9D8F; border-color: rgba(42,157,143,0.5);  background: rgba(42,157,143,0.1); }
.lang-ru { color: #a78bfa; border-color: rgba(167,139,250,0.5); background: rgba(123,94,167,0.15); }
.lang-as { color: #FF6B35; border-color: rgba(255,107,53,0.5);  background: rgba(255,107,53,0.1); }
.lang-al { color: #f87171; border-color: rgba(230,57,70,0.5);   background: rgba(230,57,70,0.12); }

.horario-nota {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin: 1.5rem auto 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .horario-semanal {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }
    .horario-dia { padding: 1.1rem 1.2rem; }
}

/* AGREGADO 2026-07 - Salvaguarda: restos de texto/botón del carrusel viejo
   quedan ocultos por si alguna regla responsive los menciona todavía.
   (Los banners nuevos son 100% imagen; estas clases ya no se generan.) */
.slide-content,
.slide-title,
.slide-description,
.slide-button {
    display: none !important;
}

/* AGREGADO 2026-07 - Respaldo para navegadores viejitos sin aspect-ratio.
   Consigue la misma proporción 1200x500 con el truco del padding (41.67%). */
@supports not (aspect-ratio: 1 / 1) {
    .carousel {
        height: 0 !important;
        padding-bottom: 41.67%;
    }
    .carousel-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}
