/* ============================================================
   PORTAL MUNICIPAL — CSS Principal
   Inspiração: portais gov.br (ES, SC) — estilo institucional
   Cores configuráveis via CSS custom properties injetadas pelo PHP
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--pm-body-text, #2c3e50);
  background: #f0f2f5;
  margin: 0; padding: 0;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--pm-primary); text-decoration: none; }
a:hover { color: var(--pm-secondary); text-decoration: none; }
img { max-width: 100%; }

/* ── Container centrado ───────────────────────────────────── */
.pm-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Skip link acessibilidade ─────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 0; z-index: 9999;
  background: var(--pm-primary); color: #fff;
  padding: .5rem 1rem; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════════════════════
   BARRA DE ACESSIBILIDADE
   ══════════════════════════════════════════════════════════ */
.access-bar {
  background: #1e2832;
  color: #b0bec5;
  font-size: .71rem;
  padding: .28rem 0;
}
.abar-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
}
.access-bar a {
  color: #b0bec5; margin: 0 .4rem;
  display: inline-flex; align-items: center; gap: .25rem;
  transition: color .18s;
}
.access-bar a:hover { color: #fff; }
.abar-right { display: flex; align-items: center; gap: .35rem; }
.btn-contrast, .btn-font {
  background: none; border: 1px solid #37474f;
  color: #b0bec5; padding: .1rem .4rem;
  cursor: pointer; border-radius: 3px; font-size: .67rem;
  transition: background .18s, color .18s;
}
.btn-contrast:hover, .btn-font:hover { background: #263238; color: #fff; }

/* ══════════════════════════════════════════════════════════
   HEADER — fundo cor primária, decoração geométrica diagonal
   ══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--pm-primary);
  color: var(--pm-header-text, #fff);
  position: relative;
  overflow: hidden;
}

/* Formas diagonais decorativas (estilo gov) */
.site-header::before {
  content: '';
  position: absolute; top: 0; right: 10%;
  width: 24%; height: 100%;
  background: rgba(255,255,255,.055);
  transform: skewX(-9deg);
  pointer-events: none;
}
.site-header::after {
  content: '';
  position: absolute; top: 0; right: 3%;
  width: 15%; height: 100%;
  background: rgba(255,255,255,.035);
  transform: skewX(-9deg);
  pointer-events: none;
}

/* Header inner — flex flat (sem Bootstrap cols) */
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
  position: relative;
  z-index: 1;
}
.btn-hamburger {
  background: none; border: none;
  color: #fff; cursor: pointer; padding: 0;
  font-size: 1.1rem; line-height: 1; flex-shrink: 0;
}
.header-brasao { flex-shrink: 0; }
.header-brasao .brasao,
.site-header .brasao {
  width: 64px; height: 64px; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.22));
  display: block;
}
.header-info { flex: 1; min-width: 0; }
.municipio-nome {
  font-size: 1.4rem; font-weight: 700;
  letter-spacing: .25px; line-height: 1.2;
  color: var(--pm-header-text, #fff);
}
.municipio-slogan {
  font-size: .77rem;
  color: rgba(255,255,255,.78);
  letter-spacing: .15px; margin-top: .12rem;
}
.header-redes {
  display: flex; align-items: center; gap: .45rem; flex-shrink: 0;
}
.header-redes a {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: .85rem;
  transition: background .2s;
}
.header-redes a:hover { background: rgba(255,255,255,.28); }

/* ══════════════════════════════════════════════════════════
   TOOLBAR DE NAVEGAÇÃO
   ══════════════════════════════════════════════════════════ */
.toolbar {
  background: #fff;
  border-bottom: 3px solid var(--pm-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  position: sticky; top: 0; z-index: 1040;
}
.toolbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: .4rem; padding-bottom: .4rem;
  gap: 1rem; flex-wrap: wrap;
}
.toolbar-nav {
  display: flex; align-items: center;
  gap: .15rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap;
}
.toolbar-nav .nav-link {
  color: #455a64; font-size: .81rem; font-weight: 600;
  padding: .38rem .75rem; border-radius: 4px;
  display: inline-flex; align-items: center; gap: .3rem;
  transition: background .18s, color .18s;
}
.toolbar-nav .nav-link:hover { background: var(--pm-primary); color: #fff; }
.toolbar-nav .nav-link.active { background: var(--pm-primary); color: #fff; }

/* Campo de busca */
.form-busca { position: relative; }
.form-busca input {
  border: 1px solid #cfd8dc; border-radius: 20px;
  padding: .36rem 2.6rem .36rem 2rem;
  font-size: .81rem; width: 250px;
  background: #f5f7f8;
  transition: border-color .2s, box-shadow .2s, width .3s;
}
.form-busca input:focus {
  outline: none; border-color: var(--pm-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-primary) 12%, transparent);
  background: #fff; width: 310px;
}
.form-busca .icon-busca {
  position: absolute; left: .7rem; top: 50%;
  transform: translateY(-50%); color: #aaa; font-size: .72rem; pointer-events: none;
}
.form-busca .btn-buscar {
  position: absolute; right: .35rem; top: 50%;
  transform: translateY(-50%);
  background: var(--pm-secondary); color: #fff; border: none;
  border-radius: 16px; padding: .18rem .65rem;
  font-size: .7rem; cursor: pointer; transition: filter .2s;
}
.form-busca .btn-buscar:hover { filter: brightness(1.1); }

/* Resultados AJAX */
.search-results {
  position: absolute; top: calc(100% + 5px); left: 0;
  width: 340px; background: #fff; border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); z-index: 2000;
  overflow: hidden; display: none; border: 1px solid #e0e6ec;
}
.search-results.open { display: block; }
.search-item {
  display: flex; gap: .7rem; padding: .55rem .9rem;
  border-bottom: 1px solid #f3f5f7; cursor: pointer;
  transition: background .15s;
}
.search-item:hover { background: #f8f9fa; }
.search-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.search-item .si-titulo { font-size: .81rem; font-weight: 600; color: #333; }
.search-item .si-data   { font-size: .68rem; color: #999; }

/* ══════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL — container centrado com sidebar
   ══════════════════════════════════════════════════════════ */
.layout-wrap { background: #f0f2f5; }

/* O pm-container dentro do layout-wrap usa layout-inner para o flex */
.layout-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR ESQUERDA
   ══════════════════════════════════════════════════════════ */
.sidebar {
  width: 248px; min-width: 248px; flex-shrink: 0;
}
.sidebar-block {
  background: #fff; border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: .9rem;
  border: 1px solid #e8ecef;
}
.sidebar-header,
.sidebar-block-title {
  background: var(--pm-primary); color: #fff;
  padding: .6rem .9rem;
  font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; gap: .45rem;
}

.sidebar-nav { padding: .25rem 0; background: #fff; }
.sidebar-nav .nav-item { border-bottom: 1px solid #f2f4f7; }
.sidebar-nav .nav-item:last-child { border-bottom: none; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: .5rem;
  color: #455a64; font-size: .82rem;
  padding: .55rem .9rem;
  transition: background .16s, color .16s, padding-left .16s;
}
.sidebar-nav .nav-link i:first-child {
  width: 16px; text-align: center; color: var(--pm-primary); flex-shrink: 0;
}
.sidebar-nav .nav-link:hover {
  background: var(--pm-primary); color: #fff; padding-left: 1.1rem;
}
.sidebar-nav .nav-link:hover i { color: #fff !important; }
.sidebar-nav .nav-link.active {
  background: var(--pm-primary); color: #fff; font-weight: 600;
  border-left: 3px solid var(--pm-secondary);
}
.sidebar-nav .nav-link.active i { color: #fff !important; }
.sidebar-nav .nav-link .arrow {
  font-size: .62rem; color: #b0bec5; margin-left: auto; transition: transform .2s;
}
.sidebar-nav .has-children.open > .nav-link .arrow { transform: rotate(180deg); }
.sidebar-nav .submenu {
  display: none; background: #f7f9fb; border-left: 3px solid var(--pm-secondary);
}
.sidebar-nav .has-children.open .submenu { display: block; }
.sidebar-nav .submenu .nav-link {
  font-size: .79rem; padding: .42rem .9rem .42rem 1.5rem; color: #607d8b;
}
.sidebar-nav .submenu .nav-link:hover {
  background: var(--pm-primary); color: #fff; padding-left: 1.7rem;
}

.sidebar-social-card {
  background: #fff; border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid #e8ecef; margin-top: .9rem;
}
.sidebar-social-card .ssc-header {
  background: #1877f2; color: #fff; padding: .48rem .75rem;
  font-weight: 700; font-size: .77rem;
  display: flex; align-items: center; gap: .38rem;
}
.sidebar-social-card.instagram .ssc-header {
  background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
}
.sidebar-social-card .ssc-body { padding: .65rem .75rem; font-size: .76rem; }
.btn-seguir {
  display: block; text-align: center; background: #1877f2; color: #fff;
  padding: .35rem; border-radius: 4px; font-weight: 700; font-size: .77rem;
  margin-top: .5rem; transition: filter .2s;
}
.btn-seguir:hover { filter: brightness(.92); color: #fff; }
.sidebar-social-card.instagram .btn-seguir {
  background: linear-gradient(45deg,#f09433,#dc2743,#bc1888);
}

/* ── Banners de Eventos (sidebar) ──────────────────────────── */
.sidebar-eventos {
  background: #fff; border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid #e8ecef;
  margin-top: .9rem;
}
.sidebar-eventos .se-header {
  background: var(--pm-secondary); color: #fff;
  padding: .48rem .75rem; font-weight: 700; font-size: .77rem;
  display: flex; align-items: center; gap: .38rem;
}
.se-banner {
  display: block; position: relative; overflow: hidden;
  border-bottom: 1px solid #eaecef; min-height: 88px;
  background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-secondary) 100%);
}
.se-banner:last-child { border-bottom: none; }
.se-banner img {
  width: 100%; height: 88px; object-fit: cover;
  display: block; transition: transform .35s ease;
}
.se-banner:hover img { transform: scale(1.05); }
.se-titulo {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.76));
  color: #fff; font-size: .69rem; font-weight: 600; line-height: 1.3;
  padding: 1.2rem .6rem .32rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════
   CONTEÚDO PRINCIPAL
   ══════════════════════════════════════════════════════════ */
.main-content { flex: 1; min-width: 0; }

/* ── Títulos de seção — dois níveis (estilo SC.gov) ──────── */
.section-heading { margin-bottom: 1.25rem; line-height: 1; }
.section-label-small {
  display: block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--pm-primary); margin-bottom: .2rem;
}
.section-label-main {
  display: block; font-size: 1.55rem; font-weight: 800;
  color: #1a2332; line-height: 1.1;
}

/* Alias antigo */
.section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--pm-primary);
  border-left: 3px solid var(--pm-secondary); padding-left: .6rem;
  margin-bottom: .85rem;
}

/* Seção genérica */
.pm-section {
  background: #fff; border-radius: 4px; border: 1px solid #e2e8ed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 1.1rem; overflow: hidden;
}
.pm-section-header {
  padding: .6rem 1rem; border-bottom: 1px solid #eceff1;
  display: flex; align-items: center; justify-content: space-between; background: #fafbfc;
}
.pm-section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  color: var(--pm-primary); display: flex; align-items: center; gap: .4rem; margin: 0;
}
.pm-section-title::before {
  content: ''; display: inline-block; width: 3px; height: 13px;
  background: var(--pm-secondary); border-radius: 2px;
}
.pm-section-header a.ver-mais {
  font-size: .74rem; font-weight: 600; color: var(--pm-secondary);
  display: flex; align-items: center; gap: .25rem; transition: gap .2s;
}
.pm-section-header a.ver-mais:hover { gap: .45rem; }
.pm-section-body { padding: .9rem 1rem; }

/* ── Banner / Carrossel ─────────────────────────────────── */
.banner-section {
  position: relative; border-radius: 4px; overflow: hidden;
  margin-bottom: 1.1rem; box-shadow: 0 2px 8px rgba(0,0,0,.1);
  background: var(--pm-primary, #1a3a5c); /* fallback quando imagem não carrega */
}
.swiper-banner { width: 100%; }
.banner-img { width: 100%; height: 400px; object-fit: cover; display: block; }
.banner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 2rem 2.25rem;
}
/* 9-point position classes */
.banner-overlay.pos-top-left      { align-items: flex-start; justify-content: flex-start; }
.banner-overlay.pos-top-center    { align-items: flex-start; justify-content: center; }
.banner-overlay.pos-top-right     { align-items: flex-start; justify-content: flex-end; }
.banner-overlay.pos-middle-left   { align-items: center;     justify-content: flex-start; }
.banner-overlay.pos-middle-center { align-items: center;     justify-content: center; }
.banner-overlay.pos-middle-right  { align-items: center;     justify-content: flex-end; }
.banner-overlay.pos-bottom-left   { align-items: flex-end;   justify-content: flex-start; }
.banner-overlay.pos-bottom-center { align-items: flex-end;   justify-content: center; }
.banner-overlay.pos-bottom-right  { align-items: flex-end;   justify-content: flex-end; }
.banner-overlay.pos-top-center .banner-content,
.banner-overlay.pos-middle-center .banner-content,
.banner-overlay.pos-bottom-center .banner-content { text-align: center; }
.banner-overlay.pos-top-right .banner-content,
.banner-overlay.pos-middle-right .banner-content,
.banner-overlay.pos-bottom-right .banner-content { text-align: right; }
.banner-content { color: #fff; max-width: 480px; }
.banner-content h2 {
  font-size: 1.6rem; font-weight: 800; margin-bottom: .45rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.3); line-height: 1.25;
}
.banner-content p {
  font-size: .9rem; opacity: .9; margin-bottom: .9rem; text-shadow: 0 1px 4px rgba(0,0,0,.28);
}
.btn-banner {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
  padding: .48rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: .86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  letter-spacing: .03em;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.btn-banner:hover {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.85);
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
  color: #fff;
}
.swiper-pagination-bullet-active { background: var(--pm-secondary) !important; }
.swiper-button-next, .swiper-button-prev { color: #fff !important; }

/* ── Cards de destaque ──────────────────────────────────── */
.cards-destaque-section {
  background: #fff; border-radius: 4px; border: 1px solid #e2e8ed;
  padding: 1rem 1rem .85rem; margin-bottom: 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.cards-grid {
  display: flex; flex-wrap: wrap; gap: .85rem;
}
.cards-grid .card-destaque {
  flex: 0 0 calc(25% - .65rem); min-width: 120px;
}
.card-destaque {
  background-color: #1a3a5c; /* fallback; cor real vem do inline style do PHP */
  color: #fff;
  border-radius: 10px; padding: 1.1rem .85rem; text-align: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.08);
  border: 2px solid rgba(255,255,255,.06);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
  min-height: 95px;
  position: relative; overflow: hidden;
}
.card-destaque::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.card-destaque:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  border-color: rgba(255,255,255,.18);
}
.card-destaque i { font-size: 1.75rem; display: block; line-height: 1; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.card-destaque .cd-titulo { font-size: .85rem; font-weight: 800; line-height: 1.3; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.45); }
.card-destaque .cd-desc   { font-size: .72rem; opacity: .88; line-height: 1.3; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }

/* ── Secretarias ────────────────────────────────────────── */
.secretarias-section {
  background: #fff; border-radius: 4px; border: 1px solid #e2e8ed;
  padding: 1rem 1rem .85rem; margin-bottom: 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.secretarias-grid {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.card-secretaria {
  flex: 0 0 calc(20% - .48rem); /* 5 por linha; 5×(20%-.48rem) + 4×.6rem = 100% */
  background: #fff; border-radius: 4px; padding: .75rem .5rem;
  text-align: center; border: 1px solid #dde3e8;
  border-top: 3px solid var(--pm-primary);
  transition: border-color .18s, transform .2s, box-shadow .2s; cursor: pointer;
}
.card-secretaria:hover {
  border-color: var(--pm-primary); transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.1);
}
.card-secretaria .cs-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .4rem; font-size: 1rem; color: #fff;
}
.card-secretaria .cs-nome { font-size: .69rem; font-weight: 600; color: #455a64; line-height: 1.25; }

/* ── Notícias ───────────────────────────────────────────── */
.noticias-section {
  background: #fff; border-radius: 4px; border: 1px solid #e2e8ed;
  padding: 1rem 1rem .85rem; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.noticias-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: .9rem;
}
.card-noticia {
  background: #fff; border-radius: 4px; overflow: hidden; border: 1px solid #dde3e8;
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.card-noticia:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.cn-img { position: relative; height: 162px; overflow: hidden; flex-shrink: 0; }
.cn-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-noticia:hover .cn-img img { transform: scale(1.04); }
.cn-badge {
  position: absolute; top: .5rem; left: .5rem;
  background: var(--pm-secondary); color: #fff;
  font-size: .61rem; font-weight: 700; padding: .18rem .48rem;
  border-radius: 3px; text-transform: uppercase; letter-spacing: .3px;
}
.cn-body { padding: .75rem .85rem .85rem; flex: 1; display: flex; flex-direction: column; }
.cn-data { font-size: .67rem; color: #90a4ae; margin-bottom: .3rem; display: flex; align-items: center; gap: .25rem; }
.cn-titulo { font-size: .88rem; font-weight: 700; color: #1a2332; line-height: 1.35; margin-bottom: .38rem; flex: 1; }
.cn-resumo { font-size: .77rem; color: #78909c; line-height: 1.55; margin-bottom: .55rem; }
.cn-link {
  color: var(--pm-secondary); font-weight: 700; font-size: .77rem;
  display: inline-flex; align-items: center; gap: .22rem; transition: gap .2s;
}
.cn-link:hover { gap: .45rem; }

/* ══════════════════════════════════════════════════════════
   FOOTER — estilo SC.gov: cinza claro, redes em círculos coloridos
   ══════════════════════════════════════════════════════════ */
.site-footer {
  background: #eceff1;
  color: #37474f;
  border-top: 4px solid var(--pm-primary);
  margin-top: .5rem;
}
.footer-top { padding: 1.8rem 0 1.4rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 260px repeat(auto-fit, minmax(130px, 1fr));
  gap: 2rem;
}
.footer-brand .brasao {
  width: 48px; height: 48px; object-fit: contain; margin-bottom: .55rem;
}
.footer-brand .nome { font-size: 1rem; font-weight: 700; color: #1a2332; margin-bottom: .2rem; }
.footer-brand .endereco { font-size: .77rem; color: #607d8b; line-height: 1.65; }
.footer-redes { display: flex; gap: .42rem; margin-top: .7rem; flex-wrap: wrap; }
.footer-redes a {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pm-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; transition: background .2s;
}
.footer-redes a:hover { background: var(--pm-secondary); }
.footer-horario {
  margin-top: .85rem; font-size: .77rem; color: #607d8b; line-height: 1.7;
  border-top: 1px solid rgba(0,0,0,.08); padding-top: .6rem;
}
.footer-horario-titulo {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--pm-primary); margin-bottom: .2rem;
}
.footer-horario-obs { font-style: italic; color: #90a4ae; font-size: .72rem; margin-top: .15rem; }
.footer-col-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #607d8b; margin-bottom: .7rem;
}
.footer-links-list { list-style: none; margin: 0; padding: 0; }
.footer-links-list li { margin-bottom: .28rem; }
.footer-links-list a {
  color: #546e7a; font-size: .79rem;
  display: flex; align-items: center; gap: .32rem;
  transition: color .16s, padding-left .16s;
}
.footer-links-list a i { width: 14px; text-align: center; color: var(--pm-primary); font-size: .72rem; }
.footer-links-list a:hover { color: var(--pm-primary); padding-left: .25rem; }

.footer-separator { border: none; border-top: 1px solid #cfd8dc; margin: 0; }
.footer-bottom {
  background: var(--pm-primary);
  color: rgba(255,255,255,.88);
  padding: .55rem 0; font-size: .72rem; text-align: center;
}
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .5rem;
}

/* ══════════════════════════════════════════════════════════
   PÁGINAS INTERNAS — classes pm-* (noticias.php, noticia.php)
   ══════════════════════════════════════════════════════════ */
.pm-header {
  background: var(--pm-primary); color: #fff; position: relative; overflow: hidden;
}
.pm-header::before {
  content: ''; position: absolute; top: 0; right: 10%;
  width: 24%; height: 100%;
  background: rgba(255,255,255,.055); transform: skewX(-9deg); pointer-events: none;
}
.pm-header-inner {
  max-width: 1280px; margin: 0 auto; padding: .75rem 2rem;
  display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1;
}
.pm-brasao { width: 54px; height: 54px; object-fit: contain; flex-shrink: 0; }
.pm-municipio-nome { font-size: 1.25rem; font-weight: 700; color: #fff; }
.pm-municipio-slogan { font-size: .76rem; color: rgba(255,255,255,.78); margin-top: .1rem; }

.pm-toolbar {
  background: #fff; border-bottom: 3px solid var(--pm-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,.07); position: sticky; top: 0; z-index: 1040;
}
.pm-toolbar-inner {
  max-width: 1280px; margin: 0 auto; padding: .4rem 2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.pm-toolbar-link {
  color: #455a64; font-size: .8rem; font-weight: 600; padding: .34rem .7rem; border-radius: 4px;
  display: inline-flex; align-items: center; gap: .28rem; transition: background .18s, color .18s;
}
.pm-toolbar-link:hover { background: var(--pm-primary); color: #fff; }
.pm-toolbar-link.active { background: var(--pm-primary); color: #fff; }

.pm-search-form { position: relative; }
.pm-search-wrap { position: relative; }
.pm-search-icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #aaa; font-size: .72rem; }
.pm-search-input {
  border: 1px solid #cfd8dc; border-radius: 20px;
  padding: .33rem .95rem .33rem 1.9rem; font-size: .79rem; width: 210px;
  background: #f5f7f8; transition: border-color .2s, width .3s;
}
.pm-search-input:focus { outline: none; border-color: var(--pm-primary); width: 270px; background: #fff; }

.pm-page-wrap {
  max-width: 1280px; margin: 1.4rem auto 2.5rem; padding: 0 2rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.pm-sidebar {
  width: 236px; min-width: 236px; flex-shrink: 0;
  background: #fff; border-radius: 4px; border: 1px solid #e2e8ed; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pm-menu-item { border-bottom: 1px solid #eceff1; }
.pm-menu-item:last-child { border-bottom: none; }
.pm-menu-link {
  display: flex; align-items: center; gap: .48rem;
  color: #455a64; font-size: .81rem; padding: .52rem .88rem;
  transition: background .16s, color .16s;
}
.pm-menu-link:hover { background: var(--pm-primary); color: #fff; }
.pm-menu-link i:first-child { width: 15px; text-align: center; color: var(--pm-primary); }
.pm-menu-link:hover i { color: #fff; }
.pm-menu-arrow { font-size: .6rem; margin-left: auto; color: #b0bec5; }
.pm-submenu { display: none; background: #f5f7f8; border-left: 3px solid var(--pm-secondary); }
.pm-menu-item.open .pm-submenu { display: block; }
.pm-submenu-link {
  display: flex; align-items: center; gap: .4rem;
  font-size: .77rem; padding: .42rem .88rem .42rem 1.5rem; color: #607d8b;
  transition: background .16s, color .16s;
}
.pm-submenu-link:hover { background: var(--pm-primary); color: #fff; }
.pm-main { flex: 1; min-width: 0; }

.pm-footer {
  background: #eceff1; color: #37474f;
  border-top: 4px solid var(--pm-primary); margin-top: 1.5rem;
}
.pm-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 1.75rem 2rem;
  display: flex; flex-wrap: wrap; gap: 2rem; border-bottom: 1px solid #cfd8dc;
}
.pm-footer-brand { display: flex; align-items: center; gap: .65rem; min-width: 200px; flex: 1; }
.pm-footer-brand img { width: 36px; height: 36px; object-fit: contain; }
.pm-footer-brand-info .pm-nome { font-weight: 700; font-size: .94rem; color: #1a2332; }
.pm-footer-brand-info .pm-uf  { font-size: .74rem; color: #78909c; }
.pm-footer-col { min-width: 130px; }
.pm-footer-col-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: #607d8b; margin-bottom: .6rem;
}
.pm-footer-link { display: block; font-size: .79rem; color: #546e7a; margin-bottom: .28rem; transition: color .16s; }
.pm-footer-link:hover { color: var(--pm-primary); }
.pm-footer-bottom {
  background: var(--pm-primary); padding: .55rem 2rem;
  font-size: .72rem; text-align: center; color: rgba(255,255,255,.88);
}

/* ── News cards ─────────────────────────────────────────── */
.pm-news-card {
  background: #fff; border-radius: 4px; border: 1px solid #dde3e8;
  overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.pm-news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-3px); }
.pm-news-card-img { width: 100%; height: 148px; object-fit: cover; display: block; }
.pm-news-card-body { padding: .72rem .82rem .82rem; }
.pm-news-card-date { font-size: .67rem; color: #90a4ae; margin-bottom: .28rem; }
.pm-news-card-title { font-size: .87rem; font-weight: 700; color: #1a2332; line-height: 1.35; margin-bottom: .32rem; }
.pm-news-card-text { font-size: .75rem; color: #78909c; line-height: 1.55; }
.pm-news-card-link { display: block; height: 100%; }

/* ══════════════════════════════════════════════════════════
   UTILITÁRIOS / BOTÕES
   ══════════════════════════════════════════════════════════ */
.btn-pm-primary {
  background: var(--pm-primary); color: #fff; border: none;
  border-radius: 3px; padding: .42rem 1.15rem; cursor: pointer;
  font-size: .83rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .38rem; transition: filter .2s;
}
.btn-pm-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-pm-secondary {
  background: var(--pm-secondary); color: #fff; border: none;
  border-radius: 3px; padding: .42rem 1.15rem; cursor: pointer;
  font-size: .83rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .38rem; transition: filter .2s;
}
.btn-pm-secondary:hover { filter: brightness(1.1); color: #fff; }

/* Alto contraste */
body.alto-contraste { filter: invert(1) hue-rotate(180deg); }
body.alto-contraste img, body.alto-contraste video { filter: invert(1) hue-rotate(180deg); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .pm-container { padding: 0 1.25rem; }
  .banner-img { height: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  .sidebar { width: 220px; min-width: 220px; }
}
@media (max-width: 767px) {
  .pm-container { padding: 0 1rem; }
  .sidebar {
    position: fixed; top: 0; left: -290px; width: 282px; height: 100vh;
    z-index: 1050; overflow-y: auto;
    transition: left .25s ease; box-shadow: 4px 0 24px rgba(0,0,0,.22); border-radius: 0;
  }
  .sidebar.open { left: 0; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1049; }
  .sidebar-backdrop.open { display: block; }
  .layout-inner { flex-direction: column; padding-top: 1rem; padding-bottom: 1.5rem; align-items: stretch; }
  .main-content { width: 100%; min-width: 0; }
  .pm-page-wrap { flex-direction: column; padding: 0 1rem; }
  .pm-sidebar { width: 100%; }
  /* ── BANNER mobile ── */
  .banner-img { height: 220px; }
  .banner-overlay { padding: 1rem 1.2rem; }
  .banner-content h2 { font-size: 1.1rem; }
  /* ── CARDS serviços mobile: 2 colunas ── */
  .cards-grid { gap: .6rem; }
  .cards-grid .card-destaque { flex: 0 0 calc(50% - .3rem); max-width: calc(50% - .3rem); min-width: 0; padding: 1rem .65rem; min-height: 90px; }
  .card-destaque i { font-size: 1.6rem; }
  .card-destaque .cd-titulo { font-size: .86rem; }
  /* ── CARDS secretarias mobile: 3 colunas ── */
  .secretarias-grid .card-secretaria { flex: 0 0 calc(33.333% - .4rem); }
  .noticias-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .section-label-main { font-size: 1.25rem; }
  .municipio-nome { font-size: 1.1rem; }
  .pm-toolbar-inner, .pm-footer-inner { padding-left: 1rem; padding-right: 1rem; }
  .pm-header-inner { padding-left: 1rem; padding-right: 1rem; }
  .pm-page-wrap { margin-top: 1rem; }
  .footer-bottom-inner { justify-content: center; }
}
@media (max-width: 480px) {
  .cards-grid { gap: .5rem; }
  .cards-grid .card-destaque { flex: 0 0 calc(50% - .25rem); max-width: calc(50% - .25rem); min-width: 0; padding: 1.1rem .65rem; min-height: 90px; }
  .card-destaque i { font-size: 1.6rem; }
  .card-destaque .cd-titulo { font-size: .86rem; font-weight: 900; }
  /* secretarias: 3 colunas já definido no 767px */
  .banner-img { height: 180px; }
}

/* ══ SECRETARIAS PAGE ════════════════════════════════════════ */
.secretarias-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.card-secretaria-full {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: #fff; border: 1px solid #e8ecf0;
  border-radius: 12px; padding: 1.25rem;
  transition: box-shadow .18s, transform .18s;
}
.card-secretaria-full:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.csf-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
}
.csf-body { flex: 1; min-width: 0; }
.csf-nome { font-weight: 700; font-size: .96rem; color: #1a2332; line-height: 1.3; }
.csf-sigla { font-size: .75rem; color: #888; font-weight: 600; letter-spacing: .04em; margin-top: .15rem; text-transform: uppercase; }
.csf-desc { font-size: .82rem; color: #555; margin: .5rem 0 .6rem; line-height: 1.5; }
.csf-contacts { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .6rem; }
.csf-contacts span, .csf-contacts a {
  font-size: .78rem; color: #666; text-decoration: none;
}
.csf-contacts a:hover { color: var(--pm-primary); }
.csf-link {
  display: inline-flex; align-items: center; font-size: .8rem;
  font-weight: 600; color: var(--pm-primary); text-decoration: none;
}
.csf-link:hover { text-decoration: underline; }

/* ══ SERVIÇOS PAGE ═══════════════════════════════════════════ */
.servicos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.card-servico {
  background: var(--svc-cor, var(--pm-primary));
  border-radius: 14px; padding: 1.5rem 1.25rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  cursor: pointer; transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
  border: 2px solid rgba(255,255,255,.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.08);
}
.card-servico::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 55%);
  transition: opacity .3s ease;
}
.card-servico:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
}
.card-servico:hover::before { opacity: 1.8; }
.csv-icon { font-size: 2rem; color: rgba(255,255,255,.9); margin-bottom: .75rem; }
.csv-titulo { font-size: .92rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: .4rem; }
.csv-desc { font-size: .77rem; color: rgba(255,255,255,.8); line-height: 1.45; margin-bottom: .75rem; flex: 1; }
.csv-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.18); border-radius: 20px;
  padding: .3rem .85rem; text-decoration: none; margin-top: auto;
  transition: background .15s;
}
.csv-link:hover { background: rgba(255,255,255,.3); color: #fff; }

@media (max-width: 768px) {
  .secretarias-grid-full { grid-template-columns: 1fr; }
  .servicos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .servicos-grid { grid-template-columns: repeat(2, 1fr); }
}
