/* =========================================================
   V10 — imagens responsivas, cards compactos e paginação
   ========================================================= */

/* Carrossel: proporção equilibrada para notícias de título longo */
.hero-news,
.hero-news .hero-slides {
    min-height: 590px !important;
}

.hero-news .hero-content {
    min-height: 590px !important;
    padding-top: 36px !important;
    padding-bottom: 104px !important;
}

.hero-news .hero-copy {
    width: min(470px, 43%) !important;
    transform: none !important;
}

.hero-news .hero-copy h1 {
    max-width: 470px !important;
    margin: 9px 0 13px !important;
    font-size: clamp(38px, 3.55vw, 52px) !important;
    line-height: 1.03 !important;
    overflow-wrap: anywhere;
}

.hero-news .hero-copy h1.hero-title-medium {
    font-size: clamp(35px, 3.15vw, 47px) !important;
}

.hero-news .hero-copy h1.hero-title-long {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(31px, 2.75vw, 42px) !important;
    line-height: 1.045 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
}

.hero-news .hero-copy p {
    display: -webkit-box;
    max-width: 410px !important;
    overflow: hidden;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.hero-news .hero-slide-image {
    object-position: center center;
}

/* Projetos: cartões compactos e com imagem realmente 16:9 */
.projects-page-section {
    padding-top: 56px;
}

.projects-toolbar {
    align-items: flex-end;
    margin-bottom: 24px;
}

.projects-toolbar h2 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 43px);
    line-height: 1.08;
}

.project-catalog {
    align-items: stretch;
    gap: 20px;
}

.catalog-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
}

.catalog-image {
    height: auto !important;
    aspect-ratio: 16 / 9;
    background: #e9f1f8;
}

.catalog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.catalog-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 21px 21px;
}

.catalog-content h3 {
    display: -webkit-box;
    min-height: 2.3em;
    margin: 9px 0 8px;
    overflow: hidden;
    font-size: clamp(19px, 1.8vw, 23px);
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalog-content > p {
    display: -webkit-box;
    min-height: 4.55em;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.catalog-progress-head {
    margin-top: auto;
    padding-top: 18px;
}

.catalog-content .card-link {
    margin-top: 12px;
}

/* Página de notícias: destaque menor e cards padronizados */
.news-feature-section {
    padding-top: 58px;
    padding-bottom: 58px;
}

.news-feature {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
    min-height: 0;
    border-radius: 20px;
}

.news-feature-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
}

.news-feature-image img {
    min-height: 0 !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-feature-copy {
    justify-content: center;
    padding: clamp(28px, 4vw, 46px);
}

.news-feature-copy h2 {
    display: -webkit-box;
    margin: 12px 0 11px;
    overflow: hidden;
    font-size: clamp(27px, 3vw, 39px);
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.news-feature-copy > p {
    display: -webkit-box;
    margin-bottom: 20px;
    overflow: hidden;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.news-feature-actions,
.news-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-trigger,
.share-icon-button {
    border: 1px solid #c9d9e8;
    color: #0c5bab;
    background: #fff;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.share-trigger {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border-radius: 8px;
    font-weight: 850;
}

.share-trigger svg,
.share-icon-button svg,
.article-share-button svg,
.article-actions .btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.share-trigger:hover,
.share-icon-button:hover {
    color: #fff;
    border-color: #0f66c2;
    background: #0f66c2;
    transform: translateY(-2px);
    box-shadow: 0 8px 19px rgba(15, 102, 194, .18);
}

.news-grid {
    align-items: stretch;
    gap: 20px;
}

.news-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
}

.news-card-image {
    height: auto !important;
    aspect-ratio: 16 / 9;
    background: #e8f0f7;
}

.news-card-image img {
    object-position: center;
}

.news-card-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.news-card-content h3 {
    display: -webkit-box;
    min-height: 3.54em;
    margin: 8px 0;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.news-card-content p {
    display: -webkit-box;
    min-height: 4.65em !important;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.news-card-actions {
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
}

.news-card-actions .card-link {
    margin-top: 0;
}

.share-icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    padding: 0;
    border-radius: 50%;
}

/* Página interna da notícia */
.article-hero {
    padding: 58px 0 62px !important;
}

.article-hero-grid {
    grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr) !important;
    gap: clamp(34px, 5vw, 64px) !important;
}

.article-hero-copy {
    min-width: 0;
}

.article-hero-copy h1 {
    max-width: 680px;
    margin: 13px 0 !important;
    font-size: clamp(34px, 4.15vw, 57px) !important;
    line-height: 1.035 !important;
    overflow-wrap: anywhere;
}

.article-hero-copy > p {
    font-size: 16px !important;
    line-height: 1.65;
}

.article-hero-media {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #dfeaf3;
    box-shadow: 0 20px 45px rgba(4, 43, 88, .16);
}

.article-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.article-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.article-share > span {
    margin-right: 3px;
    color: #5f7489;
    font-size: 12px;
    font-weight: 850;
}

.article-share-button {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #cbdbe8;
    border-radius: 50%;
    color: #0d5eaf;
    background: #fff;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease, background .2s ease, border-color .2s ease;
}

.article-share-button .social-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

.article-share-button:hover {
    color: #fff;
    border-color: #0f66c2;
    background: #0f66c2;
    transform: translateY(-2px);
}

.article-share-button.whatsapp:hover {
    border-color: #25d366;
    background: #25d366;
}

.article-share-button.facebook:hover {
    border-color: #1877f2;
    background: #1877f2;
}

.share-toast {
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 28px);
    padding: 11px 17px;
    border-radius: 999px;
    color: #fff;
    background: #07396f;
    box-shadow: 0 12px 30px rgba(4, 43, 88, .25);
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, 18px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.share-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Paginação mais clara */
.pagination {
    margin-top: 30px !important;
}

.pagination-link {
    border-radius: 9px !important;
}

/* Responsividade */
@media (max-width: 1080px) {
    .hero-news,
    .hero-news .hero-slides,
    .hero-news .hero-content {
        min-height: 620px !important;
    }

    .hero-news .hero-copy {
        width: min(470px, 53%) !important;
    }

    .hero-news .hero-copy h1.hero-title-long {
        font-size: clamp(30px, 3.4vw, 39px) !important;
    }

    .news-feature {
        grid-template-columns: 1fr 1fr;
    }

    .article-hero-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 840px) {
    .news-feature {
        grid-template-columns: 1fr;
    }

    .news-feature-image {
        max-height: 390px;
    }

    .news-feature-copy {
        padding: 28px;
    }

    .article-hero-grid {
        grid-template-columns: 1fr !important;
    }

    .article-hero-media {
        order: -1;
        width: 100%;
        max-height: 470px;
    }
}

@media (max-width: 700px) {
    .hero-news,
    .hero-news .hero-slides {
        min-height: 700px !important;
    }

    .hero-news .hero-slide-image {
        height: 245px !important;
        object-position: center;
    }

    .hero-news .hero-content {
        min-height: 625px !important;
        align-items: flex-start !important;
        padding-top: 265px !important;
        padding-bottom: 92px !important;
    }

    .hero-news .hero-copy {
        width: 100% !important;
    }

    .hero-news .hero-copy h1,
    .hero-news .hero-copy h1.hero-title-medium,
    .hero-news .hero-copy h1.hero-title-long {
        max-width: 100% !important;
        font-size: clamp(29px, 8.6vw, 37px) !important;
        line-height: 1.04 !important;
    }

    .hero-news .hero-copy p {
        -webkit-line-clamp: 3;
    }

    .projects-toolbar {
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 5px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .filter-group::-webkit-scrollbar {
        display: none;
    }

    .filter-button {
        flex: 0 0 auto;
    }

    .project-catalog,
    .news-grid {
        grid-template-columns: 1fr !important;
    }

    .catalog-content h3,
    .news-card-content h3 {
        min-height: 0;
    }

    .catalog-content > p,
    .news-card-content p {
        min-height: 0 !important;
    }

    .news-feature-section {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .news-feature-image {
        max-height: none;
    }

    .news-feature-copy h2 {
        font-size: 28px;
        -webkit-line-clamp: 5;
    }

    .news-feature-actions .btn,
    .news-feature-actions .share-trigger {
        width: 100%;
    }

    .article-hero {
        padding: 38px 0 44px !important;
    }

    .article-hero-copy h1 {
        font-size: clamp(31px, 9vw, 41px) !important;
    }

    .article-hero-media {
        border-radius: 15px;
    }

    .article-share > span {
        flex-basis: 100%;
    }
}
