/* =====================================================================
   PORTAL DA TRANSPARÊNCIA (pg-transparencia.php) NO PADRÃO ATRICON, IGUAL PARA PREFEITURAS E CÂMARAS.
   Arquivo AUTOSSUFICIENTE (idêntico nos 4 portais): as regras dos cartões vieram do css-transparencia.css da Prefeitura, com as variáveis
   --gov-* (Prefeitura) ou --transp-blue-* (Câmara) lidas por --hub-*, para o mesmo desenho funcionar nos dois temas.
   Carregar DEPOIS do css-transparencia.css e do CSS do tema. A página fica dentro de <div class="hub">.
   ===================================================================== */
:root {
  --hub-primary: var(--gov-primary, var(--transp-blue-primary, #0d417d));
  --hub-primary-hover: var(--gov-primary-hover, var(--transp-blue-dark, #08305c));
  --hub-primary-dark: var(--gov-primary-dark, var(--transp-blue-dark, #08264d));
  --hub-primary-rgb: var(--gov-primary-rgb, var(--transp-blue-primary-rgb, 13, 65, 125));
  --hub-secondary: var(--gov-secondary, var(--transp-blue-light, #1660b8));
  --hub-accent: var(--gov-accent, var(--transp-blue-border, #70b6f6));
  --hub-pill: var(--gov-blue-pill, var(--transp-blue-pale, #e6f0fa));
  --hub-esic-bg: var(--gov-esic-bg, var(--transp-blue-pale, #f6f9fd));
  --hub-esic-border: var(--gov-esic-border, var(--transp-blue-border, #c9dcf0));
}
/* cores do Bootstrap que a página usa (text-primary, btn-primary...) seguem o tema, também na Câmara */
.hub { --bs-primary: var(--hub-primary); --bs-primary-rgb: var(--hub-primary-rgb); --bs-link-color-rgb: var(--hub-primary-rgb); }
.hub .text-primary { color: var(--hub-primary) !important; }
.hub .btn-primary { --bs-btn-bg: var(--hub-primary); --bs-btn-border-color: var(--hub-primary); --bs-btn-hover-bg: var(--hub-primary-hover); --bs-btn-hover-border-color: var(--hub-primary-hover); --bs-btn-active-bg: var(--hub-primary-hover); --bs-btn-active-border-color: var(--hub-primary-hover); }
.hub .btn-outline-primary { --bs-btn-color: var(--hub-primary); --bs-btn-border-color: var(--hub-primary); --bs-btn-hover-bg: var(--hub-primary); --bs-btn-hover-border-color: var(--hub-primary); --bs-btn-active-bg: var(--hub-primary); --bs-btn-active-border-color: var(--hub-primary); }
.hub { font-family: inherit; }
.hub .row { margin-left: calc(-.5 * var(--bs-gutter-x, 1.5rem)); margin-right: calc(-.5 * var(--bs-gutter-x, 1.5rem)); }
.hub .card-title-main, .hub .card-subtitle-small { font-family: inherit; }

/* Card de Busca & Filtros Rápidos */
.search-box-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-top: -3.25rem;
  position: relative;
  z-index: 20;
  border: 1px solid rgba(var(--hub-primary-rgb), 0.18);
  box-shadow: 0 10px 30px rgba(var(--hub-primary-rgb), 0.08);
}
.search-input-field {
  border: 2px solid #cbd5e1;
  font-size: 1.05rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px 0 0 12px;
  box-shadow: none;
  transition: border-color 0.2s;
}
.search-input-field:focus {
  border-color: var(--hub-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--hub-primary-rgb), 0.15);
}
.search-btn-action {
  background: linear-gradient(135deg, var(--hub-primary) 0%, var(--hub-secondary) 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  border-radius: 0 12px 12px 0;
  padding: 0.85rem 1.8rem;
}
.search-btn-action:hover {
  background: linear-gradient(135deg, var(--hub-primary-hover) 0%, var(--hub-primary) 100%);
  color: #ffffff;
}
.quick-search-pill {
  font-size: 0.82rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-search-pill:hover, .quick-search-pill.active {
  background: var(--hub-pill);
  color: var(--hub-primary);
  border-color: var(--hub-accent);
}

/* ========================================================================= */
/* CARDS TEMÁTICOS E BOTÕES COLORIDOS - MATRIZ ATRICON 2 COLUNAS             */
/* ========================================================================= */
.atricon-card-wrapper {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.atricon-card-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.card-header-styled {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.card-header-styled .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: #ffffff;
}
.card-header-styled .card-title-main {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}
.card-header-styled .card-subtitle-small {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.15rem;
  display: block;
}
.atricon-section-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.card-body-items {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Botão Colorido e Interativo */
.atricon-btn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none !important;
  border: 1px solid transparent;
  gap: 0.6rem;
}
.atricon-btn-item .item-text {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  flex-grow: 1;
  line-height: 1.3;
}
.atricon-btn-item .item-text i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.atricon-btn-item .item-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.atricon-btn-item .tag-freq {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.atricon-btn-item .chevron-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}
.atricon-btn-item:hover .chevron-icon {
  transform: translateX(3px);
}

/* ========================================================================= */
/* SEÇÃO DE DESTAQUE: E-SIC E OUVIDORIA (ESTILO DEDICADO ATRICON §4º)        */
/* ========================================================================= */
.prominent-esic-section {
  background: #ffffff;
  border-radius: 18px;
  border: 2px solid var(--hub-accent);
  box-shadow: 0 8px 28px rgba(var(--hub-primary-rgb), 0.08);
  overflow: hidden;
  margin-top: 1.5rem;
  margin-bottom: 2.25rem;
}
.prominent-esic-header {
  background: linear-gradient(135deg, var(--hub-primary) 0%, var(--hub-primary-dark) 100%);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.prominent-esic-header .title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.prominent-esic-header .icon-badge-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.esic-card-interactive {
  background: var(--hub-esic-bg);
  border: 1px solid var(--hub-esic-border);
  border-radius: 14px;
  padding: 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.esic-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--hub-primary-rgb), 0.12);
  border-color: var(--hub-primary);
}
.esic-contact-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.esic-quick-link {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.esic-quick-link:hover {
  background-color: var(--hub-pill);
  border-color: var(--hub-primary);
  color: var(--hub-primary-dark);
  transform: translateY(-2px);
}

/* ========================================================================= */
/* IDENTIDADES CROMÁTICAS TEMÁTICAS                                          */
/* ========================================================================= */
/* 1. Azul Vibrante / Índigo */
.theme-blue { border-top: 4px solid #1d4ed8; }
.theme-blue .card-header-styled { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: #1e3a8a; }
.theme-blue .icon-badge { background: #1d4ed8; }
.theme-blue .atricon-section-badge { background: #bfdbfe; color: #1e40af; }
.theme-blue .atricon-btn-item { background: #f8faff; color: #1e3a8a; border-color: #dbeafe; }
.theme-blue .atricon-btn-item:hover { background: #1d4ed8; color: #ffffff; border-color: #1d4ed8; }
.theme-blue .tag-freq { background: #dbeafe; color: #1e40af; }
.theme-blue .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 2. Esmeralda / Verde */
.theme-green { border-top: 4px solid #059669; }
.theme-green .card-header-styled { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: #064e3b; }
.theme-green .icon-badge { background: #059669; }
.theme-green .atricon-section-badge { background: #a7f3d0; color: #065f46; }
.theme-green .atricon-btn-item { background: #f0fdf4; color: #065f46; border-color: #d1fae5; }
.theme-green .atricon-btn-item:hover { background: #059669; color: #ffffff; border-color: #059669; }
.theme-green .tag-freq { background: #d1fae5; color: #065f46; }
.theme-green .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 3. Carmim / Vermelho / Coral */
.theme-red { border-top: 4px solid #dc2626; }
.theme-red .card-header-styled { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); color: #7f1d1d; }
.theme-red .icon-badge { background: #dc2626; }
.theme-red .atricon-section-badge { background: #fecaca; color: #991b1b; }
.theme-red .atricon-btn-item { background: #fff8f8; color: #991b1b; border-color: #fee2e2; }
.theme-red .atricon-btn-item:hover { background: #dc2626; color: #ffffff; border-color: #dc2626; }
.theme-red .tag-freq { background: #fee2e2; color: #991b1b; }
.theme-red .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 4. Roxo / Violeta */
.theme-purple { border-top: 4px solid #7c3aed; }
.theme-purple .card-header-styled { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: #4c1d95; }
.theme-purple .icon-badge { background: #7c3aed; }
.theme-purple .atricon-section-badge { background: #ddd6fe; color: #5b21b6; }
.theme-purple .atricon-btn-item { background: #faf8ff; color: #5b21b6; border-color: #ede9fe; }
.theme-purple .atricon-btn-item:hover { background: #7c3aed; color: #ffffff; border-color: #7c3aed; }
.theme-purple .tag-freq { background: #ede9fe; color: #5b21b6; }
.theme-purple .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 5. Âmbar / Laranja */
.theme-amber { border-top: 4px solid #ea580c; }
.theme-amber .card-header-styled { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); color: #7c2d12; }
.theme-amber .icon-badge { background: #ea580c; }
.theme-amber .atricon-section-badge { background: #fed7aa; color: #9a3412; }
.theme-amber .atricon-btn-item { background: #fffbf6; color: #9a3412; border-color: #ffedd5; }
.theme-amber .atricon-btn-item:hover { background: #ea580c; color: #ffffff; border-color: #ea580c; }
.theme-amber .tag-freq { background: #ffedd5; color: #9a3412; }
.theme-amber .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 6. Azul Marinho / Ciano */
.theme-cyan { border-top: 4px solid #00A8A4; }
.theme-cyan .card-header-styled { background: linear-gradient(135deg, #f0f9ff 0%, #E0FAFE 100%); color: #0c4a6e; }
.theme-cyan .icon-badge { background: #00A8A4; }
.theme-cyan .atricon-section-badge { background: #bae6fd #bae6fd; color: #04889F; }
.theme-cyan .atricon-btn-item { background: #F4FEFF; color: #04889F; border-color: #E0FAFE; }
.theme-cyan .atricon-btn-item:hover { background: #00A8A4; color: #ffffff; border-color: #00A8A4; }
.theme-cyan .tag-freq { background: #E0FAFE; color: #04889F; }
.theme-cyan .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 7. Teal / Turquesa */
.theme-teal { border-top: 4px solid #0d9488; }
.theme-teal .card-header-styled { background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%); color: #134e4a; }
.theme-teal .icon-badge { background: #0d9488; }
.theme-teal .atricon-section-badge { background: #99f6e4; color: #115e59; }
.theme-teal .atricon-btn-item { background: #f5fdfb; color: #115e59; border-color: #ccfbf1; }
.theme-teal .atricon-btn-item:hover { background: #0d9488; color: #ffffff; border-color: #0d9488; }
.theme-teal .tag-freq { background: #ccfbf1; color: #115e59; }
.theme-teal .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 8. Âmbar Escuro / Bronze / Ocre */
.theme-bronze { border-top: 4px solid #d97706; }
.theme-bronze .card-header-styled { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); color: #78350f; }
.theme-bronze .icon-badge { background: #d97706; }
.theme-bronze .atricon-section-badge { background: #fde68a; color: #92400e; }
.theme-bronze .atricon-btn-item { background: #fffdf5; color: #92400e; border-color: #fef3c7; }
.theme-bronze .atricon-btn-item:hover { background: #d97706; color: #ffffff; border-color: #d97706; }
.theme-bronze .tag-freq { background: #fef3c7; color: #92400e; }
.theme-bronze .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 9. Rosa / Magenta / Rubi */
.theme-rose { border-top: 4px solid #e11d48; }
.theme-rose .card-header-styled { background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%); color: #881337; }
.theme-rose .icon-badge { background: #e11d48; }
.theme-rose .atricon-section-badge { background: #fecdd3; color: #9f1239; }
.theme-rose .atricon-btn-item { background: #fff6f7; color: #9f1239; border-color: #ffe4e6; }
.theme-rose .atricon-btn-item:hover { background: #e11d48; color: #ffffff; border-color: #e11d48; }
.theme-rose .tag-freq { background: #ffe4e6; color: #9f1239; }
.theme-rose .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 10. Celeste / Azul Céu */
.theme-sky { border-top: 4px solid #0284c7; }
.theme-sky .card-header-styled { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); color: #0369a1; }
.theme-sky .icon-badge { background: #0284c7; }
.theme-sky .atricon-section-badge { background: #bae6fd; color: #0284c7; }
.theme-sky .atricon-btn-item { background: #f8fcff; color: #0369a1; border-color: #e0f2fe; }
.theme-sky .atricon-btn-item:hover { background: #0284c7; color: #ffffff; border-color: #0284c7; }
.theme-sky .tag-freq { background: #e0f2fe; color: #0369a1; }
.theme-sky .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }

/* 12. Ardósia / Grafite azulado */
.theme-slate { border-top: 4px solid #475569; }
.theme-slate .card-header-styled { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); color: #1e293b; }
.theme-slate .icon-badge { background: #475569; }
.theme-slate .atricon-section-badge { background: #e2e8f0; color: #334155; }
.theme-slate .atricon-btn-item { background: #fcfdfe; color: #334155; border-color: #e2e8f0; }
.theme-slate .atricon-btn-item:hover { background: #475569; color: #ffffff; border-color: #475569; }
.theme-slate .tag-freq { background: #e2e8f0; color: #334155; }
.theme-slate .atricon-btn-item:hover .tag-freq { background: rgba(255,255,255,0.25); color: #ffffff; }


/* ---------- ACRESCENTADO NESTA VERSÃO: identificação numérica da Matriz ATRICON ---------- */
.hub .hub-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em; height: 1.7em; padding: 0 .35em; margin-right: .4rem;
  border-radius: 6px; font-size: .8em; font-weight: 800; background: rgba(0, 0, 0, .09); color: inherit; vertical-align: .08em;
}
.hub .hub-crit { display: block; margin-top: 2px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; opacity: .72; }
.hub .hub-ir { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #e2e8f0; }
.hub .hub-ir > span { font-size: .8rem; font-weight: 700; color: #64748b; margin-right: .3rem; }
.hub .hub-ir a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: 8px; font-size: .8rem; font-weight: 700;
  background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; text-decoration: none;
}
.hub .hub-ir a:hover, .hub .hub-ir a:focus-visible { background: var(--hub-primary); color: #fff; border-color: var(--hub-primary); }
.hub .hub-resumo { font-size: .85rem; color: #64748b; margin: .6rem 0 0; }
.hub .hub-bloco-titulo { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin: 0 0 .9rem; }
.hub .pill-limpar, .hub .pill-limpar:hover, .hub .pill-limpar:focus { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.hub .atricon-card-wrapper { scroll-margin-top: 1rem; }
.hub .atricon-card-wrapper:target { box-shadow: 0 0 0 3px rgba(var(--hub-primary-rgb), .35); }
@media (max-width: 575.98px) {
  .hub .search-box-card { padding: 1.1rem 1rem; }
  .hub .card-header-styled { padding: .95rem 1rem; }
  .hub .card-body-items { padding: 1rem; }
}

/* ---------- alto contraste (e-MAG): só dentro da página ---------- */
html.high-contrast .hub .search-box-card, html.high-contrast .hub .atricon-card-wrapper, html.high-contrast .hub .prominent-esic-section, html.high-contrast .hub .prominent-esic-header,
html.high-contrast .hub .esic-card-interactive, html.high-contrast .hub .esic-quick-link, html.high-contrast .hub .card-header-styled, html.high-contrast .hub .atricon-btn-item {
  background: #000 !important; border-color: #ffff00 !important; color: #fff !important; box-shadow: none !important;
}
html.high-contrast .hub h1, html.high-contrast .hub h2, html.high-contrast .hub h3, html.high-contrast .hub h4, html.high-contrast .hub .card-title-main, html.high-contrast .hub strong { color: #ffff00 !important; }
html.high-contrast .hub a, html.high-contrast .hub .atricon-btn-item, html.high-contrast .hub .btn, html.high-contrast .hub .quick-search-pill, html.high-contrast .hub .esic-quick-link { color: #00ffff !important; border-color: #00ffff !important; background-color: #000 !important; }
html.high-contrast .hub .atricon-btn-item:hover, html.high-contrast .hub .btn:hover, html.high-contrast .hub .esic-quick-link:hover, html.high-contrast .hub .hub-ir a:hover { background-color: #ffff00 !important; color: #000 !important; }
html.high-contrast .hub input { background: #000 !important; color: #fff !important; border-color: #ffff00 !important; }
html.high-contrast .hub .icon-badge, html.high-contrast .hub .icon-badge-lg, html.high-contrast .hub .atricon-section-badge, html.high-contrast .hub .tag-freq, html.high-contrast .hub .hub-num {
  background: #000 !important; color: #ffff00 !important; border: 1px solid #ffff00 !important;
}
html.high-contrast .hub i, html.high-contrast .hub .chevron-icon { color: #ffff00 !important; }
html.high-contrast .hub .text-muted, html.high-contrast .hub .hub-resumo, html.high-contrast .hub .hub-bloco-titulo, html.high-contrast .hub .hub-ir > span, html.high-contrast .hub .small { color: #fff !important; }
html.high-contrast .hub .hub-ir a { background: #000 !important; color: #00ffff !important; border-color: #00ffff !important; }
