/* noticias.css - VERSIÓN CORREGIDA CON BOTONES VISIBLES */
.noticias-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
    overflow: hidden;
}

.noticias-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--azul-oscuro);
    font-weight: 700;
    position: relative;
    padding: 0 1rem;
}

.noticias-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    border-radius: 2px;
}

.noticias-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Grid de noticias - CARRUSEL PARA MÓVILES, GRID PARA DESKTOP */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    overflow: hidden;
}

.noticia-card {
    background: var(--blanco);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--sombra-fuerte);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 420px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
}

.noticia-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(232, 201, 140, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.noticia-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.noticia-card:hover::before {
    opacity: 1;
}

.noticia-imagen-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
    z-index: 2;
}

.noticia-imagen-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.noticia-card:hover .noticia-imagen-container img {
    transform: scale(1.15);
}

.noticia-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(41, 47, 92, 0.9) 0%, rgba(122, 47, 36, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
}

.noticia-card:hover .noticia-overlay {
    opacity: 1;
}

.btn-leer-noticia {
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    color: var(--azul-oscuro);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    transform: translateY(20px);
    opacity: 0;
}

.noticia-card:hover .btn-leer-noticia {
    transform: translateY(0);
    opacity: 1;
}

.btn-leer-noticia:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

.noticia-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.noticia-titulo {
    margin: 0 0 1rem 0;
    color: var(--azul-oscuro);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2rem; /* Altura mínima para evitar saltos */
}

.noticia-fecha {
    margin: 0 0 0.5rem 0;
    color: var(--rojo-vino);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.noticia-resumen {
    margin: 0 0 1rem 0; /* Reducido para dar más espacio al botón */
    color: var(--texto-oscuro);
    line-height: 1.6;
    flex-grow: 1;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem; /* Altura mínima consistente */
}

.noticia-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    font-size: 0.9rem;
    min-height: 3.5rem; /* Altura mínima para el área del botón */
}

.btn-ver-mas {
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    color: var(--azul-oscuro);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex !important; /* Forzar display */
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
    visibility: visible !important; /* Forzar visibilidad */
    opacity: 1 !important; /* Forzar opacidad */
}

.btn-ver-mas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* BOTONES DE CARRUSEL PARA NOTICIAS - MEJORADOS */
.noticias-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--dorado) 0%, var(--dorado-claro) 100%);
    border: none;
    color: var(--azul-oscuro);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.noticias-carousel-btn:hover {
    background: linear-gradient(135deg, var(--dorado-claro) 0%, var(--dorado) 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
}

.noticias-carousel-btn.prev {
    left: 1rem;
}

.noticias-carousel-btn.next {
    right: 1rem;
}

.noticias-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%);
    background: var(--gris-claro);
    color: var(--texto-oscuro);
    box-shadow: none;
}

.noticias-carousel-btn:disabled:hover {
    transform: translateY(-50%);
}

/* Estados de noticias */
.no-noticias, .error-noticias {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--azul-oscuro);
    grid-column: 1 / -1;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
    border-radius: 12px;
    border: 2px dashed var(--dorado);
}

.error-noticias {
    color: var(--rojo-vino);
    background: linear-gradient(135deg, #fef2f2 0%, #f5f0e6 100%);
    border-color: var(--rojo-vino);
}

/* =============================== */
/* RESPONSIVE - MÓVILES PRIMERO */
/* =============================== */

/* Teléfonos pequeños (hasta 480px) */
@media (max-width: 480px) {
    .noticias-section {
        padding: 1.5rem 0;
    }
    
    .noticias-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .noticias-container {
        padding: 0 0.5rem;
    }
    
    /* CARRUSEL HORIZONTAL PARA MÓVILES */
    .noticias-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
        padding: 1rem 0.5rem;
        gap: 1rem;
        scrollbar-width: none;
    }
    
    .noticias-grid::-webkit-scrollbar {
        display: none;
    }
    
    .noticia-card {
        min-width: 280px;
        max-width: 320px;
        height: 380px;
        flex-shrink: 0;
        scroll-snap-align: start;
        margin: 0;
    }
    
    .noticia-imagen-container {
        height: 180px;
    }
    
    .noticia-content {
        padding: 1.2rem;
    }
    
    .noticia-titulo {
        font-size: 1.1rem;
        min-height: 2.8rem;
    }
    
    .noticia-resumen {
        font-size: 0.9rem;
        min-height: 4.2rem;
    }
    
    .noticia-meta {
        min-height: 3.2rem;
    }
    
    /* MOSTRAR BOTONES DE CARRUSEL EN MÓVILES */
    .noticias-carousel-btn {
        display: flex;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .noticias-carousel-btn.prev {
        left: 0.5rem;
    }
    
    .noticias-carousel-btn.next {
        right: 0.5rem;
    }
    
    .btn-leer-noticia {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .btn-ver-mas {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        min-width: 120px;
    }
}

/* Teléfonos grandes y tablets pequeñas (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .noticias-container {
        padding: 0 1rem;
    }
    
    /* CARRUSEL HORIZONTAL */
    .noticias-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        margin: 1.5rem 0;
        padding: 1rem;
        gap: 1.5rem;
        scrollbar-width: none;
    }
    
    .noticias-grid::-webkit-scrollbar {
        display: none;
    }
    
    .noticia-card {
        min-width: 300px;
        max-width: 350px;
        height: 400px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    
    .noticia-imagen-container {
        height: 200px;
    }
    
    /* MOSTRAR BOTONES DE CARRUSEL */
    .noticias-carousel-btn {
        display: flex;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .noticias-carousel-btn.prev {
        left: 0.8rem;
    }
    
    .noticias-carousel-btn.next {
        right: 0.8rem;
    }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .noticias-section {
        padding: 3rem 0;
    }
    
    .noticias-section h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }
    
    .noticias-container {
        padding: 0 2rem;
    }
    
    /* GRID DE 2 COLUMNAS PARA TABLETS */
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        display: grid !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        padding: 0;
    }
    
    .noticia-card {
        min-width: auto;
        max-width: none;
        height: 400px;
    }
    
    .noticia-imagen-container {
        height: 200px;
    }
    
    /* OCULTAR BOTONES DE CARRUSEL EN TABLETS Y DESKTOP */
    .noticias-carousel-btn {
        display: none !important;
    }
}

/* Desktop (1024px en adelante) */
@media (min-width: 1024px) {
    .noticias-section {
        padding: 4rem 0;
    }
    
    .noticias-section h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }
    
    .noticias-container {
        padding: 0 4rem;
    }
    
    /* GRID DE 3 COLUMNAS PARA DESKTOP */
    .noticias-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        display: grid !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        padding: 0;
    }
    
    .noticia-card {
        height: 420px;
    }
    
    .noticia-imagen-container {
        height: 220px;
    }
    
    /* OCULTAR BOTONES DE CARRUSEL */
    .noticias-carousel-btn {
        display: none !important;
    }
}