/* ==========================================================================
   NEWS.CSS
   Portal AARCA
   ========================================================================== */


/* ==========================================================================
   ARQUIVO DE NOTÍCIAS
   ========================================================================== */

.news-content {
    padding: 55px 0 90px;
}


/* ==========================================================================
   TOOLBAR / BUSCA
   ========================================================================== */

.news-toolbar {
    padding: 35px 0 20px;
}

.news-search {
    display: flex;

    width: 92%;
    max-width: 700px;

    margin: 0 auto;
}

.news-search input {
    flex: 1;

    min-width: 0;

    padding: 15px 18px;

    border: 1px solid #dcdcdc;
    border-right: 0;

    border-radius: 12px 0 0 12px;

    background: #ffffff;

    color: #333333;

    font-size: 16px;

    outline: none;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.news-search input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(46, 125, 50, 0.10);
}

.news-search button {
    padding: 15px 28px;

    border: none;

    border-radius: 0 12px 12px 0;

    background: var(--primary);

    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.news-search button:hover {
    background: var(--primary-dark);
}


/* ==========================================================================
   TÍTULO DA SEÇÃO
   ========================================================================== */

.news-content .section-title {
    margin-bottom: 35px;
}


/* ==========================================================================
   FILTROS
   ========================================================================== */

.news-filters {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;

    gap: 12px;

    margin: 0 0 40px;
}

.news-filters a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 10px 22px;

    border-radius: 40px;

    background: #f3f3f3;

    color: #444444;

    font-weight: 600;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.news-filters a:hover,
.news-filters .active {
    background: var(--primary);

    color: #ffffff;
}


/* ==========================================================================
   GRID
   ========================================================================== */

.news-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(300px, 1fr)
        );

    gap: 30px;

    align-items: stretch;

    margin-top: 20px;
}


/* ==========================================================================
   CARD
   ========================================================================== */

.news-card {
    display: flex;

    flex-direction: column;

    height: 100%;

    overflow: hidden;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.08);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.news-card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 20px 45px
        rgba(0, 0, 0, 0.12);
}


/* ==========================================================================
   IMAGEM
   ========================================================================== */

.news-card-image {
    display: block;
}

.news-card-image img,
.news-card > a img {
    display: block;

    width: 100%;
    height: 220px;

    object-fit: cover;
}


/* ==========================================================================
   CONTEÚDO DO CARD
   ========================================================================== */

.news-card .card-content {
    display: flex;

    flex-direction: column;

    flex: 1;

    padding: 25px;
}


/* CATEGORIA */

.news-category {
    display: inline-block;

    padding: 6px 12px;

    margin-bottom: 15px;

    border-radius: 20px;

    background: var(--secondary);

    color: #ffffff;

    font-size: 13px;
}


/* DATA */

.news-date {
    display: block;

    margin-bottom: 15px;

    color: #888888;

    font-size: 14px;
}


/* TÍTULO */

.news-card h3 {
    margin: 15px 0;

    font-size: 24px;
    line-height: 1.4;
}

.news-card h3 a {
    color: var(--dark);
}

.news-card h3 a:hover {
    color: var(--primary);
}


/* RESUMO */

.news-card-excerpt {
    flex: 1;
}

.news-card-excerpt p,
.news-card .card-content > p {
    margin: 0 0 25px;

    color: #666666;

    line-height: 1.8;
}


/* BOTÃO */

.news-card-button {
    margin-top: auto;
}

.news-card-button .btn,
.news-card .card-content .btn {
    margin: 0;

    align-self: flex-start;
}


/* ==========================================================================
   PAGINAÇÃO
   ========================================================================== */

.news-pagination,
.pagination {
    margin-top: 50px;

    text-align: center;
}


/* ==========================================================================
   SINGLE NOTÍCIA
   ========================================================================== */

.single-hero {
    padding: 90px 0;

    background: #f5f7f4;

    text-align: center;
}

.single-hero h1 {
    margin: 20px 0;

    font-size: 42px;
}


/* META */

.news-meta {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;

    gap: 30px;

    margin-top: 20px;

    color: #777777;

    font-size: 15px;
}


/* IMAGEM DESTACADA */

.featured-image {
    margin: 50px auto;
}

.featured-image img {
    display: block;

    width: 100%;

    border-radius: 20px;

    box-shadow: var(--shadow-md);
}


/* CONTEÚDO */

.entry-content {
    max-width: 900px;

    margin: auto;

    font-size: 18px;
    line-height: 1.9;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 40px;
    margin-bottom: 15px;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content img {
    display: block;

    margin: 30px auto;

    border-radius: 15px;
}

.entry-content ul {
    margin-left: 30px;
    margin-bottom: 20px;
}


/* ==========================================================================
   NAVEGAÇÃO ENTRE NOTÍCIAS
   ========================================================================== */

.news-navigation {
    margin-top: 60px;

    padding: 60px 0;

    border-top:
        1px solid #eeeeee;
}

.nav-links {
    display: flex;

    justify-content: space-between;

    gap: 20px;
}

.nav-links a {
    color: var(--primary);

    font-weight: 700;
}


/* ==========================================================================
   NOTÍCIAS RELACIONADAS
   ========================================================================== */

.related-news {
    padding: 80px 0;

    background: #fafafa;
}


/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 768px) {

    .news-toolbar {
        padding: 25px 0 15px;
    }

    .news-content {
        padding: 40px 0 65px;
    }

    .news-search {
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .news-card-image img,
    .news-card > a img {
        height: 230px;
    }

    .single-hero {
        padding: 70px 0;
    }

    .single-hero h1 {
        font-size: 34px;
    }

    .nav-links {
        flex-direction: column;
    }

}


@media (max-width: 520px) {

    .news-search {
        flex-direction: column;

        gap: 10px;
    }

    .news-search input {
        border-right:
            1px solid #dcdcdc;

        border-radius: 10px;
    }

    .news-search button {
        width: 100%;

        border-radius: 10px;
    }

    .news-card .card-content {
        padding: 22px;
    }

    .news-card h3 {
        font-size: 21px;
    }

}
/* ==========================================================================
   ARCHIVE NOTÍCIAS - CAMPO DE PESQUISA
   ========================================================================== */

.news-archive-page .news-archive-toolbar {
    padding: 35px 0 10px;
}

.news-archive-page .news-archive-search {
    display: flex;

    width: 92%;
    max-width: 720px;

    margin: 0 auto;
}

.news-archive-page .news-archive-search-input {
    flex: 1;

    min-width: 0;

    height: 52px;

    padding: 0 20px;

    border: 1px solid #d9e2da;
    border-right: 0;

    border-radius: 14px 0 0 14px;

    background: #ffffff;

    color: #333333;

    font-family: inherit;
    font-size: 16px;

    outline: none;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.04);
}

.news-archive-page .news-archive-search-input:focus {
    border-color: #2e7d32;

    box-shadow:
        0 0 0 3px
        rgba(46, 125, 50, 0.10);
}

.news-archive-page .news-archive-search-button {
    height: 52px;

    padding: 0 28px;

    border: none;

    border-radius: 0 14px 14px 0;

    background: #2e7d32;

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.news-archive-page .news-archive-search-button:hover {
    background: #1b5e20;
}


/* REDUZ ESPAÇO ENTRE BUSCA E CONTEÚDO */

.news-archive-page .news-content {
    padding-top: 40px;
}

.news-archive-page .news-content .section-title {
    margin-bottom: 30px;
}


/* MOBILE */

@media (max-width: 600px) {

    .news-archive-page .news-archive-search {
        width: 100%;

        flex-direction: column;

        gap: 10px;
    }

    .news-archive-page .news-archive-search-input {
        width: 100%;

        border:
            1px solid #d9e2da;

        border-radius: 12px;
    }

    .news-archive-page .news-archive-search-button {
        width: 100%;

        border-radius: 12px;
    }

}


/* ==========================================================================
   NOTÍCIAS PREMIUM — REFINAMENTO DE LANÇAMENTO
   ========================================================================== */

.home-page .home-news {
    padding: 76px 0;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbf8 100%
        );
}

.home-page .home-news .section-title {
    max-width: 780px;
    margin: 0 auto 36px;
    text-align: center;
}

.home-page .home-news .section-title span {
    display: block;
    margin-bottom: 8px;
    color: #2e7d32;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-page .home-news .section-title h2 {
    margin: 0;
    color: #17351d;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.home-page .home-news .section-title p {
    max-width: 700px;
    margin: 14px auto 0;
    color: #5f6e63;
    font-size: 16px;
    line-height: 1.7;
}

.news-grid {
    align-items: stretch;
}

.news-card {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(23, 53, 29, .09);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(23, 53, 29, .08);
    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
}

.news-card:hover,
.news-card:focus-within {
    transform: translateY(-7px);
    border-color: rgba(46, 125, 50, .20);
    box-shadow: 0 26px 54px rgba(23, 53, 29, .14);
}

.news-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.news-card-link:focus-visible {
    outline: 3px solid rgba(46, 125, 50, .30);
    outline-offset: -3px;
}

.news-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: 255px;
    overflow: hidden;
    background: #eef4ef;
}

.news-card-image::after {
    content: "";
    position: absolute;
    inset: 48% 0 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(10, 30, 15, .32)
        );
}

.news-card-image-file {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .52s ease;
}

.news-card:hover .news-card-image-file,
.news-card:focus-within .news-card-image-file {
    transform: scale(1.055);
}

.news-card-image-placeholder {
    opacity: .72;
}

.news-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    background: rgba(23, 53, 29, .82);
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.news-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.news-card-main {
    flex: 1;
}

.news-card-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #748078;
    font-size: 13px;
    font-weight: 650;
}

.news-card h3 {
    margin: 0 0 13px;
    color: #17351d;
    font-size: 23px;
    line-height: 1.28;
    letter-spacing: -.025em;
}

.news-card-excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #5f6e63;
    font-size: 15px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.news-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 11px 14px;
    margin-top: 22px;
    border: 1px solid rgba(46, 125, 50, .14);
    border-radius: 12px;
    background: #f5faf5;
    color: #2e7d32;
    font-size: 14px;
    font-weight: 800;
    transition:
        background .3s ease,
        color .3s ease,
        gap .3s ease;
}

.news-card-action-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform .3s ease;
}

.news-card:hover .news-card-action,
.news-card:focus-within .news-card-action {
    background: #2e7d32;
    color: #ffffff;
}

.news-card:hover .news-card-action-arrow,
.news-card:focus-within .news-card-action-arrow {
    transform: translateX(4px);
}

.home-news-action {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.home-news-action .btn {
    min-width: 220px;
    text-align: center;
}

@media (max-width: 768px) {

    .home-page .home-news {
        padding: 58px 0;
    }

    .news-card-image {
        height: 235px;
    }

}

@media (max-width: 520px) {

    .news-card-content {
        padding: 21px;
    }

    .news-card h3 {
        font-size: 21px;
    }

    .news-card-action {
        width: 100%;
    }

}


/* ==========================================================================
   NOTÍCIAS PREMIUM 2.0 — REFINAMENTO FINAL
   ========================================================================== */

/*
| Imagem com melhor proporção e enquadramento.
*/
.news-card-image {
    height: 220px;
    border-radius: 22px 22px 0 0;
}

.news-card-image-file {
    object-fit: cover;
    object-position: center;
}


/*
| Selo mais compacto e refinado.
*/
.news-card-badge {
    top: 16px;
    left: 16px;
    min-height: 29px;
    padding: 6px 12px;
    font-size: 10px;
    letter-spacing: .055em;
}


/*
| Conteúdo com altura uniforme.
*/
.news-card-link {
    min-height: 100%;
}

.news-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.news-card-main {
    display: flex;
    flex: 1;
    flex-direction: column;
}


/*
| Data com presença visual discreta.
*/
.news-card-date {
    margin-bottom: 10px;
    color: #748078;
    font-size: 13px;
    font-weight: 700;
}


/*
| Título mais forte sem exagero.
*/
.news-card h3 {
    margin-bottom: 12px;
    color: #17351d;
    font-size: 22px;
    line-height: 1.34;
}


/*
| Resumo alinhado e limitado.
*/
.news-card-excerpt {
    display: -webkit-box;
    flex: 1;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/*
| CTA sempre na base do card.
*/
.news-card-action {
    margin-top: 22px;
}


/*
| Hover final.
*/
.news-card:hover,
.news-card:focus-within {
    transform: translateY(-8px);
    box-shadow: 0 24px 52px rgba(23, 53, 29, .13);
}

.news-card:hover .news-card-image-file,
.news-card:focus-within .news-card-image-file {
    transform: scale(1.06);
}


/*
| Home: três colunas bem equilibradas.
*/
.home-page .home-news .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}


/*
| Tablet.
*/
@media (max-width: 980px) {

    .home-page .home-news .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/*
| Celular.
*/
@media (max-width: 680px) {

    .home-page .home-news .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card-image {
        height: 230px;
    }

    .news-card h3 {
        font-size: 21px;
    }

}


/* ==========================================================================
   ARQUIVO DE NOTÍCIAS — HERO INSTITUCIONAL CLARO
   ========================================================================== */

.news-archive-page .page-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
    background:
        radial-gradient(
            circle at 14% 18%,
            rgba(129, 199, 132, .15),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 8%,
            rgba(249, 168, 37, .10),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            var(--primary-muted),
            var(--white)
        );
    color: var(--text);
    text-align: center;
}

.news-archive-page .page-hero::before,
.news-archive-page .page-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.news-archive-page .page-hero::before {
    top: -105px;
    right: -75px;
    width: 250px;
    height: 250px;
    border: 32px solid rgba(46, 125, 50, .045);
}

.news-archive-page .page-hero::after {
    bottom: -100px;
    left: -70px;
    width: 210px;
    height: 210px;
    background: rgba(46, 125, 50, .04);
}

.news-archive-page .page-hero .container {
    position: relative;
    z-index: 2;
}

.news-archive-page .page-hero-content {
    max-width: 860px;
    margin: 0 auto;
}

.news-archive-page .page-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-bottom: 14px;
    padding: 7px 15px;
    border: 1px solid rgba(46, 125, 50, .14);
    border-radius: var(--radius-pill);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: .07em;
    text-transform: uppercase;
}

.news-archive-page .page-hero h1 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(2.6rem, 6vw, 4.1rem);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.news-archive-page .page-hero-subtitle {
    margin: 16px 0 0;
    color: var(--primary);
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}

.news-archive-page .page-hero-description {
    max-width: 760px;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-size: var(--font-size-md);
    line-height: var(--line-height-base);
}

.news-archive-page .news-archive-toolbar {
    margin-top: -25px;
    padding: 0 0 10px;
    position: relative;
    z-index: 3;
}

@media (max-width: 640px) {

    .news-archive-page .page-hero {
        padding: 54px 0 50px;
    }

    .news-archive-page .page-hero-description {
        font-size: var(--font-size-base);
    }

    .news-archive-page .news-archive-toolbar {
        margin-top: -16px;
    }

}