/* 
 * Mobile Styles for Radio CMS
 * Optimized for small screens and touch interfaces
 */

/* Utilidades generales para móvil */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ----------------- Mobile Navigation ----------------- */
.menu-toggle {
    display: none; /* Se mostrará en media query */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
    transition: color 0.3s ease;
    z-index: 1030;
}

.menu-toggle:hover {
    color: var(--primary-dark);
}

/* Menú móvil */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1025;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    right: -300px;
    bottom: 0;
    width: 300px;
    background: #ffffff;
    z-index: 1026;
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.2);
}

.mobile-nav-container.show {
    transform: translateX(-300px);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
}

.mobile-nav-title {
    font-weight: 600;
    font-size: 18px;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

/* Estilos simplificados para enlaces del menú móvil */
.mobile-nav-links {
    margin: 0;
    padding: 0;
}

.mobile-nav-links a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.mobile-nav-links a i {
    margin-right: 12px;
    font-size: 18px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.mobile-nav-links a:hover {
    background-color: rgba(0,0,0,0.02);
}

.mobile-nav-links a.admin-link {
    background-color: var(--primary-color);
    color: white;
}

.mobile-nav-links a.admin-link i {
    color: white;
}

/* Social links in mobile menu */
.mobile-social-links {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.social-links-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.mobile-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease;
}

.mobile-social-links a:hover {
    transform: translateY(-3px);
}

/* Clase auxiliar ya definida arriba */

/* ----------------- Mobile News Slider ----------------- */
.mobile-news-slider {
    display: none; /* Hidden by default, shown in media query */
    margin: 1.5rem 0;
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 480px; /* Altura incrementada para mejor visualización */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15);
}

.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    visibility: hidden; /* Ocultar al principio */
}

.news-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
    visibility: visible;
}

.news-slide .news-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-slide .news-header {
    position: relative;
    padding-top: 55%;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.news-slide .news-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-slide .news-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.news-slide .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-slide .news-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

.news-slide .news-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.news-slide .news-video-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-slide .news-image.no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-alt);
}

.news-slide .news-image.no-image i {
    font-size: 4.5rem;
    color: var(--text-lighter);
    display: block;
}

.news-slide .news-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-slide .news-body h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-color);
}

.news-slide .news-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.news-slide .news-excerpt {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-light);
    flex: 1;
}

.news-slide .read-more {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

/* Slider controls - versión sobria */
.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
}

.slider-prev, .slider-next {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.slider-prev:hover, .slider-next:hover {
    background: var(--primary-dark);
}

.slider-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.slider-dot:hover {
    background-color: #ccc;
}

.slider-dot.active {
    background-color: var(--primary-color);
}

/* Indicador de swipe sobrio para usuarios nuevos */
.swipe-indicator {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-color);
    font-size: 0.85rem;
    padding: 6px 12px;
    background-color: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    margin: 0 auto;
    width: 150px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.swipe-indicator i {
    color: var(--primary-color);
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ----------------- Mobile Footer ----------------- */
.mobile-footer {
    display: none; /* Hidden by default, shown in media query */
    text-align: center;
    padding: 1.5rem 0;
}

.mobile-footer .footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.mobile-footer .footer-logo i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.mobile-footer .footer-logo span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.mobile-footer .mobile-social-links {
    margin-top: 1rem;
}

/* ----------------- Media Queries ----------------- */
@media (max-width: 768px) {
    /* Show mobile-specific elements */
    .mobile-news-slider {
        display: block;
    }
    
    .mobile-footer {
        display: block;
    }
    
    /* Hide desktop-specific elements */
    .desktop-news-view {
        display: none;
    }
    
    .desktop-footer {
        display: none;
    }
    
    .social-links.desktop-only {
        display: none;
    }
    
    /* Ocultar el menú de navegación de escritorio */
    .desktop-nav {
        display: none;
    }
    
    /* Adjust layout for small screens */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Show menu toggle */
    .menu-toggle {
        display: block;
    }
    
    /* Other mobile adjustments */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-text h1 {
        font-size: 1.8rem;
    }

    .radio-player {
        flex-direction: column;
    }
    
    .audio-visualizer {
        width: 100%;
    }
    
    .modal-content {
        width: 90%;
    }
}

/* Vista de noticias individuales en móvil */
.news-single {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto 2rem;
    overflow: hidden;
    max-width: 90%;
}

.news-single .news-header {
    padding: 1rem 1rem 0.5rem;
}

.news-single h1 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.news-single .back-button {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-alt);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.news-single .back-button:hover, 
.news-single .back-button:active {
    background-color: var(--primary-light);
    color: white;
}

.news-single .back-button i {
    margin-right: 0.5rem;
}

.news-single .news-meta {
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.news-single .news-meta i {
    margin-right: 0.4rem;
    opacity: 0.7;
}

.news-single .news-image {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio igual que el video */
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-alt);
}

.news-single .news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--bg-alt);
}

.news-single .news-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-single .news-image.no-image i {
    font-size: 4rem;
    color: var(--text-lighter);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.news-single .news-content {
    line-height: 1.6;
    font-size: 1rem;
    padding: 0 1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.news-single .news-content p {
    margin-bottom: 1rem;
}

.news-single .news-video {
    margin-bottom: 1.5rem;
    overflow: hidden;
    width: 100%;
}

.news-single .video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.news-single .video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.news-single .news-source {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.news-single .news-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1rem 1.5rem;
    margin-top: auto;
}

.news-single .news-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.news-single .news-actions .btn i {
    margin-right: 0.5rem;
}

.news-single .news-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.news-single .news-actions .btn-primary:hover,
.news-single .news-actions .btn-primary:active {
    background-color: var(--primary-dark);
}

.news-single .news-actions .btn-secondary {
    background-color: #f44336;
    color: white;
}

.news-single .news-actions .btn-secondary:hover,
.news-single .news-actions .btn-secondary:active {
    background-color: #d32f2f;
}

/* Very small screens */
@media (max-width: 480px) {
    .slider-wrapper {
        min-height: 450px;
    }
    
    .news-slide .news-body h3 {
        font-size: 1.1rem;
    }
    
    .news-slide .news-excerpt {
        font-size: 0.85rem;
    }
    
    /* Ajustes adicionales para pantallas muy pequeñas */
    .news-single h1 {
        font-size: 1.4rem;
    }
    
    .news-single .news-content {
        font-size: 0.95rem;
    }
}