/* Blocos «fotografia + ligações» dos hubs (Vida e recursos, Vetores de pressão, Soluções naturais): o mesmo molde do hub Conhecimento para cuidar. */
/* Ferramentas do hub: uma fotografia e quatro ligações, sem cartões redondos nem espaços vazios. */
.hub-tools-lead { margin: .9rem 0 0; max-width: 62ch; color: var(--muted, #5b665f); font-size: 1rem; line-height: 1.7; }
.hub-tools-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.4rem, 3.2vw, 2.8rem); align-items: stretch; }
.hub-tools-foto { margin: 0; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.hub-tools-foto img { display: block; width: 100%; flex: 1; min-height: 300px; max-height: 480px; object-fit: cover; border-radius: 22px; border: 1px solid var(--line, #dfe5dc); }
.hub-tools-foto figcaption { font-size: .78rem; line-height: 1.55; color: var(--muted, #5b665f); }
.hub-tools-foto figcaption span { display: block; }
.hub-tools-foto figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hub-tools-lista { list-style: none; margin: 0; padding: 0; display: grid; align-content: center; min-width: 0; }
.hub-tools-lista li { margin: 0; padding: 0; border-bottom: 1px solid var(--line, #dfe5dc); }
.hub-tools-lista li:first-child { border-top: 1px solid var(--line, #dfe5dc); }
.hub-tools-lista a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; padding: 1.15rem .3rem; color: var(--ink, #1d2922); text-decoration: none; border-bottom: 0; }
.hub-tools-ico { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--pale, #eef3ec); color: var(--forest, #2f6b3a); transition: background .2s, color .2s; }
.hub-tools-txt { display: grid; gap: .2rem; min-width: 0; }
.hub-tools-txt strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.hub-tools-txt small { font-size: .92rem; line-height: 1.5; color: var(--muted, #5b665f); }
.hub-tools-seta { font-size: 1.25rem; color: var(--forest, #2f6b3a); transition: transform .2s; }
.hub-tools-lista a:hover .hub-tools-ico, .hub-tools-lista a:focus-visible .hub-tools-ico { background: var(--forest, #2f6b3a); color: #fff; }
.hub-tools-lista a:hover .hub-tools-seta, .hub-tools-lista a:focus-visible .hub-tools-seta { transform: translateX(5px); }
/* Blocos alternados: a fotografia fica à direita, o texto à esquerda. */
@media (min-width: 861px) {
  .hub-tools-grid--inv { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .hub-tools-grid--inv .hub-tools-foto { order: 2; }
}
@media (max-width: 860px) {
  .hub-tools-grid { grid-template-columns: minmax(0, 1fr); }
  .hub-tools-foto img { min-height: 0; max-height: none; aspect-ratio: 3 / 2; }
}

/* Sem traços horizontais entre blocos: a fotografia e o espaço bastam. */
.hub-section:has(> .hub-tools-grid) { border-top: 0 !important; padding: clamp(2rem, 4vw, 3.2rem) 0 !important; }
.hub-section[id], .hub-latest[id] { scroll-margin-top: 5.8rem; }

/* Cor por bloco: cada tema ou vetor tem o seu tom (texto, ícones, setas e sombra da fotografia), do verde da horta ao vinho da vinha. */
.hub-section[data-tom] { --tom: #2f6b3a; --tom-suave: #e6f0e3; }
.hub-section[data-tom] .hub-section-head .eyebrow { color: var(--tom); }
.hub-section[data-tom] .hub-tools-ico { background: var(--tom-suave); color: var(--tom); }
.hub-section[data-tom] .hub-tools-seta { color: var(--tom); }
.hub-section[data-tom] .hub-tools-lista a:hover .hub-tools-ico, .hub-section[data-tom] .hub-tools-lista a:focus-visible .hub-tools-ico { background: var(--tom); color: #fff; }
.hub-section[data-tom] .hub-tools-lista li, .hub-section[data-tom] .hub-tools-lista li:first-child { border-color: color-mix(in srgb, var(--tom) 22%, #e3e8e1); }
.hub-section[data-tom] .hub-tools-foto img { box-shadow: 0 16px 32px -24px var(--tom); }
.hub-section[data-tom="horta"] { --tom: #2f6b3a; --tom-suave: #e6f0e3; }
.hub-section[data-tom="vinha"] { --tom: #7b2c4e; --tom-suave: #f4e7ee; }
.hub-section[data-tom="ferramentas"] { --tom: #8a5a12; --tom-suave: #f6ecd9; }
.hub-section[data-tom="agua"] { --tom: #1f6f8b; --tom-suave: #e2eff4; }
.hub-section[data-tom="ar"] { --tom: #4f6fa0; --tom-suave: #e8eef7; }
.hub-section[data-tom="solo"] { --tom: #7a4d2b; --tom-suave: #f1e7de; }
.hub-section[data-tom="biodiversidade"] { --tom: #55731f; --tom-suave: #edf1dc; }
.hub-section[data-tom="renovaveis"] { --tom: #9a6a00; --tom-suave: #f8eed2; }
.hub-section[data-tom="digital"] { --tom: #44529a; --tom-suave: #e8eaf6; }
.hub-section[data-tom="mineracao"] { --tom: #8a4b32; --tom-suave: #f3e5de; }
.hub-section[data-tom="pecuaria"] { --tom: #a3472f; --tom-suave: #f6e5df; }
.hub-section[data-tom="aviacao"] { --tom: #4a6178; --tom-suave: #e6ecf1; }
.hub-section[data-tom="construido"] { --tom: #6d675b; --tom-suave: #ecebe5; }
.hub-section[data-tom="moda"] { --tom: #9a3f72; --tom-suave: #f6e6ef; }
.hub-section[data-tom="produtos"] { --tom: #3f7a3a; --tom-suave: #e8f1e4; }
.hub-section[data-tom="tecnicas"] { --tom: #2a7473; --tom-suave: #e1f0ef; }
.hub-section[data-tom="problema"] { --tom: #b0482f; --tom-suave: #f7e6e0; }

/* A barra fixa acompanha o tom do bloco: o destaque do link muda de cor com o bloco. */
html body #main .reading-nav a[href$="#horta"] { --hero-accent: #2f6b3a; }
html body #main .reading-nav a[href$="#vinha"] { --hero-accent: #7b2c4e; }
html body #main .reading-nav a[href$="#ferramentas"] { --hero-accent: #8a5a12; }
html body #main .reading-nav a[href$="#agua"] { --hero-accent: #1f6f8b; }
html body #main .reading-nav a[href$="#ar"] { --hero-accent: #4f6fa0; }
html body #main .reading-nav a[href$="#solo"] { --hero-accent: #7a4d2b; }
html body #main .reading-nav a[href$="#biodiversidade"] { --hero-accent: #55731f; }
html body #main .reading-nav a[href$="#renovaveis"] { --hero-accent: #9a6a00; }
html body #main .reading-nav a[href$="#digital"] { --hero-accent: #44529a; }
html body #main .reading-nav a[href$="#mineracao"] { --hero-accent: #8a4b32; }
html body #main .reading-nav a[href$="#pecuaria"] { --hero-accent: #a3472f; }
html body #main .reading-nav a[href$="#aviacao"] { --hero-accent: #4a6178; }
html body #main .reading-nav a[href$="#construido"] { --hero-accent: #6d675b; }
html body #main .reading-nav a[href$="#moda"] { --hero-accent: #9a3f72; }
html body #main .reading-nav a[href$="#produtos"] { --hero-accent: #3f7a3a; }
html body #main .reading-nav a[href$="#tecnicas"] { --hero-accent: #2a7473; }
html body #main .reading-nav a[href$="#problema"] { --hero-accent: #b0482f; }

/* Hubs: lista de ligações sem traços nem setas, alinhada com a fotografia (do topo da imagem ao fim da imagem);
   cada ligação leva o ícone no tom do tema e, ao passar o rato, um fundo suave. */
html body #main .hub-tools-grid { grid-template-rows: auto auto; row-gap: .6rem; align-items: stretch; }
html body #main .hub-tools-foto { display: contents; }
html body #main .hub-tools-foto img { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 300px; max-height: 30rem; aspect-ratio: 3 / 2; border: 0; object-fit: cover; }
html body #main .hub-tools-foto figcaption { grid-column: 1; grid-row: 2; min-width: 0; }
html body #main .hub-tools-lista { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; align-content: normal; gap: .5rem; }
html body #main .hub-tools-grid--inv .hub-tools-foto img, html body #main .hub-tools-grid--inv .hub-tools-foto figcaption { grid-column: 2; }
html body #main .hub-tools-grid--inv .hub-tools-lista { grid-column: 1; }
html body #main .hub-tools-lista li, html body #main .hub-tools-lista li:first-child, html body #main .hub-section[data-tom] .hub-tools-lista li, html body #main .hub-section[data-tom] .hub-tools-lista li:first-child { border: 0 !important; }
html body #main .hub-tools-lista a { grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; padding: .85rem 1rem; margin: 0 -1rem; border: 0 !important; border-radius: 18px; transition: background .2s ease; }
html body #main .hub-tools-seta { display: none !important; }
html body #main .hub-tools-ico { width: 3rem; height: 3rem; border-radius: 16px; }
html body #main .hub-section[data-tom] .hub-tools-lista a:hover, html body #main .hub-section[data-tom] .hub-tools-lista a:focus-visible { background: var(--tom-suave); }
html body #main .hub-section[data-tom] .hub-tools-lista a:hover .hub-tools-txt strong, html body #main .hub-section[data-tom] .hub-tools-lista a:focus-visible .hub-tools-txt strong { color: var(--tom); }
@media (max-width: 900px) {
  html body #main .hub-tools-grid { grid-template-rows: none; }
  html body #main .hub-tools-foto { display: flex; }
  html body #main .hub-tools-foto img { grid-column: auto; grid-row: auto; height: auto; aspect-ratio: 3 / 2; min-height: 0; }
  html body #main .hub-tools-lista, html body #main .hub-tools-grid--inv .hub-tools-lista { grid-column: auto; grid-row: auto; }
}

/* Segundo bloco dentro da mesma área do hub (título pequeno + fotografia + ligações) */
.hub-section-head--sub { margin-top: clamp(2rem, 4vw, 3rem); margin-bottom: .2rem; }
.hub-section-head--sub h3 { margin: 0; color: #20342a; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.2; }

