/* =========================================
   MEJORAS RESPONSIVE - RADIO LÍDER
   ========================================= */

/* --- Menú Móvil (Hamburguesa) --- */
.mobile-menu-toggle {
    display: none !important;
    /* Oculto por defecto (Desktop First) */
}

@media (max-width: 991px) {

    /* Ocultar elementos de escritorio que sobran */
    .desktop-only {
        display: none !important;
    }

    /* OCULTAR ELEMENTOS DE CABECERA SOBRANTES EN MÓVIL */
    #header-directo,
    #header-reproductor,
    #header-app,
    #header-redes,
    #header-toplider,
    #header-menu-mini,
    #header-menu1,
    #header-menu2,
    #header-tiempo,
    #header-cookies {
        display: none !important;
    }

    /* Ajustar el logo para que sea lo único visible junto al menú */
    header #header-top .flex {
        justify-content: flex-start;
        /* Alinear logo a la izquierda */
        padding-left: 15px;
    }

    /* Ajustes Header Top Móvil */
    header #header-top .flex {
        height: auto;
        min-height: 80px;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 0;
    }

    header #header-top #header-logo img {
        max-height: 50px;
        /* Reducir un poco más para evitar solapamientos */
        width: auto;
        margin-top: 5px;
    }

    /* Botón Hamburguesa */
    .mobile-menu-toggle {
        display: block !important;
        background: transparent;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        padding: 10px;
        position: absolute;
        right: 15px;
        top: 25px;
        z-index: 1001;
    }

    .mobile-menu-toggle .fa {
        color: #2B2D2E;
        /* Color oscuro para contrastar con fondo claro si lo hay, o blanco si fondo oscuro */
    }

    /* Contenedor del Menú Móvil (Off-canvas) */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .mobile-nav {
        position: fixed;
        top: 0;
        right: -280px;
        /* Oculto a la derecha */
        width: 280px;
        height: 100%;
        background: #243049;
        /* Azul corporativo */
        z-index: 1000;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        padding-top: 60px;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav.open {
        right: 0;
    }

    .mobile-nav-overlay.open {
        display: block;
    }

    /* Elementos del menú móvil */
    .mobile-nav-item {
        display: flex;
        align-items: center;
        padding: 15px 25px;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 15px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        background: #7CB342;
        color: white;
        text-decoration: none;
        padding-left: 30px;
        transform: translateX(5px);
    }

    .mobile-nav-item i,
    .mobile-nav-item .fa {
        margin-right: 12px;
        width: 24px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        color: #7CB342;
        font-size: 18px;
        flex-shrink: 0;
    }

    .mobile-nav-item:hover i,
    .mobile-nav-item:hover .fa {
        color: white;
    }

    /* Redes sociales en menú móvil */
    .mobile-social {
        padding: 20px;
        text-align: center;
        margin-top: 20px;
    }

    .mobile-social a {
        display: inline-block;
        width: 40px;
        height: 40px;
        line-height: 40px;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border-radius: 50%;
        margin: 0 5px;
        font-size: 18px;
    }

    .mobile-social a:hover {
        background: #7CB342;
    }

    /* Botones de apps en menú móvil */
    .mobile-apps {
        padding: 0 20px 20px 20px;
        text-align: center;
    }

    .mobile-apps img {
        height: 35px;
        margin-bottom: 10px;
    }
}

/* --- REGLAS PARA TABLET (768px - 991px) --- */
@media (min-width: 768px) and (max-width: 991px) {

    /* En tablet, mostrar menú hamburguesa pero con mejor espaciado */
    .mobile-menu-toggle {
        display: block !important;
        right: 20px;
        top: 30px;
    }

    /* Ocultar elementos de escritorio que no caben */
    #header-directo,
    #header-reproductor,
    #header-app,
    #header-redes,
    #header-toplider,
    #header-menu-mini,
    #header-menu1,
    #header-menu2,
    #header-tiempo {
        display: none !important;
    }

    /* Logo más grande en tablet */
    header #header-top #header-logo img {
        max-height: 65px;
    }

    /* Menú móvil más ancho en tablet */
    .mobile-nav {
        width: 320px;
        right: -320px;
    }

    /* Items del menú con más espacio */
    .mobile-nav-item {
        padding: 18px 30px;
        font-size: 16px;
    }

    .mobile-nav-item i,
    .mobile-nav-item .fa {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 20px;
        margin-right: 15px;
    }
}

/* --- REGLAS PARA ESCRITORIO (PC) --- */
@media (min-width: 992px) {

    /* Ocultar menú móvil en escritorio */
    .mobile-menu-toggle,
    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }

    /* Asegurar que elementos de escritorio estén visibles */
    #header-directo,
    #header-reproductor,
    #header-app,
    #header-redes,
    #header-toplider,
    #header-menu-mini,
    #header-menu1,
    #header-menu2,
    #header-tiempo {
        display: block !important;
    }

    /* Mejorar visualización de iconos en header-menu2 */
    #header-menu2 .menu-elem a {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    #header-menu2 .menu-elem a i,
    #header-menu2 .menu-elem a .fa {
        font-size: 16px;
        color: inherit;
        margin-right: 4px;
    }

    /* Asegurar que los iconos hereden el color del enlace */
    #header-menu2 .menu-elem a:hover i,
    #header-menu2 .menu-elem a:hover .fa {
        color: #7CB342;
    }
}

/* --- Ajustes Globales --- */

/* Imágenes Responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Contenedores Bootstrap 3 Fix */
@media (max-width: 767px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Ajuste de columnas laterales */
    #ppalIzda,
    #ppalDcha,
    #ppalCtro {
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Reordenar columnas en móvil (Contenido primero, luego widgets) */
    #cuerpo .row {
        display: flex;
        flex-direction: column;
    }

    #ppalCtro {
        order: 1;
    }

    #ppalIzda {
        order: 2;
        margin-top: 30px;
    }

    #ppalDcha {
        order: 3;
    }
}

/* Ajustes de Tablas Responsive */
.table-responsive-fix {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* Ajustes Footer */
@media (max-width: 767px) {
    footer #footer-cont {
        flex-direction: column;
    }

    footer #footer-cont>div {
        margin-bottom: 20px;
        border: none !important;
    }
}

/* Ajustes Títulos */
@media (max-width: 767px) {

    .titulo-engagement,
    .news-hero h1,
    .tourism-hero h1,
    .events-hero h1 {
        font-size: 32px !important;
    }

    .titulo-seccion h1 {
        font-size: 32px !important;
        margin-top: 5px;
    }

    .titulo-seccion img {
        max-height: 40px;
    }

    /* AJUSTES SLIDER PRINCIPAL EN MÓVIL */
    #inicio-top #inicio-top-slider {
        min-height: auto !important;
        /* Quitar altura fija forzada */
        padding-bottom: 20px;
        background-size: cover !important;
        /* Llenar todo el espacio con la imagen de fondo */
        background-position: center top !important;
    }

    #inicio-top #inicio-top-slider .slide {
        position: relative !important;
        height: auto !important;
        left: 0 !important;
        opacity: 1 !important;
        display: none;
        min-height: 450px !important;
        /* Altura para cubrir todo el espacio */
        background-image: url('../images/rock_overlay_bg.png');
        background-size: cover;
        background-position: center;
        background-color: rgba(0, 0, 0, 0.85);
        background-blend-mode: multiply;
        border-radius: 0 0 20px 20px;
    }

    #inicio-top #inicio-top-slider .slide.slideAct {
        display: block !important;
    }

    /* NUEVO DISEÑO COMPACTO PARA MÓVIL (Full Hero) */

    /* 1. Imagen dominando todo el ancho */
    /* 1. Imagen dominando todo el ancho */
    /* 1. OCULTAR imagen del slider - solo usar fondo rock */
    #inicio-top #inicio-top-slider .sliderTop {
        display: none !important;
    }

    /* 2. Mostrar título y descripción en móvil (igual que PC) */
    /* ELIMINADO: Ya no ocultamos h2, .horario, .texto */

    /* 3. Contenedor de botones pegado inmediatamente abajo */
    #inicio-top #inicio-top-slider .container {
        padding-top: 80px !important;
        /* AUMENTADO: Bajar contenido hacia el centro */
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 30px;
        /* Más espacio abajo también */
        margin-top: 0;
        /* Eliminar margen negativo */
        text-align: center;
        position: relative;
        background-image: url('../images/rock_overlay_bg.png');
        background-size: cover;
        background-position: center;
        background-blend-mode: multiply;
        background-color: rgba(0, 0, 0, 0.7);
        /* Oscurecer más */
        border-radius: 0 0 15px 15px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    /* Asegurar que el texto sea legible sobre el fondo oscuro */
    #inicio-top #inicio-top-slider .container * {
        color: white !important;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    }

    /* 4. Botón de acción grande y moderno */
    #inicio-top #inicio-top-slider .btn {
        margin-top: 5px !important;
        margin-bottom: 10px !important;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        /* Un poco más moderno */
    }

    /* 5. Centrar iconos */
    #inicio-top #inicio-top-slider .iconos-redes,
    #inicio-top #inicio-top-slider .iconos-reproductores {
        text-align: center;
        margin-bottom: 5px;
    }

    /* Ajustar botones del pager del slider */
    #inicio-top #inicio-top-pager button {
        height: auto;
        padding: 10px 5px;
    }

    #inicio-top #inicio-top-pager .horario {
        font-size: 16px !important;
        display: block;
    }

    #inicio-top #inicio-top-pager .text-engagement {
        font-size: 18px !important;
    }

    /* MEJORAS PARA CARDS DE NOTICIAS Y TURISMO EN MÓVIL */
    .news-card,
    .destination-card {
        margin-bottom: 20px;
    }

    .news-card img,
    .destination-card img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
    }

    .news-card h3,
    .destination-card h3 {
        font-size: 18px !important;
        line-height: 1.4;
        margin-top: 10px;
    }

    .news-card p,
    .destination-card p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Botones más grandes y táctiles en móvil */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Mejorar espaciado de secciones */
    section {
        margin-bottom: 30px;
    }

    .titulo-seccion {
        margin-bottom: 20px;
    }
}

/* --- MEJORAS PARA TABLET --- */
@media (min-width: 768px) and (max-width: 991px) {

    /* Cards en 2 columnas en tablet */
    .news-card,
    .destination-card {
        width: 48%;
        display: inline-block;
        vertical-align: top;
        margin-right: 2%;
    }

    .news-card:nth-child(2n),
    .destination-card:nth-child(2n) {
        margin-right: 0;
    }

    /* Títulos optimizados para tablet */
    .titulo-engagement,
    .news-hero h1,
    .tourism-hero h1 {
        font-size: 42px !important;
    }

    /* Slider con altura media */
    #inicio-top #inicio-top-slider .slide {
        min-height: 500px !important;
    }
}

/* --- MEJORAS GLOBALES PARA TODOS LOS DISPOSITIVOS --- */

/* Asegurar que los iconos FontAwesome siempre sean visibles */
.fa,
i[class^="fa-"],
i[class*=" fa-"] {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Mejorar contraste de iconos */
.menu-elem a i,
.menu-elem a .fa {
    opacity: 1;
    visibility: visible;
}

/* Transiciones suaves para hover */
.menu-elem a,
.mobile-nav-item {
    transition: all 0.3s ease;
}

/* Mejorar accesibilidad táctil */
@media (hover: none) and (pointer: coarse) {

    /* Dispositivos táctiles */
    .menu-elem a,
    .mobile-nav-item,
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}