/* ==========================================================================
   GeoInfo — design "Essencial" (opção 1)
   Carregado em todas as páginas: via snippets/custom_theme.html (páginas MapStore)
   e via base.html (páginas clássicas Django). As variáveis --ms-* do MapStore
   ficam em custom_theme.html; aqui ficam os tokens GeoInfo e os componentes.
   ========================================================================== */

:root {
  --gi-green: #06783E;
  --gi-green-700: #045C2F;
  --gi-green-900: #04331C;
  --gi-green-50: #EEF7F1;
  --gi-green-100: #DCEFE3;
  --gi-green-200: #BFDCC9;
  --gi-ink: #0E1A14;
  --gi-ink-2: #33433A;
  --gi-muted: #5E6E65;
  --gi-subtle: #77867E;
  --gi-line: #E3E8E4;
  --gi-line-2: #EEF1EE;
  --gi-bg: #FFFFFF;
  --gi-surface: #F7F9F7;
  --gi-blue: #034A92;
  --gi-danger: #B42318;
  --gi-danger-bg: #FEF3F2;
  --gi-r-sm: 8px;
  --gi-r-md: 12px;
  --gi-r-lg: 20px;
  --gi-sh-1: 0 1px 2px rgba(14, 26, 20, .05), 0 1px 1px rgba(14, 26, 20, .03);
  --gi-sh-2: 0 12px 32px -12px rgba(14, 26, 20, .18), 0 2px 6px rgba(14, 26, 20, .04);
  --gi-focus: 0 0 0 3px rgba(6, 120, 62, .28);
  --gi-font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gi-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gi-wrap: 2560px; /* layout fluido: ocupa a largura disponível (teto só para ultrawide) */
  --gi-gutter: 28px; /* margem lateral única: cabeçalho, conteúdo e rodapé alinhados */
  --gi-nav-h: 68px;
}

/* ---------- Base ---------- */
.geoinfo-global-shell,
.geoinfo-global-shell body,
.msgapi .gn-theme,
.geoinfo-nav,
body .geoinfo-footer,
.geoinfo-hero,
.geoinfo-home {
  font-family: var(--gi-font);
}
body.geoinfo-global-shell {
  padding-top: 0 !important; /* o cabeçalho é sticky; o base.css do GeoNode reservava 20px para o header fixo */
  background: var(--gi-bg);
  color: var(--gi-ink);
}
.geoinfo-global-shell a,
.geoinfo-home a,
body .gn-footer.geoinfo-footer a { text-decoration: none; }
.geoinfo-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.geoinfo-wrap {
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin-left: auto;
  margin-right: auto;
}
#gn-brand-navbar.geoinfo-nav :focus-visible,
.geoinfo-home :focus-visible,
.geoinfo-hero :focus-visible,
body .gn-footer.geoinfo-footer :focus-visible,
.geoinfo-login-card :focus-visible {
  outline: none;
  box-shadow: var(--gi-focus);
  border-radius: var(--gi-r-sm);
}
@media (prefers-reduced-motion: reduce) {
  .geoinfo-home *, #gn-brand-navbar.geoinfo-nav *, .geoinfo-hero * { transition: none !important; animation: none !important; }
}
html { scroll-padding-top: calc(var(--gi-nav-h) + 8px); } /* âncoras e foco não ficam sob o cabeçalho sticky */
/* Link "Pular para o conteúdo": primeiro item focável, visível só ao receber foco.
   "body a." vence o `.msgapi a { background-color: transparent }` do tema do MapStore. */
body a.geoinfo-skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: var(--gi-r-sm);
  background: var(--gi-green);
  color: #fff;
  font-family: var(--gi-font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
body a.geoinfo-skip-link:focus,
body a.geoinfo-skip-link:hover { color: #fff; transform: none; }
.gn-homepage .geoinfo-home:focus { outline: none; } /* <main> recebe o foco do link "Pular para o conteúdo" */

/* ---------- Header / navegação ---------- */
.msgapi .gn-main-header.geoinfo-main-header,
.geoinfo-global-shell .gn-main-header.geoinfo-main-header,
.gn-main-header.geoinfo-main-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  border-bottom: 0;
}
/* Neutraliza regras do tema GeoNode (geonode.css) pensadas para o cabeçalho upstream */
#gn-brand-navbar .gn-brand-navbar-left-menu-container,
#gn-brand-navbar .gn-search-bar { visibility: visible; }
#gn-brand-navbar .gn-brand-navbar-left-menu-container > .gn-brand-navbar-menu { position: static; }
#gn-brand-navbar.geoinfo-nav .gn-search-bar {
  max-width: none;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
  z-index: 20;
}
#gn-brand-navbar.geoinfo-nav .geoinfo-brand img { max-height: none; }
#gn-brand-navbar.geoinfo-nav .gn-user-menu-dropdown .dropdown-toggle:has(img) {
  width: auto;
  height: 40px;
  overflow: visible;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  padding: 0 10px 0 4px;
}
.gn-main-header-placeholder,
.gn-footer-placeholder,
#gn-brand-navbar-bottom { display: none !important; }

#gn-brand-navbar.geoinfo-nav {
  position: relative;
  display: block;
  min-height: var(--gi-nav-h);
  padding: 0 !important;
  background: transparent;
  border-bottom: 1px solid var(--gi-line);
  box-shadow: none;
  color: var(--gi-ink);
}
/* O vidro fica num pseudo-elemento: backdrop-filter na própria nav viraria o containing block
   da gaveta mobile (.geoinfo-nav-collapse, position: fixed), que ficava com a altura da nav. */
#gn-brand-navbar.geoinfo-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  pointer-events: none;
}
#gn-brand-navbar .geoinfo-nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--gi-nav-h);
  padding: 0 var(--gi-gutter);
  max-width: calc(var(--gi-wrap) + var(--gi-gutter) * 2);
  margin: 0 auto;
}
#gn-brand-navbar.geoinfo-nav .geoinfo-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}
#gn-brand-navbar.geoinfo-nav .geoinfo-brand img {
  display: block;
  width: auto;
  height: 40px;
}
#gn-brand-navbar .geoinfo-nav-collapse {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}
#gn-brand-navbar .geoinfo-nav-links { min-width: 0; }
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu > li,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions > li { list-style: none; }
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .nav-link,
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--gi-r-sm);
  background: transparent;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
  text-decoration: none;
}
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .nav-link:hover,
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .dropdown-toggle:hover {
  background: var(--gi-surface);
  color: var(--gi-ink);
}
#gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .nav-link.active {
  background: var(--gi-green-50);
  color: var(--gi-green-700);
  font-weight: 600;
}
#gn-brand-navbar .geoinfo-nav-search {
  flex: 1 1 320px;
  max-width: 420px;
  margin-left: auto;
}
#gn-brand-navbar .geoinfo-nav-actions {
  margin-left: auto !important;
  flex: none;
  gap: 8px !important;
}
#gn-brand-navbar.geoinfo-nav.has-search .geoinfo-nav-actions { margin-left: 0 !important; }

/* Botões do header (idioma, entrar, registrar, publicar, usuário) */
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .btn,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  text-decoration: none;
}
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .btn:hover,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .nav-link:hover { background: var(--gi-surface); color: var(--gi-ink); }
#gn-brand-navbar.geoinfo-nav .geoinfo-language-selector .btn { font-weight: 500; }
#gn-brand-navbar .geoinfo-language-code { font-family: var(--gi-mono); font-size: 13px; letter-spacing: .02em; }
#gn-brand-navbar .geoinfo-language-name { display: none; }
#gn-brand-navbar.geoinfo-nav .geoinfo-home-add-resource-trigger {
  border-color: var(--gi-line) !important;
  background: #fff !important;
  box-shadow: var(--gi-sh-1) !important;
  color: var(--gi-ink) !important;
}
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .geoinfo-sign-in-link,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions #sign-in {
  background: var(--gi-green);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(4, 51, 28, .3);
}
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .geoinfo-sign-in-link:hover,
#gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions #sign-in:hover { background: var(--gi-green-700); color: #fff; }
#gn-brand-navbar.geoinfo-nav .gn-user-menu-dropdown .dropdown-toggle {
  padding: 0 10px 0 4px;
  border-color: var(--gi-line);
  background: #fff;
}
#gn-brand-navbar.geoinfo-nav .gn-user-menu-dropdown .dropdown-toggle img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
#gn-brand-navbar .geoinfo-user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* Dropdowns (Bootstrap 3) */
#gn-brand-navbar.geoinfo-nav .dropdown-menu {
  min-width: 220px;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-md);
  background: #fff;
  box-shadow: var(--gi-sh-2);
  font-family: var(--gi-font);
}
#gn-brand-navbar.geoinfo-nav .dropdown-menu > li > a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--gi-ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
#gn-brand-navbar.geoinfo-nav .dropdown-menu > li > a:hover,
#gn-brand-navbar.geoinfo-nav .dropdown-menu > li > a:focus { background: var(--gi-surface); color: var(--gi-ink); }
#gn-brand-navbar.geoinfo-nav .dropdown-menu .divider { margin: 6px 4px; background: var(--gi-line-2); }
#gn-brand-navbar.geoinfo-nav .dropdown-menu .dropdown-header { padding: 8px 12px 6px; color: var(--gi-subtle); font-size: 12px; font-weight: 600; }

/* Busca do header (snippet upstream search_bar.html) */
#gn-brand-navbar.geoinfo-nav .gn-search-bar { position: relative; width: 100%; }
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 6px;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: var(--gi-surface);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group:focus-within {
  border-color: var(--gi-green);
  background: #fff;
  box-shadow: var(--gi-focus);
}
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group-prepend,
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group-append { display: flex; align-items: center; }
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group-prepend { order: 0; }
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gi-muted);
  box-shadow: none;
}
#gn-brand-navbar.geoinfo-nav .gn-search-bar .input-group .btn:hover { background: var(--gi-line-2); color: var(--gi-ink); }
#gn-brand-navbar.geoinfo-nav .gn-search-bar .form-control {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 14px;
  padding: 0 6px;
}
#gn-brand-navbar.geoinfo-nav .gn-search-bar .form-control::placeholder { color: var(--gi-subtle); }
#gn-brand-navbar.geoinfo-nav .gn-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-md);
  background: #fff;
  box-shadow: var(--gi-sh-2);
}
#gn-brand-navbar.geoinfo-nav .gn-suggestions-header { display: flex; justify-content: flex-end; padding: 4px; }
#gn-brand-navbar.geoinfo-nav .gn-suggestions .list-group { margin: 0; padding: 0 6px 6px; }
#gn-brand-navbar.geoinfo-nav .gn-suggestions .list-group-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gi-ink-2);
  font-size: 14px;
  text-align: left;
}
#gn-brand-navbar.geoinfo-nav .gn-suggestions .list-group-item:hover { background: var(--gi-surface); color: var(--gi-ink); }

/* Botão de menu (mobile) */
#gn-brand-navbar .geoinfo-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gi-ink);
  box-shadow: var(--gi-sh-1);
  cursor: pointer;
}
#gn-brand-navbar .geoinfo-nav-toggle .geoinfo-icon-close { display: none; }
#gn-brand-navbar.geoinfo-nav.is-open .geoinfo-nav-toggle .geoinfo-icon-open { display: none; }
#gn-brand-navbar.geoinfo-nav.is-open .geoinfo-nav-toggle .geoinfo-icon-close { display: block; }
html.geoinfo-nav-locked,
html.geoinfo-nav-locked body { overflow: hidden !important; }

@media (max-width: 1280px) {
  #gn-brand-navbar .geoinfo-nav-inner { gap: 16px; }
  #gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .nav-link { padding: 0 9px; font-size: 14px; }
  #gn-brand-navbar .geoinfo-nav-search { flex-basis: 220px; }
}
@media (max-width: 1100px) {
  :root { --gi-nav-h: 60px; }
  #gn-brand-navbar.geoinfo-nav .geoinfo-brand img { height: 34px; }
  #gn-brand-navbar .geoinfo-nav-toggle { display: inline-flex; }
  #gn-brand-navbar .geoinfo-nav-collapse {
    display: none;
    position: fixed;
    top: var(--gi-nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1031;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px 16px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-top: 1px solid var(--gi-line);
  }
  #gn-brand-navbar.geoinfo-nav.is-open .geoinfo-nav-collapse { display: flex; }
  #gn-brand-navbar .geoinfo-nav-search { order: -1; flex: none; max-width: none; margin: 0; }
  #gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu { flex-direction: column; align-items: stretch; gap: 2px; }
  #gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .nav-link,
  #gn-brand-navbar.geoinfo-nav .gn-brand-navbar-menu .dropdown-toggle {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 16px;
  }
  #gn-brand-navbar .geoinfo-nav-actions {
    flex-wrap: wrap;
    margin: 0 !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--gi-line);
  }
  #gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions > li { flex: 1 1 auto; }
  #gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .btn,
  #gn-brand-navbar.geoinfo-nav .geoinfo-nav-actions .nav-link { width: 100%; height: 46px; border-color: var(--gi-line); }
  #gn-brand-navbar .geoinfo-language-name { display: inline; font-weight: 500; }
  #gn-brand-navbar .geoinfo-language-code { display: none; }
  #gn-brand-navbar.geoinfo-nav .dropdown-menu { position: static; float: none; width: 100%; margin-top: 6px; box-shadow: none; }
}

/* ---------- Home v2 · opção A "Portal compacto" ---------- */
/* Faixa de entrada: título + números à esquerda, links de acesso rápido + busca à direita */
.geoinfo-hero.geoinfo-band {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid var(--gi-line);
  background: #F2F8F4; /* verde claro único, sem degradê */
  text-align: left;
}
/* Pontilhado verde por toda a faixa */
.geoinfo-hero.geoinfo-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(6, 120, 62, .14) 1px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
}
.geoinfo-hero .geoinfo-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin: 0 auto;
  padding: 34px 0 30px;
}
.geoinfo-hero .geoinfo-band-inner > * { min-width: 0; }
.geoinfo-hero h1 {
  margin: 0;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.geoinfo-hero h1 em { font-style: normal; color: var(--gi-green); }
/* Uma linha só, com a largura do título: o geoinfo-home.js refina o tamanho da fonte (15 px já serve em pt-BR). */
.geoinfo-hero .geoinfo-hero-text { margin: 6px 0 0; color: var(--gi-muted); font-size: 15px; line-height: 1.5; white-space: nowrap; }

/* Números do acervo em linha */
.geoinfo-hero .geoinfo-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin-top: 18px;
  color: var(--gi-muted);
  font-size: 13.5px;
}
.geoinfo-hero .geoinfo-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gi-muted);
  text-decoration: none;
  white-space: nowrap;
}
.geoinfo-hero .geoinfo-metric[hidden] { display: none; }
.geoinfo-hero .geoinfo-metric + .geoinfo-metric::before {
  content: '';
  width: 4px;
  height: 4px;
  margin: 0 12px;
  border-radius: 50%;
  background: #C2CBC5;
}
.geoinfo-hero a.geoinfo-metric:hover { color: var(--gi-green-700); }
.geoinfo-hero a.geoinfo-metric:hover .geoinfo-metric-value { color: var(--gi-green-700); }
.geoinfo-hero .geoinfo-metric-value {
  color: var(--gi-ink);
  font-family: var(--gi-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.geoinfo-hero .geoinfo-metric-updated svg { color: var(--gi-green); }
.geoinfo-hero .geoinfo-metric-updated .geoinfo-metric-value { color: var(--gi-muted); font-family: var(--gi-font); font-size: 13.5px; font-weight: 400; letter-spacing: 0; }

/* Busca */
.geoinfo-hero .geoinfo-hero-search { margin: 0; width: 100%; }
.geoinfo-hero .geoinfo-hero-searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 7px 0 18px;
  border: 1px solid #D5DDD7;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--gi-sh-2), 0 0 0 5px rgba(6, 120, 62, .05);
  transition: border-color .15s, box-shadow .15s;
}
.geoinfo-hero .geoinfo-hero-searchbox:focus-within { border-color: var(--gi-green); box-shadow: var(--gi-sh-2), 0 0 0 5px rgba(6, 120, 62, .14); }
.geoinfo-hero .geoinfo-hero-search-icon { flex: none; color: var(--gi-muted); }
.geoinfo-hero .geoinfo-hero-searchbox input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 15.5px;
}
.geoinfo-hero .geoinfo-hero-searchbox input::placeholder { color: #7B8A82; }
.geoinfo-hero .geoinfo-hero-searchbox input::-webkit-search-cancel-button { display: none; }
.geoinfo-hero .geoinfo-hero-type {
  height: 36px;
  padding: 0 28px 0 12px;
  border: 0 !important;
  border-left: 1px solid var(--gi-line) !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2333433A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.geoinfo-hero .geoinfo-hero-type:focus-visible { outline: none; box-shadow: var(--gi-focus) !important; border-radius: 8px; }
.geoinfo-hero .geoinfo-hero-kbd {
  padding: 1px 7px;
  border: 1px solid var(--gi-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--gi-muted);
  font-family: var(--gi-mono);
  font-size: 12px;
  box-shadow: none;
}
.geoinfo-hero .hero-search-clear-btn {
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gi-muted);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.geoinfo-hero .hero-search-clear-btn:hover { background: var(--gi-surface); color: var(--gi-ink); }
.geoinfo-hero .hero-search-clear-btn[hidden] { display: none; }
.geoinfo-hero .hero-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--gi-green);
  color: #fff;
  font-family: var(--gi-font);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(4, 51, 28, .3);
  cursor: pointer;
}
.geoinfo-hero .hero-search-btn span { color: #fff; }
.geoinfo-hero .hero-search-btn:hover { background: var(--gi-green-700); }
.geoinfo-hero .geoinfo-hero-btn-icon { display: none; }

/* Página da home (rolagem normal; o wrapper do ms2 é absoluto) */
html.msgapi:has(.gn-homepage),
html.msgapi:has(.gn-homepage) body { height: auto !important; min-height: 100%; overflow-y: auto !important; }
.gn-page-wrapper:has(.gn-homepage) { min-height: 100vh; display: flex; flex-direction: column; background: var(--gi-bg); }
.gn-theme.gn-homepage { display: flex; flex-direction: column; flex: 1 1 auto; background: var(--gi-bg); }
.gn-homepage .geoinfo-home { flex: 1 0 auto; }
/* O cabeçalho e a faixa do topo nunca encolhem. Com overflow: hidden, o mínimo automático de um item
   flex é 0: no modo sem rolagem, a faixa era espremida (até 43 px) enquanto os esqueletos dos cards
   carregavam, e ficava encavalada com o resto da página. */
.gn-homepage > .gn-main-header,
.gn-homepage > .geoinfo-hero { flex: none; }
.gn-homepage .geoinfo-home-mapstore { display: none !important; }
.gn-homepage .gn-footer { flex: none; }

/* Home sem rolagem (desktop): a página ocupa exatamente a altura da janela e o rodapé fica sempre visível.
   A classe é aplicada pelo geoinfo-home.js quando ao menos uma linha completa de cards cabe na tela. */
html.msgapi.geoinfo-home-fit,
html.msgapi.geoinfo-home-fit body { height: 100% !important; overflow: hidden !important; }
html.geoinfo-home-fit .gn-page-wrapper:has(.gn-homepage) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
html.geoinfo-home-fit .gn-theme.gn-homepage { height: 100%; min-height: 0; overflow: hidden; }
/* base 0: a área dos cards fica com exatamente o que sobra da janela, qualquer que seja o conteúdo */
html.geoinfo-home-fit .gn-homepage .geoinfo-home { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
html.geoinfo-home-fit .geoinfo-home .geoinfo-recent { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 12px; }
/* a grade tem a altura das linhas exibidas (o paginador vem logo abaixo); se faltar espaço, ela encolhe e corta,
   sem empurrar o paginador sobre o rodapé */
html.geoinfo-home-fit .geoinfo-home .geoinfo-recent-grid { flex: 0 1 auto; min-height: 0; overflow: hidden; align-content: start; }
html.geoinfo-home-fit .geoinfo-home .geoinfo-recent-pager { flex: none; flex-wrap: nowrap; }
html.geoinfo-home-fit .gn-homepage .gn-footer { margin-top: 0; }

/* Temas: fileira compacta de pílulas (rolável) + "Todos os temas"; oculta por padrão (botão "Temas" no título de recentes) */
.geoinfo-home .geoinfo-themes { display: flex; align-items: center; gap: 14px; padding-top: 20px; }
.geoinfo-home .geoinfo-themes[hidden] { display: none; }
.geoinfo-home .geoinfo-themes-label { flex: none; margin: 0; color: var(--gi-muted); font-family: var(--gi-font); font-size: 13px; font-weight: 600; }
.geoinfo-home .geoinfo-categories-scroller {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 93%, transparent);
  mask-image: linear-gradient(90deg, #000 93%, transparent);
}
.geoinfo-home .geoinfo-categories-scroller::-webkit-scrollbar { display: none; }
.geoinfo-home .geoinfo-categories-grid { display: flex; flex-wrap: nowrap; justify-content: safe center; gap: 8px; padding: 2px 32px 2px 2px; }
.geoinfo-home .geoinfo-themes.is-expanded { align-items: flex-start; }
.geoinfo-home .geoinfo-themes.is-expanded .geoinfo-themes-label { padding-top: 11px; }
.geoinfo-home .geoinfo-themes.is-expanded .geoinfo-categories-scroller { overflow: visible; -webkit-mask-image: none; mask-image: none; }
.geoinfo-home .geoinfo-themes.is-expanded .geoinfo-categories-grid { flex-wrap: wrap; justify-content: center; padding-right: 2px; }
/* Janela baixa com todos os temas abertos: o geoinfo-home.js limita a altura da lista, que rola por dentro,
   para sempre sobrar ao menos uma linha de cards e o paginador sem rolar a página. */
.geoinfo-home .geoinfo-themes.is-expanded.is-capped .geoinfo-categories-scroller { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #C9D3CC transparent; }
.geoinfo-home .geoinfo-themes.is-expanded.is-capped .geoinfo-categories-scroller::-webkit-scrollbar { display: block; width: 6px; }
.geoinfo-home .geoinfo-themes.is-expanded.is-capped .geoinfo-categories-scroller::-webkit-scrollbar-thumb { border-radius: 3px; background: #C9D3CC; }
/* Desktop: a fileira ocupa 65% da largura do conteúdo, centralizada, para aliviar a página. */
@media (min-width: 1024px) {
  .geoinfo-home .geoinfo-themes { width: calc(min(var(--gi-wrap), 100% - var(--gi-gutter) * 2) * .65); }
}
.geoinfo-home .geoinfo-category-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--gi-line);
  border-radius: 999px;
  background: #fff;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.geoinfo-home .geoinfo-category-pill svg { color: var(--gi-green); }
.geoinfo-home .geoinfo-category-pill em { padding-left: 2px; color: #8A978F; font-family: var(--gi-mono); font-size: 12px; font-style: normal; }
.geoinfo-home .geoinfo-category-pill:hover { border-color: var(--gi-green-200); color: var(--gi-ink); }
.geoinfo-home .geoinfo-category-pill[aria-pressed="true"] { border-color: var(--gi-green); background: var(--gi-green-50); color: var(--gi-green-700); box-shadow: inset 0 0 0 1px var(--gi-green); }
/* tema sem resultado no filtro atual: esmaecido, mas clicável */
.geoinfo-home .geoinfo-category-pill.is-empty:not([aria-pressed="true"]) { color: var(--gi-subtle); }
.geoinfo-home .geoinfo-category-pill.is-empty:not([aria-pressed="true"]) svg { opacity: .45; }
.geoinfo-home .geoinfo-categories-toggle {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border: 1px dashed var(--gi-green-200);
  border-radius: 999px;
  background: #fff;
  color: var(--gi-green);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.geoinfo-home .geoinfo-categories-toggle:hover { background: var(--gi-green-50); }
.geoinfo-home .geoinfo-categories-toggle[hidden] { display: none; }

/* Seção de recentes */
.geoinfo-home .geoinfo-section { padding-top: 30px; }
.geoinfo-home .geoinfo-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.geoinfo-home .geoinfo-section-title { margin: 0; color: var(--gi-ink); font-family: var(--gi-font); font-size: 22px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
/* no celular, se o título não couber ao lado, o botão desce para a linha de baixo (o título não quebra) */
.geoinfo-home .geoinfo-section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
/* "Temas": discreto (sem borda) enquanto as pílulas estão ocultas; verde claro quando abertas */
.geoinfo-home .geoinfo-themes-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--gi-muted);
  font-family: var(--gi-font);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.geoinfo-home .geoinfo-themes-switch:hover { border-color: var(--gi-line); background: var(--gi-surface); color: var(--gi-ink-2); }
.geoinfo-home .geoinfo-themes-switch[aria-expanded="true"] { border-color: var(--gi-green-200); background: var(--gi-green-50); color: var(--gi-green-700); }
.geoinfo-home .geoinfo-themes-switch:focus-visible { outline: none; box-shadow: var(--gi-focus); }
.geoinfo-home .geoinfo-themes-switch-chevron { transition: transform .2s; }
.geoinfo-home .geoinfo-themes-switch[aria-expanded="true"] .geoinfo-themes-switch-chevron { transform: rotate(180deg); }
/* quantos temas estão selecionados (aparece também com as pílulas ocultas) */
.geoinfo-home .geoinfo-themes-switch-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gi-green); color: #fff; font-family: var(--gi-mono); font-size: 11px; font-style: normal; font-weight: 600; line-height: 18px; text-align: center; }
.geoinfo-home .geoinfo-themes-switch-count[hidden] { display: none; }
.geoinfo-home .geoinfo-section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gi-green); font-size: 14px; font-weight: 600; white-space: nowrap; }
.geoinfo-home .geoinfo-section-link:hover { color: var(--gi-green-700); text-decoration: underline; text-underline-offset: 3px; }
.geoinfo-home .geoinfo-recent-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.geoinfo-home .geoinfo-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--gi-line); border-radius: 10px; background: var(--gi-surface); }
.geoinfo-home .geoinfo-segment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gi-muted);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.geoinfo-home .geoinfo-segment[hidden] { display: none; }
.geoinfo-home .geoinfo-segment i { color: #8A978F; font-family: var(--gi-mono); font-size: 12px; font-style: normal; }
.geoinfo-home .geoinfo-segment:hover { color: var(--gi-ink); }
.geoinfo-home .geoinfo-segment[aria-pressed="true"] { background: #fff; color: var(--gi-ink); box-shadow: var(--gi-sh-1); }
.geoinfo-home .geoinfo-segment.is-empty:not([aria-pressed="true"]) { color: var(--gi-subtle); }
.geoinfo-home .geoinfo-select {
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2333433A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.geoinfo-home .geoinfo-select:focus-visible { outline: none; border-color: var(--gi-green); box-shadow: var(--gi-focus); }
.geoinfo-home .geoinfo-view-toggle,
.gn-catalogue .geoinfo-view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--gi-line); border-radius: 10px; background: var(--gi-surface); }
.geoinfo-home .geoinfo-view-toggle button,
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gi-muted);
  cursor: pointer;
}
.geoinfo-home .geoinfo-view-toggle button[aria-pressed="true"],
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle button[aria-pressed="true"] { background: #fff; color: var(--gi-ink); box-shadow: var(--gi-sh-1); }

/* Grade fluida: colunas por largura (o JS completa as linhas) */
.geoinfo-home .geoinfo-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 26px 20px;
  transition: opacity .15s;
}
.geoinfo-home .geoinfo-recent-grid.is-loading { opacity: .5; }
.geoinfo-home .geoinfo-resource-card { display: flex; flex-direction: column; min-width: 0; color: var(--gi-ink); text-decoration: none; }
.geoinfo-home .geoinfo-resource-thumb {
  position: relative;
  aspect-ratio: 2 / 1.08;
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-md);
  background: var(--gi-surface);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.geoinfo-home .geoinfo-resource-thumb-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
/* Janela baixa: o geoinfo-home.js baixa as miniaturas (grade e lista) o bastante para caber uma linha de cards */
.geoinfo-home .geoinfo-recent-grid.is-short-thumbs .geoinfo-resource-thumb,
.geoinfo-home .geoinfo-recent-grid.is-short-thumbs .geoinfo-resource-skeleton span { aspect-ratio: auto; height: var(--geoinfo-fit-thumb-h); }
/* ...e, na grade, sem miniatura quando nem a mínima cabe: card só com o texto, emoldurado como na lista */
.geoinfo-home .geoinfo-recent-grid.is-no-thumbs:not(.is-list) .geoinfo-resource-thumb,
.geoinfo-home .geoinfo-recent-grid.is-no-thumbs:not(.is-list) .geoinfo-resource-skeleton span { display: none; }
.geoinfo-home .geoinfo-recent-grid.is-no-thumbs:not(.is-list) .geoinfo-resource-card { padding: 10px 12px; border: 1px solid var(--gi-line-2); border-radius: var(--gi-r-md); }
.geoinfo-home .geoinfo-recent-grid.is-no-thumbs:not(.is-list) .geoinfo-resource-card:hover { border-color: var(--gi-green-200); background: var(--gi-surface); }
.geoinfo-home .geoinfo-recent-grid.is-no-thumbs:not(.is-list) .geoinfo-resource-body { padding-top: 0; }
.geoinfo-home .geoinfo-resource-card:hover .geoinfo-resource-thumb { border-color: var(--gi-green-200); box-shadow: var(--gi-sh-2); }
.geoinfo-home .geoinfo-resource-card:hover .geoinfo-resource-thumb-image { transform: scale(1.03); }
.geoinfo-home .geoinfo-resource-card:hover .geoinfo-resource-title { color: var(--gi-green-700); }
.geoinfo-home .geoinfo-resource-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--gi-ink-2);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--gi-sh-1);
}
.geoinfo-home .geoinfo-resource-format {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(14, 26, 20, .74);
  color: #fff;
  font-family: var(--gi-mono);
  font-size: 11px;
}
.geoinfo-home .geoinfo-resource-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 12px; }
.geoinfo-home .geoinfo-resource-type { display: none; align-items: center; gap: 5px; color: var(--gi-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.geoinfo-home .geoinfo-resource-title {
  color: var(--gi-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  min-height: 2.7em; /* sempre 2 linhas: todos os cards com a mesma altura (linhas previsíveis) */
  transition: color .15s;
}
.geoinfo-home .geoinfo-resource-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; overflow: hidden; color: var(--gi-muted); font-size: 12.5px; white-space: nowrap; }
.geoinfo-home .geoinfo-resource-meta > * { flex: none; }
.geoinfo-home .geoinfo-resource-cat { min-width: 0; flex: 0 1 auto !important; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) {
  /* telas estreitas rolam normalmente: o tema pode quebrar linha em vez de ser cortado */
  .geoinfo-home .geoinfo-resource-meta { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
  .geoinfo-home .geoinfo-resource-cat { overflow: visible; }
}
.geoinfo-home .geoinfo-resource-cat { display: inline-flex; align-items: center; gap: 6px; color: var(--gi-green-700); font-weight: 500; }
.geoinfo-home .geoinfo-resource-cat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gi-green); }
.geoinfo-home .geoinfo-dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #B3BDB7; }

/* Visão em lista */
.geoinfo-home .geoinfo-recent-grid.is-list { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px 24px; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-card { flex-direction: row; align-items: center; gap: 14px; padding: 8px; border: 1px solid var(--gi-line-2); border-radius: var(--gi-r-md); }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-card:hover { border-color: var(--gi-green-200); background: var(--gi-surface); }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-thumb { width: 150px; flex: none; aspect-ratio: 2 / 1.25; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-badge,
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-format { display: none; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-body { padding-top: 0; gap: 4px; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-type { display: inline-flex; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-title { font-size: 14.5px; }

/* Esqueletos e estados vazios */
.geoinfo-home .geoinfo-resource-skeleton { display: flex; flex-direction: column; gap: 10px; }
.geoinfo-home .geoinfo-resource-skeleton span,
.geoinfo-home .geoinfo-resource-skeleton i {
  display: block;
  border-radius: var(--gi-r-md);
  background: linear-gradient(90deg, var(--gi-line-2), #F6F8F6, var(--gi-line-2));
  background-size: 200% 100%;
  animation: geoinfo-shimmer 1.2s infinite linear;
}
.geoinfo-home .geoinfo-resource-skeleton span { aspect-ratio: 2 / 1.08; }
.geoinfo-home .geoinfo-resource-skeleton i { height: 14px; width: 80%; border-radius: 6px; }
.geoinfo-home .geoinfo-resource-skeleton i + i { width: 50%; }
/* Na lista, o esqueleto tem o formato do card da lista (miniatura à esquerda, ~112 px), para a página
   não pular quando os cards chegam */
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 10px 14px;
  padding: 8px;
  border: 1px solid var(--gi-line-2);
  border-radius: var(--gi-r-md);
}
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton span { grid-row: 1 / 3; aspect-ratio: 2 / 1.25; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton i { align-self: end; }
.geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton i + i { align-self: start; }
@keyframes geoinfo-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.geoinfo-home .geoinfo-empty-state {
  grid-column: 1 / -1;
  padding: 36px 24px;
  border: 1px dashed var(--gi-line);
  border-radius: var(--gi-r-md);
  background: var(--gi-surface);
  color: var(--gi-muted);
  font-size: 14.5px;
  text-align: center;
}
.geoinfo-home .geoinfo-empty-state-error { border-color: #F4C7C3; background: var(--gi-danger-bg); color: var(--gi-danger); }
/* Troca de página: os cards novos entram com um leve deslize */
@keyframes geoinfo-page-in { from { opacity: 0; transform: translateY(6px); } }
.geoinfo-home .geoinfo-recent-grid.is-entering > * { animation: geoinfo-page-in .24s cubic-bezier(.2, .7, .3, 1) both; }

/* Paginador dos recentes: intervalo à esquerda; anterior · páginas · próxima à direita. Mesmo vocabulário da barra
   de cima: páginas num trilho claro como as abas de tipo (a atual em branco, com sombra) e setas com a borda e a
   altura (38 px) do seletor de ordenação. Altura fixa: o cálculo de linhas do modo sem rolagem desconta 38 + 16 px. */
.geoinfo-home .geoinfo-recent-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  min-height: 38px;
  margin-top: 16px;
  transition: opacity .15s;
}
.geoinfo-home .geoinfo-recent-pager[data-state="single"],
.geoinfo-home .geoinfo-recent-pager[data-state="empty"] { display: none; }
/* sem rolagem, o espaço continua reservado (o número de linhas não muda com a quantidade de páginas) */
html.geoinfo-home-fit .geoinfo-home .geoinfo-recent-pager[data-state="single"],
html.geoinfo-home-fit .geoinfo-home .geoinfo-recent-pager[data-state="empty"] { display: flex; visibility: hidden; }
.geoinfo-home .geoinfo-recent-pager.is-busy { opacity: .45; }
.geoinfo-home .geoinfo-pager-range { margin: 0; color: var(--gi-muted); font-size: 13.5px; white-space: nowrap; }
.geoinfo-home .geoinfo-pager-range strong { color: var(--gi-ink-2); font-family: var(--gi-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.geoinfo-home .geoinfo-pager-nav { display: flex; align-items: center; gap: 8px; }
.geoinfo-home .geoinfo-pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: var(--gi-surface);
  list-style: none;
}
.geoinfo-home .geoinfo-pager-pages li { display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; }
.geoinfo-home .geoinfo-pager-pages button {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gi-muted);
  font-family: var(--gi-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.geoinfo-home .geoinfo-pager-pages button:hover { background: rgba(255, 255, 255, .75); color: var(--gi-ink); }
.geoinfo-home .geoinfo-pager-pages button[aria-current="page"] { background: #fff; color: var(--gi-green-700); font-weight: 600; box-shadow: var(--gi-sh-1), inset 0 0 0 1px var(--gi-green-100); cursor: default; }
.geoinfo-home .geoinfo-pager-pages .geoinfo-pager-gap { width: 24px; height: 30px; color: var(--gi-subtle); }
.geoinfo-home .geoinfo-pager-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s, box-shadow .15s;
}
.geoinfo-home .geoinfo-pager-step[data-pager-action="next"] { padding: 0 10px 0 14px; }
.geoinfo-home .geoinfo-pager-step svg { flex: none; transition: transform .15s; }
.geoinfo-home .geoinfo-pager-step:hover:not(:disabled) { border-color: var(--gi-green-200); background: var(--gi-green-50); color: var(--gi-green-700); }
.geoinfo-home .geoinfo-pager-step[data-pager-action="prev"]:hover:not(:disabled) svg { transform: translateX(-2px); }
.geoinfo-home .geoinfo-pager-step[data-pager-action="next"]:hover:not(:disabled) svg { transform: translateX(2px); }
.geoinfo-home .geoinfo-pager-step:disabled { border-color: var(--gi-line-2); background: transparent; color: #B3BDB7; cursor: default; }
.geoinfo-home .geoinfo-pager-step:focus-visible { border-color: var(--gi-green); border-radius: 10px; }
/* esqueleto até a primeira resposta */
.geoinfo-home .geoinfo-pager-skeleton {
  display: block;
  width: 116px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gi-line-2), #F6F8F6, var(--gi-line-2));
  background-size: 200% 100%;
  animation: geoinfo-shimmer 1.2s infinite linear;
}
.geoinfo-home .geoinfo-pager-nav .geoinfo-pager-skeleton { width: 360px; max-width: 72vw; height: 38px; border-radius: 10px; }

/* Home: responsivo (a partir de 1024 px, faixa em duas colunas e home sem rolagem) */
@media (max-width: 1023px) {
  .geoinfo-hero .geoinfo-band-inner { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 700px) {
  .geoinfo-hero .geoinfo-band-inner { padding: 22px 0 20px; gap: 18px; }
  .geoinfo-hero h1 { font-size: 24px; }
  .geoinfo-hero .geoinfo-hero-text { display: none; }
  .geoinfo-hero .geoinfo-metrics { gap: 6px 14px; margin-top: 12px; font-size: 13px; }
  .geoinfo-hero .geoinfo-metric + .geoinfo-metric::before { display: none; }
  .geoinfo-hero .geoinfo-hero-searchbox { height: 54px; padding: 0 6px 0 14px; gap: 8px; }
  .geoinfo-hero .geoinfo-hero-searchbox input { font-size: 16px; }
  .geoinfo-hero .geoinfo-hero-type,
  .geoinfo-hero .geoinfo-hero-kbd { display: none; }
  .geoinfo-hero .hero-search-btn { width: 42px; height: 42px; padding: 0; }
  .geoinfo-hero .geoinfo-hero-btn-label { display: none; }
  .geoinfo-hero .geoinfo-hero-btn-icon { display: block; }
  .geoinfo-home .geoinfo-themes { padding-top: 16px; gap: 10px; }
  .geoinfo-home .geoinfo-themes-label { display: none; }
  .geoinfo-home .geoinfo-themes .geoinfo-categories-toggle { padding: 0 12px; }
  .geoinfo-home .geoinfo-section { padding-top: 24px; }
  .geoinfo-home .geoinfo-section-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
  .geoinfo-home .geoinfo-recent-tools { justify-content: flex-start; width: 100%; }
  .geoinfo-home .geoinfo-select,
  .geoinfo-home .geoinfo-view-toggle { display: none; }
  .geoinfo-home .geoinfo-segmented { max-width: 100%; overflow-x: auto; }
  .geoinfo-home .geoinfo-recent-grid,
  .geoinfo-home .geoinfo-recent-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-card { flex-direction: column; align-items: stretch; padding: 0; border: 0; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-thumb { width: auto; aspect-ratio: 2 / 1.08; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton { display: flex; flex-direction: column; padding: 0; border: 0; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton span { aspect-ratio: 2 / 1.08; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-skeleton i { align-self: auto; }
  .geoinfo-home .geoinfo-resource-badge { height: 22px; padding: 0 8px; left: 8px; top: 8px; font-size: 11px; }
  .geoinfo-home .geoinfo-resource-format { display: none; }
  .geoinfo-home .geoinfo-resource-title { font-size: 13.5px; }
  .geoinfo-home .geoinfo-resource-meta { font-size: 12px; gap: 6px; }
  /* paginador: intervalo em cima, controles embaixo, centralizados; setas só com o ícone */
  .geoinfo-home .geoinfo-recent-pager { flex-direction: column; justify-content: center; gap: 10px; margin-top: 24px; }
  .geoinfo-home .geoinfo-pager-range { font-size: 13px; }
  .geoinfo-home .geoinfo-pager-nav { gap: 6px; }
  .geoinfo-home .geoinfo-pager-step,
  .geoinfo-home .geoinfo-pager-step[data-pager-action="next"] { width: 38px; padding: 0; justify-content: center; }
  .geoinfo-home .geoinfo-pager-step-label { display: none; }
  .geoinfo-home .geoinfo-pager-pages button { min-width: 34px; padding: 0 6px; }
}

/* ---------- Rodapé ---------- */
/* Barra única e baixa: direito autoral à esquerda, logo Embrapa à direita (mesma margem lateral do cabeçalho). */
body .gn-footer.geoinfo-footer {
  position: relative;
  bottom: auto;
  z-index: auto;
  display: block;
  width: auto;
  margin-top: 40px;
  padding: 0;
  border-top: 1px solid var(--gi-line);
  background: var(--gi-surface);
  color: var(--gi-muted);
}
body .geoinfo-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  min-height: 52px;
  margin: 0 auto;
  padding: 8px 0;
}
body .geoinfo-footer-copy { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--gi-muted); font-size: 13px; text-align: left; }
body .geoinfo-footer-brand { display: inline-flex; flex: none; align-items: center; }
body .geoinfo-footer-brand-logo { display: block; width: auto; height: 28px; }
body .gn-footer.geoinfo-footer.geoinfo-footer-compact {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  width: 100%;
  margin-top: 0;
}
body .geoinfo-footer-compact .geoinfo-footer-bar { min-height: 44px; padding: 6px 0; }
body .geoinfo-footer-compact .geoinfo-footer-brand-logo { height: 22px; }
@media (max-width: 700px) {
  body .geoinfo-footer-bar { gap: 12px; }
  body .geoinfo-footer-copy { font-size: 12px; line-height: 1.45; }
  body .geoinfo-footer-brand-logo { height: 24px; }
  body .geoinfo-footer-compact .geoinfo-footer-copy { font-size: 11px; }
}

/* ---------- Login ---------- */
.geoinfo-global-shell.geoinfo-login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 0 !important;
  overflow-x: hidden;
  background: var(--gi-bg) !important;
}
.geoinfo-global-shell.geoinfo-login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(6, 120, 62, .18) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 20%, transparent 70%);
  pointer-events: none;
}
.geoinfo-global-shell.geoinfo-login-page::after {
  content: '';
  position: fixed;
  left: 50%;
  top: 40%;
  width: 900px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(6, 120, 62, .10), transparent);
  pointer-events: none;
}
.geoinfo-global-shell.geoinfo-login-page #wrap {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: transparent;
}
.geoinfo-login-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
}
.geoinfo-login-logo img { display: block; height: 38px; width: auto; }
.geoinfo-login-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--gi-ink-2);
  font-size: 14px;
  font-weight: 600;
}
.geoinfo-login-back:hover { background: var(--gi-surface); color: var(--gi-ink); }
.geoinfo-login-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
}
.geoinfo-login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  border: 1px solid var(--gi-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 60px -24px rgba(4, 51, 28, .22), 0 2px 6px rgba(14, 26, 20, .04);
  font-family: var(--gi-font);
  color: var(--gi-ink);
}
.geoinfo-login-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #CFE6D7;
  border-radius: 13px;
  background: var(--gi-green-50);
  color: var(--gi-green);
}
.geoinfo-login-card h1 {
  margin: 20px 0 0;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.geoinfo-login-sub { margin: 6px 0 24px; color: var(--gi-muted); font-size: 14.5px; }
.geoinfo-login-alert {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #F4C7C3;
  border-radius: var(--gi-r-md);
  background: var(--gi-danger-bg);
  color: var(--gi-danger);
  font-size: 14px;
}
.geoinfo-login-alert svg { flex: none; margin-top: 1px; }
.geoinfo-login-alert p { margin: 0; }
.geoinfo-login-social .socialaccount_providers { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.geoinfo-login-social .socialaccount_providers a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border: 1px solid var(--gi-line);
  border-radius: 11px;
  background: #fff;
  color: var(--gi-ink);
  font-weight: 600;
  box-shadow: var(--gi-sh-1);
}
.geoinfo-login-social .socialaccount_providers a:hover { border-color: var(--gi-green-200); }
.geoinfo-login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #8A978F; font-size: 12.5px; }
.geoinfo-login-divider::before,
.geoinfo-login-divider::after { content: ''; flex: 1; height: 1px; background: var(--gi-line); }
.geoinfo-login-field { margin-bottom: 16px; }
.geoinfo-login-field label,
.geoinfo-login-label-row label { display: block; margin: 0 0 7px; color: var(--gi-ink); font-size: 13.5px; font-weight: 600; }
.geoinfo-login-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.geoinfo-login-label-row a { color: var(--gi-green); font-size: 13.5px; font-weight: 500; }
.geoinfo-login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 6px 0 14px;
  border: 1px solid #D5DDD7;
  border-radius: 11px;
  background: #fff;
  color: #8A978F;
  transition: border-color .15s, box-shadow .15s;
}
.geoinfo-login-input:focus-within { border-color: var(--gi-green); box-shadow: 0 0 0 4px rgba(6, 120, 62, .12); }
.geoinfo-login-input input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 15px;
}
.geoinfo-login-field.has-error .geoinfo-login-input { border-color: var(--gi-danger); }
.geoinfo-login-error,
.geoinfo-login-error .errorlist { margin: 6px 0 0; padding: 0; list-style: none; color: var(--gi-danger); font-size: 13px; }
.geoinfo-login-reveal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8A978F;
  cursor: pointer;
}
.geoinfo-login-reveal:hover,
.geoinfo-login-reveal[aria-pressed="true"] { background: var(--gi-surface); color: var(--gi-ink); }
.geoinfo-login-remember {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 4px 0 22px;
  color: var(--gi-ink-2);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.geoinfo-login-remember input { width: 17px; height: 17px; margin: 0; accent-color: var(--gi-green); }
.geoinfo-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 11px;
  background: var(--gi-green);
  color: #fff;
  font-family: var(--gi-font);
  font-size: 15px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(4, 51, 28, .3);
  cursor: pointer;
}
.geoinfo-login-btn:hover,
.geoinfo-login-btn:focus { background: var(--gi-green-700); color: #fff; }
.geoinfo-login-alt { margin: 22px 0 0; color: var(--gi-muted); font-size: 14px; text-align: center; }
.geoinfo-login-alt a { color: var(--gi-green); font-weight: 600; }
.geoinfo-login-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 20px;
  color: var(--gi-muted);
  font-size: 13px;
}
.geoinfo-login-foot img { height: 26px; width: auto; }

/* ---------- Páginas clássicas (Django) ---------- */
.geoinfo-global-shell #wrap { min-height: calc(100vh - 200px); background: var(--gi-bg); }
/* O base.css do GeoNode reserva 70px no topo para o cabeçalho fixo antigo; o cabeçalho atual é sticky. */
body.geoinfo-global-shell #wrap { margin-top: 0 !important; padding-top: 0 !important; }
body.geoinfo-global-shell #wrap > .container:first-child { padding-top: 28px; }
.geoinfo-classic-shell { padding: 40px 0 56px; }
.geoinfo-account-card {
  max-width: 480px;
  margin: 48px auto;
  padding: 32px;
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-lg);
  background: #fff;
  box-shadow: var(--gi-sh-2);
}
.geoinfo-page-header { border-bottom: 1px solid var(--gi-line); background: var(--gi-bg); }
.geoinfo-page-header-inner { width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2); margin: 0 auto; padding: 28px 0 24px; }
.geoinfo-page-header h1 { margin: 6px 0 4px; font-family: var(--gi-font); font-size: 32px; font-weight: 650; letter-spacing: -0.035em; color: var(--gi-ink); }
.geoinfo-page-header p { margin: 0; color: var(--gi-muted); }
.geoinfo-breadcrumb { color: var(--gi-muted); font-size: 13.5px; }
.geoinfo-breadcrumb a { color: var(--gi-muted); }
.geoinfo-breadcrumb a:hover { color: var(--gi-green); }

/* ---------- Catálogo (SPA MapStore) ---------- */
.geoinfo-catalogue-shell { width: 100%; }
.gn-catalogue #ms-container.geoinfo-catalogue-mapstore { width: 100%; max-width: none; margin: 0; padding: 0; background: var(--gi-bg); }
.gn-catalogue .ms-resources-container,
.geoinfo-global-shell .ms-resources-container { width: 100%; background: var(--gi-bg) !important; }
.gn-catalogue .ms-resources-container > div,
.geoinfo-global-shell .ms-resources-container > div {
  max-width: none !important;
  padding: 0 var(--gi-gutter) 32px;
}

/* Barra de título/ferramentas da listagem */
.gn-catalogue .ms-resources-menu {
  padding-top: 20px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--gi-line);
  background: rgba(255, 255, 255, .96) !important;
}
.gn-catalogue .ms-resources-menu > .ms-text {
  margin-bottom: 10px;
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 30px !important;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.gn-catalogue .ms-resources-menu .ms-text._font-size-sm { color: var(--gi-muted); font-family: var(--gi-mono); font-size: 13px !important; }
.gn-catalogue .ms-resources-menu .btn {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--gi-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--gi-sh-1);
}
.gn-catalogue .ms-resources-menu .btn:hover { border-color: var(--gi-green-200); color: var(--gi-green-700); }
.gn-catalogue .ms-resources-menu .btn-success,
.gn-catalogue .ms-resources-menu .btn-primary,
.gn-catalogue .ms-resources-menu .ms-notification-circle {
  border-color: var(--gi-green);
  background: var(--gi-green);
  color: #fff;
}
.gn-catalogue .ms-resources-menu .btn-success:hover,
.gn-catalogue .ms-resources-menu .btn-primary:hover,
.gn-catalogue .ms-resources-menu .ms-notification-circle:hover { background: var(--gi-green-700); color: #fff; }
.gn-catalogue .ms-resources-menu .square-button-md,
.gn-catalogue .ms-resources-menu .square-button { width: 38px; padding: 0; } /* square-button: MapStore 2026 (GeoNode 5.1) */
.gn-catalogue .ms-resources-menu .dropdown-menu,
.gn-catalogue .ms-resource-card-action-buttons .dropdown-menu {
  padding: 6px;
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-md);
  box-shadow: var(--gi-sh-2);
  font-family: var(--gi-font);
}
.gn-catalogue .ms-resources-menu .dropdown-menu > li > a,
.gn-catalogue .ms-resource-card-action-buttons .dropdown-menu > li > a { padding: 8px 12px; border-radius: 8px; font-size: 14px; }

/* Grade e cards: o mesmo formato dos cards da home (miniatura emoldurada com selos, título em 2 linhas,
   tema e data), mesma largura mínima e espaçamento. Os selos, o rótulo do tema e a data formatada vêm do
   decorateCatalogueCards() em _geonode_config.html; os botões (favorito, detalhes) ficam no fim da linha da data. */
.gn-catalogue .ms-resources-container-grid,
.geoinfo-global-shell .ms-resources-container-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr));
  gap: 26px 20px !important; /* vence o _flex-gap-lg do MapStore; o JS usa estas medidas para o tamanho da página */
  width: 100%;
  margin: 0;
  padding: 24px 0 8px !important; /* embaixo, a própria barra de paginação já dá o respiro */
  list-style: none;
  align-items: start;
}
.gn-catalogue .ms-resources-container-grid > li,
.geoinfo-global-shell .ms-resources-container-grid > li { display: flex; width: auto !important; min-width: 0; }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid {
  --gi-card-thumb-ratio: 2 / 1.08;
  container-type: inline-size; /* o selo de formato se posiciona pela largura do card (altura da miniatura) */
  width: 100% !important;
  max-width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  color: var(--gi-ink);
}
/* moldura da miniatura (borda e sombra do hover), desenhada por cima da imagem */
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid::after,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  aspect-ratio: var(--gi-card-thumb-ratio);
  border: 1px solid var(--gi-line);
  border-radius: var(--gi-r-md);
  pointer-events: none;
  transition: border-color .2s, box-shadow .2s;
}
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid:hover::after,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid:hover::after { border-color: var(--gi-green-200); box-shadow: var(--gi-sh-2); }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: transparent;
}
/* Miniatura: cantos pelo clip-path; no hover cresce 3% e o recorte encolhe na mesma proporção (inset 1,456%),
   então a imagem dá zoom dentro da moldura parada, como na home. pointer-events: com transform a miniatura
   sobe de camada e cobriria o link do card. */
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img {
  display: block;
  width: 100%;
  height: auto;
  flex: none;
  aspect-ratio: var(--gi-card-thumb-ratio);
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background-color: var(--gi-surface);
  clip-path: inset(0 round var(--gi-r-md));
  transition: transform .35s ease, clip-path .35s ease;
  pointer-events: none;
}
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid:hover .ms-resource-card-img,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid:hover .ms-resource-card-img {
  transform: scale(1.03);
  clip-path: inset(1.456% round 11.65px);
}
@media (prefers-reduced-motion: reduce) {
  .gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img,
  .geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img { transition: none; }
}
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img img,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img img { width: 100%; height: 100%; object-fit: cover; }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .geoinfo-generated-document-thumb,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .geoinfo-generated-document-thumb {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
/* Selos sobre a miniatura (tipo no canto superior, formato no inferior), iguais aos da home */
.ms-resource-card .geoinfo-resource-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--gi-sh-1);
  pointer-events: none;
}
.ms-resource-card .geoinfo-resource-format {
  position: absolute;
  right: 10px;
  top: calc(100cqw * 1.08 / 2 - 33px); /* base da miniatura (proporção 2:1,08) − 10 px − altura do selo */
  z-index: 3;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(14, 26, 20, .74);
  color: #fff;
  font-family: var(--gi-mono);
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
}
/* Texto: título em 2 linhas; abaixo, tema · data e os botões no fim da linha */
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body > .ms-flex-fill,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body > .ms-flex-fill {
  flex-flow: row wrap !important;
  align-items: center;
  gap: 6px 8px;
  min-height: 0;
  padding: 12px 0 0 !important;
}
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header { flex: 0 0 100%; align-items: flex-start !important; min-width: 0; }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header .glyphicon,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header .glyphicon { display: none; } /* o tipo está no selo da miniatura */
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header [class*="ms-text"],
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header [class*="ms-text"] {
  min-height: 2.7em; /* sempre 2 linhas: todos os cards com a mesma altura */
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal !important; /* o _ellipsis do MapStore quebrava palavras no meio */
  white-space: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color .15s;
}
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid:hover .ms-resource-card-body-header [class*="ms-text"],
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid:hover .ms-resource-card-body-header [class*="ms-text"] { color: var(--gi-green-700); }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body .ms-resource-status { align-self: flex-start; }
.ms-resource-card.ms-resource-card-type-grid .geoinfo-card-subtype { display: none !important; } /* só alimenta o selo de formato */
.ms-resource-card.ms-resource-card-type-grid .geoinfo-card-category {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--gi-green-700);
  font-family: var(--gi-font);
  font-size: 12.5px !important;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.ms-resource-card.ms-resource-card-type-grid .geoinfo-card-category::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gi-green); }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-footer,
.geoinfo-global-shell .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-footer {
  flex: 1 0 auto;
  gap: 8px;
  margin: 0 !important;
  color: var(--gi-muted);
  font-family: var(--gi-font);
  font-size: 12.5px;
}
.ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-footer > .ms-flex-fill { flex: 1 1 auto; min-width: 0; }
.ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-footer .ms-text { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px !important; white-space: nowrap; }
/* ponto separador entre o tema e a data, como na home */
.ms-resource-card.ms-resource-card-type-grid .geoinfo-card-category ~ .ms-resource-card-body-footer .geoinfo-card-date::before { content: ''; flex: none; width: 3px; height: 3px; border-radius: 50%; background: #B3BDB7; }
.gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-buttons { flex: none; margin-left: auto; }
.gn-catalogue .ms-resource-card .ms-resource-card-buttons .btn,
.gn-catalogue .ms-resource-card .ms-resource-card-action-buttons .dropdown-toggle {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--gi-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  color: var(--gi-ink-2);
  box-shadow: var(--gi-sh-1);
}
.gn-catalogue .ms-resource-card .ms-resource-card-buttons .btn:hover { border-color: var(--gi-green-200); color: var(--gi-green-700); }
.gn-catalogue .ms-resource-card .ms-resource-card-action-buttons { z-index: 4; }

/* Alternador grade/lista na barra do catálogo (injetado pelo _geonode_config.html): mesmas medidas da home,
   sem herdar o estilo de botão da barra (altura, borda e sombra). */
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle { flex: none; }
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle button {
  width: 32px;
  height: 30px;
  padding: 0;
  font-size: 0;
  box-shadow: none;
}
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle button:hover { color: var(--gi-ink); }
.gn-catalogue .ms-resources-menu .geoinfo-view-toggle button:focus-visible { outline: 2px solid var(--gi-green); outline-offset: 1px; }

/* Catálogo em lista: o mesmo card, no formato dos cards de lista da home (miniatura à esquerda, tipo em caixa-alta,
   título e tema · data), em colunas de no mínimo 420 px. */
.ms-resource-card .geoinfo-card-kind { display: none; }
html.geoinfo-catalogue-list .gn-catalogue .ms-resources-container-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
  gap: 14px 24px !important;
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid {
  --gi-card-thumb-ratio: 2 / 1.25;
  --gi-list-thumb-width: 150px;
  border: 1px solid var(--gi-line-2);
  border-radius: var(--gi-r-md);
  transition: border-color .2s, background-color .2s;
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid:hover { border-color: var(--gi-green-200); background: var(--gi-surface); }
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid::after {
  top: 8px;
  left: 8px;
  width: var(--gi-list-thumb-width);
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 8px;
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-img {
  align-self: flex-start;
  width: var(--gi-list-thumb-width);
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body > .ms-flex-fill {
  flex: 1 1 auto;
  gap: 4px 8px;
  min-width: 0;
  padding: 0 !important;
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card .geoinfo-resource-badge,
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card .geoinfo-resource-format { display: none; }
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card .geoinfo-card-kind {
  display: inline-flex;
  flex: 0 0 100%;
  align-items: center;
  gap: 5px;
  color: var(--gi-muted);
  font-family: var(--gi-font);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
}
html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid .ms-resource-card-body-header [class*="ms-text"] { font-size: 14.5px; }
@media (max-width: 600px) {
  html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card.ms-resource-card-type-grid { --gi-list-thumb-width: 112px; }
  /* card estreito: tema numa linha e a data na seguinte, sem o ponto separador no começo da linha */
  html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card .geoinfo-card-category { flex-basis: 100%; }
  html.geoinfo-catalogue-list .gn-catalogue .ms-resource-card .geoinfo-card-category ~ .ms-resource-card-body-footer .geoinfo-card-date::before { display: none; }
}

/* Lista (modo tabela/lista do MapStore) */
.gn-catalogue .ms-resource-card.ms-resource-card-type-list { border: 1px solid var(--gi-line); border-radius: var(--gi-r-md); background: #fff; }

/* Paginação: o mesmo desenho do paginador da home (.geoinfo-recent-pager), só com CSS sobre o Pagination do
   React-Bootstrap (ul.pagination.custom > li > a): páginas num trilho claro, a atual em branco com sombra, e as
   setas em botões de 38 px. A marcação do MapStore não traz o intervalo ("17–32 de 1.272") nem rótulos nas setas
   (o total já aparece no topo, "1.272 recursos encontrados"). Seletores com .msgapi para vencer o geonode.css. */
/* A faixa branca da paginação é sticky no rodapé (MapStore), mas sem z-index: ao rolar no celular, ou com a janela
   reduzida depois de carregar, as etiquetas e as ações dos cards (z-index 3 e 4) passavam por cima das setas e da página 1. */
.msgapi .gn-catalogue .ms-main-colors:has(> .pagination.custom) { z-index: 5; }
.msgapi .gn-catalogue .pagination.custom { display: flex; align-items: center; margin: 0; padding: 0; }
.msgapi .gn-catalogue .pagination.custom > li { display: flex; align-items: center; justify-content: center; }
/* trilho: do segundo ao penúltimo item (o primeiro e o último são as setas) */
.msgapi .gn-catalogue .pagination.custom > li:not(:first-child):not(:last-child) {
  gap: 0;
  height: 38px;
  padding: 3px 1px;
  border-top: 1px solid var(--gi-line);
  border-bottom: 1px solid var(--gi-line);
  background: var(--gi-surface);
}
.msgapi .gn-catalogue .pagination.custom > li:nth-child(2) {
  margin-left: 8px;
  padding-left: 3px;
  border-left: 1px solid var(--gi-line);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.msgapi .gn-catalogue .pagination.custom > li:nth-last-child(2) {
  margin-right: 8px;
  padding-right: 3px;
  border-right: 1px solid var(--gi-line);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.msgapi .gn-catalogue .pagination.custom > li > a,
.msgapi .gn-catalogue .pagination.custom > li > span {
  display: grid;
  place-items: center;
  float: none;
  min-width: 32px;
  height: 30px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 8px !important;
  background: transparent;
  box-shadow: none;
  color: var(--gi-muted);
  font-family: var(--gi-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}
.msgapi .gn-catalogue .pagination.custom > li > a:hover { background: rgba(255, 255, 255, .75); color: var(--gi-ink); }
.msgapi .gn-catalogue .pagination.custom > .active > a,
.msgapi .gn-catalogue .pagination.custom > .active > a:hover,
.msgapi .gn-catalogue .pagination.custom > .active > a:focus {
  background: #fff;
  color: var(--gi-green-700);
  font-weight: 600;
  box-shadow: var(--gi-sh-1), inset 0 0 0 1px var(--gi-green-100);
}
/* reticências */
.msgapi .gn-catalogue .pagination.custom > .disabled:not(:first-child):not(:last-child) > a { min-width: 24px; padding: 0; color: var(--gi-subtle); }
.msgapi .gn-catalogue .pagination.custom > .disabled:not(:first-child):not(:last-child) > a > span {
  display: block;
  width: 16px;
  height: 16px;
  overflow: hidden;
  font-size: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/g%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/g%3E%3C/svg%3E") center / 16px no-repeat;
}
/* setas */
.msgapi .gn-catalogue .pagination.custom > li:first-child > a,
.msgapi .gn-catalogue .pagination.custom > li:last-child > a {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--gi-line);
  border-radius: 10px !important;
  background: #fff;
  color: var(--gi-ink-2);
}
.msgapi .gn-catalogue .pagination.custom > li:first-child:not(.disabled) > a:hover,
.msgapi .gn-catalogue .pagination.custom > li:last-child:not(.disabled) > a:hover { border-color: var(--gi-green-200); background: var(--gi-green-50); color: var(--gi-green-700); }
.msgapi .gn-catalogue .pagination.custom > li.disabled:first-child > a,
.msgapi .gn-catalogue .pagination.custom > li.disabled:last-child > a { border-color: var(--gi-line-2); background: transparent; color: #B3BDB7; }
/* o glifo do MapStore dá lugar ao mesmo chevron da home; o span com aria-label continua (nome do botão) */
.msgapi .gn-catalogue .pagination.custom > li:first-child .glyphicon,
.msgapi .gn-catalogue .pagination.custom > li:last-child .glyphicon { display: none; }
.msgapi .gn-catalogue .pagination.custom > li:first-child > a > span,
.msgapi .gn-catalogue .pagination.custom > li:last-child > a > span {
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.msgapi .gn-catalogue .pagination.custom > li:last-child > a > span { transform: scaleX(-1); }
.msgapi .gn-catalogue .pagination.custom > li > a:focus-visible { outline: none; box-shadow: var(--gi-focus); }
.msgapi .gn-catalogue .pagination.custom > li:first-child > a:focus-visible,
.msgapi .gn-catalogue .pagination.custom > li:last-child > a:focus-visible { border-color: var(--gi-green); }

/* Painel de filtros (vira barra lateral fixa no desktop — ver _geonode_config.html) */
.gn-catalogue .ms-resources-filter {
  border-right: 1px solid var(--gi-line);
  background: #fff !important;
  box-shadow: none !important;
  font-family: var(--gi-font);
}
.gn-catalogue .ms-filters-form > div:first-child {
  padding: 18px 18px 12px !important;
  border-bottom: 1px solid var(--gi-line-2);
  background: #fff !important;
}
.gn-catalogue .ms-filters-form > div:first-child .ms-text { color: var(--gi-ink); font-size: 16px !important; font-weight: 650; letter-spacing: -0.02em; }
.gn-catalogue .ms-filters-form .btn {
  border: 1px solid var(--gi-line);
  border-radius: 8px;
  background: #fff;
  color: var(--gi-ink-2);
  font-weight: 600;
  box-shadow: none;
}
.gn-catalogue .ms-filters-form .btn:hover { color: var(--gi-green-700); border-color: var(--gi-green-200); }
.gn-catalogue .ms-filters-form form { gap: 16px !important; padding-top: 16px !important; padding-bottom: 24px !important; }
.gn-catalogue .ms-filters-form input.form-control,
.gn-catalogue .ms-filters-form .rw-widget,
.gn-catalogue .ms-filters-form .Select-control {
  min-height: 38px;
  border: 1px solid var(--gi-line) !important;
  border-radius: 10px !important;
  background: var(--gi-surface) !important;
  box-shadow: none !important;
  font-family: var(--gi-font);
  font-size: 14px;
}
.gn-catalogue .ms-filters-form input.form-control:focus,
.gn-catalogue .ms-filters-form .is-focused .Select-control { border-color: var(--gi-green) !important; background: #fff !important; box-shadow: var(--gi-focus) !important; }
.gn-catalogue .ms-filters-form label,
.gn-catalogue .ms-filters-form .ms-text._strong { color: var(--gi-ink); font-size: 13.5px; font-weight: 600; }
.gn-catalogue .ms-filters-form .checkbox label { color: var(--gi-ink-2); font-weight: 400; font-size: 14px; }
.gn-catalogue .ms-filters-form input[type="checkbox"] { accent-color: var(--gi-green); }
.gn-catalogue .ms-filters-form .Select-value { border-color: var(--gi-green-200) !important; border-radius: 6px !important; background: var(--gi-green-50) !important; color: var(--gi-green-700) !important; }

/* Detalhe do recurso (painel lateral) */
.gn-catalogue .ms-details-panel,
.gn-catalogue .ms-resource-detail {
  border-left: 1px solid var(--gi-line);
  background: #fff;
  font-family: var(--gi-font);
  box-shadow: -18px 0 40px -30px rgba(14, 26, 20, .35);
}
.gn-catalogue .ms-details-panel h1,
.gn-catalogue .ms-details-panel h2,
.gn-catalogue .ms-details-panel .ms-details-title {
  color: var(--gi-ink);
  font-family: var(--gi-font);
  font-weight: 650;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.gn-catalogue .ms-details-panel .nav-tabs > li > a { border: 0; color: var(--gi-muted); font-weight: 500; }
.gn-catalogue .ms-details-panel .nav-tabs > li.active > a,
.gn-catalogue .ms-details-panel .nav-tabs > li > a:hover { border: 0; border-bottom: 2px solid var(--gi-green); background: transparent; color: var(--gi-ink); }
.gn-catalogue .ms-details-panel table td,
.gn-catalogue .ms-details-panel table th { border-color: var(--gi-line-2) !important; font-size: 13.5px; }
.gn-catalogue .ms-details-panel a { color: var(--gi-green-700); }

.gn-catalogue .geoinfo-generated-detail-document-thumb-host,
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-host {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F3F7F4, #E4EEE7);
}
.gn-catalogue .geoinfo-generated-detail-document-thumb-overlay,
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.gn-catalogue .geoinfo-generated-detail-document-thumb-host .btn,
.gn-catalogue .geoinfo-generated-detail-document-thumb-host button,
.gn-catalogue .geoinfo-generated-detail-document-thumb-host a,
.gn-catalogue .geoinfo-generated-detail-document-thumb-host [role="button"],
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-host .btn,
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-host button,
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-host a,
.geoinfo-global-shell .geoinfo-generated-detail-document-thumb-host [role="button"] { position: relative; z-index: 2; }

/* Barra de ações do visualizador (Visualizar / Baixar) */
.gn-catalogue .gn-viewer-layout-header,
.gn-catalogue .ms-action-navbar { border-bottom: 1px solid var(--gi-line); background: #fff !important; }
.gn-catalogue .gn-viewer-layout-header .btn,
.gn-catalogue .ms-action-navbar .btn { border-radius: 8px; font-family: var(--gi-font); font-weight: 600; }

/* Detalhe: correções de layout do metadado (workaround GeoNode 5.0.x — manter) */
html.geoinfo-catalogue-detail-open,
body.geoinfo-catalogue-detail-open {
  overflow: hidden !important;
  height: 100vh !important;
}
body.geoinfo-catalogue-detail-open .gn-page-wrapper,
body.geoinfo-catalogue-detail-open .gn-catalogue {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
body.geoinfo-catalogue-detail-open .geoinfo-main-header,
body.geoinfo-catalogue-detail-open .geoinfo-footer { flex: 0 0 auto; }
body.geoinfo-catalogue-detail-open .geoinfo-catalogue-shell {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden;
}
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit {
  box-sizing: border-box;
  min-width: 0 !important;
  width: var(--geoinfo-detail-metadata-width, 100%) !important;
  max-width: var(--geoinfo-detail-metadata-width, 100%) !important;
  overflow-x: auto;
}
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .gn-metadata-view,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .gn-metadata,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .gn-metadata-layout,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .gn-metadata-groups {
  min-width: 0 !important;
  max-width: 100% !important;
}
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit-parent {
  box-sizing: border-box;
  min-width: 0 !important;
  max-width: var(--geoinfo-detail-metadata-width, 100%) !important;
}
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore iframe.geoinfo-detail-metadata-fit { display: block; border: 0; }
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit h1,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit h2,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit h3,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit td,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit th,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit a,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit .gn-metadata-title,
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit .gn-metadata-group-value { overflow-wrap: anywhere; word-break: normal; }
body.geoinfo-catalogue-detail-open #ms-container.geoinfo-catalogue-mapstore .geoinfo-detail-metadata-fit table { max-width: 100%; }
.msgapi .gn-metadata-page .gn-metadata-view,
.msgapi .gn-metadata-page .gn-metadata { width: 100%; min-width: 0; overflow-x: hidden; font-family: var(--gi-font); }
.msgapi .gn-metadata-page .gn-metadata-container {
  box-sizing: border-box;
  width: calc(100% - 96px) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 48px !important;
  margin-right: 48px !important;
}
.msgapi .gn-metadata-page .gn-metadata-layout,
.msgapi .gn-metadata-page .gn-metadata-groups { min-width: 0 !important; max-width: 100% !important; }
.msgapi .gn-metadata-page .gn-metadata-title,
.msgapi .gn-metadata-page .gn-metadata-group-value,
.msgapi .gn-metadata-page .gn-metadata-group-value a { overflow-wrap: anywhere; }
.msgapi .gn-metadata-page .gn-metadata-title { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.25; }

/* ---------- Responsivo ---------- */
@media (min-width: 1680px) {
  :root { --gi-gutter: 40px; }
}
@media (max-width: 1280px) {
  :root { --gi-gutter: 20px; }
}
@media (max-width: 1100px) {
  :root { --gi-gutter: 16px; }
}
@media (max-width: 900px) {
  .msgapi .gn-metadata-page .gn-metadata-container { width: calc(100% - 32px) !important; margin-left: 16px !important; margin-right: 16px !important; }
  .gn-catalogue .ms-resources-container > div { padding: 0 16px 24px; }
}
@media (max-width: 600px) {
  .geoinfo-login-topbar { padding: 16px; }
  .geoinfo-login-back span { display: none; }
  .geoinfo-login-stage { place-items: start center; padding-top: 8px; }
  .geoinfo-login-card { padding: 24px 20px; border: 0; background: transparent; box-shadow: none; }
  .geoinfo-login-foot { flex-direction: column; gap: 8px; }
  .gn-catalogue .ms-resources-menu > .ms-text { font-size: 24px !important; }
  .gn-catalogue .ms-resources-container-grid { grid-template-columns: 1fr; }
}

/* ---------- Links de acesso rápido da home ---------- */
/* Discretos, no topo da coluna da busca. FAQ e Qualidade de metadados só para logados;
   Metadados e Website do projeto para todos. Quebram linha alinhados à direita quando falta espaço. */
.geoinfo-hero .geoinfo-band-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px 6px;
  margin: -6px -10px 10px 0;
}
.geoinfo-hero .geoinfo-band-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--gi-ink-2);
  font-family: var(--gi-font);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.geoinfo-hero .geoinfo-band-link svg { flex: none; color: var(--gi-green); }
.geoinfo-hero .geoinfo-band-link .geoinfo-band-link-ext { color: var(--gi-subtle); }
.geoinfo-hero .geoinfo-band-link:hover { background: rgba(6, 120, 62, .07); color: var(--gi-green-700); }
.geoinfo-hero .geoinfo-band-link:focus-visible { outline: none; box-shadow: var(--gi-focus); }
/* Quando a coluna da busca fica estreita, os 4 links viram uma grade 2 × 2 (evita um link sozinho na 2ª linha). */
.geoinfo-hero .geoinfo-band-search { container: band-search / inline-size; }
@container band-search (max-width: 719px) {
  .geoinfo-hero .geoinfo-band-links { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: end; column-gap: 6px; }
}
@media (max-width: 1023px) {
  .geoinfo-hero .geoinfo-band-links { justify-content: start; margin: 0 0 8px -10px; }
}

/* ---------- Perguntas frequentes (/faq/) ---------- */
.geoinfo-faq { font-family: var(--gi-font); color: var(--gi-ink); }
.geoinfo-faq a { color: var(--gi-green-700); }
.geoinfo-faq a:hover { color: var(--gi-green); }
.geoinfo-faq-band {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gi-line);
  background: linear-gradient(90deg, #fff 0%, #fff 45%, #F2F8F4 100%);
}
.geoinfo-faq-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(6, 120, 62, .14) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  pointer-events: none;
}
.geoinfo-faq-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin: 0 auto;
  padding: 30px 0 30px;
}
.geoinfo-faq-band-inner > * { min-width: 0; }
.geoinfo-faq .geoinfo-breadcrumb { display: flex; gap: 6px; color: var(--gi-muted); font-size: 13px; }
.geoinfo-faq .geoinfo-breadcrumb a { color: var(--gi-muted); }
.geoinfo-faq-band h1 { margin: 8px 0 0; color: var(--gi-ink); font-family: var(--gi-font); font-size: 32px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.12; }
.geoinfo-faq-band h1 em { font-style: normal; color: var(--gi-green); }
.geoinfo-faq-lead { margin: 6px 0 0; color: var(--gi-muted); font-size: 15px; }
.geoinfo-faq-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--gi-muted); font-size: 13.5px; }
.geoinfo-faq-meta b { color: var(--gi-ink); font-family: var(--gi-mono); font-size: 15px; font-weight: 600; }
.geoinfo-faq-searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 8px 0 18px;
  border: 1px solid #D5DDD7;
  border-radius: 14px;
  background: #fff;
  color: var(--gi-muted);
  box-shadow: var(--gi-sh-2), 0 0 0 5px rgba(6, 120, 62, .05);
  transition: border-color .15s, box-shadow .15s;
}
.geoinfo-faq-searchbox:focus-within { border-color: var(--gi-green); box-shadow: var(--gi-sh-2), 0 0 0 5px rgba(6, 120, 62, .14); }
.geoinfo-faq-searchbox input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: transparent; color: var(--gi-ink); font-family: var(--gi-font); font-size: 15.5px; box-shadow: none; }
.geoinfo-faq-searchbox input::placeholder { color: #7B8A82; }
.geoinfo-faq-searchbox input::-webkit-search-cancel-button { display: none; }
.geoinfo-faq-clear { height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--gi-surface); color: var(--gi-ink-2); font-family: var(--gi-font); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.geoinfo-faq-clear[hidden] { display: none; }
.geoinfo-faq-status { min-height: 1.4em; margin: 8px 2px 0; color: var(--gi-green-700); font-size: 13.5px; font-weight: 500; }

.geoinfo-faq-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin: 0 auto;
  padding: 32px 0 0;
  align-items: start;
}
.geoinfo-faq-layout > * { min-width: 0; }
.geoinfo-faq-aside { position: sticky; top: calc(var(--gi-nav-h) + 20px); display: flex; flex-direction: column; gap: 14px; }
.geoinfo-faq-aside-title { margin: 0; color: var(--gi-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.geoinfo-faq-topics { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.geoinfo-faq-topics a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--gi-ink-2) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.geoinfo-faq-topics a em { margin-left: auto; color: #8A978F; font-family: var(--gi-mono); font-size: 12px; font-style: normal; }
.geoinfo-faq-topics a:hover { background: var(--gi-surface); color: var(--gi-ink) !important; }
.geoinfo-faq-topics a.is-active { background: var(--gi-green-50); color: var(--gi-green-700) !important; font-weight: 600; }
.geoinfo-faq-topic-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--gi-green-50); color: var(--gi-green); }
.geoinfo-faq-topics a.is-active .geoinfo-faq-topic-ic { background: var(--gi-green); color: #fff; }
.geoinfo-faq-toggle-all { align-self: flex-start; height: 34px; padding: 0 12px; border: 1px solid var(--gi-line); border-radius: 9px; background: #fff; color: var(--gi-ink-2); font-family: var(--gi-font); font-size: 13px; font-weight: 600; cursor: pointer; }
.geoinfo-faq-toggle-all:hover { border-color: var(--gi-green-200); color: var(--gi-green-700); }
.geoinfo-faq-aside-card { padding: 14px; border: 1px solid var(--gi-line); border-radius: 14px; background: var(--gi-surface); font-size: 13px; }
.geoinfo-faq-aside-card p { margin: 0 0 8px; color: var(--gi-muted); }
.geoinfo-faq-aside-card a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

.geoinfo-faq-content { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.geoinfo-faq-topic { scroll-margin-top: calc(var(--gi-nav-h) + 16px); }
.geoinfo-faq-topic[hidden] { display: none; }
.geoinfo-faq-topic h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--gi-ink); font-family: var(--gi-font); font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.geoinfo-faq-topic h2 .geoinfo-faq-topic-ic { width: 32px; height: 32px; }
.geoinfo-faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--gi-line);
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: calc(var(--gi-nav-h) + 16px);
  transition: border-color .15s, box-shadow .15s;
}
.geoinfo-faq-item[hidden] { display: none; }
.geoinfo-faq-item:hover { border-color: var(--gi-green-200); }
.geoinfo-faq-item[open] { border-color: var(--gi-green-200); box-shadow: var(--gi-sh-2); }
.geoinfo-faq-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
}
.geoinfo-faq-item summary::-webkit-details-marker { display: none; }
.geoinfo-faq-item summary:focus-visible { outline: none; border-radius: 14px; box-shadow: var(--gi-focus); }
.geoinfo-faq-num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--gi-surface); color: var(--gi-muted); font-family: var(--gi-mono); font-size: 13px; font-weight: 600; }
.geoinfo-faq-item[open] .geoinfo-faq-num { background: var(--gi-green); color: #fff; }
.geoinfo-faq-q { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.geoinfo-faq-chevron { flex: none; color: var(--gi-muted); transition: transform .2s; }
.geoinfo-faq-item[open] .geoinfo-faq-chevron { transform: rotate(180deg); color: var(--gi-green); }
.geoinfo-faq-answer { padding: 0 22px 18px 64px; color: var(--gi-ink-2); font-size: 15px; line-height: 1.65; }
.geoinfo-faq-answer > * + * { margin-top: 12px; }
.geoinfo-faq-answer > * { max-width: 920px; }
.geoinfo-faq-answer p { margin: 0; }
.geoinfo-faq-answer code { padding: 1px 6px; border-radius: 6px; background: var(--gi-surface); border: 1px solid var(--gi-line-2); color: var(--gi-ink); font-family: var(--gi-mono); font-size: 13px; }
.geoinfo-faq-answer kbd { padding: 1px 6px; border: 1px solid var(--gi-line); border-bottom-width: 2px; border-radius: 6px; background: #fff; color: var(--gi-ink-2); font-family: var(--gi-mono); font-size: 12px; box-shadow: none; }
.geoinfo-faq-ui { display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--gi-green-200); border-radius: 7px; background: var(--gi-green-50); color: var(--gi-green-700); font-size: 13.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.geoinfo-faq-steps { margin: 0; padding: 0; list-style: none; counter-reset: faq-step; }
.geoinfo-faq-steps li { position: relative; padding: 2px 0 10px 40px; counter-increment: faq-step; }
.geoinfo-faq-steps li::before {
  content: counter(faq-step);
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gi-green-50);
  color: var(--gi-green-700);
  font-family: var(--gi-mono);
  font-size: 12.5px;
  font-weight: 600;
}
.geoinfo-faq-steps li:not(:last-child)::after { content: ''; position: absolute; left: 12.5px; top: 30px; bottom: 0; width: 1px; background: var(--gi-line); }
.geoinfo-faq-list { margin: 0; padding-left: 20px; }
.geoinfo-faq-list li { margin-bottom: 6px; }
.geoinfo-faq-list li::marker { color: var(--gi-green); }
.geoinfo-faq-callout { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 14.5px; line-height: 1.55; }
.geoinfo-faq-callout-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.geoinfo-faq-callout.is-tip { border-color: var(--gi-green-200); background: var(--gi-green-50); }
.geoinfo-faq-callout.is-tip .geoinfo-faq-callout-label { color: var(--gi-green-700); }
.geoinfo-faq-callout.is-important { border-color: #C9D9EC; background: #F2F6FB; }
.geoinfo-faq-callout.is-important .geoinfo-faq-callout-label { color: var(--gi-blue); }
.geoinfo-faq-callout.is-attention { border-color: #F2DFB5; background: #FDF8EC; }
.geoinfo-faq-callout.is-attention .geoinfo-faq-callout-label { color: #8A5A00; }
.geoinfo-faq-item-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.geoinfo-faq-copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--gi-muted); font-family: var(--gi-font); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.geoinfo-faq-copy:hover { background: var(--gi-surface); color: var(--gi-green-700); }
.geoinfo-faq-empty { display: flex; flex-direction: column; gap: 4px; padding: 28px; border: 1px dashed var(--gi-line); border-radius: 14px; background: var(--gi-surface); color: var(--gi-muted); text-align: center; }
.geoinfo-faq-empty[hidden] { display: none; }
.geoinfo-faq-empty b { color: var(--gi-ink); }
.geoinfo-faq-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--gi-green-900);
  color: #fff;
}
.geoinfo-faq-contact h2 { margin: 0; color: #fff; font-family: var(--gi-font); font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.geoinfo-faq-contact p { margin: 4px 0 0; color: rgba(255, 255, 255, .74); font-size: 14.5px; }
.geoinfo-faq-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.geoinfo-faq .geoinfo-faq-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.geoinfo-faq .geoinfo-faq-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.geoinfo-faq .geoinfo-faq-btn.is-primary { border-color: #fff; background: #fff; color: var(--gi-green-900); }
.geoinfo-faq .geoinfo-faq-btn.is-primary:hover { background: var(--gi-green-50); color: var(--gi-green-900); }
.geoinfo-faq-contact .geoinfo-faq-source { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.geoinfo-faq-contact .geoinfo-faq-source a { color: #BFE8D4; }

@media (max-width: 1000px) {
  .geoinfo-faq-band-inner { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .geoinfo-faq-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 18px; }
  .geoinfo-faq-aside { position: static; }
  .geoinfo-faq-aside-title, .geoinfo-faq-aside-card { display: none; }
  .geoinfo-faq-topics { flex-direction: row; overflow-x: auto; gap: 8px; margin-right: calc(var(--gi-gutter) * -1); padding-right: var(--gi-gutter); scrollbar-width: none; }
  .geoinfo-faq-topics::-webkit-scrollbar { display: none; }
  .geoinfo-faq-topics a { flex: none; height: 38px; padding: 0 12px 0 6px; border: 1px solid var(--gi-line); border-radius: 999px; white-space: nowrap; }
  .geoinfo-faq-topics a em { margin-left: 2px; }
}
@media (max-width: 600px) {
  .geoinfo-faq-band-inner { padding: 20px 0; }
  .geoinfo-faq-band h1 { font-size: 26px; }
  .geoinfo-faq-lead { display: none; }
  .geoinfo-faq-item summary { gap: 10px; padding: 14px; }
  .geoinfo-faq-num { width: 28px; height: 28px; font-size: 12px; }
  .geoinfo-faq-q { font-size: 15px; }
  .geoinfo-faq-answer { padding: 0 14px 14px; font-size: 14.5px; }
  .geoinfo-faq-ui { white-space: normal; }
  .geoinfo-faq-contact { grid-template-columns: 1fr; padding: 20px; }
  .geoinfo-faq .geoinfo-faq-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Página pública do recurso (/datasets/<alternate>, /maps/<id>, /documents/<id>, /apps/<id>) ---------- */
.geoinfo-resource { font-family: var(--gi-font); color: var(--gi-ink); padding-bottom: 48px; }
.geoinfo-resource a { color: var(--gi-green-700); }
.geoinfo-resource a:hover { color: var(--gi-green); }
.geoinfo-resource-band { position: relative; overflow: hidden; border-bottom: 1px solid var(--gi-line); background: linear-gradient(90deg, #fff 0%, #fff 45%, #F2F8F4 100%); }
.geoinfo-resource-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(6, 120, 62, .14) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  pointer-events: none;
}
.geoinfo-resource-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin: 0 auto;
  padding: 28px 0;
}
.geoinfo-resource .geoinfo-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; color: var(--gi-muted); font-size: 13px; }
.geoinfo-resource .geoinfo-breadcrumb a { color: var(--gi-muted); }
.geoinfo-resource-kicker { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; font-size: 12.5px; font-weight: 600; }
.geoinfo-resource-kicker span { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--gi-surface); border: 1px solid var(--gi-line); color: var(--gi-ink-2); }
.geoinfo-resource-kicker .geoinfo-resource-type { background: var(--gi-green-50); border-color: var(--gi-green-200); color: var(--gi-green-700); }
.geoinfo-resource-band h1 { max-width: 1100px; margin: 10px 0 0; color: var(--gi-ink); font-family: var(--gi-font); font-size: 30px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.geoinfo-resource-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 0; color: var(--gi-muted); font-size: 13.5px; }
.geoinfo-resource-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.geoinfo-resource .geoinfo-resource-cta { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; background: var(--gi-green); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: var(--gi-sh-2); }
.geoinfo-resource .geoinfo-resource-cta:hover { background: var(--gi-green-700); color: #fff; }
.geoinfo-resource .geoinfo-resource-cta:focus-visible,
.geoinfo-resource .geoinfo-resource-secondary:focus-visible { outline: none; box-shadow: var(--gi-focus); }
.geoinfo-resource .geoinfo-resource-secondary { color: var(--gi-ink-2); font-size: 13.5px; font-weight: 500; }

.geoinfo-resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2);
  margin: 0 auto;
  padding: 32px 0 0;
  align-items: start;
}
.geoinfo-resource-content { display: flex; flex-direction: column; gap: 28px; min-width: 0; max-width: 980px; }
.geoinfo-resource-content h2,
.geoinfo-resource-related h2 { margin: 0 0 10px; color: var(--gi-ink); font-family: var(--gi-font); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.geoinfo-resource-thumb { margin: 0; }
.geoinfo-resource-thumb img { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--gi-line); border-radius: 14px; background: var(--gi-surface); }
.geoinfo-resource-text { color: var(--gi-ink-2); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.geoinfo-resource-text > * + * { margin-top: 12px; }
.geoinfo-resource-text p { margin: 0; }
.geoinfo-resource-text table { max-width: 100%; border-collapse: collapse; font-size: 14px; }
.geoinfo-resource-text td,
.geoinfo-resource-text th { padding: 6px 10px; border: 1px solid var(--gi-line); vertical-align: top; }
.geoinfo-resource-empty { margin: 0; color: var(--gi-muted); }
.geoinfo-resource-content code,
.geoinfo-resource-mono { font-family: var(--gi-mono); font-size: 13px; }
.geoinfo-resource-content code { padding: 1px 6px; border-radius: 6px; background: var(--gi-surface); border: 1px solid var(--gi-line-2); color: var(--gi-ink); overflow-wrap: anywhere; }
.geoinfo-resource-services { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.geoinfo-resource-services li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.geoinfo-resource-services span { flex: none; width: 48px; color: var(--gi-green-700); font-family: var(--gi-mono); font-size: 13px; font-weight: 600; }

.geoinfo-resource-aside { position: sticky; top: calc(var(--gi-nav-h) + 20px); padding: 18px; border: 1px solid var(--gi-line); border-radius: 16px; background: var(--gi-surface); }
.geoinfo-resource-facts { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.geoinfo-resource-facts dt { margin: 0 0 3px; color: var(--gi-muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.geoinfo-resource-facts dd { margin: 0; color: var(--gi-ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.geoinfo-resource-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.geoinfo-resource-tags li { padding: 2px 9px; border: 1px solid var(--gi-line); border-radius: 999px; background: #fff; color: var(--gi-ink-2); font-size: 13px; }

.geoinfo-resource-related { width: min(var(--gi-wrap), 100% - var(--gi-gutter) * 2); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--gi-line); }
.geoinfo-resource-related ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.geoinfo-resource-related a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px; border: 1px solid var(--gi-line); border-radius: 12px; background: #fff; color: var(--gi-ink) !important; font-size: 14px; font-weight: 500; line-height: 1.35; }
.geoinfo-resource-related a:hover { border-color: var(--gi-green-200); box-shadow: var(--gi-sh-1); }
.geoinfo-resource-related img { flex: none; width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--gi-surface); }
.geoinfo-resource-related span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.geoinfo-resource-related em { color: var(--gi-muted); font-size: 12px; font-style: normal; font-weight: 600; }

@media (max-width: 1000px) {
  .geoinfo-resource-band-inner { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .geoinfo-resource-actions { align-items: flex-start; }
  .geoinfo-resource-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .geoinfo-resource-aside { position: static; }
}
@media (max-width: 600px) {
  .geoinfo-resource-band-inner { padding: 20px 0; }
  .geoinfo-resource-band h1 { font-size: 24px; }
  .geoinfo-resource .geoinfo-resource-cta { width: 100%; justify-content: center; }
  .geoinfo-resource-actions { align-items: stretch; }
  .geoinfo-resource-related ul { grid-template-columns: 1fr; }
}

/* ---------- Home: modo compacto em telas baixas (fica no fim para prevalecer sobre as regras base) ---------- */
/* Desktop com altura até 1000 px: faixa de entrada enxuta para sobrar altura para os cards.
   Mesma disposição das telas altas (título + números | links de acesso rápido sobre a busca), com
   tipografia e espaçamentos menores; os links ficam numa única fileira quando cabem (senão, grade 2 × 2). */
@media (min-width: 1024px) and (max-height: 1000px) {
  .geoinfo-hero .geoinfo-band-inner { gap: 40px; padding: 18px 0 20px; }
  .geoinfo-hero .geoinfo-band-links { margin: -4px -7px 6px 0; }
  .geoinfo-hero .geoinfo-band-link { height: 28px; padding: 0 7px; font-size: 12.5px; }
  @container band-search (min-width: 660px) {
    .geoinfo-hero .geoinfo-band-links { display: flex; justify-content: flex-end; gap: 2px; }
  }
  .geoinfo-hero h1 { font-size: 26px; }
  .geoinfo-hero .geoinfo-hero-text { display: none; }
  .geoinfo-hero .geoinfo-metrics { margin-top: 10px; }
  .geoinfo-hero .geoinfo-hero-searchbox { height: 54px; }
  .geoinfo-home .geoinfo-themes { padding-top: 12px; }
  .geoinfo-home .geoinfo-section { padding-top: 14px; }
  .geoinfo-home .geoinfo-section-header { align-items: center; row-gap: 10px; margin-bottom: 12px; }
}
/* Desktop com altura até 800 px (notebooks, 1024 × 768, zoom de 125%): tudo um pouco mais enxuto para caber ao
   menos uma linha de cards, o paginador e o rodapé sem rolagem, mesmo com os temas à mostra. */
@media (min-width: 1024px) and (max-height: 800px) {
  .geoinfo-hero .geoinfo-band-inner { padding: 12px 0 13px; }
  .geoinfo-hero .geoinfo-band-links { margin-bottom: 4px; }
  .geoinfo-hero .geoinfo-band-link { height: 24px; }
  .geoinfo-hero h1 { font-size: 23px; }
  .geoinfo-hero .geoinfo-metrics { row-gap: 4px; margin-top: 6px; }
  .geoinfo-hero .geoinfo-hero-searchbox { height: 48px; }
  .geoinfo-hero .geoinfo-hero-searchbox input { height: 40px; }
  .geoinfo-hero .hero-search-btn { height: 38px; }
  .geoinfo-home .geoinfo-themes { padding-top: 8px; }
  .geoinfo-home .geoinfo-category-pill,
  .geoinfo-home .geoinfo-categories-toggle { height: 34px; }
  .geoinfo-home .geoinfo-section { padding-top: 10px; }
  .geoinfo-home .geoinfo-section-title { font-size: 20px; }
  .geoinfo-home .geoinfo-section-header { row-gap: 8px; margin-bottom: 10px; }
  .geoinfo-home .geoinfo-recent-pager { margin-top: 10px; }
  .gn-homepage .geoinfo-footer-bar { min-height: 40px; padding: 4px 0; }
  .gn-homepage .geoinfo-footer-brand-logo { height: 22px; }
}
/* Desktop estreito (1024 a 1279 px): coluna do título mais larga, para ele caber numa linha, e "Abrir catálogo"
   na linha do título (o cabeçalho de recentes já quebra em duas linhas; sem isso, o link iria para uma terceira). */
@media (min-width: 1024px) and (max-width: 1279px) {
  .geoinfo-hero .geoinfo-band-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
  .geoinfo-home .geoinfo-section-header { position: relative; }
  .geoinfo-home .geoinfo-section-heading { min-height: 30px; padding-right: 140px; }
  .geoinfo-home .geoinfo-section-link { position: absolute; top: 0; right: 0; height: 30px; }
}
@media (min-width: 1024px) and (max-width: 1279px) and (max-height: 1000px) {
  .geoinfo-hero h1 { font-size: 22px; }
}
/* Desktop com altura até 640 px (ex.: 1280 × 720 com barra de tarefas): os números do acervo saem da faixa
   (os mesmos totais seguem no seletor de tipos dos recentes) para sobrar espaço para os cards. */
@media (min-width: 1024px) and (max-height: 640px) {
  .geoinfo-hero .geoinfo-metrics { display: none; }
}
/* Até 560 px (ex.: 1366 × 768 com zoom de 125%): os links de acesso rápido descem para baixo do título,
   ao lado da busca, e a faixa fica com a altura da busca. */
@media (min-width: 1024px) and (max-height: 560px) {
  .geoinfo-hero .geoinfo-band-inner { grid-template-rows: auto auto; row-gap: 2px; }
  .geoinfo-hero .geoinfo-band-search { display: contents; }
  .geoinfo-hero .geoinfo-band-copy { grid-column: 1; grid-row: 1; align-self: end; }
  .geoinfo-hero .geoinfo-band-links { grid-column: 1; grid-row: 2; align-self: start; min-width: 0; justify-content: flex-start; margin: 0 0 0 -7px; }
  .geoinfo-hero .geoinfo-hero-search { grid-column: 2; grid-row: 1 / 3; min-width: 0; }
  .geoinfo-home .geoinfo-themes { padding-top: 4px; }
  .geoinfo-home .geoinfo-section { padding-top: 6px; }
  .geoinfo-home .geoinfo-section-header { row-gap: 6px; margin-bottom: 6px; }
  .geoinfo-home .geoinfo-recent-grid.is-list .geoinfo-resource-card { padding-top: 6px; padding-bottom: 6px; }
}

/* ==========================================================================
   Cartão dos atributos no topo do editor de metadados do catálogo (#/metadata/<pk>)
   js/geoinfo-attributes-entry.js · página: css/geoinfo-attributes.css
   ========================================================================== */
.geoinfo-attrs-entry {
  display: flex; align-items: center; gap: 16px; max-width: 760px; margin: 6px 0 22px; padding: 16px 18px;
  border: 1px solid var(--gi-green-200); border-radius: 14px; background: linear-gradient(90deg, #fff 0%, var(--gi-green-50) 100%);
  color: var(--gi-ink-2); font-family: var(--gi-font); box-shadow: var(--gi-sh-1);
}
.geoinfo-attrs-entry-icon {
  display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--gi-green-200); color: var(--gi-green);
}
.geoinfo-attrs-entry-body { flex: 1; min-width: 0; }
.geoinfo-attrs-entry .geoinfo-attrs-entry-title { margin: 0; color: var(--gi-ink); font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.geoinfo-attrs-entry .geoinfo-attrs-entry-text { margin: 3px 0 0; color: var(--gi-muted); font-size: 13.5px; line-height: 1.45; }
.geoinfo-attrs-entry-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; font-size: 13px; }
.geoinfo-attrs-entry-bar { position: relative; flex: 0 0 140px; height: 6px; overflow: hidden; border-radius: 999px; background: #DDE7E0; }
.geoinfo-attrs-entry-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--gi-green); }
.geoinfo-attrs-entry-count { color: var(--gi-muted); }
.geoinfo-attrs-entry-count strong { color: var(--gi-ink); font-family: var(--gi-mono); font-size: 12.5px; font-weight: 600; }
.geoinfo-attrs-entry-count .is-missing { color: #8A5A00; font-weight: 500; }
.geoinfo-attrs-entry-count .is-complete { color: var(--gi-green-700); font-weight: 500; }
.geoinfo-attrs-entry .geoinfo-attrs-entry-button {
  display: inline-flex; flex: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--gi-green); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(4, 51, 28, .3); transition: background-color .15s;
}
.geoinfo-attrs-entry .geoinfo-attrs-entry-button:hover,
.geoinfo-attrs-entry .geoinfo-attrs-entry-button:focus { background: var(--gi-green-700); color: #fff; text-decoration: none; }
.geoinfo-attrs-entry .geoinfo-attrs-entry-button:focus-visible { outline: none; box-shadow: var(--gi-focus); }
@media (max-width: 720px) {
  .geoinfo-attrs-entry { flex-wrap: wrap; }
  .geoinfo-attrs-entry-body { flex-basis: calc(100% - 60px); }
  .geoinfo-attrs-entry .geoinfo-attrs-entry-button { width: 100%; justify-content: center; }
}

/* ---------- Seção "Atributos" do Visualizar metadados (templates/geoinfo/metadata_attributes.html) ---------- */
/* Links com .gn-metadata-view: o tema pinta todo "a" de azul (.msgapi a). */
.geoinfo-md-attrs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 4px 0 12px;
}
.geoinfo-md-attrs-count { margin: 0; color: #4b5563; }
.geoinfo-md-attrs-count strong { color: #111827; font-variant-numeric: tabular-nums; }
.gn-metadata-view a.geoinfo-md-attrs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #2f6b3a;
  border-radius: 999px;
  color: #2f6b3a;
  font-weight: 600;
  text-decoration: none;
}
.gn-metadata-view a.geoinfo-md-attrs-link:hover,
.gn-metadata-view a.geoinfo-md-attrs-link:focus-visible { background: #2f6b3a; color: #fff; text-decoration: none; }
.geoinfo-md-attrs-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.geoinfo-md-attrs-table thead th {
  padding: 8px 12px;
  border-bottom: 1px solid #d1d5db;
  color: #6b7280;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}
.geoinfo-md-attrs-table thead th:nth-child(1) { width: 26%; }
.geoinfo-md-attrs-table thead th:nth-child(2) { width: 24%; }
.geoinfo-md-attrs-table tbody th,
.geoinfo-md-attrs-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eceef1;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.geoinfo-md-attrs-table tbody tr:last-child th,
.geoinfo-md-attrs-table tbody tr:last-child td { border-bottom: 0; }
.geoinfo-md-attrs-table code {
  padding: 0;
  background: none;
  color: #111827;
  font-size: 0.92em;
  font-weight: 600;
}
.geoinfo-md-attrs-meta { display: block; margin-top: 2px; color: #6b7280; font-size: 0.82em; }
.geoinfo-md-attrs-hidden { color: #92400e; }
.geoinfo-md-attrs-empty { color: #9ca3af; }
.geoinfo-md-attrs-more { margin: 12px 0 0; color: #4b5563; }
.gn-metadata-view .geoinfo-md-attrs-more a { color: #2f6b3a; font-weight: 600; }

@media (max-width: 640px) {
  .geoinfo-md-attrs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .geoinfo-md-attrs-table,
  .geoinfo-md-attrs-table tbody,
  .geoinfo-md-attrs-table tr,
  .geoinfo-md-attrs-table tbody th,
  .geoinfo-md-attrs-table tbody td { display: block; width: auto; }
  .geoinfo-md-attrs-table tr { padding: 10px 0; border-bottom: 1px solid #eceef1; }
  .geoinfo-md-attrs-table tbody th,
  .geoinfo-md-attrs-table tbody td { padding: 2px 0; border: 0; }
  .geoinfo-md-attrs-table tbody td::before {
    content: attr(data-label);
    display: block;
    color: #6b7280;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
