/* =============================================================================
   Shortcode [ultimas_noticias] — 2 pequenas à esquerda, 1 grande ao centro, lista à direita
   Rede de Bibliotecas de Barcelos
   ============================================================================= */

   .rdeb-noticias-home {
    max-width: 1600px;
    margin: 0 auto;
    font-family: "Bricolage Grotesque", sans-serif;
}

.rdeb-noticias-home.center {
    justify-content: flex-start;
}

/* ─── Cabeçalho ───────────────────────────────────────────────────────────── */
.rdeb-noticias-home__header {
    width: 100%;
    margin-bottom: 24px;
}

.rdeb-noticias-home__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.rdeb-noticias-home__heading span {
    display: inline-block;
}

/* ─── Grid: esquerda (2 pequenas) | centro (1 grande) | direita (lista) — mesma altura ───── */
.rdeb-noticias-home__grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 320px;
    grid-template-rows: 700px;
    gap: 24px;
    align-items: stretch;
}

.rdeb-noticias-home__left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.rdeb-noticias-home__center {
    min-height: 0;
    height: 100%;
}

/* ─── nl-card no shortcode: ajustes de layout (estilos base em comum.css) ───── */
.rdeb-noticias-home__left .nl-card,
.rdeb-noticias-home__center .nl-card {
    background: #fff;
    padding: 24px 20px;
}

/* Card pequeno (lateral esquerda): 50% da altura da coluna */
.rdeb-noticias-home__card--small {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rdeb-noticias-home__card--small .nl-card__meta {
    margin-bottom: 12px;
}

.rdeb-noticias-home__card--small .nl-card__body {
    padding-top: 12px;
}

.rdeb-noticias-home__card--small .nl-card__excerpt {
    -webkit-line-clamp: 2;
}

.rdeb-noticias-home__card--small .nl-card__img-wrap {
    aspect-ratio: 16 / 10;
}

/* Card grande (centro) */
.rdeb-noticias-home__card--big {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rdeb-noticias-home__card--big .nl-card__img-wrap {
    flex: 1;
    min-height: 380px;
    aspect-ratio: auto;
}

.rdeb-noticias-home__card--big .nl-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Listagem (direita): mesma altura que as colunas dos cards, conteúdo a rolar ───── */
.rdeb-noticias-home__list-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
    background: #fff;
    padding: 24px 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
}

.rdeb-noticias-home__list-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-right: 12px;
    box-sizing: content-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rdeb-noticias-home__list-inner::-webkit-scrollbar {
    display: none;
}

.rdeb-noticias-home__list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 90px;
    min-height: 0;
    padding: 6px 0;
    border-bottom: 1px solid #e8e8e8;
}

.rdeb-noticias-home__list-item:last-child {
    border-bottom: none;
}

.rdeb-noticias-home__list-item.curr .rdeb-noticias-home__list-title a {
    font-weight: 700;
}

.rdeb-noticias-home__list-date {
    flex-shrink: 0;
    width: 36px;
    font-size: 13px;
    font-weight: 700;
    color: #1a3650;
    line-height: 1.2;
    text-align: center;
}

.rdeb-noticias-home__list-title {
    flex: 1;
    min-width: 0;
    line-height: 1.15;
}

.rdeb-noticias-home__list-title a,
.noticia-home-ter .noticia-title a {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    line-height: 1.15 !important;
    display: block;
}

.rdeb-noticias-home__list-title a:hover {
    color: #1a3650;
    text-decoration: underline;
}

.rdeb-noticias-home .clear {
    clear: both;
}

/* ─── Responsivo ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rdeb-noticias-home__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 360px auto;
    }

    .rdeb-noticias-home__left {
        grid-column: 1;
        grid-row: 1;
    }

    .rdeb-noticias-home__center {
        grid-column: 2;
        grid-row: 1;
    }

    .rdeb-noticias-home__list-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 300px;
        min-height: 300px;
    }
}

@media (max-width: 700px) {
    .rdeb-noticias-home__grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 280px;
    }

    .rdeb-noticias-home__left {
        grid-column: 1;
        grid-row: 1;
    }

    .rdeb-noticias-home__center {
        grid-column: 1;
        grid-row: 2;
    }

    .rdeb-noticias-home__list-wrap {
        grid-column: 1;
        grid-row: 3;
        height: 280px;
        min-height: 280px;
    }
}
