@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&display=swap');

:root {
    --bg: #f2f8fb;
    --card: #ffffff;
    --text: #102033;
    --muted: #65788d;
    --muted-2: #8aa0b4;
    --line: #d7e5ee;
    --teal: #008c95;
    --teal-dark: #006a73;
    --teal-deep: #075866;
    --teal-soft: #d8f8f6;
    --shadow: 0 18px 45px rgba(22, 52, 78, 0.10);
    --radius-lg: 28px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 140, 149, 0.12), transparent 30%),
        linear-gradient(180deg, #eef7fa 0%, var(--bg) 42%, #ffffff 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1480px, calc(100% - 48px));
    margin: 0 auto;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(215, 229, 238, 0.95);
}

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.painel-destaque-projeto .frase-projeto {
    font-size: 0.96rem;
    line-height: 1.5;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo-full {
    height: 76px;
    width: auto;
    max-width: 580px;
    display: block;
    background: #ffffff;
    object-fit: contain;
}

/* Compatibilidade com versões anteriores do index */

.brand-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    flex: 0 0 58px;
}

.brand-icon img {
    width: 58px;
    height: 58px;
    display: block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    object-fit: contain;
}

.brand-text strong {
    display: block;
    font-size: 1.58rem;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.brand-text span {
    display: none !important;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-weight: 800;
}

.main-nav a:hover {
    color: var(--teal-dark);
}

/* HERO */

.hero-section {
    padding: 34px 0 34px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

.hero-card {
    min-height: 500px;
    padding: clamp(48px, 5vw, 62px);
    border-radius: var(--radius-lg);
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(4, 152, 156, 0.95), rgba(0, 96, 107, 0.98)),
        radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.16), transparent 32%);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badge {
    width: fit-content;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 900;
}

.hero-card h1 {
    margin: 30px 0 24px;
    max-width: 900px;
    font-size: clamp(2.45rem, 4.55vw, 4.45rem);
    line-height: 0.98;
    letter-spacing: -0.058em;
    font-weight: 950;
}

.hero-card p {
    max-width: 850px;
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(1.05rem, 1.35vw, 1.20rem);
    line-height: 1.62;
    font-weight: 650;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 38px;
    flex-wrap: wrap;
}

/* BUTTONS */

.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 0.98rem;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #009aa4, #00727b);
    box-shadow: 0 10px 22px rgba(0, 140, 149, 0.20);
}

.hero-card .btn-primary {
    color: #005b63;
    background: #ffffff;
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.btn-light {
    color: #005f67;
    background: #edf7f7;
}

/* STATS */

.stats-card {
    padding: 34px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.stats-card h2 {
    margin: 0 0 20px;
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.78rem;
    font-weight: 950;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stat-box {
    min-height: 120px;
    padding: 24px;
    border-radius: 18px;
    background: #eef7f8;
    border: 1px solid #cfe5ec;
}

.stat-box strong {
    display: block;
    color: #006778;
    font-size: 2.7rem;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.stat-box span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 900;
}

/* CORPORATE PROJECT NOTE */

.painel-destaque-projeto {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(237, 248, 249, 0.96), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(0, 140, 149, 0.16);
    border-left: 5px solid rgba(0, 140, 149, 0.72);
    box-shadow: 0 10px 24px rgba(22, 52, 78, 0.055);
}

.frase-projeto {
    display: block;
    color: var(--teal-deep);
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.55;
    letter-spacing: -0.015em;
}

.frase-projeto::before {
    content: "IA aplicada à saúde pública";
    display: block;
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 140, 149, 0.10);
    color: var(--teal-dark);
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.data-atualizacao-discreta {
    margin-top: 8px;
    color: #7890a2;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

/* FILTERS */

.filter-section {
    padding: 0 0 30px;
}

.filter-card {
    padding: 36px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(22, 52, 78, 0.08);
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 20px;
}

.filter-title span {
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.77rem;
    font-weight: 950;
}

.filter-title h2 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.filters {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(170px, 0.8fr)) auto auto;
    gap: 14px;
    align-items: end;
}

.filters label {
    display: grid;
    gap: 8px;
}

.filters label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.filters input,
.filters select {
    width: 100%;
    min-height: 52px;
    border: 1px solid #cfe0ea;
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    padding: 0 16px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    outline: none;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 140, 149, 0.12);
}

/* CATEGORIES */

.category-section {
    padding: 0 0 30px;
}

.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 14px;
    scrollbar-width: auto;
}

.category-pill {
    flex: 0 0 auto;
    border: 1px solid #cfe0ea;
    background: rgba(255, 255, 255, 0.96);
    color: #005f67;
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(22, 52, 78, 0.05);
}

.category-pill span {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    margin-left: 8px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--teal-soft);
    color: #00747d;
}

/* NEWS */

.news-section {
    padding: 0 0 42px;
}

.news-card-wrapper {
    padding: 42px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.section-heading span {
    display: block;
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 950;
}

.section-heading h2 {
    margin: 10px 0 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.055em;
    font-weight: 950;
}

.section-heading h2 strong {
    color: var(--teal);
}

.section-heading p {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 600;
}

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

.news-card {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #cfe0ea;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(22, 52, 78, 0.07);
}

.card-image {
    height: 168px;
    background: linear-gradient(135deg, #0f969c, #006b75);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-placeholder {
    background:
        radial-gradient(circle at 15% 15%, rgba(255,255,255,.12), transparent 24%),
        linear-gradient(135deg, #0f969c, #006b75);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.tag {
    display: inline-flex;
    align-items: center;
    max-width: 78%;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: #005f67;
    background: var(--teal-soft);
    font-size: 0.75rem;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.news-card h4 {
    margin: 0;
    color: #152539;
    font-size: 1.16rem;
    line-height: 1.25;
    letter-spacing: -0.035em;
    font-weight: 950;
}

.news-card h4 a:hover {
    color: var(--teal-dark);
}

.summary {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 600;
}

.original-title {
    margin-top: 18px;
    color: #253447;
    line-height: 1.45;
    font-size: 0.91rem;
}

.original-title strong {
    font-weight: 950;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
}

.meta span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 11px;
    border-radius: 999px;
    background: #eef5f7;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
}

.source {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d8e6ee;
    display: grid;
    gap: 6px;
}

.source strong {
    color: #1b2d42;
    font-size: 0.78rem;
    font-weight: 950;
}

.source span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.card-footer a {
    color: var(--teal-dark);
    font-size: 0.82rem;
    font-weight: 950;
}

.image-count {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.empty-state {
    padding: 42px;
    text-align: center;
    border-radius: var(--radius-md);
    background: #f5fafc;
    border: 1px dashed #cfe0ea;
}

.empty-state h3 {
    margin: 0;
    font-size: 1.4rem;
}

.empty-state p {
    margin: 10px 0 0;
    color: var(--muted);
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.pagination button {
    border: 1px solid #cfe0ea;
    background: #ffffff;
    color: var(--teal-dark);
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
}

.pagination button.active {
    color: #ffffff;
    background: var(--teal);
    border-color: var(--teal);
}

/* SOURCES */

.sources-section {
    padding: 0 0 50px;
}

.sources-card {
    padding: 34px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--line);
    text-align: center;
}

.sources-card span {
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    font-weight: 950;
}

.sources-card h2 {
    margin: 10px 0 10px;
    font-size: 1.75rem;
    letter-spacing: -0.05em;
}

.sources-card p {
    margin: 0 auto;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.65;
}

/* FOOTER */

.site-footer {
    padding: 20px 0 30px;
    background: transparent;
}

.footer-inner {
    display: flex;
    justify-content: center;
}

.footer-copy {
    width: 100%;
    text-align: center;
    color: #6d7f91;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    padding-top: 18px;
    border-top: 1px solid rgba(199, 219, 229, 0.9);
}

/* RESPONSIVE */

@media (max-width: 1180px) {
    .brand-logo-full {
        height: 62px;
        max-width: 460px;
    }

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

    .hero-card {
        min-height: auto;
    }

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 1480px);
    }

    .header-inner {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
        gap: 18px;
    }

    .brand {
        width: 100%;
    }

    .brand-logo-full {
        height: 52px;
        max-width: min(100%, 390px);
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    .brand-icon img {
        width: 48px;
        height: 48px;
    }

    .brand-text strong {
        font-size: 1.28rem;
        line-height: 1.1;
    }

    .main-nav {
        width: 100%;
        gap: 16px;
        overflow-x: auto;
    }

    .hero-card {
        padding: 32px;
    }

    .hero-card h1 {
        margin: 26px 0 20px;
        font-size: clamp(2.25rem, 11vw, 3.15rem);
        line-height: 1.02;
        letter-spacing: -0.055em;
    }

    .hero-card p {
        font-size: 1rem;
        line-height: 1.58;
    }

    .hero-actions {
        margin-top: 30px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-title,
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters {
        grid-template-columns: 1fr;
    }

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

    .news-card-wrapper,
    .filter-card,
    .stats-card {
        padding: 24px;
    }

    .card-image {
        height: 150px;
    }
}