﻿:root {
    --border-slate-300: #cae2ca;
    --color1: #0f5223;
    --text-muted: #0f5223bd;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 14px;
}

/* ================================================== */
/* HEADER */
/* ================================================== */

.noticias-home__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: .5rem 1rem;
}

.noticias-home__subtitle {
    display: inline-block;
    background-color: #cffec375;
    color: #00b329;
    border: 1px solid #47fd84e1;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.35rem 1.25rem;
    border-radius: 9999px;
    margin: 0 0 0.75rem 0;
}

/* Por si vuelves a usar el título */
.noticias-home__title {
    color: #0f2a4a;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    margin: 0;
    text-transform: uppercase;
}

/* Divider más grande */
.noticias-home__divider {
    width: 120px;
    height: 6px;
    background: linear-gradient(to right, #0f4a19 50%, #06d918 50%);
    border-radius: 3px;
    margin: 0.75rem 0 1rem 0;
}

.noticias-home__description {
    color: #1f252c;
    font-size: 1rem;
    margin: 0;
    max-width: 600px;
}

/* ================================================== */
/* LAYOUT: 1 DESTACADA + 2 SECUNDARIAS */
/* ================================================== */

.noticias-home__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 900px) {

    .noticias-home__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "featured featured"
            "secondary secondary";
        gap: 24px;
    }

    .noticias-home__featured {
        grid-area: featured;
    }

    .noticias-home__secondary {
        grid-area: secondary;
    }

    .noticias-home__secondary-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

}

@media (max-width: 899px) {

    .noticias-home__secondary-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

}

.noticias-home__featured,
.noticias-home__secondary,
.noticias-home__item {
    list-style: none;
}

.noticias-home__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-family: system-ui, sans-serif;
}

/* ================================================== */
/* CARD DESTACADA (horizontal) */
/* ================================================== */


.obs__featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: #ffffff;
    border: 1px solid var(--border-slate-300);
    border-radius: 16px;
    overflow: hidden;
    min-height: 340px;
}

.obs__featured-figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #f1f5f9;
    min-height: 340px;
    /* Aseguramos que el blur no se escape del borde */
    isolation: isolate;
}

/* Contenedor interno de la imagen (bg + main) */
.obs__featured-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Fondo con blur — llena toda la figura */
.obs__featured-image .obs__noticia-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.15);
    opacity: 0.7;
    z-index: 0;
}

/* Imagen principal — se ve completa, centrada, sin recortes */
.obs__featured-image .obs__noticia-image-main {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    display: block;
}

.obs__featured-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    font-family: system-ui, -apple-system, sans-serif;
}

.obs__featured-badge {
    display: inline-block;
    align-self: flex-start;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
}

.obs__featured-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--color1);
    line-height: 1.25;
    margin: 0;
}

.obs__featured-comment {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.obs__featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-slate-300);
    padding-top: 14px;
    margin-top: 4px;
}

.obs__featured-fecha {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #0f2a4a;
    font-weight: 600;
}

.obs__featured-enlace {
    align-self: flex-start;
    padding: 10px 22px;
    border-radius: 10px;
    background: var(--color1);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 2px solid var(--color1);
}

.obs__featured-enlace:hover {
    background: #ffffff;
    color: var(--color1);
}

@media (max-width: 899px) {

    .obs__featured {
        grid-template-columns: 1fr;
    }

    .obs__featured-figure {
        min-height: 220px;
    }

    .obs__featured-body {
        padding: 20px;
    }

    .obs__featured-title {
        font-size: 20px;
    }

}

/* ================================================== */
/* CARD SECUNDARIA */
/* ================================================== */

.obs__noticia {
    border: 1px solid var(--border-slate-300);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    transition: var(--transition-smooth);
}

.obs__noticia:hover {
    box-shadow: 0 8px 24px rgba(15, 42, 74, 0.08);
    transform: translateY(-2px);
}

.obs__noticia-figure {
    position: relative;
    padding: 4px;
    height: 200px;
    overflow: hidden;
    width: 100%;
    margin: 0;
    background: #f1f5f9;
}

.obs__noticia-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.obs__noticia-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px);
    transform: scale(1.15);
    opacity: .75;
}

.obs__noticia-image-main {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

.obs__noticia-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 16px;
    font-family: system-ui, -apple-system, sans-serif;
}

.obs__noticias-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.obs__noticia-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color1);
    line-height: 1.4;
    transition: var(--transition-smooth);
    margin: 0;
}

.obs__noticia-comment {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

.obs__noticia-enlace {
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    border: 2px solid var(--border-slate-300);
    background: transparent;
    color: var(--color1);
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.obs__noticia-enlace:hover {
    background-color: var(--color1);
    border-color: var(--color1);
    color: white;
}

.border__bottom-dashed {
    border-top: 1px dashed var(--border-slate-300);
    height: 0;
    display: block;
}

/* ================================================== */
/* FOOTER */
/* ================================================== */

.noticias-home__footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.noticias-home__ver-todas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--color1);
    background-color: transparent;
    border: 2px solid var(--border-slate-300);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.noticias-home__ver-todas:hover {
    background-color: var(--color1);
    border-color: var(--color1);
    color: #fff;
    text-decoration: none;
}

.noticias-home__ver-todas span {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.noticias-home__ver-todas:hover span {
    transform: translateX(4px);
}

/* ================================================== */
/* RESPONSIVE */
/* ================================================== */
@media (max-width: 899px) {


    .obs__featured {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .obs__featured-figure {
        min-height: 260px;
        height: 260px;
    }

    .obs__featured-body {
        padding: 20px;
    }

    .obs__featured-title {
        font-size: 20px;
    }
}

@media(max-width:768px) {

    .noticias-home__title {
        font-size: 2rem;
    }

    .noticias-home__description {
        font-size: 16px;
    }

}