.news-section {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    overflow: hidden;
}

.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(163, 134, 177, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(144, 212, 189, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.news-header {
    text-align: center;
    margin-bottom: 4rem;
}

.news-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #a386b1 0%, #90d4bd 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.news-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Carrusel moderno */
.news-carousel {
    position: relative;
    height: 600px;
    perspective: 1000px;
    margin-bottom: 3rem;
}

.news-slide {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateZ(-100px) rotateY(-10deg);
    width: 85%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.15),
        0 10px 40px rgba(163, 134, 177, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.news-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateZ(0) rotateY(0deg);
    z-index: 10;
    cursor: pointer;
}

/* Indicador de que la card activa es clicable */
.news-slide.active:hover {
    transform: translateX(-50%) translateZ(0) rotateY(0deg) scale(1.02);
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.2),
        0 15px 50px rgba(163, 134, 177, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Indicador visual para card activa */
.news-slide.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #a386b1, #90d4bd);
    border-radius: 27px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.news-slide.active:hover::before {
    opacity: 0.3;
}

/* Animación de pulsación sutil para slides laterales */
.news-slide.prev,
.news-slide.next {
    opacity: 0.7;
    visibility: visible;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 5;
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { 
        box-shadow: 
            0 25px 80px rgba(0, 0, 0, 0.15),
            0 10px 40px rgba(163, 134, 177, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 25px 80px rgba(0, 0, 0, 0.15),
            0 10px 40px rgba(163, 134, 177, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 0 3px rgba(163, 134, 177, 0.1);
    }
}

.news-slide.prev {
    transform: translateX(-80%) translateZ(-50px) rotateY(15deg) scale(0.9);
}

.news-slide.next {
    transform: translateX(-20%) translateZ(-50px) rotateY(-15deg) scale(0.9);
}

/* Efectos de hover para slides laterales */
.news-slide.prev:hover,
.news-slide.next:hover {
    opacity: 0.9;
    transform: translateX(-80%) translateZ(-30px) rotateY(10deg) scale(0.95);
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.2),
        0 15px 50px rgba(163, 134, 177, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.news-slide.next:hover {
    transform: translateX(-20%) translateZ(-30px) rotateY(-10deg) scale(0.95);
}

/* Indicador de interactividad */
.news-slide.prev .news-content::before,
.news-slide.next .news-content::before {
    content: '👆 Haz clic para ver';
    position: absolute;
    top: -15px;
    right: 20px;
    background: rgba(163, 134, 177, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    pointer-events: none;
}

.news-slide.prev:hover .news-content::before,
.news-slide.next:hover .news-content::before {
    opacity: 1;
    transform: translateY(0);
}

.news-image {
    position: relative;
    height: 60%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.news-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(163, 134, 177, 0.3) 0%,
        rgba(144, 212, 189, 0.2) 100%
    );
    border-radius: 24px 24px 0 0;
}

.news-content {
    position: relative;
    padding: 2.5rem;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.news-date {
    font-size: 0.9rem;
    color: #a386b1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.news-content p {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #a386b1 0%, #90d4bd 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 8px 30px rgba(163, 134, 177, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    align-self: flex-start;
}

.news-btn::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;
}

.news-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 50px rgba(163, 134, 177, 0.4),
        0 8px 25px rgba(0, 0, 0, 0.15);
    scale: 1.05;
}

.news-btn:hover::before {
    left: 100%;
}

.news-btn svg {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.news-btn:hover svg {
    transform: translateX(5px);
}

/* Indicadores modernos */
.news-indicators {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 3rem;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(163, 134, 177, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.news-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(163, 134, 177, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
}

.news-dot:hover::before {
    opacity: 1;
}

.news-dot.active {
    width: 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, #a386b1, #90d4bd);
    box-shadow: 0 4px 15px rgba(163, 134, 177, 0.4);
}

/* Controles de navegación modernos */
.news-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.1),
        0 4px 15px rgba(163, 134, 177, 0.1);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
}

.news-carousel:hover .news-nav {
    opacity: 1;
    visibility: visible;
}

.news-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(163, 134, 177, 0.2);
}

.news-nav.prev {
    left: -30px;
}

.news-nav.next {
    right: -30px;
}

.news-nav svg {
    width: 24px;
    height: 24px;
    color: #6c757d;
}

/* Efectos de partículas flotantes */
.news-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(163, 134, 177, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 85% 85%, rgba(144, 212, 189, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 45% 75%, rgba(163, 134, 177, 0.05) 1px, transparent 1px);
    background-size: 150px 150px, 200px 200px, 100px 100px;
    animation: floatParticles 30s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes floatParticles {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-100px, -100px) rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .news-carousel {
        height: 550px;
    }
    
    .news-slide {
        width: 90%;
    }
}

/* Responsive específico para móvil */
@media (max-width: 768px) {
    /* Ocultar botones en móvil */
    .desktop-only {
        display: none !important;
    }
    
    /* Ocultar botones de navegación en móvil */
    .news-nav {
        display: none !important;
    }
    
    .news-section {
        padding: 4rem 0;
    }
    
    .news-container {
        padding: 0 1rem;
    }
    
    .news-title {
        font-size: 2.5rem;
    }
    
    .news-carousel {
        height: 520px; /* Aumentado para más espacio de contenido */
    }
    
    .news-slide {
        width: 95%;
        border-radius: 20px;
    }
    
    /* Ocultar slides laterales en móvil completamente */
    .news-slide.prev,
    .news-slide.next {
        opacity: 0;
        visibility: hidden;
        pointer-events: none; /* Importante: evitar clics fantasma */
    }
    
    /* Ajustar distribución de imagen y contenido */
    .news-image {
        height: 50%; /* Reducido de 60% a 50% */
    }
    
    .news-content {
        padding: 1.8rem;
        height: 50%; /* Aumentado de 40% a 50% */
        /* Cambiar a auto para que se ajuste al contenido */
        min-height: 50%;
        height: auto;
    }
    
    .news-content h3 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }
    
    .news-content p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0; /* Sin margen inferior ya que no hay botón */
        /* Limitar a 4 líneas para aprovechar el espacio del botón */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Mejorar posicionamiento de botones de navegación - solo desktop */
    .news-nav {
        width: 50px;
        height: 50px;
        opacity: 1;
        visibility: visible;
        /* Botones ocultos en móvil - se controla arriba */
    }
    
    .news-nav.prev {
        left: 10px;
    }
    
    .news-nav.next {
        right: 10px;
    }
    
    .news-nav svg {
        width: 20px;
        height: 20px;
    }
    
    /* Mejorar el área de toque para el slide activo */
    .news-slide.active {
        cursor: pointer;
    }
    
    /* Ocultar botón "Leer artículo" en móvil */
    .news-btn {
        display: none;
    }
    
    /* Hacer toda la tarjeta clicable */
    .news-slide.active {
        cursor: pointer;
    }
    
    /* Indicador visual de que es clicable y deslizable */
    .news-slide.active::after {
        content: '👆 Toca para leer • ↔️ Desliza para navegar';
        position: absolute;
        bottom: 15px;
        right: 20px;
        background: rgba(163, 134, 177, 0.9);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        animation: pulseGently 3s ease-in-out infinite;
        max-width: calc(100% - 40px);
        text-align: center;
        line-height: 1.2;
    }
    
    @keyframes pulseGently {
        0%, 100% { opacity: 0.8; transform: scale(1); }
        50% { opacity: 1; transform: scale(1.02); }
    }
}

@media (max-width: 480px) {
    .news-title {
        font-size: 2rem;
    }
    
    .news-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .news-carousel {
        height: 480px; /* Ajustado para pantallas muy pequeñas */
    }
    
    .news-slide {
        border-radius: 16px;
        width: 98%; /* Más ancho en pantallas muy pequeñas */
    }
    
    /* Distribución más equilibrada */
    .news-image {
        height: 45%;
    }
    
    .news-content {
        padding: 1.5rem;
        height: 55%;
        min-height: 55%;
    }
    
    .news-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .news-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0;
        /* Limitar a 3 líneas en pantallas muy pequeñas */
        -webkit-line-clamp: 3;
    }
    
    .news-date {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    /* Ocultar botón también en móviles pequeños */
    .news-btn {
        display: none;
    }
    
    /* Indicador más compacto en pantallas pequeñas */
    .news-slide.active::after {
        content: '👆 Toca • ↔️ Desliza';
        font-size: 0.7rem;
        padding: 6px 12px;
        bottom: 10px;
        right: 15px;
    }
    
    /* Botones de navegación ocultos también en móviles pequeños */
    .news-nav {
        display: none !important;
    }
    
    /* Indicadores más grandes para touch */
    .news-dot {
        width: 10px;
        height: 10px;
    }
    
    .news-dot::before {
        width: 28px;
        height: 28px;
    }
    
    .news-dot.active {
        width: 36px;
        border-radius: 18px;
    }
}

/* Estilos especiales para cuando solo hay una noticia */
.news-carousel.single-news .news-slide {
    /* Centrar completamente la única noticia */
    transform: translateX(-50%) translateZ(0) rotateY(0deg) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.news-carousel.single-news .news-slide.active {
    /* Mantener la noticia activa centrada */
    transform: translateX(-50%) translateZ(0) rotateY(0deg) !important;
    z-index: 10;
}

/* Ocultar controles de navegación cuando solo hay una noticia */
.news-carousel.single-news .news-nav {
    display: none !important;
}

/* Ocultar indicadores cuando solo hay una noticia */
.news-carousel.single-news + .news-indicators {
    display: none !important;
}

/* Para desktop - asegurar que no aparezcan slides fantasma */
.news-carousel.single-news .news-slide.prev,
.news-carousel.single-news .news-slide.next {
    display: none !important;
}

/* Ajustar el tamaño de la única noticia para aprovechar mejor el espacio */
.news-carousel.single-news .news-slide {
    width: 90%;
    max-width: 800px; /* Limitar el ancho máximo para mejor legibilidad */
}

@media (max-width: 768px) {
    .news-carousel.single-news .news-slide {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .news-carousel.single-news .news-slide {
        width: 98%;
    }
}