*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

 :root {
    --ink: #0d1a2e;
    --paper: #f5f3ee;
    --accent: #003366;
    --accent2: #2a4a6e;
    --accent-light: #e8f0f8;
    --muted: #7a8898;
    --border: #ddd9d0;
    --white: #ffffff;
    --blue-deep: #003B7A;
    --blue-mid: #0051A8;
    --blue-accent: #0070E0;
    --bar-white-70: rgba(255, 255, 255, 0.7);
    --bar-white-15: rgba(255, 255, 255, 0.08);
    --bar-white-30: rgba(255, 255, 255, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
}


/* ══ PORTAL BAR ══ */

.fapesp-portal-bar {
    width: 100%;
    position: relative;
    z-index: 200;
    background: linear-gradient(105deg, var(--blue-deep) 0%, var(--blue-mid) 60%, var(--blue-accent) 100%);
}

.fapesp-portal-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.bar-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 48px;
    gap: 16px;
}

.bar-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.bar-label-text {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bar-white-70);
    white-space: nowrap;
    text-decoration: none;
}

.bar-label-text:hover {
    color: white;
}

.bar-divider {
    width: 1px;
    height: 20px;
    background: var(--bar-white-30);
}

.bar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.bar-nav li a {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    border-radius: 100px;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--bar-white-70);
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.bar-nav li a:hover {
    color: white;
    background: var(--bar-white-15);
}

.bar-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--bar-white-30);
    flex-shrink: 0;
    margin: 0 4px;
}


/* ── NAV ── */

.main-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgba(245, 243, 238, 0.93);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo .badge {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
}

.nav-logo .org {
    font-size: 13px;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active {
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-lang {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}


/* ── HERO EDITAIS ── */

.hero-editais {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #001f3f 0%, #002f5a 40%, #003870 70%, #001a35 100%);
    overflow: hidden;
}

.hero-editais::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(0, 140, 255, 0.30) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridpan 30s linear infinite;
}

.hero-editais::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(105deg, rgba(0, 10, 30, 0.5) 0%, rgba(0, 15, 40, 0.15) 60%, transparent 100%);
}

@keyframes gridpan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 80px 80px;
    }
}

.hero-editais-content {
    position: relative;
    z-index: 2;
    padding: 72px 80px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.hero-editais-text {
    flex: 1;
}

.hero-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-tag::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, .4);
}

.hero-editais h1 {
    font-family: 'Google Sans', 'Product Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 3.5vw, 52px);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: white;
    margin-bottom: 16px;
}

.hero-editais p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .75);
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.hero-stat {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    padding: 20px 24px;
    backdrop-filter: blur(10px);
    text-align: center;
    min-width: 100px;
}

.hero-stat .n {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.hero-stat .l {
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
    margin-top: 6px;
    line-height: 1.4;
}


/* ── BREADCRUMB ── */

.breadcrumb {
    padding: 14px 80px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span {
    font-size: 12px;
    color: var(--border);
}

.breadcrumb .current {
    font-size: 12px;
    color: var(--ink);
    font-weight: 500;
}


/* ── MAIN LAYOUT ── */

.page-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 80px;
    align-items: start;
}

.main-col {
    padding-right: 56px;
}

.sidebar {
    position: sticky;
    top: 80px;
}


/* ── INTRO BOX ── */

.intro-box {
    background: var(--accent-light);
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 48px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.intro-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.intro-box p {
    font-size: 14px;
    line-height: 1.7;
    color: #2a3a50;
}

.intro-box strong {
    color: var(--accent);
}


/* ── YEAR GROUP ── */

.year-group {
    margin-bottom: 48px;
}

.year-label {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.year-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}


/* ── EDITAL CARD ── */

.edital-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.edital-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 51, 102, .08);
}

.edital-card.open {
    border-color: var(--accent);
}

.edital-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background .15s;
}

.edital-card.open .edital-header,
.edital-header:hover {
    background: var(--accent-light);
}

.edital-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.edital-icon.aberto {
    background: #e6f4ea;
}

.edital-icon.encerrado {
    background: #f0f0f0;
}

.edital-icon.resultado {
    background: #fff3e0;
}

.edital-info {
    flex: 1;
}

.edital-title {
    font-family: 'Google Sans', 'Product Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 6px;
}

.edital-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.edital-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
}

.tag-ia {
    background: #e8f0fb;
    color: #1a56c4;
}

.tag-energia {
    background: #fff3e0;
    color: #c07000;
}

.tag-saude {
    background: #fce8f3;
    color: #9c1b6e;
}

.tag-agro {
    background: #e8f5e9;
    color: #1b7a2e;
}

.tag-quimica {
    background: #f3e8ff;
    color: #6b1fb8;
}

.tag-offshore {
    background: #e0f2f1;
    color: #00695c;
}

.tag-geral {
    background: var(--accent-light);
    color: var(--accent);
}

.status-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-pill::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.status-aberto {
    background: #e6f4ea;
    color: #1a7a3a;
}

.status-aberto::before {
    background: #1a7a3a;
}

.status-encerrado {
    background: #f5f5f5;
    color: #888;
}

.status-encerrado::before {
    background: #aaa;
}

.status-resultado {
    background: #fff3e0;
    color: #c07000;
}

.status-resultado::before {
    background: #c07000;
}

.edital-partner {
    font-size: 12px;
    color: var(--muted);
}

.edital-chevron {
    font-size: 16px;
    color: var(--muted);
    transition: transform .3s;
    flex-shrink: 0;
}

.edital-card.open .edital-chevron {
    transform: rotate(180deg);
}


/* ── EDITAL BODY ── */

.edital-body {
    display: none;
    padding: 0 24px 24px;
    border-top: 1px solid var(--border);
}

.edital-card.open .edital-body {
    display: block;
}

.edital-body-inner {
    padding-top: 20px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 24px;
}

.edital-desc {
    font-size: 14px;
    line-height: 1.75;
    color: #555;
}

.edital-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-edital {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Google Sans', 'Product Sans', 'sans-serif';
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    text-align: center;
}

.btn-edital.primary {
    background: var(--accent);
    color: white;
}

.btn-edital.primary:hover {
    background: #004488;
    transform: translateY(-1px);
}

.btn-edital.secondary {
    background: white;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.btn-edital.secondary:hover {
    background: var(--accent-light);
}

.edital-date-info {
    margin-top: 16px;
}

.edital-date-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 6px;
}

.edital-date-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 80px;
}

.edital-date-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}


/* ── SIDEBAR ── */

.sidebar-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-card h4 {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link-list li a {
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    transition: color .2s;
}

.sidebar-link-list li a:hover {
    color: var(--accent);
}

.sidebar-link-list li a::before {
    content: '→';
    color: var(--accent);
    flex-shrink: 0;
    font-size: 12px;
    margin-top: 1px;
}

.opp-mini-card {
    background: var(--accent-light);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
    transition: background .2s;
}

.opp-mini-card:hover {
    background: #d0e4f5;
}

.opp-mini-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.opp-mini-title {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.4;
    font-weight: 500;
}

.opp-mini-deadline {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.pub-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    transition: background .2s;
}

.pub-card:hover {
    background: var(--paper);
}

.pub-thumb {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--paper);
    border: 1px solid var(--border);
}

.pub-info {
    flex: 1;
}

.pub-title {
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.4;
}

.pub-lang {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.pub-download {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 6px;
    display: block;
}


/* ── CTA BAND ── */

.cta-band {
    background: var(--accent2);
    color: white;
    padding: 72px 80px;
    text-align: center;
}

.cta-band h2 {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 2.4vw, 36px);
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.cta-band p {
    font-size: 16px;
    opacity: .8;
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.btn-white {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    background: white;
    color: var(--accent);
    padding: 14px 36px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: transform .15s, box-shadow .15s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .15);
}


/* ── REVEAL ── */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}


/* ── TIMELINE MINI ── */

.timeline-mini {
    margin-top: 8px;
}

.tl-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.tl-row:last-child {
    border-bottom: none;
}

.tl-year {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    min-width: 34px;
}

.tl-count {
    font-size: 12px;
    color: var(--muted);
}

.painelCard2 h5 {
    font-size: 25px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 6px;
}

.painelCard2 h5,
.small-noticias small,
.TextLimitedNews {
    font-family: "Google Sans", "Product Sans", sans-serif;
}

.small-noticias,
.TextLimitedNews {
    color: #6a6f73;
}

.sobre-wrap-int {
    min-height: 320px;
}

.ctrlAltura {
    height: 190px;
}

.imgNews {
    width: 273px;
    height: 190px !important;
    object-fit: fill;
}

.card {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    background: none;
}

.pagination {
    display: -ms-flexbox;
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: .25rem;
    justify-content: center;
    align-items: center;
}

.news-card-title-int {
    font-size: 18px;
}

.circuit-svg-int {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    z-index: 0;
}

@media (max-width: 960px) {
    .sobre-wrap-int {
        min-height: 100%;
    }
    .imgNews {
        object-fit: fill;
        width: 100%;
        aspect-ratio: 16 / 9;
        display: block;
        background: var(--paper);
    }
    .ctrlAltura {
        height: 100%;
        height: 100%;
        padding-right: 20px;
    }
    .painelCard2 h5 {
        font-size: 20px;
    }
    .TextLimitedNews {
        margin-top: 12px;
    }
    .main-nav {
        padding: 0 24px;
    }
    .nav-links {
        display: none;
    }
    .hero-editais-content {
        padding: 48px 32px;
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-stats {
        flex-wrap: wrap;
    }
    .breadcrumb {
        padding: 14px 24px;
    }
    .page-body {
        grid-template-columns: 1fr;
        padding: 40px 24px;
    }
    .main-col {
        padding-right: 0;
    }
    .sidebar {
        position: static;
    }
    .edital-body-inner {
        grid-template-columns: 1fr;
    }
    .edital-desc h3 {
        font-size: 23px;
    }
    .cta-band {
        padding: 56px 32px;
    }
    footer {
        padding: 48px 32px 32px;
    }
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}