/* =========================================================
   NOTICIAS Y EVENTOS EN LA PÁGINA DE INICIO
   ========================================================= */

.home-news {
    position: relative;
    background:
        linear-gradient(
            180deg,
            #f7fafc 0%,
            #ffffff 100%
        );
}

.home-news__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 42px;
}

.home-news__heading h2 {
    margin-bottom: 12px;
}

.home-news__intro {
    max-width: 650px;
    margin: 0;
    color: #5f6f7b;
    line-height: 1.75;
}

.home-news__all {
    flex: 0 0 auto;
    margin-bottom: 6px;
}

.home-news__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.home-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(29, 67, 91, 0.11);
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 16px 45px rgba(15, 46, 67, 0.08);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.home-news-card:hover {
    transform: translateY(-7px);
    border-color: rgba(36, 109, 152, 0.22);
    box-shadow:
        0 25px 55px rgba(15, 46, 67, 0.15);
}

.home-news-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dbe6ec;
}

.home-news-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 45%,
        rgba(5, 28, 43, 0.43) 100%
    );
    pointer-events: none;
}

.home-news-card__image img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: initial;
    transition: transform 0.7s ease;
}

.home-news-card:hover .home-news-card__image img {
    transform: scale(1.055);
}

.home-news-card__type,
.home-news-card__featured {
    position: absolute;
    z-index: 2;
    top: 18px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-news-card__type {
    left: 18px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue-950);
    backdrop-filter: blur(8px);
}

.home-news-card__featured {
    right: 18px;
    background: #c99d49;
    color: #ffffff;
}

.home-news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 26px 26px 28px;
}

.home-news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    color: #71808a;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.home-news-card h3 {
    margin: 0 0 14px;
    font-size: clamp(1.18rem, 1.6vw, 1.48rem);
    line-height: 1.35;
}

.home-news-card h3 a {
    color: var(--blue-950);
    text-decoration: none;
    transition: color 0.25s ease;
}

.home-news-card h3 a:hover {
    color: #2878a5;
}

.home-news-card__body > p {
    margin: 0 0 20px;
    color: #5f6f7b;
    line-height: 1.7;
}

.home-news-card__place {
    padding-top: 12px;
    border-top: 1px solid rgba(29, 67, 91, 0.1);
    font-size: 0.88rem;
}

.home-news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin-top: auto;
    color: #236d98;
    font-weight: 700;
    text-decoration: none;
    transition:
        gap 0.25s ease,
        color 0.25s ease;
}

.home-news-card__link:hover {
    gap: 14px;
    color: var(--blue-950);
}

.home-news-card--featured {
    border-color: rgba(201, 157, 73, 0.28);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .home-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-news-card:first-child {
        grid-column: 1 / -1;
    }

    .home-news-card:first-child {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }

    .home-news-card:first-child .home-news-card__image {
        height: 100%;
        aspect-ratio: auto;
        min-height: 360px;
    }
}

@media (max-width: 700px) {
    .home-news__heading {
        display: block;
        margin-bottom: 30px;
    }

    .home-news__all {
        display: inline-flex;
        margin-top: 18px;
    }

    .home-news__grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .home-news-card:first-child {
        display: flex;
        grid-column: auto;
    }

    .home-news-card:first-child .home-news-card__image {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .home-news-card__body {
        padding: 23px 22px 25px;
    }
}