/* Estilos Generales para el Bloque de Noticias - Versión "Magazine Overlay" */

:root {
    --bright-blue: #00d2ff;
    --dark-blue: #0b1c3d;
    --vibrant-gradient: linear-gradient(to top, rgba(11, 28, 61, 0.9) 0%, rgba(11, 28, 61, 0.4) 50%, transparent 100%);
}

.hero-noticias {
    background: linear-gradient(rgba(11, 28, 61, 0.7), rgba(11, 28, 61, 0.8)), url('../img/Encabezado_Noticias.JPG') no-repeat center center;
    background-size: cover;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: white;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
}

.hero-noticias h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-noticias p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.news-subtitle {
    text-align: center;
    color: #4b5563;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Tarjeta de Noticia - Estilo Estrenado "Magazine" */
.new-card {
    position: relative;
    height: 400px;
    /* Altura fija para el estilo magazine */
    background: #0b1c3d;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.new-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.new-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.new-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: var(--vibrant-gradient);
    z-index: 2;
}

.new-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.new-card:hover .new-card-image img {
    transform: scale(1.1);
}

.new-card-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(37, 99, 235, 0.9);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.new-card-content {
    position: relative;
    padding: 25px;
    z-index: 4;
    color: white;
}

.new-card-content h4 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.new-card-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón Leer Más Estilo Magazine */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--bright-blue);
    font-weight: 800;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
}

.btn-read-more i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-read-more:hover {
    color: white;
    transform: translateX(5px);
}

/* Errores */
.error-msg {
    text-align: center;
    color: #ff4444;
    padding: 20px;
    font-weight: 600;
}

/* Estilos para la sección en el Inicio */
#noticias-inicio {
    padding: 80px 5% 60px 5%;
    background-color: transparent;
}

.ver-todas-container {
    text-align: center;
    margin-top: 30px;
}

.btn-ver-todas {
    display: inline-block;
    padding: 16px 45px;
    background: linear-gradient(45deg, #0b1c3d 0%, #0b1c3d 50%, #0b1c3d 100%);
    color: #fff;
    border-radius: 50px;
    border: 2px solid #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(11, 28, 61, 0.6), 0 0 24px rgba(30, 58, 138, 0.4);
    text-shadow: 0 0 6px #1e3a8a;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    /* enable pseudo-element positioning */
    overflow: hidden;
    /* clip the shine effect */
}

.btn-ver-todas::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
    pointer-events: none;
    z-index: 2;
}

/* Responsive */
@media(max-width: 1024px) {
    .new-card {
        height: 350px;
    }

    .new-card-content h4 {
        font-size: 1.2rem;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}
