/* Portal CBH Baixo Paranaíba — estilos próprios, sem dependências externas. */
:root {
  --blue: #0b7eca;
  --blue-dark: #075c94;
  --blue-ink: #1f2d33;
  --brand: #0a6fb3;
  --brand-dark: #003daa;
  --brand-deep: #0b72b8;
  --amber: #fb9d01;
  --ink: #1d2a30;
  --muted: #5d6d74;
  --line: #dbe5e9;
  --soft: #f2f7f9;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(3, 50, 90, .10);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-dark); }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- cabeçalho ---------- */
.topbar { background: var(--brand-deep); color: #e6f2fb; font-size: .875rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.topbar-mail { color: inherit; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.topbar-mail:hover { color: var(--white); }
.topbar-search { display: flex; align-items: stretch; background: var(--white); border-radius: 6px; overflow: hidden; margin: 6px 0; }
.topbar-search input { background: transparent; border: 0; color: var(--ink); width: 210px; font: inherit; padding: 6px 12px; }
.topbar-search input::placeholder { color: #7a8790; }
.topbar-search input:focus { outline: none; }
.topbar-search button { background: var(--brand); border: 0; color: var(--white); padding: 0 12px; cursor: pointer; font-size: 1.05rem; display: flex; align-items: center; }
.topbar-search button:hover { background: var(--brand-dark); }
.mainbar { background: var(--white); box-shadow: 0 3px 8px rgba(0,0,0,.12); position: relative; z-index: 20; }
.mainbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand img { display: block; width: auto; height: 72px; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a, .nav-parent { display: flex; align-items: center; gap: 4px; padding: 10px 14px; font: inherit; font-weight: 500; font-size: 1rem; color: var(--blue); text-decoration: none; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.main-nav > ul > li > .nav-parent:hover, .main-nav > ul > li > a:hover { background: var(--soft); color: var(--blue-dark); }
.main-nav > ul > li.is-active > .nav-parent { color: var(--blue-ink); }
.main-nav .sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--amber); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; }
.main-nav > ul > li:nth-last-child(-n+3) > .sub { left: auto; right: 0; }
.main-nav li:hover > .sub,.main-nav li:focus-within > .sub, .main-nav li.is-open > .sub { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub a { font-weight: 500; color: var(--blue-ink); padding: 8px 12px; border-radius: 6px; }
.main-nav .sub a:hover, .main-nav .sub a[aria-current] { background: var(--soft); color: var(--blue); }
.nav-toggle { display: none; }

/* ---------- carrossel ---------- */
.hero { position: relative; background: var(--brand-deep); overflow: hidden; }
.hero-track { position: relative; aspect-ratio: 1920 / 640; max-height: 560px; width: 100%; }
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s ease; }
.hero-slide.is-current { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 0 56px; background: linear-gradient(transparent, rgba(3,50,90,.6)); }
.hero-caption > * { width: min(1180px, 100% - 32px); margin-inline: auto; display: block; }
.hero-caption .btn { width: max-content; }
.hero-title { color: var(--white); font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 700; margin-bottom: 12px; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--blue-ink); display: grid; place-items: center; cursor: pointer; font-size: 1.6rem; }
.hero-prev { left: 16px; } .hero-next { right: 16px; }
.hero-dots { position: absolute; z-index: 2; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--white); }

/* ---------- botões ---------- */
.btn { display: inline-block; background: var(--brand); color: var(--white); padding: 10px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--brand); cursor: pointer; font: inherit; font-weight: 600; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--blue-ink); border-color: var(--white); }
.btn-light:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }
.btn-outline { background: transparent; color: var(--brand-dark); }
.btn-outline:hover { color: var(--white); }

/* ---------- home ---------- */
.section-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--blue-ink); margin: 0 0 24px; display: flex; align-items: center; gap: 14px; }
.section-title::before { content: ""; width: 6px; height: 1.1em; background: var(--amber); border-radius: 3px; }
.section-more { text-align: center; margin: 28px 0 0; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -48px; position: relative; z-index: 3; }
.quick-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-decoration: none; color: var(--ink); display: grid; gap: 6px; border-bottom: 4px solid var(--blue); transition: transform .15s ease; }
.quick-card:hover { transform: translateY(-3px); color: var(--ink); border-bottom-color: var(--amber); }
.quick-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--soft); color: var(--blue); display: grid; place-items: center; font-size: 1.6rem; }
.quick-title { font-size: 1.2rem; font-weight: 700; color: var(--blue-ink); }
.quick-text { color: var(--muted); font-size: .95rem; }
.quick-more { color: var(--brand-dark); font-weight: 600; font-size: .9rem; }
.intro { padding: 64px 0; }
.intro-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; }
.intro-body > h2 { grid-column: 1 / -1; }
.intro-body > figure { grid-column: 1; grid-row: 2 / span 3; margin: 0; }
.intro-body > figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.intro-body > p { grid-column: 2; margin-top: 0; }
.logos-band { background: var(--soft); padding: 56px 0; }
.logo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.logo-grid li { background: var(--white); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(7,56,75,.06); }
.logo-grid a, .logo-grid li > img, .logo-grid li > span { display: grid; justify-items: center; gap: 12px; padding: 22px; text-decoration: none; color: var(--blue-ink); font-weight: 600; text-align: center; }
.logo-grid img { max-height: 90px; width: auto; object-fit: contain; }
.logo-grid-plain li { box-shadow: none; border: 1px solid var(--line); display: grid; place-items: center; }
.partners { padding: 56px 0; }
.news-band { background: linear-gradient(180deg, var(--soft), var(--white)); padding: 56px 0 72px; }

/* ---------- cartões de notícia ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-placeholder { display: block; height: 100%; background: linear-gradient(135deg, var(--blue), var(--brand)); opacity: .25; }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 1.08rem; line-height: 1.35; margin: 4px 0 6px; }
.card-body h3 a { color: var(--blue-ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--blue); }
.card-cat { display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--brand-dark); margin: 0; }
.card-date { font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.card-excerpt { margin: 0; font-size: .95rem; color: #3b4a50; }

/* ---------- páginas internas ---------- */
.page-head { background: var(--white); color: var(--blue-ink); padding: 40px 0 0; }
.page-head .wrap { border-bottom: 1px solid #d5dbd7; padding-bottom: 18px; }
.page-head h1 { margin: 8px 0 0; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.2; font-weight: 500; }
.crumbs { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--blue); }
.page-body { padding: 40px 0 72px; }
.prose { max-width: 920px; overflow-wrap: anywhere; }
.prose h2 { color: var(--blue-ink); font-size: 1.5rem; margin: 1.6em 0 .6em; }
.prose h3 { color: var(--blue-dark); font-size: 1.2rem; margin: 1.4em 0 .5em; }
.prose h4 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.prose figure { margin: 24px 0; }
.prose figure img { border-radius: 8px; }
.prose figcaption { font-size: .875rem; color: var(--muted); margin-top: 6px; }
.prose blockquote { margin: 24px 0; padding: 12px 20px; border-left: 4px solid var(--amber); background: var(--soft); border-radius: 0 8px 8px 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a[href$=".pdf"]::after, .prose a[href$=".PDF"]::after { content: " PDF"; font-size: .68rem; font-weight: 700; color: var(--white); background: #c0392b; border-radius: 3px; padding: 1px 4px; margin-left: 6px; vertical-align: middle; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 560px; }
.table-wrap td, .table-wrap th { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap thead th, .table-wrap tr:first-child td { background: var(--soft); }
.table-wrap tr.table-section td, .table-wrap tr.table-section th { background: var(--brand-deep); color: var(--white); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: .82rem; }
.table-wrap tr.table-section a { color: var(--white); }
.table-wrap tbody tr:nth-child(even):not(.table-section) td { background: #fafcfd; }
.prose-accordion { max-width: none; }
.acc { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 12px; background: var(--white); }
.acc > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--blue-ink); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue); margin-left: 4px; }
.acc[open] > summary::after { content: "–"; }
.acc-title { flex: 1; }
.acc-count { background: var(--soft); color: var(--blue-dark); font-size: .78rem; border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.acc-body { padding: 0 18px 12px; }
.acc-body > p { margin: 0; padding: 8px 0; border-top: 1px dashed var(--line); }
.acc-body > p:first-child { border-top: 0; }
.acc-l2 { border-left: 4px solid var(--blue); }
.acc-l2[open] > summary { background: var(--soft); border-radius: var(--radius) var(--radius) 0 0; }
.acc-l3, .acc-l4 { margin: 10px 0; }
.acc-l3 > summary { font-weight: 600; padding: 10px 14px; }
.acc-l4 > summary { font-weight: 600; font-size: .95rem; padding: 8px 12px; color: var(--blue-dark); }
.acc-empty { color: var(--muted); font-size: .9rem; font-style: italic; }
.empty-page { font-size: 1.05rem; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.person { text-align: center; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 20px; }
.person img, .person-avatar svg { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--soft); }
.person-avatar { display: inline-block; }
.person h2 { font-size: 1.1rem; margin: 14px 0 6px; color: var(--blue-ink); }
.person-org { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.person-role { display: inline-block; margin: 0; background: var(--brand); color: var(--white); font-weight: 700; font-size: .82rem; padding: 3px 12px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; color: var(--blue-ink); }
.chips a[aria-current] { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); }
.article-meta { display: flex; gap: 14px; align-items: center; color: var(--muted); margin-top: 0; }
.article-hero img { border-radius: var(--radius); }
.article-hero { margin: 0 0 24px; max-width: 920px; }
.attachments { max-width: 920px; background: var(--soft); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; }
.attachments h2 { margin-top: 0; font-size: 1.1rem; }
.related { margin-top: 48px; }
.search-form { display: flex; gap: 10px; max-width: 640px; margin-bottom: 20px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
.results { list-style: none; padding: 0; max-width: 860px; }
.results li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.results h2 { font-size: 1.15rem; margin: 2px 0 4px; }
.results p { margin: 0; color: #3b4a50; }
.result-kind { font-size: .75rem; text-transform: uppercase; font-weight: 700; color: var(--brand-dark); }

/* ---------- rodapé ---------- */
.site-footer { background: var(--brand-deep); color: #eef6fc; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand img { max-width: 240px; }
.footer-brand p { font-size: .9rem; }
.site-footer h2 { color: var(--white); font-size: 1.05rem; margin: 0 0 14px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-contact p { margin: 0; line-height: 1.8; }
.footer-contact strong { color: var(--white); }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.social { list-style: none; padding: 0; display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--brand-deep); }
.footer-credits { background: #000; font-size: .9rem; padding: 14px 0; color: var(--white); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .main-nav a, .nav-parent { padding: 10px 9px; font-size: .9rem; }
}
@media (max-width: 960px) {
  .nav-toggle { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; display: block; width: 22px; height: 2px; background: var(--blue-ink); position: relative; transition: .2s; }
  .nav-toggle-bar::before { position: absolute; top: -7px; } .nav-toggle-bar::after { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow); max-height: calc(100vh - 140px); overflow-y: auto; }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; padding: 8px 16px 16px; }
  .main-nav a, .nav-parent { width: 100%; justify-content: space-between; padding: 12px 8px; font-size: 1rem; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .main-nav > ul > li.is-active > .nav-parent { box-shadow: none; }
  .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; display: none; padding: 0 0 8px 12px; min-width: 0; }
  .main-nav li.is-open > .sub { display: block; }
  .main-nav li:hover > .sub { display: none; }
  .main-nav li.is-open:hover > .sub { display: block; }
  .quick { grid-template-columns: 1fr; margin-top: 24px; }
  .intro-body { grid-template-columns: 1fr; }
  .intro-body > figure, .intro-body > p { grid-column: 1; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; justify-content: center; padding: 6px 0; }
  .topbar-search { width: 100%; } .topbar-search input { width: 100%; }
  .mainbar-inner { min-height: 76px; }
  .brand img { height: 56px; }
  .hero-track { aspect-ratio: 4 / 3; }
  .hero-nav { display: none; }
  .search-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- cartão de contato (Secretaria Executiva) ---------- */
.contact-card { --navy: #1d3f8f; --sky: #2aa3df; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(180px, 280px) 1fr; align-items: center; gap: 0; max-width: 860px; margin: 8px auto 0; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 44px 48px; isolation: isolate; }
.contact-card::before, .contact-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.contact-card::before { top: 0; left: 0; width: 46%; height: 42px; background: linear-gradient(90deg, #6cc04a, #2e9a4b); clip-path: polygon(0 0, 100% 0, 92% 100%, 0 38%); opacity: .9; }
.contact-card::after { right: 0; bottom: 0; width: 150px; height: 120px; background: linear-gradient(135deg, var(--sky), #1b6fc9); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.contact-org { display: grid; place-items: center; padding-right: 36px; border-right: 3px solid #c9a96e; min-height: 150px; }
.contact-org img { width: 100%; max-width: 220px; height: auto; }
.contact-info { padding-left: 36px; padding-right: 48px; }
.contact-info h2 { margin: 0 0 18px; color: var(--navy); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.contact-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-pill { display: inline-flex; align-items: center; gap: 12px; background: var(--sky); color: var(--white); border-radius: 999px; padding: 8px 22px 8px 14px; text-decoration: none; font-size: 1.05rem; min-width: min(100%, 320px); box-shadow: 0 2px 6px rgba(29,63,143,.18); }
.contact-pill:hover { background: #1b8cc6; color: var(--white); }
.contact-pill svg { font-size: 1.3rem; }
.contact-pill em { font-style: italic; opacity: .95; }
.contact-line { display: flex; align-items: flex-start; gap: 12px; color: var(--navy); font-size: 1.02rem; }
.contact-line svg { font-size: 1.3rem; margin-top: 2px; }
.contact-line a { color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.contact-line a:hover { text-decoration: underline; }
.contact-line address { font-style: normal; }
@media (max-width: 720px) {
  .contact-card { grid-template-columns: 1fr; padding: 48px 22px 36px; }
  .contact-card::after { width: 90px; height: 70px; }
  .contact-org { border-right: 0; border-bottom: 3px solid #c9a96e; padding: 0 0 22px; min-height: 0; }
  .contact-info { padding: 22px 0 0; }
  .contact-pill { min-width: 0; width: 100%; }
}

/* ---------- créditos ---------- */
.credits-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-credits a { color: var(--blue); }
.footer-credits a:hover { color: var(--white); }
