/* ==========================================================================
   Mulinari Consultoria Agronômica — Design System (site público)
   Tokens -> base -> layout -> componentes -> páginas
   ========================================================================== */

:root {
  /* Cores */
  --green-950: #0a2a1f;
  --green-900: #0f3d2e;
  --green-800: #14513b;
  --green-700: #1b6b4a;
  --green-500: #4c9a2a;
  --green-400: #6bb53f;
  --green-100: #e8f3e1;
  --green-50:  #f3f8ef;
  --ink-900: #18201b;
  --ink-700: #3b463f;
  --ink-500: #66726b;
  --line:    #e2e8e3;
  --surface: #ffffff;
  --surface-alt: #f6f8f5;
  --danger-600: #b42318;
  --danger-100: #fdeceb;
  --warning-100: #fff6df;
  --success-100: #e8f6e9;

  /* Tipografia */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-300: .875rem; --fs-400: 1rem; --fs-500: 1.125rem;
  --fs-600: 1.375rem; --fs-700: 1.75rem; --fs-800: 2.25rem; --fs-900: clamp(2rem, 5vw, 3.25rem);

  /* Espaçamento, bordas, sombras, larguras */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15,61,46,.08);
  --shadow:    0 6px 20px rgba(15,61,46,.10);
  --container: 1180px; --reading: 760px; --header-h: 76px;
  --focus: 0 0 0 3px rgba(76,154,42,.45);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-400); line-height: 1.65;
  color: var(--ink-700); background: var(--surface); -webkit-font-smoothing: antialiased;
}
body.site img { max-width: 100%; height: auto; }
body.site a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.site a:hover { color: var(--green-500); }
body.site h1, body.site h2, body.site h3, body.site h4 { color: var(--green-900); line-height: 1.2; margin: 0 0 var(--space-4); font-weight: 700; }
body.site h1 { font-size: var(--fs-900); } body.site h2 { font-size: var(--fs-700); }
body.site h3 { font-size: var(--fs-600); } body.site h4 { font-size: var(--fs-500); }
body.site p { margin: 0 0 var(--space-4); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--green-900); color: #fff !important; padding: var(--space-3) var(--space-4); z-index: 1000; }
.skip-link:focus { left: var(--space-4); top: var(--space-4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.reading   { width: min(100%, var(--reading)); margin-inline: auto; }
.section   { padding-block: var(--space-8); }
.section--alt { background: var(--surface-alt); }
.section__head { text-align: center; margin-bottom: var(--space-7); }
.section__eyebrow { display: inline-block; color: var(--green-500); font-weight: 700; font-size: var(--fs-300); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--space-2); }
.section__title { margin: 0; }

/* Botões ----------------------------------------------------------------- */
.btn, body.site button.btn, body.site .login button, body.site form.contato button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: .75rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent;
  font: 600 var(--fs-400)/1 var(--font-sans); cursor: pointer; text-decoration: none !important;
  background: var(--green-500); color: #fff !important; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover, body.site .login button:hover, body.site form.contato button:hover { background: var(--green-700); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--green-800) !important; border-color: var(--green-700); }
.btn--secondary:hover { background: var(--green-50); }
.btn--light { background: #fff; color: var(--green-900) !important; }
.btn--light:hover { background: var(--green-100); }
.btn--danger { background: var(--danger-600); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: progress; pointer-events: none; }

/* Cabeçalho -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--green-950); color: #cfe3d6; font-size: var(--fs-300); }
.topbar__inner { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-5); min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; } .topbar a:hover { color: var(--green-400); }
.topbar__search { display: flex; align-items: center; margin: 0; }
.topbar__search input { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff; padding: .25rem .9rem; width: 190px; font: inherit; }
.topbar__search input::placeholder { color: #a9c4b4; }
.topbar__search button { background: none; border: 0; color: #fff; cursor: pointer; padding: 0 .5rem; font-size: 1rem; }
.header-main { display: flex; align-items: center; gap: var(--space-5); min-height: var(--header-h); }
.logo { display: block; flex: 0 0 auto; } .logo img { display: block; width: min(260px, 52vw); height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav__list { display: flex; align-items: center; gap: var(--space-1); }
.site-nav li { position: relative; }
.site-nav li > a { display: block; padding: .6rem .9rem; border-radius: var(--radius-sm); color: var(--ink-900); font-weight: 600; font-size: .95rem; text-decoration: none; }
.site-nav li > a span { background: none !important; }
.site-nav li > a:hover, .site-nav li > a[aria-current="page"] { color: var(--green-700); background: var(--green-50); }
.site-nav li ul { position: absolute; left: 0; top: 100%; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-2); display: none; z-index: 60; }
.site-nav li:hover > ul, .site-nav li:focus-within > ul, .site-nav li.is-open > ul { display: block; }
.site-nav li ul li > a { font-weight: 500; }
.site-nav__toggle, .submenu-toggle { display: none; }
.header-cta { flex: 0 0 auto; padding: .65rem 1.2rem; }

@media (max-width: 980px) {
  .site-nav__toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; cursor: pointer; color: var(--green-900); font-size: 1.3rem; line-height: 1; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); margin: 0; display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; padding: var(--space-3) 1rem var(--space-5); }
  .site-nav li > a { padding: .85rem .5rem; }
  .site-nav li ul { position: static; display: none; box-shadow: none; border: 0; border-left: 2px solid var(--green-100); border-radius: 0; margin-left: .5rem; }
  .site-nav li:hover > ul, .site-nav li:focus-within > ul { display: none; }
  .site-nav li.is-open > ul { display: block; }
  .submenu-toggle { display: inline-flex; position: absolute; right: 0; top: 4px; background: none; border: 0; padding: .6rem .8rem; cursor: pointer; color: var(--green-700); }
  .header-cta { display: none; }
  .topbar__search input { width: 120px; }
}

/* Hero (home) / carrossel ------------------------------------------------ */
.hero { position: relative; color: #fff; background: var(--green-950); overflow: hidden; }
.hero__slides { position: relative; min-height: clamp(420px, 68vh, 640px); }
.hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,42,31,.88) 0%, rgba(10,42,31,.55) 55%, rgba(10,42,31,.25) 100%); }
.hero__content { position: absolute; inset: 0; display: flex; align-items: center; }
.hero__content .container { padding-bottom: 3rem; }
.hero h1 { color: #fff; max-width: 18ch; margin-bottom: var(--space-4); }
.hero p { font-size: var(--fs-500); max-width: 52ch; color: #e6f1ea; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero__controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: var(--space-4); }
.hero__controls .container { display: flex; align-items: center; justify-content: space-between; }
.hero__dots { display: flex; gap: var(--space-2); }
.hero__dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.hero__dots button[aria-current="true"] { background: #fff; }
.hero__arrows { display: flex; gap: var(--space-2); }
.hero__arrows button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(10,42,31,.5); color: #fff; font-size: 1.2rem; cursor: pointer; }
.hero__arrows button:hover { background: var(--green-500); }
@media (prefers-reduced-motion: reduce) { .hero__slide { transition: none; } html { scroll-behavior: auto; } }

/* Cabeçalho de página interna + breadcrumb ------------------------------- */
.page-hero { position: relative; color: #fff; background: var(--green-900) center/cover no-repeat; padding-block: var(--space-7); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,42,31,.92), rgba(15,61,46,.7)); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; margin: var(--space-2) 0 0; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; font-size: var(--fs-300); color: #cfe3d6; }
.breadcrumb li + li::before { content: "›"; margin-right: var(--space-2); }
.breadcrumb a { color: #fff; }

/* Cards, grade, listas --------------------------------------------------- */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { aspect-ratio: 16/10; background: var(--green-50) center/cover; display: block; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; gap: var(--space-2); }
.card__title { font-size: var(--fs-500); margin: 0; } .card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--green-500); }
.card__meta { font-size: var(--fs-300); color: var(--ink-500); }
.card__text { color: var(--ink-700); margin: 0; }
.card__footer { margin-top: auto; padding-top: var(--space-3); }
.date-badge { display: inline-flex; flex-direction: column; align-items: center; background: var(--green-700); color: #fff; border-radius: var(--radius); padding: .35rem .7rem; line-height: 1.1; font-weight: 700; }
.date-badge small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

.empty-state { text-align: center; color: var(--ink-500); padding: var(--space-7) var(--space-4); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface-alt); }

/* Widgets cotação / tempo ------------------------------------------------ */
.info-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1fr 2fr 1fr; align-items: start; } }
.info-card { background: var(--green-900); color: #fff; border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow); }
.info-card h3 { color: #fff; font-size: var(--fs-500); margin-bottom: var(--space-3); }
.info-card__value { font-size: var(--fs-800); font-weight: 800; line-height: 1.1; color: #fff; }
.info-card__sub { color: #cfe3d6; font-size: var(--fs-300); margin: var(--space-2) 0 0; }
.info-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.is-loading-text { color: #cfe3d6; }
.is-loading-text::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .5em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formulários ------------------------------------------------------------ */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-6); }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; color: var(--green-900); margin-bottom: var(--space-1); }
body.site input[type=text], body.site input[type=email], body.site input[type=password], body.site input[type=file], body.site textarea, body.site select {
  width: 100%; padding: .75rem .9rem; border: 1px solid #c9d3cc; border-radius: var(--radius); font: inherit; color: var(--ink-900); background: #fff; }
body.site input:focus, body.site textarea:focus { border-color: var(--green-500); outline: none; box-shadow: var(--focus); }
body.site input[disabled] { background: var(--surface-alt); color: var(--ink-500); }
.field--error input, .field--error textarea { border-color: var(--danger-600); }

/* Alertas ---------------------------------------------------------------- */
.alert { border-radius: var(--radius); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-5); border: 1px solid transparent; }
.alert--success { background: var(--success-100); border-color: #b7e0ba; color: #1d5a2a; }
.alert--error   { background: var(--danger-100); border-color: #f5c2bf; color: var(--danger-600); }
.alert--warning { background: var(--warning-100); border-color: #f1dc9b; color: #7a5a00; }
.alert ul { margin: 0; padding-left: 1.2rem; }

/* Tabelas ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--green-50); color: var(--green-900); font-size: var(--fs-300); text-transform: uppercase; letter-spacing: .06em; }
.table tbody tr:hover { background: var(--surface-alt); } .table tr:last-child td { border-bottom: 0; }
.table .col-date { white-space: nowrap; color: var(--ink-500); width: 1%; }

/* Paginação (will_paginate) --------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: var(--space-1); justify-content: center; margin-top: var(--space-6); }
.pagination a, .pagination span, .pagination em { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-style: normal; }
.pagination .current, .pagination em { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pagination .disabled { color: var(--ink-500); background: var(--surface-alt); }
.pagination a:hover { background: var(--green-50); }

/* Conteúdo editorial (páginas/notícias/eventos vindos do admin) ---------- */
.prose { font-size: var(--fs-500); line-height: 1.75; }
.prose img { border-radius: var(--radius); height: auto; }
.prose h2, .prose h3 { margin-top: var(--space-6); }
.prose table { width: 100%; border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: .5rem .75rem; }
.prose iframe, .prose video { max-width: 100%; }
.article-meta { color: var(--ink-500); font-size: var(--fs-300); margin-bottom: var(--space-5); }
.gallery { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: var(--space-6); }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.two-col { display: grid; gap: var(--space-7); grid-template-columns: 1fr; }
@media (min-width: 960px) { .two-col { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.sidebar-box { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); }
.sidebar-box h3 { font-size: var(--fs-500); }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; } .sidebar-box li { padding: .5rem 0; border-bottom: 1px solid var(--line); } .sidebar-box li:last-child { border: 0; }

/* Equipe ----------------------------------------------------------------- */
.team-card { text-align: center; }
.team-card .card__media { aspect-ratio: 1/1; }
.team-card__about { font-size: var(--fs-300); color: var(--ink-500); text-align: left; }

/* Compatibilidade: HTML antigo salvo em blocos/páginas no banco ----------- */
.legacy-block img { max-width: 100%; height: auto; }
.legacy-block .cmsms_row_inner, .legacy-block .cmsms_row_margin { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.legacy-block .cmsms_column { flex: 1 1 260px; }
.legacy-block .cmsms_column.one_first { flex-basis: 100%; }
.legacy-block .cmsms_column.one_half { flex-basis: 45%; }
.legacy-block .cmsms_heading_wrap, .legacy-block .cmsms_heading { text-align: center; }
.legacy-block a.button, .legacy-block .cmsms_button { display: inline-block; background: var(--green-500); color: #fff !important; padding: .7rem 1.3rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; }

/* Rodapé ----------------------------------------------------------------- */
.site-footer { background: var(--green-950); color: #cfe3d6; margin-top: var(--space-8); }
.site-footer__grid { display: grid; gap: var(--space-6); padding-block: var(--space-7); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4, .site-footer strong { color: #fff; }
.site-footer a { color: #fff; } .site-footer a:hover { color: var(--green-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { padding: .25rem 0; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: var(--space-4); font-size: var(--fs-300); }
.back-to-top { position: fixed; right: 1rem; bottom: 1rem; width: 44px; height: 44px; border-radius: 50%; background: var(--green-700); color: #fff; border: 0; cursor: pointer; box-shadow: var(--shadow); display: none; font-size: 1.1rem; }
.back-to-top.is-visible { display: block; }

/* Área logada (clientes) ------------------------------------------------- */
.account-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); padding: 0; list-style: none; }
.account-nav a { display: inline-block; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.account-nav a[aria-current="page"], .account-nav a:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.inline-search { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.inline-search input { flex: 1 1 240px; width: auto !important; }

/* ==========================================================================
   Texto claro sobre fundos escuros (hero, cabeçalho de página, topo, rodapé,
   cards verdes). Seletores com body.site para vencer a especificidade das
   regras globais de h1–h4 e links.
   ========================================================================== */
body.site .hero h1,
body.site .hero h2,
body.site .page-hero h1,
body.site .info-card h3,
body.site .info-card .info-card__value,
body.site .site-footer h1,
body.site .site-footer h2,
body.site .site-footer h3,
body.site .site-footer h4,
body.site .site-footer strong,
body.site .site-footer b { color: #ffffff; }

body.site .hero p { color: #eaf4ee; }

body.site .page-hero .breadcrumb,
body.site .page-hero .breadcrumb li,
body.site .page-hero .breadcrumb [aria-current] { color: #e6f1ea; }
body.site .page-hero .breadcrumb a { color: #ffffff; }
body.site .page-hero .breadcrumb a:hover { color: #b9e08f; }

body.site .topbar,
body.site .topbar a { color: #eaf4ee; }
body.site .topbar a:hover { color: #b9e08f; }

body.site .site-footer,
body.site .site-footer p,
body.site .site-footer li,
body.site .site-footer span { color: #e0ede5; }
body.site .site-footer a { color: #ffffff; text-decoration-color: rgba(255,255,255,.45); }
body.site .site-footer a:hover { color: #b9e08f; }
body.site .site-footer__bottom,
body.site .site-footer__bottom .container { color: #cfe3d6; }

body.site .info-card,
body.site .info-card li,
body.site .info-card__sub,
body.site .is-loading-text { color: #e0ede5; }

/* Conteúdo vindo do banco (blocos) dentro do rodapé: garante leitura */
body.site .site-footer .legacy-block,
body.site .site-footer [class*="cmsms"] { color: #e0ede5; }

/* Mapa da página de contato */
.map-section { background: var(--green-50); line-height: 0; border-bottom: 1px solid var(--line); }
.map-section iframe { display: block; width: 100%; height: 340px; border: 0; }
@media (max-width: 640px) { .map-section iframe { height: 260px; } }

/* Verificação anti-robô (soma) */
.captcha { background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: var(--space-4); }
.captcha label strong { color: var(--green-700); font-size: var(--fs-500); white-space: nowrap; }
body.site .captcha .captcha__input { max-width: 120px; text-align: center; font-weight: 700; font-size: var(--fs-500); }
.captcha__help { display: block; color: var(--ink-500); margin-top: var(--space-1); }
body.site button[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Busca expansível: só a lupa; ao clicar o campo se abre */
body.site .topbar__search { position: relative; display: flex; align-items: center; flex-direction: row-reverse; gap: 0; }
body.site .topbar__search input[type=text] {
  width: 0; min-width: 0; padding: .3rem 0; opacity: 0; border: 1px solid transparent; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: var(--fs-300);
  transition: width .25s ease, padding .25s ease, opacity .2s ease, border-color .2s ease;
}
body.site .topbar__search.is-open input[type=text] { width: 220px; max-width: 52vw; padding: .3rem .9rem; opacity: 1; border-color: rgba(255,255,255,.35); margin-right: .35rem; }
body.site .topbar__search input[type=text]:focus { box-shadow: 0 0 0 3px rgba(185,224,143,.5); border-color: #b9e08f; }
body.site .topbar__search-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .15s, color .15s; }
body.site .topbar__search-btn:hover, body.site .topbar__search.is-open .topbar__search-btn { background: rgba(255,255,255,.16); color: #b9e08f; }
@media (prefers-reduced-motion: reduce) { body.site .topbar__search input[type=text] { transition: none; } }

/* Bloco de apresentação da home (bloco_home_textos): título e subtítulo centralizados */
body.site .home-intro { text-align: center; }
body.site .home-intro .container { display: flex; flex-direction: column; align-items: center; }
body.site .home-intro .cmsms_row_inner,
body.site .home-intro .cmsms_row_margin { justify-content: center; width: 100%; }
body.site .home-intro .cmsms_column { flex: 1 1 100%; }
body.site .home-intro * { text-align: center !important; float: none !important; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; max-width: 100%; }
body.site .home-intro h1, body.site .home-intro h2, body.site .home-intro h3 { margin-bottom: var(--space-3); }

/* Notícias sem imagem: bloco de destaque no lugar da foto */
.card__media--placeholder { display: grid; place-items: center; aspect-ratio: 16/6; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: rgba(255,255,255,.85); text-decoration: none; }
.card__media--placeholder:hover { color: #fff; background: linear-gradient(135deg, var(--green-800), var(--green-500)); }
.grid > .card { min-width: 0; }
.card__title { overflow-wrap: anywhere; }

/* Coluna de conteúdo nunca estoura (URLs longas, tabelas, imagens) */
.two-col > * { min-width: 0; }
.news-source { margin-top: var(--space-6); overflow-wrap: anywhere; word-break: break-word; }
.prose { overflow-wrap: anywhere; }

/* ===== Imagem das notícias: nunca deixa espaço vazio ===== */
.card__media { position: relative; overflow: hidden; }
.card__media-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: rgba(255,255,255,.85); }
.card__media > img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media--placeholder { aspect-ratio: 16/6; }

/* Lista compacta de notícias (home): miniatura pequena + título */
.news-list { display: grid; gap: var(--space-4); }
.news-item { display: flex; gap: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s; }
.news-item:hover { box-shadow: var(--shadow); }
.news-item .card__media { flex: 0 0 132px; aspect-ratio: auto; min-height: 112px; align-self: stretch; }
.news-item .card__media--placeholder { aspect-ratio: auto; }
.news-item .card__media-fallback svg { width: 40px; height: 40px; }
.news-item__body { padding: var(--space-4) var(--space-4) var(--space-4) 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); justify-content: center; }
.news-item__body .card__title { font-size: var(--fs-400); line-height: 1.35; }
.news-item__body .card__text { font-size: var(--fs-300); color: var(--ink-500); }
@media (max-width: 520px) { .news-item .card__media { flex-basis: 96px; } }
