/* Inter (variable) self-hosted: the Google Fonts stylesheet was the single
   biggest render blocker (~856 ms) plus two extra third-party connections.
   Files fetched from fonts.gstatic.com — refresh them if Inter is updated. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/frontend/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/frontend/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Intrinsic width/height attributes (added for CLS) are presentational hints:
   where a rule sets only the width, the attribute height would win and stretch
   the image. :where() has zero specificity, so any author rule still overrides
   this default — it only fills in the "height: auto" the markup used to imply. */
:where(img[width][height]) { height: auto; }

/* ============================================================
   ADENOR — public site design system
   Brand (Manual da Marca): verde principal #003E2B, verde
   secundária #007C3E, amarelo #FDC300, vermelho #E30413.
   Typography: Inter (headings 800/900) + system fallback.
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --green-900: #003E2B;
    --green-700: #00552f;
    --green-600: #007C3E;
    --green-100: #e3f2e9;
    --green-50:  #f2f9f5;
    --yellow:    #FDC300;
    --red:       #E30413;
    --bg:        #f7faf8;
    --card:      #ffffff;
    --text:      #14231c;
    --muted:     #5b6f64;
    --border:    #e2ebe5;
    --radius:    14px;
    --shadow:    0 10px 30px rgba(0, 62, 43, 0.08);
    --shadow-lg: 0 24px 60px rgba(0, 62, 43, 0.16);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; }
img { max-width: 100%; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.icon { vertical-align: -3px; flex-shrink: 0; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; }

/* ---------------- Topbar ---------------- */
.topbar { background: var(--green-900); color: #cfe6da; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-contacts { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-item { color: #cfe6da; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar-item:hover { color: #fff; }
.topbar-item .icon { width: 14px; height: 14px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang-switcher { display: flex; gap: 4px; }
.lang-switcher a { color: #9dbfae; text-decoration: none; font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: 5px; }
.lang-switcher a.active, .lang-switcher a:hover { color: var(--green-900); background: var(--yellow); }

/* ---------------- Header / nav ---------------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 500; box-shadow: 0 1px 0 var(--border); transition: box-shadow .25s; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(0, 62, 43, 0.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; }
.site-logo img { width: 240px; height: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav > a, .nav-dropdown-toggle {
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
    padding: 9px 12px; border-radius: 9px; background: none; border: 0; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 4px; transition: background .15s, color .15s;
}
.main-nav > a:hover, .main-nav > a.active, .nav-dropdown-toggle:hover { background: var(--green-50); color: var(--green-600); }
.main-nav > a.nav-highlight { color: var(--green-600); font-weight: 700; }
.btn-whatsapp-nav {
    display: inline-flex; align-items: center; gap: 8px; background: var(--green-600); color: #fff !important;
    padding: 10px 16px !important; border-radius: 999px; font-weight: 700; margin-left: 8px;
}
.btn-whatsapp-nav:hover { background: var(--green-700) !important; color: #fff !important; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute; top: calc(100% + 6px); left: 0; background: #fff; min-width: 230px;
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: 8px; display: none; z-index: 600;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav-dropdown-menu a:hover { background: var(--green-50); color: var(--green-600); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 3px; background: var(--green-900); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 1080px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; padding: 12px 22px 20px; gap: 2px;
        box-shadow: 0 24px 40px rgba(0,62,43,.18); border-top: 1px solid var(--border);
    }
    .main-nav.open { display: flex; }
    .nav-dropdown-menu { position: static; box-shadow: none; border: 0; padding-left: 16px; }
    .btn-whatsapp-nav { margin: 10px 0 0; justify-content: center; }
    .site-logo img { width: 190px; }
}

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 13px 24px; font-size: 15px; border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); box-shadow: 0 12px 24px rgba(0,124,62,.3); }
.btn-yellow { background: var(--yellow); color: var(--green-900); }
.btn-yellow:hover { box-shadow: 0 12px 24px rgba(253,195,0,.35); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-whatsapp { background: #25D366; color: #06341c; }
.btn-whatsapp:hover { box-shadow: 0 12px 24px rgba(37,211,102,.35); }

/* ---------------- Section scaffolding ----------------
   Sections stack, so the band between two of them is DOUBLE this padding.
   At 72px that meant ~150px of empty space between every block (worst on
   mobile) — keep the value low and let the pairing rules below do the rest. */
.section { padding: 52px 0; }
@media (max-width: 900px) { .section { padding: 36px 0; } }
/* Neighbours that share a background have no color change to justify the
   doubled padding: the gap reads as one continuous void. Collapse it so the
   band equals one section's padding, while a color boundary keeps both. */
.section:not(.section-alt) + .section:not(.section-alt),
.section-alt + .section-alt { padding-top: 0; }
.section-alt { background: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--green-600); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.kicker::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--yellow); }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: var(--green-900); margin-top: 8px; }
.section-sub { color: var(--muted); max-width: 640px; margin-top: 10px; font-size: 17px; }
.see-all { color: var(--green-600); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------------- HERO (home) ---------------- */
.hero { position: relative; background: var(--green-900); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -180px; top: -180px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,124,62,.55), transparent); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 32px 0 34px; position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(253,195,0,.14); color: var(--yellow); font-weight: 700; font-size: 15px; padding: 8px 16px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; line-height: 1.12; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { margin: 22px 0 30px; color: #cfe6da; font-size: 18px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media .hero-card {
    border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); display: block; position: relative;
    aspect-ratio: 4 / 3; background: var(--green-700);
}
.hero-media .hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.hero-media .hero-card:hover img { transform: scale(1.04); }
.hero-card-overlay { position: absolute; inset: auto 0 0 0; padding: 26px; background: linear-gradient(transparent, rgba(0, 30, 20, .92)); color: #fff; }
.hero-card-overlay .cat { color: var(--yellow); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.hero-card-overlay h2 { font-size: 21px; margin-top: 6px; font-weight: 800; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 6px 0 38px; position: relative; z-index: 1; }
.hero-stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; text-align: center; }
.hero-stat b { display: block; font-size: clamp(22px, 3vw, 32px); font-weight: 900; color: var(--yellow); }
.hero-stat span { color: #cfe6da; font-size: 13px; font-weight: 600; }
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; padding: 32px 0 22px; }
}
@media (max-width: 560px) {
    .hero-stats { grid-template-columns: 1fr; }
}

/* ---------------- Cards / post grids ---------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.story-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.story-card .cover { display: block; aspect-ratio: 16 / 10; background: var(--green-100); overflow: hidden; position: relative; }
.story-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.story-card:hover .cover img { transform: scale(1.06); }
.story-card .cover .cat-chip { position: absolute; left: 14px; top: 14px; }
.cat-chip { display: inline-block; background: var(--yellow); color: var(--green-900); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; text-decoration: none; }
.story-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story-card h3 { font-size: 17.5px; font-weight: 800; }
.story-card h3 a { color: var(--green-900); text-decoration: none; }
.story-card h3 a:hover { color: var(--green-600); }
.story-card .excerpt { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card .meta { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Featured (first card bigger on home news section) */
.grid-featured { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-auto-rows: auto; gap: 26px; }
.grid-featured .story-card:first-child { grid-row: span 2; }
.grid-featured .story-card:first-child .cover { aspect-ratio: 16 / 12; }
.grid-featured .story-card:first-child h3 { font-size: 22px; }
@media (max-width: 960px) { .grid-featured { grid-template-columns: 1fr 1fr; } .grid-featured .story-card:first-child { grid-column: span 2; grid-row: auto; } }
@media (max-width: 620px) { .grid-featured { grid-template-columns: 1fr; } .grid-featured .story-card:first-child { grid-column: auto; } }

/* ---------------- Pillars / institutional strip ---------------- */
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 1100px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 28px 24px; transition: transform .2s, box-shadow .2s; }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pillar .pic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; }
.pillar:nth-child(1) .pic { background: var(--green-600); }
.pillar:nth-child(2) .pic { background: var(--green-900); }
.pillar:nth-child(3) .pic { background: var(--yellow); color: var(--green-900); }
.pillar:nth-child(4) .pic { background: var(--red); }
.pillar:nth-child(5) .pic { background: var(--green-700); }
.pillar h3 { font-size: 17px; font-weight: 800; color: var(--green-900); margin-bottom: 8px; }
.pillar p { font-size: 14.5px; color: var(--muted); }

/* ---------------- CTA band ---------------- */
.cta-band { background: linear-gradient(120deg, var(--green-900), var(--green-700)); color: #fff; border-radius: 24px; padding: clamp(30px, 4vw, 46px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(253,195,0,.16); }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; max-width: 560px; position: relative; z-index: 1; }
.cta-band p { color: #cfe6da; margin-top: 10px; max-width: 520px; position: relative; z-index: 1; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------------- Partners band + footer ---------------- */
/* White background is mandatory for the colored Petrobras mark; paddings keep
   the brand's non-interference area (≥ the mark height on every side). */
.partners-band { background: #fff; border-top: 1px solid var(--border); padding: 46px 0; }
.partners-inner { display: flex; align-items: center; justify-content: center; gap: clamp(60px, 12vw, 160px); flex-wrap: wrap; }
.partner-block { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.partner-role { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.partner-logo-adenor { width: 210px; height: auto; }
.partner-logo-petrobras { width: 190px; min-width: 100px; height: auto; }

.site-footer { background: var(--green-900); color: #cfe6da; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 60px 0 44px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { width: 200px; height: auto; margin-bottom: 16px; }
.footer-about p { font-size: 14.5px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: background .15s; }
.footer-social a:hover { background: var(--green-600); }
.footer-col h3 { color: #fff; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col span { color: #cfe6da; text-decoration: none; font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: var(--yellow); }
.footer-contact .btn { margin-top: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px; color: #9dbfae; }

/* WhatsApp float */
.whatsapp-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 58px; height: 58px; border-radius: 50%;
    background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(37,211,102,.45);
    transition: transform .15s;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------------- Listing (category) ---------------- */
.page-head { background: linear-gradient(120deg, var(--green-900), var(--green-700)); color: #fff; padding: 56px 0; }
.page-head .breadcrumbs { font-size: 13px; color: #9dbfae; margin-bottom: 12px; }
.page-head .breadcrumbs a { color: #cfe6da; text-decoration: none; }
.page-head .breadcrumbs a:hover { color: var(--yellow); }
.page-head h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 900; }
.page-head p { color: #cfe6da; margin-top: 10px; max-width: 640px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 44px; }
.pagination a, .pagination span.current { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 14px; border-radius: 12px; text-decoration: none; font-weight: 700; color: var(--green-900); background: #fff; border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--green-600); color: var(--green-600); }
.pagination span.current { background: var(--green-600); color: #fff; border-color: var(--green-600); }

/* ---------------- Article page ---------------- */
.article-hero { background: linear-gradient(120deg, var(--green-900), var(--green-700)); color: #fff; padding: 52px 0 150px; }
.article-hero .breadcrumbs { font-size: 13px; color: #9dbfae; margin-bottom: 16px; }
.article-hero .breadcrumbs a { color: #cfe6da; text-decoration: none; }
.article-hero .cat-chip { margin-bottom: 16px; }
.article-hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; max-width: 880px; }
.article-hero .meta { margin-top: 16px; color: #cfe6da; font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.article-shell { max-width: 860px; margin: -110px auto 0; position: relative; z-index: 2; padding: 0 22px 40px; }
.article-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.article-card .cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.article-body-wrap { padding: clamp(24px, 5vw, 52px); }
.article-excerpt { font-size: 19px; color: var(--muted); border-left: 4px solid var(--yellow); padding-left: 18px; margin-bottom: 26px; }
.article-content { font-size: 17.5px; }
.article-content p { margin-bottom: 18px; }
.article-content h2, .article-content h3 { color: var(--green-900); margin: 30px 0 12px; }
.article-content img { border-radius: 12px; margin: 10px 0; }
.article-content a { color: var(--green-600); }
.article-content ul, .article-content ol { margin: 0 0 18px 22px; }

/* Institutional people cards (presidents gallery, board): text left, photo right */
.person-roll { display: flex; flex-direction: column; gap: 16px; margin: 26px 0; }
.person-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 24px; }
.person-row h3 { margin: 0 0 4px; font-size: 19px; }
.person-row .person-meta { margin: 0; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.article-content .person-photo { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid var(--green-100); margin: 0; }
@media (max-width: 560px) {
    .person-row { padding: 16px 18px; gap: 14px; }
    .article-content .person-photo { width: 72px; height: 72px; }
}

/* Institutional councils: each member paired with the entity represented */
.council { margin: 0 0 30px; }
.article-content .council-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 620px) { .article-content .council-members { grid-template-columns: 1fr; } }
.council-members li { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.council-members b { display: block; color: var(--green-900); font-size: 15.5px; }
.council-members span { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* Institutional participations: chronological timeline, one card per council/committee */
.article-content .inst-timeline { list-style: none; margin: 26px 0 0; padding: 0 0 0 26px; position: relative; }
.inst-timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--green-100); }
.inst-timeline li { position: relative; margin: 0 0 18px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 24px; }
.inst-timeline li::before { content: ''; position: absolute; left: -26px; top: 24px; width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green-600); }
.inst-timeline .inst-period { display: inline-block; color: var(--green-600); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.article-content .inst-timeline h3 { margin: 0 0 4px; font-size: 19px; }
.inst-timeline .inst-org { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.inst-timeline p:last-child { margin: 0; }
@media (max-width: 560px) { .inst-timeline li { padding: 16px 18px; } }

.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 30px; }
.article-gallery a { border-radius: 12px; overflow: hidden; display: block; }
.article-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .35s; }
.article-gallery a:hover img { transform: scale(1.06); }

/* Videos attached to a post (posts.videos column) */
.article-videos { margin-top: 34px; }
.article-videos-title { display: flex; align-items: center; gap: 9px; font-size: 21px; color: var(--green-900); margin: 0 0 14px; }
.article-videos-title .icon { color: var(--green-600); }
.article-videos .vc-prev { left: -10px; }
.article-videos .vc-next { right: -10px; }

/* Share */
.share-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.share-bar .label { font-weight: 800; color: var(--green-900); font-size: 14px; margin-right: 4px; display: inline-flex; align-items: center; gap: 8px; }
.share-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, filter .15s; }
.share-btn:hover { transform: translateY(-3px); filter: brightness(1.08); }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-x { background: #111; }
.share-linkedin { background: #0A66C2; }
.share-copy { background: var(--green-100); color: var(--green-900); }

/* Related */
.related-wrap { max-width: 1180px; margin: 0 auto; padding: 30px 22px 0; }

/* Comments */
.comments-wrap { max-width: 860px; margin: 0 auto; padding: 40px 22px 70px; }
.comments-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: clamp(22px, 4vw, 40px); }
.comments-card h2 { color: var(--green-900); font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comments-card .comments-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.comment { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.comment img.avatar, .comment .avatar-fallback { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.comment .avatar-fallback { background: var(--green-100); color: var(--green-600); display: grid; place-items: center; font-weight: 800; }
.comment .c-body b { color: var(--green-900); font-size: 14.5px; }
.comment .c-body time { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.comment .c-body p { font-size: 15px; margin-top: 4px; white-space: pre-line; }
.comment-form { margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--border); }
.comment-form textarea { width: 100%; min-height: 110px; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; font: inherit; font-size: 15px; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--green-600); }
.comment-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.comment-hint { font-size: 13px; color: var(--muted); }
.comment-feedback { margin-top: 12px; font-weight: 600; font-size: 14.5px; display: none; }
.comment-feedback.ok { color: var(--green-600); display: block; }
.comment-feedback.err { color: var(--red); display: block; }

/* ---------------- Landing pages (portfólio / recicla óleo) ---------------- */
.lp-hero { position: relative; color: #fff; padding: 72px 0; background: var(--green-900); overflow: hidden; }
.lp-hero.lp-hero-img { background-size: cover; background-position: center; }
.lp-hero .lp-hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,40,28,.94) 20%, rgba(0,62,43,.72) 60%, rgba(0,62,43,.45)); }
.lp-hero .container { position: relative; z-index: 1; }
.lp-hero .lp-logo { max-width: 340px; margin-bottom: 26px; }
.lp-hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 900; max-width: 760px; line-height: 1.08; }
.lp-hero h1 em { font-style: normal; color: var(--yellow); }
.lp-hero p { margin: 22px 0 32px; color: #dbeee3; font-size: 19px; max-width: 640px; }

.stat-band { background: var(--green-600); color: #fff; }
.stat-band .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 40px; padding-bottom: 40px; }
@media (max-width: 800px) { .stat-band .container { grid-template-columns: repeat(2, 1fr); } }
.stat-band .stat { text-align: center; }
.stat-band b { display: block; font-size: clamp(28px, 4vw, 44px); font-weight: 900; color: var(--yellow); }
.stat-band span { font-size: 14px; font-weight: 600; color: #eafff3; }

/* Track-record tabs (Projetos | Parcerias | Eventos) */
.tl-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 26px; }
.tl-tab { border: 1px solid var(--border); background: #fff; color: var(--green-900); font: inherit; font-weight: 800; font-size: 15px; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.tl-tab:hover { border-color: var(--green-600); color: var(--green-600); }
.tl-tab.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.tl-panel[hidden] { display: none; }

.timeline { position: relative; margin-top: 20px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--green-100); }
.tl-item { position: relative; padding: 0 0 34px 62px; }
/* The last item's bottom padding stacked on top of the section padding. */
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); border: 4px solid #fff; box-shadow: 0 0 0 3px var(--green-100); }
.tl-item .tl-year { font-weight: 900; color: var(--green-600); font-size: 14px; letter-spacing: .06em; }
.tl-item h3 { color: var(--green-900); font-size: 19px; font-weight: 800; margin: 4px 0 8px; }
.tl-item p { color: var(--muted); font-size: 15.5px; max-width: 760px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery-grid a { display: block; border-radius: 14px; overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.07); }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 960px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-weight: 900; font-size: 42px; color: var(--green-100); position: absolute; right: 18px; top: 10px; }
.step h3 { color: var(--green-900); font-size: 16.5px; font-weight: 800; margin-bottom: 8px; position: relative; }
.step p { font-size: 14.5px; color: var(--muted); position: relative; }

.map-shell { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
#collectMap { width: 100%; height: 480px; background: var(--green-50); }
.points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 960px) { .points-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .points-grid { grid-template-columns: 1fr; } }
.point-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.point-card h3 { color: var(--green-900); font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.point-card h3 .icon { color: var(--green-600); }
.point-card p { font-size: 14px; color: var(--muted); margin: 8px 0 12px; }
.point-card .point-links { display: flex; gap: 10px; flex-wrap: wrap; }
.point-card .point-links a { font-size: 13px; font-weight: 700; color: var(--green-600); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.point-card .point-links a:hover { text-decoration: underline; }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .video-grid { grid-template-columns: 1fr; } }
.video-embed { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.video-embed iframe { width: 100%; aspect-ratio: 9 / 16; border: 0; display: block; }
.video-embed.wide iframe { aspect-ratio: 16 / 9; }

/* Empty state */
.empty-state { text-align: center; padding: 62px 20px; color: var(--muted); }
.empty-state h2 { color: var(--green-900); margin-bottom: 8px; }

/* 404 */
.notfound-main { padding: 72px 0; text-align: center; }
.notfound-main h1 { font-size: 68px; color: var(--green-900); font-weight: 900; }
.notfound-main p { color: var(--muted); margin: 14px 0 28px; }

/* utility */
.mt-30 { margin-top: 30px; }
.center { text-align: center; }

/* Recicla Óleo lockup includes dark text — sit it on a white chip on dark heroes */
.lp-hero .lp-logo { background: #fff; padding: 18px 26px; border-radius: 16px; box-shadow: var(--shadow-lg); display: inline-block; }

/* Footer fixes: center icons inside the social circles; more breathing room */
.footer-social a .icon { vertical-align: 0; display: block; }
.footer-grid { padding: 88px 0 64px; }
.comment-form input[type="text"] { width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px; margin-bottom: 10px; }
.comment-form input[type="text"]:focus { outline: none; border-color: var(--green-600); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Instagram embeds grid */
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.ig-grid .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; border-radius: 14px !important; }

/* Partnership feature section — WHITE background (mandatory for the colored
   Petrobras mark), generous clear space (> mark height) and > mark-height
   distance between the two brands, per the Petrobras identity manual. */
.partnership-feature { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: clamp(34px, 6vw, 60px); text-align: center; box-shadow: var(--shadow); }
.partnership-feature .kicker { justify-content: center; }
.partnership-feature h2 { font-size: clamp(24px, 3.6vw, 36px); font-weight: 900; color: var(--green-900); margin-top: 10px; }
.partnership-feature > p { color: var(--muted); max-width: 720px; margin: 14px auto 0; font-size: 16.5px; }
.partnership-logos { display: flex; align-items: center; justify-content: center; gap: clamp(50px, 9vw, 130px); flex-wrap: wrap; margin: 44px 0 36px; }
.partnership-logos img { height: auto; }
.partnership-logos .pl-adenor { width: clamp(180px, 22vw, 250px); height: auto; }
.partnership-logos .pl-petrobras { width: clamp(160px, 20vw, 230px); min-width: 100px; height: auto; }
.partnership-feature .btn { margin-top: 4px; }

/* Petrobras white "negativa" on the dark recicla hero (allowed over the brand
   dark green); kept >= 100px wide with clear space around. */
.lp-partner-strip { display: flex; align-items: center; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.lp-partner-strip .lp-partner-label { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #9dbfae; }
.lp-partner-strip img { width: 170px; min-width: 100px; height: auto; display: block; }

/* Recicla Óleo logo: bigger in the landing hero; white chip version for dark bands */
.lp-hero .lp-logo { max-width: 460px; }
.recicla-logo-chip { background: #fff; padding: 14px 20px; border-radius: 14px; width: 320px; max-width: 100%; height: auto; display: block; margin-bottom: 20px; box-shadow: var(--shadow); }

/* Fix: .main-nav > a (background: none) outranked .btn-whatsapp-nav — match
   its specificity so the header WhatsApp button is always green. */
.main-nav > a.btn-whatsapp-nav { background: var(--green-600); color: #fff; }
.main-nav > a.btn-whatsapp-nav:hover { background: var(--green-700); color: #fff; }

/* Footer: more breathing room and truly centered social icons */
.site-footer .footer-grid { padding: 76px 0 60px; gap: 44px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.footer-social a svg { display: block; vertical-align: 0; }

/* Tighten the nav so everything fits on one row up to ~1100px-wide viewports */
@media (min-width: 1081px) {
    .main-nav { flex-wrap: nowrap; }
    .main-nav > a, .nav-dropdown-toggle { padding: 8px 9px; font-size: 14px; }
    .main-nav > a.btn-whatsapp-nav { padding: 9px 14px !important; font-size: 14px; }
    .site-logo img { width: 205px; }
}

/* footer-grid shares the .container div — its padding override was zeroing
   the container's lateral padding. Restore it (20px on mobile). */
.site-footer .container.footer-grid { padding: 76px 22px 60px; }
@media (max-width: 768px) {
    .site-footer .container.footer-grid { padding: 52px 20px 44px; }
}

/* Social CTA (replaces on-site comments): loud gradient card with big buttons */
.social-cta { border-radius: 26px; background: linear-gradient(115deg, var(--green-900) 0%, var(--green-600) 62%, #0a9a52 100%); color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.social-cta::before { content: ""; position: absolute; left: -70px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(253,195,0,.18); }
.social-cta::after { content: ""; position: absolute; right: -60px; bottom: -110px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.08); }
.social-cta-inner { position: relative; z-index: 1; padding: clamp(34px, 6vw, 56px); text-align: center; }
.social-cta h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 900; }
.social-cta p { color: #dbeee3; max-width: 620px; margin: 12px auto 28px; font-size: 16.5px; }
.social-cta-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.social-cta-buttons .btn { font-size: 15.5px; padding: 15px 26px; }
.social-cta-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.social-cta-fb { background: #1877F2; color: #fff; }

/* Recicla Óleo lockup: full hero width on desktop, never overflow on mobile */
.lp-hero .lp-logo { display: block; width: 100%; max-width: 100%; }

/* Lightbox for gallery/content images */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 24, 16, .92); display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; opacity: 0; transition: opacity .2s; }
.lightbox.open { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .15s; }
.lightbox-close:hover { background: var(--red); }

/* Featured first card: let the cover grow to fill the tall slot instead of
   leaving a white gap between title and date when there is no excerpt. */
.grid-featured .story-card:first-child .cover { aspect-ratio: auto; flex: 1; min-height: 320px; }
.grid-featured .story-card:first-child .body { flex: 0 0 auto; }

/* YouTube shorts carousel */
.video-carousel { position: relative; }
/* align-items: center — a track can mix 9:16 Shorts with 16:9 videos; stretching
   would leave black bands under the wide slides. */
.vc-track { display: flex; align-items: center; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; }
.vc-track::-webkit-scrollbar { display: none; }
.vc-item { flex: 0 0 min(290px, 76vw); scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.vc-item iframe { width: 100%; aspect-ratio: 9 / 16; border: 0; display: block; }
.vc-item-wide { flex-basis: min(560px, 90vw); }
.vc-item-wide iframe { aspect-ratio: 16 / 9; height: 100%; }
.vc-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--green-600); color: #fff; cursor: pointer; display: grid; place-items: center; z-index: 2; box-shadow: var(--shadow-lg); transition: background .15s; }
.vc-btn:hover { background: var(--green-700); }
.vc-prev { left: -12px; }
.vc-prev .icon { transform: rotate(180deg); }
.vc-next { right: -12px; }
.vc-more { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.vc-more a { color: var(--green-600); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.vc-more a:hover { text-decoration: underline; }

/* Channel link under a single embedded video (hero shorts sit on dark bands) */
.video-channel-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; color: #fff; opacity: .82; font-weight: 600; font-size: .92rem; text-decoration: none; }
.video-channel-link:hover { opacity: 1; text-decoration: underline; }

/* Home hero video embed keeps the media-card frame */
.hero-card.hero-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Vertical Recicla Óleo lockup on small screens */
.lp-hero .lp-logo, .recicla-logo-chip { height: auto; }
/* Picture wrapper inherits the chip styling on both variants */
.lp-hero picture .lp-logo { width: 100%; }
@media (max-width: 640px) {
    .lp-hero .lp-logo { max-width: 340px; margin-left: auto; margin-right: auto; }
    .recicla-logo-chip { width: 240px; }
}

/* ---- Chrome-free YouTube short (ported from the cid.news player) ----
   The iframe is oversized and cropped so YouTube's title/controls fall
   outside the visible area; play/pause is our own overlay via the API. */
.video-container.short-video { width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 13.2 / 16.05; background: #000; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.video-container.short-video iframe { position: absolute; top: 50%; left: 50%; width: 1080px; height: 2340px; border: 0; transform: translate(-50%, -50%) scale(var(--yt-scale, 0.64)); }
.video-tap { position: absolute; inset: 0; z-index: 2; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.video-toggle-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--green-600); display: flex; align-items: center; justify-content: center; z-index: 3; pointer-events: none; opacity: 0; box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: opacity .25s ease; }
.video-toggle-icon .vt-play { margin-left: 5px; }
.video-toggle-icon .vt-pause, .short-video.is-paused .vt-pause { display: none; }
.short-video.is-paused .vt-play { display: block; }
.short-video.is-playing .vt-play { display: none; }
.short-video.is-playing .vt-pause { display: block; }
.video-container.short-video.is-paused .video-toggle-icon { opacity: 1; animation: videoPlayPulse 2.4s ease-in-out infinite; }
@keyframes videoPlayPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 0 0 0 rgba(255,255,255,.45); }
    50%      { box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 0 0 18px rgba(255,255,255,0); }
}
.video-container.short-video.is-loading .video-toggle-icon { opacity: 1; animation: none; }
.video-container.short-video.is-loading .video-toggle-icon svg { display: none; }
.video-container.short-video.is-loading .video-toggle-icon::after { content: ""; width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(0,124,62,.2); border-top-color: var(--green-600); animation: videoSpin .8s linear infinite; }
@keyframes videoSpin { to { transform: rotate(360deg); } }
.video-toggle-icon.flash { opacity: 1; transition: none; }

/* ---- Video facades: a thumbnail stands in for the YouTube player until the
       first tap, keeping ~500 KB of third-party JS off the initial load ---- */
.vc-facade { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.vc-item-wide .vc-facade { aspect-ratio: 16 / 9; }
/* Thumbnails are local and pre-cropped (generate_video_thumbs.php strips the
   gray canvas YouTube pads Shorts with), so no zoom is needed here. */
.vc-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vc-play { position: relative; width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--green-600); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .2s; }
.vc-facade:hover .vc-play { transform: scale(1.08); }

/* Hero short: local poster shown until the player boots */
.hero-short-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.video-container.short-video .video-tap { padding: 0; border: 0; background: transparent; }

/* Reserve height for the Instagram embeds, which are injected on scroll */
.ig-grid .instagram-media { min-height: 620px; }

/* Fix: .footer-col a outranked .btn-whatsapp and left light text on WhatsApp
   green (1.6:1). Restore the dark label — 7:1. */
.footer-col a.btn-whatsapp { color: #06341c; }

/* ---------------- Vertical rhythm on small screens ----------------
   Paddings tuned for a 1440px canvas leave a lot of dead space once the
   viewport is a phone: the full-bleed bands (hero, page head, partners) were
   the remaining offenders after .section was reduced. */
@media (max-width: 640px) {
    .lp-hero { padding: 44px 0; }
    .page-head { padding: 38px 0; }
    .partners-band { padding: 32px 0; }
    .notfound-main { padding: 52px 0; }
    .empty-state { padding: 46px 18px; }
    .section-head { margin-bottom: 24px; }
}
