/* ===================================== 
   SECCIÓN DE NOTICIAS RECIENTES - INDEX
   CSS COMPLETO - Radio Nueva 97.7 FM
   ===================================== */

/* ===================================== 
   SEPARACIÓN ENTRE SECCIONES
   ===================================== */

#redes-sociales {
    padding-bottom: 80px !important;
    margin-bottom: 0 !important;
}

/* ===================================== 
   SECCIÓN DE NOTICIAS RECIENTES
   ===================================== */

#noticias-recientes {
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

#noticias-recientes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Header de Noticias */
.noticias-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.noticias-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 20px rgba(102, 126, 234, 0.5);
}

.noticias-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.5);
}

.noticias-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* Grid de Noticias */
.noticias-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Tarjeta de Noticia */
.noticia-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.noticia-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

/* Imagen de Noticia */
.noticia-imagen {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.noticia-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-imagen img {
    transform: scale(1.1);
}

/* Categoría Badge */
.noticia-categoria {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #667eea;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Contenido de Noticia */
.noticia-contenido {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Meta información */
.noticia-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #999;
    flex-wrap: wrap;
}

.noticia-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.noticia-meta i {
    color: #667eea;
}

.noticia-fecha,
.noticia-vistas {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Título de Noticia */
.noticia-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.noticia-card:hover .noticia-titulo {
    color: #667eea;
}

/* Resumen */
.noticia-resumen {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer de Noticia */
.noticia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.noticia-autor {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.noticia-autor i {
    color: #667eea;
}

/* Botón Leer Más */
.btn-leer-mas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-leer-mas:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-leer-mas i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-leer-mas:hover i {
    transform: translateX(3px);
}

/* Mensaje cuando no hay noticias */
.no-noticias {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-noticias i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-noticias p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* CTA Ver Todas */
.noticias-cta {
    text-align: center;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.btn-ver-todas {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-ver-todas::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-ver-todas:hover::before {
    left: 100%;
}

.btn-ver-todas:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-ver-todas i {
    transition: transform 0.3s ease;
}

.btn-ver-todas:hover i {
    transform: translateX(5px);
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.noticia-card {
    animation: fadeInUp 0.6s ease backwards;
}

.noticia-card:nth-child(1) { animation-delay: 0.1s; }
.noticia-card:nth-child(2) { animation-delay: 0.2s; }
.noticia-card:nth-child(3) { animation-delay: 0.3s; }
.noticia-card:nth-child(4) { animation-delay: 0.4s; }
.noticia-card:nth-child(5) { animation-delay: 0.5s; }
.noticia-card:nth-child(6) { animation-delay: 0.6s; }

/* ===================================== 
   RESPONSIVE
   ===================================== */

@media (max-width: 1200px) {
    .noticias-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    #redes-sociales {
        padding-bottom: 60px !important;
    }

    #noticias-recientes {
        padding: 80px 15px 60px;
    }

    .noticias-header h2 {
        font-size: 2.2rem;
    }

    .noticias-header p {
        font-size: 1rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .noticia-imagen {
        height: 200px;
    }

    .noticia-contenido {
        padding: 20px;
    }

    .noticia-titulo {
        font-size: 1.2rem;
    }

    .noticia-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .btn-leer-mas {
        width: 100%;
        justify-content: center;
    }

    .btn-ver-todas {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #redes-sociales {
        padding-bottom: 50px !important;
    }

    #noticias-recientes {
        padding: 60px 15px 40px;
    }

    .noticias-header h2 {
        font-size: 1.8rem;
    }

    .noticia-imagen {
        height: 180px;
    }

    .noticia-contenido {
        padding: 15px;
    }

    .noticia-titulo {
        font-size: 1.1rem;
    }

    .noticia-resumen {
        font-size: 0.9rem;
    }

    .noticias-cta {
        margin-top: 40px;
    }

    .btn-ver-todas {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* ===================================== 
   TEMA OSCURO (Opcional)
   ===================================== */

@media (prefers-color-scheme: dark) {
    .noticia-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
    }

    .noticia-titulo {
        color: white;
    }

    .noticia-resumen {
        color: rgba(255, 255, 255, 0.7);
    }

    .noticia-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* ===================================== 
   UTILIDADES ADICIONALES
   ===================================== */

/* Efecto de carga para imágenes */
.noticia-imagen img {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.noticia-imagen img.loaded {
    opacity: 1;
}

/* Hover states mejorados */
.noticia-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.noticia-card:hover {
    transform: translateY(-10px);
}

/* Optimización de rendimiento */
.noticia-card {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accesibilidad */
.btn-leer-mas:focus,
.btn-ver-todas:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 3px;
}

/* Estados de carga */
.noticia-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===================================== 
   FIN DEL CSS
   ===================================== */