/* ====== GLOSSÁRIO (escopo só nesta rota) ====== */
body.post-type-archive-glossario { --ink:#22304a; --brand:#ee6c4d; --bg:#f7f9fc; --card:#ffffff; --muted:#8a95a6; --gap:24px; --container:1140px; }

/* Containers */
body.post-type-archive-glossario .g4g-container{max-width:var(--container);margin:0 auto;padding:0 16px;}

/* HERO */
body.post-type-archive-glossario .g4g-hero{background:#172b4d;color:#fff;padding:48px 0;}
body.post-type-archive-glossario .g4g-breadcrumb{font-size:13px;opacity:.85;margin-bottom:12px;}
body.post-type-archive-glossario .g4g-breadcrumb a{color:#c7d3ea;text-decoration:none;}
body.post-type-archive-glossario .g4g-title{margin:0;font-size:32px;letter-spacing:.02em}

/* SEARCH */
body.post-type-archive-glossario .g4g-search{background:var(--bg);padding:28px 0 8px;}
body.post-type-archive-glossario .g4g-search__h{margin:0 0 12px 0;text-align:center;font-size:14px;color:var(--muted);letter-spacing:.08em}
body.post-type-archive-glossario .g4g-search__form{display:flex;justify-content:center}
body.post-type-archive-glossario .g4g-search__form input[type="search"]{
  width:100%;max-width:420px;border:1px solid #e2e6ee;border-radius:6px;padding:10px 12px;background:#fff;
}

/* GRID */
body.post-type-archive-glossario .g4g-grid{background:var(--bg);padding:24px 0 56px;}
body.post-type-archive-glossario .g4g-cards{
  display:grid !important;
  grid-template-columns:repeat(4,1fr) !important;
  gap:var(--gap) !important;
}
@media (max-width: 1024px){
  body.post-type-archive-glossario .g4g-cards{grid-template-columns:repeat(3,1fr)!important}
}
@media (max-width: 768px){
  body.post-type-archive-glossario .g4g-cards{grid-template-columns:repeat(2,1fr)!important}
}
@media (max-width: 520px){
  body.post-type-archive-glossario .g4g-cards{grid-template-columns:1fr!important}
}

/* Card */
body.post-type-archive-glossario .g4g-card{
  background:var(--card);
  border:1px solid #e8edf3;
  border-radius:10px;
  padding:22px;
  min-height:120px;
  display:flex;justify-content:space-between;align-items:flex-start;
  box-sizing:border-box;
  transition:transform .12s ease, box-shadow .12s ease;
}
body.post-type-archive-glossario .g4g-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(23,43,77,.06)}

/* Collection item transitions for smooth loading */
body.post-type-archive-glossario .collection-item-3 {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Ensure new cards start with proper positioning */
body.post-type-archive-glossario .collection-item-3.loading {
  opacity: 0;
  transform: translateY(20px);
}
body.post-type-archive-glossario .g4g-card__title{margin:0;line-height:1.25;font-weight:700;font-size:18px;color:var(--ink);}
body.post-type-archive-glossario .g4g-card__title a{color:inherit;text-decoration:none;}
body.post-type-archive-glossario .g4g-card__plus{
  display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;
  border:2px solid var(--brand);color:var(--brand);font-weight:700;flex:0 0 22px;
}

/* Paginação SSR (fica oculta quando JS ativo) */
body.post-type-archive-glossario .g4g-pagination{display:flex;justify-content:center;margin-top:24px}
body.post-type-archive-glossario .g4g-pagination ul{display:flex;gap:8px;list-style:none;margin:0;padding:0}
body.post-type-archive-glossario .g4g-pagination a,
body.post-type-archive-glossario .g4g-pagination span{display:inline-block;padding:8px 12px;border:1px solid #e2e6ee;border-radius:8px;text-decoration:none;color:var(--ink);background:#fff}
body.post-type-archive-glossario .g4g-pagination .current{background:#172b4d;color:#fff;border-color:#172b4d}

/* Botão Ver Mais */
body.post-type-archive-glossario .g4g-morewrap{display:flex;justify-content:center;margin-top:18px}
body.post-type-archive-glossario #g4g-more{border:1px solid #d6dbe4;background:#fff;padding:10px 16px;border-radius:8px;cursor:pointer}
body.post-type-archive-glossario #g4g-more[disabled]{opacity:.5;cursor:default}

/* Util */
body.post-type-archive-glossario .g4g-empty{text-align:center;color:var(--muted)}

/* ----- Botão Ver Mais (forçado) ----- */
body.post-type-archive-glossario .g4g-morewrap{
  display:flex; justify-content:center; margin-top:24px;
}

body.post-type-archive-glossario #g4g-more,
body.post-type-archive-glossario #g4g-more *{
  opacity:1 !important;
}

body.post-type-archive-glossario #g4g-more{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 18px;
  border:1px solid #d6dbe4;
  border-radius:999px;
  background:#fff;
  color:#22304a;                     /* texto visível */
  font-weight:600;
  line-height:1;
  cursor:pointer;
  text-decoration:none;
  box-shadow:0 1px 0 rgba(0,0,0,0.02);
  transition:border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}

body.post-type-archive-glossario #g4g-more:hover{
  border-color:#c7ceda;
  box-shadow:0 2px 10px rgba(23,43,77,.06);
  transform:translateY(-1px);
}

body.post-type-archive-glossario #g4g-more:active{
  transform:translateY(0);
}

body.post-type-archive-glossario #g4g-more[disabled]{
  opacity:.55 !important;
  cursor:default;
  color:#22304a;           /* mantém texto visível mesmo desabilitado */
  background:#fff;
}

/* Garantir que o header e footer apareçam */
body.post-type-archive-glossario header,
body.post-type-archive-glossario footer,
body.post-type-archive-glossario .navbar,
body.post-type-archive-glossario .footer,
body.show-header-footer header,
body.show-header-footer footer,
body.show-header-footer .navbar,
body.show-header-footer .footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: auto !important;
  position: relative !important;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
}

/* Ajustar z-index para evitar sobreposição com o header */
body.post-type-archive-glossario .g4g-hero {
  position: relative;
  z-index: 1;
}

/* Remover espaçamento errado acima da section header-glossario */
.header-glossario {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Garantir que não há espaçamento extra no main do glossário */
body.page-template-page-glossario1 main#primary,
body.page-template-page-glossario main#primary {
  padding-top: 0 !important;
  margin-top: 0 !important;
}