@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--fonte-texto, 'Poppins', sans-serif);
}

:root {
  --red: #c00000;
  --gray: #e6e6e6;
  --dark-gray: #666666;
  --light: #f4f4f4;
  --white: #fffdfd;
  --black: #000000;
  --text: #333;
  --radius: 12px;
  --blue: #0A4EA3;
  --yellow: #F8C300;
  --orange: #F36A21;

  --font-scale: 1;
}

html {
  font-size: calc(16px * var(--font-scale));
}

html,
body {
  overflow-x: hidden;
}

body,
body {
  background: #fbfbfb;
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

p {
  font-size: 1rem !important;
}

h4 {
  line-height: 1.2;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================= PÁGINA DE ERRO ================= */
.error-page {
  display: flex;
  flex: 1;
  align-items: center;
  padding: 72px 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(192, 0, 0, .09) 0, transparent 22rem),
    linear-gradient(135deg, #fff 0%, #fbf3f3 100%);
}

.error-page__content {
  position: relative;
  max-width: 780px;
  padding: 60px 48px;
  overflow: hidden;
  text-align: center;

}

.error-page__content::before,
.error-page__content::after {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(192, 0, 0, .11);
  border-radius: 50%;
  content: "";
}

.error-page__content::before {
  top: -150px;
  left: -125px;
}

.error-page__content::after {
  right: -145px;
  bottom: -165px;
}

.error-page__code {
  position: relative;
  z-index: 1;
  color: var(--red);
  font-size: clamp(6rem, 16vw, 10rem) !important;
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.09em;
  margin-left: -.09em;
  text-shadow: 0 8px 16px rgba(128, 0, 0, .1);
}

.error-page__icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 25px auto 18px;
  border: 4px solid #fae2e2;
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  box-shadow: 0 8px 18px rgba(104, 0, 0, .12);
  font-size: 1.5rem;
}

.error-page h1,
.error-page__description,
.error-page__actions {
  position: relative;
  z-index: 1;
}

.error-page h1 {
  color: #292929;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.error-page__description {
  max-width: 570px;
  margin: 14px auto 0;
  color: #585858;
  line-height: 1.7;
}

.error-page__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.error-page__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tributos-empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid #eadada;
  border-radius: 10px;
  color: #5b4444;
  background: #fffafa;
}

.tributos-empty-state i {
  color: var(--red);
  font-size: 1.5rem;
}

.tributos-empty-state p {
  margin: 0;
}

.publication-metadata {
  margin-top: 25px;
  padding: 15px;
  border-radius: 8px;
  background: #f9f9f9;
}

.publication-back {
  margin-top: 30px;
}


/* ================= PESQUISAR ================= */
.search-container {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  /* Define o arredondamento */
  padding: 5px 15px;
  width: 300px;
  /* Ajuste conforme necessário */
  transition: box-shadow 0.3s ease;
  height: 33px;
}

.search-container:focus-within {
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
  border-color: var(--red);
}

.search-container input {
  border: none;
  outline: none;
  padding: 8px;
  width: 100%;
  font-size: 0.8rem;
  background: transparent;
}

.search-container button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-gray);
  padding: 5px;
}

.search-container button:hover {
  color: var(--red);
  /* Cor do ícone ao passar o mouse */
}

.header-top,
.header-top-content,
.top-right {
  overflow: visible;
}

.search-container-live {
  position: relative;
  overflow: visible;
}

.search-live-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  width: 100%;
  background: var(--white);
  border: 1px solid #dcdcdc;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-live-item-title:hover {
  color: #fff;
}

.search-live-all:hover,
.search-live-item-meta:hover {
  color: var(--white) !important;
}

.search-live-results[hidden] {
  display: none !important;
}

.search-live-item {
  display: block;
  padding: 12px 14px;
  background: var(--white);
  color: #111111;
  text-decoration: none;
  border-bottom: 1px solid #eeeeee;
  transition: background 0.2s ease, color 0.2s ease;
}

.search-live-item:last-child {
  border-bottom: none;
}

.search-live-item:hover {
  background: #f5f5f5;
  color: var(--black);
}

.search-live-item-title {
  display: block;
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  line-height: 1.4;
  color: #111111;
  margin-bottom: 4px;
}

.search-live-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: calc(12px * var(--font-scale));
  color: #555555;
}

.search-live-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f1f1;
  color: #222222;
  font-size: calc(11px * var(--font-scale));
  font-weight: 600;
}

.search-live-empty {
  padding: 12px 14px;
  background: var(--white);
  color: #111111;
  font-size: calc(14px * var(--font-scale));
}

.search-live-all {
  display: block;
  padding: 12px 14px;
  background: var(--white);
  color: var(--black) !important;
  text-decoration: none;
  font-size: calc(13px * var(--font-scale));
  font-weight: 600;
  border-top: 1px solid #eeeeee;
  transition: background 0.2s ease, color 0.2s ease;
}

.search-live-all:hover {
  background: #f5f5f5;
  color: var(--black);
}

@media (max-width: 768px) {
  .search-live-results {
    min-width: 260px;
    width: 100%;
  }
}

/* ================= HEADER ================= */
body.alto-contraste,
body.alto-contraste *,
body.alto-contraste .recent-box,
body.alto-contraste .search-box,
body.alto-contraste div,
body.alto-contraste section,
body.alto-contraste header,
body.alto-contraste footer {
  background-color: var(--black) !important;
  box-shadow: none !important;
}

body.alto-contraste h1,
body.alto-contraste h2,
body.alto-contraste h3,
body.alto-contraste h4,
body.alto-contraste h5,
body.alto-contraste h6,
body.alto-contraste h1 *,
body.alto-contraste h2 *,
body.alto-contraste h3 * {
  color: #ffff00 !important;
}

body.alto-contraste p,
body.alto-contraste span,
body.alto-contraste li,
body.alto-contraste td,
body.alto-contraste th,
body.alto-contraste label {
  color: var(--white) !important;
}

body.alto-contraste a {
  color: #ffff00 !important;
}

body.alto-contraste .recent-box,
body.alto-contraste .search-box,
body.alto-contraste input,
body.alto-contraste select {
  border: 1px solid var(--white) !important;
}

.logo-contrast {
  display: none !important;
}

body.alto-contraste .logo-default {
  display: none !important;
}

body.alto-contraste .logo-contrast {
  display: block !important;
  margin: 0 auto;
}

.menu-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
  backdrop-filter: blur(3px);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Estilo base do seu span se não tiver */
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  /* ou a cor do seu ícone */
  margin: 6px 0;
  transition: 0.3s;
}

.header-top a {
  position: relative;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.25s ease;
}

/* hover do fundo */
.header-top a:hover {
  background: var(--portal-top, #a10303);
}

/* linha escondida */
.header-top a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  /* cor da linha */
  transition: width 0.25s ease;
}

/* animação da linha */
.header-top a:hover::after {
  width: 100%;
}

.social-icons a {
  display: inline-block;
  color: var(--white);
  /* cor dos ícones */
  font-size: calc(15px * var(--font-scale));
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.3);
  color: var(--white);
}

.header {
  position: relative;
  z-index: 9;
  width: 100%;
}

.header-top,
.header-bg,
.header-menu {
  position: relative;
  width: 100%;
}

.header.scrolled .header-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10002;
}

.header.scrolled {
  padding-top: 88px;
}

.header.scrolled .header-menu {
  position: fixed;
  top: 40px;
  /* altura do header-top */
  left: 0;
  width: 100%;
  z-index: 999;
}

.header.scrolled .header-bg {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* FAIXA SUPERIOR (CONTATO / REDES SOCIAIS) */
.header-top {
  background: var(--portal-top, #ae0404);
  height: 40px;
  display: flex;
  align-items: center;
  font-size: calc(11px * var(--font-scale));
}

.header-top-content {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-left span {
  margin-right: 14px;
  color: var(--white);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-right a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

.artisan-bar {
  width: 100%;
  height: 3px;
  background: var(--yellow);
}

.header-bg {
  position: relative;
  background: var(--topo-fundo, none) center/cover no-repeat;
  height: 13vh;
}

.header-menu::before {
  content: "";
  position: absolute;
  left: -250px;
  bottom: -226px;
  width: 500px;
  height: 500px;
  background: var(--menu-fundo, none) no-repeat center;
  background-size: contain;
  pointer-events: none;
  opacity: 1;
}

/* Mandala direita */
.header-menu::after {
  content: "";
  position: absolute;
  right: -250px;
  bottom: -226px;
  width: 500px;
  height: 500px;
  background: var(--menu-fundo, none) no-repeat center;
  background-size: contain;
  pointer-events: none;
  opacity: 1;
  transform: scaleX(-1);
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  z-index: 9999 !important;
  position: relative;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--black);
  margin: 3px 0;
  border-radius: 2px;
}

/* conteúdo da logo */
.header-content {
  position: relative;
  max-width: 1200px;
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 95px;
}

/* logo */
.logo-bg {
  position: relative;
  padding: 18px 28px;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

/* logo e texto acima do fundo */
.logo-area {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* garante que a logo fique colorida */
.logo-area img {
  height: 11vh;
  max-width: 100%;
}


.logo-text strong {
  font-size: calc(12px * var(--font-scale));
  letter-spacing: 1px;
  color: var(--black);
}

.logo-text h1 {
  font-size: calc(26px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: var(--black);
}

/* FAIXA DO MENU */
.header-menu {
  position: relative;
  overflow: visible;
  background: var(--red);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000 !important;
}

.menu-overlay {
  z-index: 9998 !important;
}

.header-menu .menu {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  gap: 28px;
  z-index: 2;
  position: relative;
}

.header-menu .menu a {
  color: var(--white);
  text-decoration: none;
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  text-transform: uppercase;
  position: relative;
}

/* hover do menu */
.header-menu .menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: .2s;
}

.header-menu .menu a:hover::after {
  width: 100%;
}

.menu-bar {
  max-width: 1200px;
  margin: auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  color: var(--white);
  font-weight: 600;
  letter-spacing: 1px;
}

.menu-list,
.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item>a {
  position: relative;
  display: block;
  padding: 15px 20px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

/* linha escondida */
.menu-item>a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width 0.3s ease;
}

.menu-item:hover>.submenu {
  display: block;
}

/* hover */
.menu-item:hover>a::after {
  width: 100%;
}

.menu-item {
  position: relative;
}

.menu-item>a {
  display: block;
  padding: 15px 20px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

.menu-item:hover>a,
.menu-item.active>a {
  background: var(--portal-top, #a10303);
  height: 48px;
}



/* ================= CONTAINER ================= */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 2vh;
}

/* ================= TITULOS ================= */

.title {
  font-size: calc(18px * var(--font-scale));
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.title::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--red);
  border-radius: 4px;
}

.block {
  margin: 35px 0;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.link {
  font-size: calc(12px * var(--font-scale));
  color: var(--red);
  font-weight: 600;
}

/* ================= BANNER ================= */
.banner {
  height: auto;
  overflow: visible;
}

.banner-slide video {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.banner-carousel {
  position: relative;
  height: 100%;
}

.banner-carousel--dynamic {
  width: 100%;
  max-width: 2000px;
  margin-inline: auto;
  aspect-ratio: 16 / 5;
  min-height: 190px;
  overflow: hidden;
  background: #000;
}

@media (min-width: 1920px) {
  .banner-carousel--dynamic .banner-slide video,
  .banner-carousel--dynamic .banner-slide img { object-fit: contain; }
}

.banner-carousel--dynamic .banner-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.banner-carousel--dynamic .banner-slide.active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.banner-carousel--dynamic .banner-slide img,
.banner-carousel--dynamic .banner-slide video,
.banner-carousel--dynamic .banner-slide iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.banner-carousel--dynamic .banner-youtube-wrap {
  position: absolute;
  inset: 0;
}

.banner-carousel--dynamic .banner-youtube-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.banner-carousel--dynamic .carousel-btn {
  z-index: 3;
}

.banner-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .5s;
}

.banner-slide.active {
  opacity: 1;
  z-index: 2;
}

.banner-slide video,
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-wrapper {
  width: 100%;
  height: 400px;
  position: relative;
}

.banner-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner img {
  width: 100%;
  height: 40vh;
  border-radius: 0 0 12px 12px;
  object-fit: cover;
  display: block;
  margin-bottom: 30px;
  position: relative;
}

.dots {
  position: absolute;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.dots span {
  width: 14px;
  height: 4px;
  background: #bbb;
  border-radius: 4px;
}

.dots span.active {
  background: var(--red);
}

/* ================= SERVIÇOS ================= */

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 80px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--red);
  cursor: pointer;
  transition: 0.25s;
  background-color: var(--white);
}

.service-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card .icon i {
  color: var(--white);
  font-size: calc(16px * var(--font-scale));
}

.service-card h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  color: #222;
  margin: 0;
  white-space: nowrap;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ================= NOTÍCIAS ================= */

.bid {
  display: flex;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.bid span {
  font-size: calc(13px * var(--font-scale));
  color: #6b7280;
  min-width: 90px;
}

.bid h4 {
  margin: 0;
  font-size: calc(15px * var(--font-scale));
  font-weight: 600;
}

.news-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.home-news-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 12px; background: var(--white); box-shadow: 0 3px 12px rgba(0,0,0,.08); text-decoration: none; }
.home-news-image { height: 300px; background: #f2f2f2; overflow: hidden; }
.home-news-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-news-image img[hidden], .home-news-image .news-image-placeholder[hidden] { display: none; }
.home-news-content { padding: 15px; color: var(--text); }
.home-news-content h3 { margin: 8px 0; font-size: calc(16px * var(--font-scale)); }
.home-news-content p { margin: 0 0 12px; color: #555; font-size: calc(14px * var(--font-scale)); }
.home-news-readmore { color: var(--red, #c00000); font-size: 13px; }
.home-news-list { display: flex; flex-direction: column; gap: 12px; }
.home-news-list .home-news-card { flex-direction: row; }
.home-news-list .home-news-image { width: 120px; min-width: 120px; height: auto; min-height: 110px; }
.home-news-list .home-news-content { flex: 1; padding: 10px; min-width: 0; }
.home-news-list .home-news-content h3 { font-size: calc(13px * var(--font-scale)); line-height: 1.3; }
.home-news-list .home-news-content p { display: none; }
.home-news-card--principal { gap: 10px; background: transparent; box-shadow: none; }
.home-news-card--principal .home-news-image { height: 380px; border-radius: 12px; }
.home-news-card--principal .home-news-content { min-height: 84px; padding: 14px 30px; border-radius: 12px; background: var(--red); color: #fff; }
.home-news-card--principal .news-card-date { color: #fff; }
.home-news-card--principal h3 { color: #fff; }
.home-news-list { justify-content: space-between; }
.home-news-list .home-news-card { background: transparent; box-shadow: none; border-radius: 0; border-left: 1px solid var(--red); padding-left: 12px; }
.home-news-list .home-news-image { width: 150px; min-width: 150px; height: 85px; min-height: 85px; border-radius: 10px; }
.home-news-list .home-news-content { padding: 0 0 0 14px; }
.home-news-list .home-news-content h3 { margin: 4px 0 8px; }
.home-news-layout { min-height: 474px; align-items: stretch; }
.home-news-layout .news-main { height: 100%; }
.home-news-layout .news-slide.active { height: 100%; }
.home-news-card--principal .home-news-image { flex: 1 1 auto; height: 380px; min-height: 300px; }
.home-news-card--principal .home-news-content { flex: 0 0 auto; min-height: 84px; }
.home-news-list { display: grid; grid-template-rows: repeat(4, minmax(105px, 1fr)); gap: 12px; }
.home-news-list article { min-height: 0; }
.home-news-list .home-news-card { height: 100%; align-items: stretch; }
.home-news-list .home-news-image { height: auto; min-height: 0; align-self: stretch; }
.home-news-list .home-news-content { display: flex; flex-direction: column; }
.home-news-list .home-news-readmore { margin-top: auto; }
.home-news-js .home-news-loading .home-news-image {
  background: linear-gradient(100deg, #ececec 20%, #f8f8f8 40%, #ececec 60%);
  background-size: 200% 100%;
  animation: home-news-skeleton 1.4s ease-in-out infinite;
}
.home-news-js .home-news-loading .home-news-image img { visibility: hidden; }
.home-news-js .home-news-loading .home-news-content { position: relative; }
.home-news-js .home-news-loading .home-news-content::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, #ececec 20%, #f8f8f8 40%, #ececec 60%);
  background-size: 200% 100%;
  animation: home-news-skeleton 1.4s ease-in-out infinite;
}
@keyframes home-news-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .home-news-js .home-news-loading .home-news-image,
  .home-news-js .home-news-loading .home-news-content::after { animation: none; }
}
@media (max-width: 1100px) {
  .home-news-layout { grid-template-rows: auto auto; }
  .home-news-layout .news-main { height: auto; }
}
@media (max-width: 600px) {
  .home-news-card--principal .home-news-image { height: 240px; min-height: 240px; }
  .home-news-list .home-news-image { width: 110px; min-width: 110px; }
}

.news-main {
  width: 100%;
  max-width: 900px;
  justify-content: center;
  /* vertical */
  align-items: center;
  /* horizontal */
  position: relative;
  overflow: hidden;
}

.news-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}

.news-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.08);
  border: none;
  color: var(--white);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background .3s ease, transform .3s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.news-main .thumb img {
  width: 100%;
  max-height: 45vh;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  border-radius: var(--radius);
}

.news-main-img {
  position: absolute;
  inset: 0;
  background: #ddd;
}

.news-main-info {
  position: relative;
  background: var(--red);
  color: var(--white);
  padding: 14px 30px;
  z-index: 2;
  border-radius: var(--radius);
}

.news-main-info span {
  font-size: calc(12px * var(--font-scale));
  opacity: 0.9;
}

.news-main-info h3 {
  margin: 4px 0 2px;
  font-size: calc(16px * var(--font-scale));
}

.news-main-info p {
  margin: 0;
  font-size: calc(13px * var(--font-scale));
  opacity: 0.9;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-list article {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  position: relative;
  padding-left: 12px;
}

/* barra vermelha lateral */
.news-list article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  border-radius: 2px;
  background: var(--red);
}

/* thumb */
.news-list .thumb {
  width: 150px;
  height: 85px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: #ddd;
}

.news-list .thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.news-list .thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* texto */
.news-list .sidebar-news .text span {
  font-size: calc(12px * var(--font-scale));
  color: var(--dark-gray);
}

.news-list h3 {
  margin: 2px 0 4px;
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
  line-height: 1.25;
}

.news-list h3 a {
  color: var(--black);
}

.news-list p {
  margin: 0;
  font-size: calc(13px * var(--font-scale));
  color: #555;
}

/* ================= LICITAÇÕES ================= */
.tab {
  padding: 10px 167px;
  border: none;
  background: #eee;
  cursor: pointer;
  font-weight: 600;
  border-radius: 12px 12px 0 0;
  margin: 2px;
  margin-bottom: 10px;
}

.tab.active {
  background: var(--white);
  border-bottom: 2px solid var(--red);
}

.tabs-content {
  background: var(--white);
  border-radius: var(--radius);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.bid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--red);
  padding: 16px 30px;
  border-radius: var(--radius);
}

.bid img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.bid span {
  display: block;
  font-size: calc(13px * var(--font-scale));
  color: var(--dark-gray);
}

.bid h4 {
  font-size: calc(15px * var(--font-scale));
  margin: 4px 0 0;
}

/* ================= BANNER INFERIOR ================= */

.banner-bottom {
  height: 180px;
  background: var(--gray);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 30px;
}

/* ================= LICITAÇÕES ================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.bid-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 16px;
  border: 1px solid var(--red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.bid-type {
  font-weight: 700;
  font-size: calc(13px * var(--font-scale));
  color: #1f2937;
}

.bid-number {
  background: var(--red);
  color: var(--white);
  font-size: calc(12px * var(--font-scale));
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.card-description {
  background: #f3f4f6;
  padding: 12px;
  border-radius: var(--radius);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.5;
  color: #374151;
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(13px * var(--font-scale));
  color: #4b5563;
}

.bid-status {
  background: #e5e7eb;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}



/* ================= CANAIS ================= */

.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 80px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--red);
  cursor: pointer;
  transition: 0.25s;
  background-color: var(--red);
}

.channel-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-card .icon i {
  color: var(--red);
  font-size: calc(16px * var(--font-scale));
}

.channel-card h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
}

.channel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* bolinha atrás do ícone */
.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;

  background: var(--red);
  color: var(--white);

  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle i {
  font-size: calc(16px * var(--font-scale));
}

/* ================= FOOTER ================= */
.footer-logo-top {
  text-align: center;
  padding: 10px 0;
}

.footer-logo-top img {
  max-width: 200px;
  height: auto;
}

.footer-bottom {
  background: var(--portal-footer, #a20303);
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 20px;
}

.footer-credits {
  display: flex;
  align-items: center;
}

.dev-logo {
  height: 25px;
  /* Tamanho da logo de quem fez */
  width: auto;
  margin-top: 10px;
}

.footer-legal a {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* Ajuste para celulares */
@media (max-width: 768px) {
  .footer-bottom-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

.footer-grid a {
  position: relative;
  text-decoration: none !important;
  color: var(--white) !important;
  display: inline-block;
  width: fit-content;
  margin-bottom: 8px;
}

.footer-grid a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--white);
  transition: width 0.3s ease-in-out;
}

.footer-grid a:hover::after {
  width: 100%;
}

.link-endereco {
  display: inline-block !important;
  color: inherit !important;
}

.mapa-footer {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.mapa-footer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

footer {
  background: var(--portal-top, #ae0404);
  color: var(--white);
  padding: 35px 20px 35px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.6fr;
  gap: 40px;
  padding: 10px 20px 0;
}

.footer-grid h4 {
  margin-bottom: 8px;
  font-weight: 600;
}

.footer-grid a {
  display: block;
  margin-bottom: 4px;
  color: var(--white);
  text-decoration: none;
}

/* ================= HOME ================= */

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000 !important;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-logo-container {
  position: relative;
  overflow: hidden;
}

.preloader-logo-container img {
  display: block;
  width: 250px;
  height: auto;
  animation: revealFromLeft 1.2s ease-out forwards;
}

.content-hidden {
  display: none;
}

@keyframes revealFromLeft {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateX(-10px);
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

#preloader.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: all 0.8s ease;
}

.container-mapa-turistico {
  width: 100%;
  overflow: hidden;
  text-align: center;
  padding: 40px 0 0;
}

.container-mapa-turistico .title {
  margin-bottom: 30px;
}

#mapa-ilustrado-png {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: none;
}

#mapa-pontos area {
  cursor: pointer;
}

.modal-turismo {
  display: none;
  position: absolute;
  z-index: 11000;
  width: 560px;
  max-width: 90vw;
  background-color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  left: 0;
  top: 0;
  animation: fadeInModal 0.25s ease;
  overflow: hidden;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-turismo.mostrar {
  display: flex;
  flex-direction: column;
}

.modal-turismo-fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  border: none;
  padding: 0;
  transition: background 0.2s;
}

.modal-turismo-fechar:hover {
  background: #c0392b;
}

.modal-turismo-body {
  display: flex;
  flex-direction: row;
  min-height: 220px;
}

.modal-turismo-texto {
  flex: 1;
  padding: 22px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.modal-turismo-texto h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 0;
  line-height: 1.3;
  border-bottom: none;
  padding-bottom: 0;
}

.modal-turismo-texto p {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  margin: 0 0 12px 0;
}

.modal-turismo-endereco {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
}

.modal-turismo-endereco .icone-pin {
  color: var(--red);
  font-size: 13px;
  margin-top: 1px;
  flex-shrink: 0;
}

.modal-turismo-horario {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #555;
  margin-bottom: 14px;
}

.modal-turismo-horario .icone-relogio {
  color: var(--red);
  font-size: 13px;
  margin-top: 1px;
  flex-shrink: 0;
}

.modal-turismo-acoes {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.modal-turismo-imagem {
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.modal-turismo-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 20px;
  border-radius: var(--radius);
}


.acessibilidade {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.acessibilidade-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--red);
  min-width: 190px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
  z-index: 10004;
}

.acessibilidade-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  color: var(--white);
  background: var(--red);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  text-decoration: none;
  font-size: calc(14px * var(--font-scale));
}

.acessibilidade-menu a:hover {
  background: var(--red, #b40303);
  color: var(--white);
}

.acessibilidade:hover .acessibilidade-menu,
.acessibilidade:focus-within .acessibilidade-menu {
  display: block;
}

.alto-contraste {
  background: var(--black);
  color: var(--white);
}

.alto-contraste a {
  color: #ff0;
}

/* ================= NOTÍCIAS ================= */
.category-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
  color: #fff !important;
}

.news-card .info {
  display: flex;
  flex-direction: column;
}

.veja-mais-noticias-wrapper {
  position: relative;
  margin-top: 20px;
}

.veja-mais-noticias-carousel {
  overflow: hidden;
  width: 100%;
}

.veja-mais-noticias-track {
  display: flex;
  gap: 20px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.veja-mais-noticias-item {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: calc((100% - 40px) / 3);
  box-sizing: border-box;
}

.veja-mais-noticias-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.veja-mais-noticias-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  height: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.veja-mais-noticias-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.veja-mais-noticias-imagem { height: 180px; background: #f2f2f2; overflow: hidden; }
.veja-mais-noticias-imagem img[hidden] { display: none; }
.veja-mais-noticias-imagem .news-image-placeholder[hidden] { display: none; }

.veja-mais-noticias-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.veja-mais-noticias-card { display: flex; flex-direction: column; }
.veja-mais-noticias-content .category-tag { color: #fff; }
.veja-mais-noticias-content p { font-size: calc(14px * var(--font-scale)); color: #555; margin: 0 0 15px; }
.veja-mais-noticias-content .veja-mais-noticias-readmore { color: var(--red, #c00000); margin-top: auto; }

.veja-mais-noticias-content span {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--dark-gray);
}

.veja-mais-noticias-content h4 {
  font-size: 1rem;
  margin: 10px 0;
  min-height: 4.5em;
  line-height: 1.35;
  overflow: hidden;
}

.veja-mais-noticias-readmore {
  font-size: 0.85rem;
  color: #888;
}

.veja-mais-noticias-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

.veja-mais-noticias-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.veja-mais-noticias-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.veja-mais-noticias-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.noticia-container-main h1 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.noticia-line {
  height: 4px;
  background: var(--red);
  width: 100%;
  margin-bottom: 25px;
}

.noticia-galeria {
  margin-bottom: 30px;
  max-width: 100%;
}

.noticia-imagem-destaque {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f8f9fa;
  cursor: pointer;
  text-align: center;
}

.noticia-imagem-destaque img {
  width: 100%;
  height: auto;
  max-height: 500px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.noticia-miniaturas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb-item {
  width: 120px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.2s;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--red);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.noticia-body-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.6;
}

.noticia-info-bar {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 10px;
  margin: 40px 0 25px 0;
  color: var(--dark-gray);
  font-size: 0.95rem;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.noticias-carousel {
  display: flex !important;
  overflow: hidden;
}

.noticia-slide {
  flex: 0 0 25%;
  min-width: 250px;
}

.slick-prev:before,
.slick-next:before {
  color: var(--red) !important;
  font-size: calc(30px * var(--font-scale));
}

.slick-track {
  width: 100% !important;
}

.news-filter .input-control,
.news-filter select,
.news-filter input[type="date"] {
  height: 45px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: calc(14px * var(--font-scale));
  width: 220px;
}

.news-filter {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 30px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.news-filter {
  display: flex;
  align-items: end;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 10px;
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-period {
  display: flex;
  gap: 10px;
}

.filter-group label {
  font-weight: 600;
}

.filter-group input {
  height: 45px;
  padding: 6px 10px;
  min-width: 289px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 13px 20px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  font-size: 0.9rem;
}

.btn.primary {
  background: var(--red);
  color: var(--white);
  position: relative;
  z-index: 1;
  border: none;
  overflow: hidden;
  padding: 15px 25px;
  transition: all 0.3s ease;
  gap: 6px;
  border-radius: var(--radius);
}

/* O "fio" branco que gira */
.btn.primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent,
      transparent,
      transparent,
      #fff);
  transition: opacity 0.3s;
  opacity: 0;
  z-index: -2;
}

.btn.primary::after {
  content: '';
  position: absolute;
  inset: 1px;
  /* Aqui você define a espessura da linha branca (2px) */
  background: var(--red);
  border-radius: var(--radius);
  z-index: -1;
}

/* Animação de rotação infinita */
@keyframes rotateLine {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Efeitos de Hover */
.btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn.primary:hover::before {
  opacity: 1;
  animation: rotateLine 1.5s linear infinite;
  /* A linha corre sem parar */
}

/* Efeito de clique */
.btn.primary:active {
  transform: scale(0.98);
}

.btn.outline {
  border: 1px solid var(--red);
  color: var(--red);
  background: transparent;
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border-radius: var(--radius);
  gap: 7px;
}

/* O "fio" VERMELHO que gira */
.btn.outline::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* Gradiente com a sua cor --red */
  background: conic-gradient(transparent,
      transparent,
      transparent,
      var(--red));
  opacity: 0;
  z-index: -2;
  transition: opacity 0.3s;
}

/* A máscara que mantém o centro transparente */
.btn.outline::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: #fff;
  /* IMPORTANTE: Use a cor de fundo do seu site aqui */
  border-radius: var(--radius);
  z-index: -1;
  transition: all 0.3s ease;
}

@keyframes rotateRedLine {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- Hover Effects --- */

.btn.outline:hover {
  color: var(--red);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(177, 0, 0, 0.2);
}

.btn.outline:hover::before {
  opacity: 1;
  animation: rotateRedLine 1.5s linear infinite;
}

/* Opcional: Se quiser que no hover o fundo continue branco/transparente */
.btn.outline:hover::after {
  background: #fff;
  /* Mantém o fundo limpo enquanto a linha corre */
}

.btn.outline:active {
  transform: scale(0.98);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card .thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.news-card .thumb {
  height: 180px;
  background: #f2f2f2;
  overflow: hidden;
}

.news-card > .link { display: flex; flex-direction: column; height: 100%; }
.news-card .info { flex: 1; }
.news-card .info .category-tag { min-height: 22px; }
.news-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 30px; }
.news-card-date { font-size: calc(13px * var(--font-scale)); color: #555; }
.news-card .info .category-tag { flex: 0 1 auto; width: fit-content; }
.news-card .info h3 { line-height: 1.5; min-height: 4.5em; }
.news-card .link .news-card-read-more { margin-top: auto; color: var(--red, #c00000); }

.news-image-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #777;
  background: #f2f2f2;
  font-size: 13px;
}
.news-image-placeholder[hidden], .news-card .thumb img[hidden] { display: none; }
.news-image-placeholder i { font-size: 38px; color: #a3a3a3; }

.news-card .info {
  padding: 15px;
}

.news-card .date {
  font-size: calc(13px * var(--font-scale));
  color: #777;
}

.date {
  font-size: calc(13px * var(--font-scale));
}

.news-card h3 {
  font-size: calc(16px * var(--font-scale));
  margin: 8px 0;
  color: var(--text);
}

.news-card p {
  font-size: calc(14px * var(--font-scale)) !important;
  color: #555;
  margin-bottom: 15px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pagination a.active {
  background: var(--red);
  color: var(--white);
}

/* ================= NOTÍCIAS DETALHES ================= */
.noticia-imagem-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 20px;
}

.noticia-imagem-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius);
}

.noticia-card {
  background: var(--white);
  border: 1px solid var(--red);
  border-radius: 14px;
  padding: 35px;
}

.noticia-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.noticia-titulo {
  font-size: calc(32px * var(--font-scale));
  font-weight: 700;
  color: var(--text);
  margin-bottom: 15px;
}

.noticia-meta {
  display: flex;
  gap: 20px;
  font-size: calc(14px * var(--font-scale));
  color: var(--dark-gray);
  margin-bottom: 15px;
}

.share {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.share-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--white);
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.whatsapp {
  background: #25d366;
}

.share-btn.linkedin {
  background: #0a66c2;
}

.share-btn.email {
  background: #f39c12;
}

.noticia-texto {
  line-height: 1.7;
  font-size: calc(16px * var(--font-scale));
  margin-bottom: 30px;
}

.noticia-links {
  margin-top: 20px;
}

.link-arquivo {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.comentarios {
  margin-top: 40px;
}

.comentarios form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comentarios input,
.comentarios textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.noticia-sidebar h3 {
  margin-bottom: 20px;
}

.sidebar-item {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.sidebar-item img {
  width: 90px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.sidebar-item h4 {
  font-size: calc(14px * var(--font-scale));
  margin: 5px 0;
}

.sidebar-item a {
  font-size: calc(13px * var(--font-scale));
  color: var(--red);
  text-decoration: underline;
}


/* ================= INSTITUCIONAL ================= */

.institucional-page {
  margin-top: 40px;
}

.gestao-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.gestao-card {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 3px 15px rgba(0, 0, 0, .08);
}

.gestao-card img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.institucional-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.institucional-tabs .tab {
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.institucional-tabs .tab.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.secretaria-list {
  display: grid;
  gap: 15px;
}

.secretaria-titulo {
  font-size: calc(16px * var(--font-scale));
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
}

.secretaria-pessoa {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secretaria-pessoa img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.pessoa-info strong {
  font-size: calc(15px * var(--font-scale));
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111827;
}

.pessoa-info span {
  font-size: calc(13px * var(--font-scale));
  color: #6b7280;
}

.verificado {
  color: #22c55e;
  font-size: calc(14px * var(--font-scale));
}

.organograma img {
  width: 100%;
  max-width: 1000px;
  display: block;
  margin: auto;
}

.faq {
  margin-top: 60px;
}

.faq-trigger {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 15px 20px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  text-align: left !important;
  transition: all 0.3s ease;
}

.faq-item {
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item button i {
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.faq-item button {
  width: 100%;
  background: var(--red);
  color: var(--white);
  padding: 15px;
  border: none;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
}

.faq-content {
  display: none;
  padding: 15px;
  border-top: none;
}

.faq-trigger i {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-trigger i {
  transform: rotate(180deg);
}

.secretaria-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--red);
  border-radius: 12px;
  border-left: 5px solid var(--red);
  background: #fff;
  gap: 15px;
}

.secretaria-info {
  flex: 1;
  min-width: 260px;
}

.secretaria-info h4 {
  font-size: calc(16px * var(--font-scale));
  margin-bottom: 12px;
}

.secretaria-pessoa img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.secretaria-contato {
  display: flex;
  align-items: stretch;
  gap: 20px;
  flex: 2;
}

.secretaria-contato .bloco {
  flex: 1;
  min-width: 0;
}

.secretaria-contato .bloco strong {
  display: block;
  margin-top: 5px;
}

.secretaria-contato .bloco p {
  margin-bottom: 6px;
}

.barra {
  width: 1px;
  height: 150px;
  background: #ddd;
}

.verificado {
  color: #22c55e;
  font-size: calc(13px * var(--font-scale));
}

/* ================= LEIS ================= */
.category {
  font-weight: 600;
  background: var(--red);
  color: #fff;
  padding: 2px 10px;
  border-radius: 11px;
}

.laws-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.law-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: .2s;
  border-left: 5px solid var(--red);
}

.law-item:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, .06);
}

.law-info h4 {
  font-size: calc(15px * var(--font-scale));
  font-weight: 600;
  color: var(--text);
}

.law-date {
  font-size: calc(13px * var(--font-scale));
  color: #777;
  display: block;
  margin-bottom: 5px;
}

.law-info p {
  font-size: calc(14px * var(--font-scale));
  color: #444;
  line-height: 1.5;
 
}

.btn-view {
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: calc(13px * var(--font-scale));
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.btn-view:hover {
  background: #8d0101;
}

.year-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.year-selector .year-btn {
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
}

.year-selector .year-btn:hover {
  background: var(--red);
  color: var(--white);
}

.year-selector .year-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}


/* ================= LEIS DETALHES ================= */
.breadcrumb {
  font-size: calc(14px * var(--font-scale));
  margin-bottom: 15px;
  color: #777;
  text-align: left;
  display: block;
  width: 100%;
}

.breadcrumb a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: var(--black);
}

.breadcrumb .current {
  color: #999;
  font-weight: 400;
}

.law-details-card {
  background: var(--white);
  border: 1px solid var(--red);
  border-radius: 14px;
  padding: 35px;
}

.law-description {
  margin-bottom: 20px;
}

.law-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.law-title {
  font-size: calc(32px * var(--font-scale));
  margin: 15px 0;
}

.law-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  color: var(--dark-gray);
  font-size: calc(14px * var(--font-scale));
}

.law-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #c40000;
  color: var(--white);
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.law-download:hover {
  background: #a80000;
}

.law-sidebar h3 {
  margin-bottom: 20px;
}

.recent-law {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: var(--text);
}

.recent-law:hover {
  color: #e30613;
}

.recent-law .date {
  font-size: calc(13px * var(--font-scale));
  color: #888;
  display: block;
  margin-bottom: 4px;
}

/* ================= CONTATO ================= */
.contato-page {
  padding: 60px 0;
}

.contato-hero {
  max-width: 900px;
  margin: 0 auto 60px;
  text-align: center;
}

.contato-hero h1 {
  font-size: calc(38px * var(--font-scale));
  font-weight: 600;
  margin-bottom: 15px;
}

.contato-hero p {
  font-size: calc(17px * var(--font-scale));
  color: #555;
  line-height: 1.7;
}

.contato-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contato-text {
  font-size: calc(16px * var(--font-scale));
  line-height: 1.7;
  color: #444;
}

.contato-text p {
  margin-bottom: 20px;
}

.contato-instrucoes h3 {
  margin-bottom: 12px;
  font-size: calc(18px * var(--font-scale));
}

.contato-instrucoes ul {
  padding-left: 20px;
}

.contato-form-card {
  background: var(--white);
  padding: 40px;
  border-radius: 14px;
  border: 1px solid var(--red)
}

.contato-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 9px;
}

.form-group label {
  display: block;
  font-weight: 500;
  /*margin-bottom: 8px;*/
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: var(--fonte-texto, 'Poppins', sans-serif);
  font-size: calc(14px * var(--font-scale));
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-enviar {
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: calc(15px * var(--font-scale));
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
}

.btn-enviar:hover {
  background: var(--portal-top, #a10303);
}

/* ================= LEIS HOME ================= */

.bid-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--white);
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid var(--red);
  transition: .25s;
}

.bid-item+.bid-item {
  margin-top: 12px;
}

.bid-item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

/* ===== DIÁRIO OFICIAL ===== */
/* Círculo vermelho para dias com edição */
.dia-com-edicao {
  position: relative;
  color: #fff !important;
  font-weight: bold;
  z-index: 1;
}

.dia-com-edicao::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background-color: #f44336;
  /* Cor vermelha da imagem */
  border-radius: 50%;
  z-index: -1;
}

/* Tooltip (Balãozinho preto) */
.calendar-grid div {
  position: relative;
}

/* Garante o alinhamento do tooltip */

.tooltip-edicao {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: calc(11px * var(--font-scale));
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.tooltip-edicao::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
}

.pagination-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.more-editions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  background: var(--white);
  color: #444;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.page-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  pointer-events: none;
}

.page-btn.prev,
.page-btn.next {
  padding: 0 14px;
}

.page-dots {
  padding: 0 6px;
  color: #888;
  font-weight: 500;
}

.border {
  border: 1px solid var(--red);
}

.gazette-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 25px;
}

.gazette-layout .full {
  grid-column: 1 / -1;
}

.recent-box,
.search-box {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, .06);
}


.recent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.recent-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recent-card .icon i {
  color: var(--white);
  font-size: calc(16px * var(--font-scale));
}

.recent-box h3 {
  font-size: calc(16px * var(--font-scale));
  font-weight: 600;
  padding-bottom: 6px;
}

.recent-card,
.edition-card {
  background: var(--white);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #e9e9e9;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recent-card img,
.edition-card img {
  width: 48px;
}

.recent-card h4,
.edition-card h4 {
  font-size: calc(14px * var(--font-scale));
  margin: 10px 0 3px;
}

.recent-card span,
.edition-card span,
.card-news-mini-content span,
.info span,
.bid-info span {
  font-size: calc(12px * var(--font-scale));
  color: #555;
  margin-bottom: 9px;
}

.edition-card small {
  display: block;
  font-size: calc(11px * var(--font-scale));
  color: #888;
  margin-bottom: 10px;
}

.btn-view {
  display: block;
  background: var(--red);
  color: var(--white);
  padding: 10px;
  border-radius: var(--radius);
  font-size: calc(13px * var(--font-scale));
  transition: .3s;
}

.btn-view:hover {
  background: rgb(172, 0, 0);
}

/* Grid */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}



/* Calendário */
.calendar-widget {
  height: 83%;
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-header span {
  font-weight: 600;
  font-size: calc(15px * var(--font-scale));
  color: #1f2937;
}

.calendar-header button {
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: calc(18px * var(--font-scale));
  cursor: pointer;
  transition: all .2s ease;
}

.calendar-header button:hover {
  background: #e5e7eb;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: calc(11px * var(--font-scale));
  color: #6b7280;
  margin-bottom: 6px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-grid div {
  text-align: center;
  padding: 8px 0;
  font-size: calc(13px * var(--font-scale));
  border-radius: 50%;
  cursor: pointer;
  transition: .5s;
  color: #1f2937;
  width: 32px;
  height: 32px;
}

.calendar-grid div:hover {
  background: rgb(168, 1, 1);
  color: var(--white);
}

.calendar-grid .today {
  background: var(--red);
  color: var(--white);
  font-weight: 600;
}

.shadow {
  box-shadow: 0 6px 15px rgba(0, 0, 0, .06);
}

.no-box-shadow {
  box-shadow: none;
}

/* ================= OUVIDORIA ================= */
.container-ouvidoria {
  border: 1px solid var(--red);
  border-radius: 14px;
  background: var(--white);
  width: 100%;
  padding: 36px 32px 40px;
}

/* Título principal */
.ouvidoria-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 18px;
  border-bottom: 4px solid var(--red);
  padding-bottom: 10px;
}

/* Texto introdutório */
.ouvidoria-text,
.ouvidoria-card-info {
  margin-bottom: 20px;
}

.ouvidoria-text a {
  color: var(--white);
  text-decoration: none;
  margin-top: 40px;
}

.ouvidoria-text a:hover {
  text-decoration: underline;
}

/* Botão Resolução */
.btn-button {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 30px;
  transition: background 0.2s;
}

.btn-button:hover {
  background: #8d0101;
}



/* Grid de dois cards */
.ouvidoria-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  align-items: start;
}

.ouvidoria-card-info {
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 24px 22px;
}

.ouvidoria-card-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.ouvidoria-card-info p {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.65;
  margin-bottom: 10px;
}

.ouvidoria-card-info p:last-child {
  margin-bottom: 0;
}

.ouvidoria-card-info a {
  color: var(--red);
  text-decoration: none;
}

.ouvidoria-card-info a:hover {
  text-decoration: underline;
}

/* Card formulário eletrônico */
.ouvidoria-card-form {
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 24px 22px;
}

.ouvidoria-card-form h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.ouvidoria-card-form>p {
  font-size: 0.93rem;
  color: #555;
  margin-bottom: 14px;
}

/* Box de protocolo */
.protocolo-box {
  background: #f8f9fa;
  padding: 15px;
  border-left: 5px solid var(--red);
  border-radius: 4px;
}

.protocolo-box a {
  color: var(--red);
  text-decoration: none;
  font-size: 0.9rem;
}

.protocolo-box a:hover {
  text-decoration: underline;
}

/* Formulário */
.form-ouvidoria-modern {
  display: flex;
  flex-direction: column;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.btn-registration {
  border: none;
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 30px;
  transition: background 0.2s;
  cursor: pointer;
}

.btn-registration:hover {
  background: #a93226;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--red);
  font-weight: 500;
  font-size: calc(13px * var(--font-scale));
  text-decoration: none;
}

.form-grid {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s;
  font-family: inherit;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c0392b;
  background: var(--white);
}

/* Área do captcha */
.captcha-area {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.captcha-area .form-group {
  flex: 1;
}

.captcha-area img {
  height: 38px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #eee;
}

@media (max-width: 700px) {
  .ouvidoria-grid {
    grid-template-columns: 1fr;
  }
}

.search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  background: var(--white);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.page-btn:hover {
  background: var(--red);
}

.page-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.link-arquivos {
  margin: 0 4px !important;
}

.page-dots {
  padding: 0 4px;
  color: var(--dark-gray);
  font-weight: 600;
}

.menu,
.menu-list,
.submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-list {
  display: flex;
}

.menu-item,
.submenu li,
.has-submenu {
  position: relative;
}

.menu-item>a {
  position: relative;
  display: block;
  padding: 15px 30px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

.menu-item:hover>a,
.menu-item.active>a {
  background: var(--portal-top, #a10303);
  height: 48px;
}

.menu-item>a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width 0.3s ease;
}

.menu-item:hover>a::after {
  width: 100%;
}

/* todos os submenus começam escondidos */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--red);
  z-index: 9999;
  border-radius: 0 0 10px 10px;
  margin-top: -2px;
}

/* abre apenas o submenu direto do item principal */
.menu-item:hover>.submenu {
  display: block;
}

/* links internos */
.submenu li>a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  background: var(--red);
  white-space: nowrap;
}

.submenu li>a:hover {
  background: var(--red, #b40303);
}

/* submenu de segundo nível e seguintes */
.submenu .submenu {
  top: 0;
  left: 100%;
  border-radius: 0 0 10px 10px;
}

/* abre apenas o submenu direto do item interno */
.submenu li:hover>.submenu {
  display: block;
}

/* seta para itens com filhos */
.has-submenu>a::after {
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 10px;
}

.noticia-galeria {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.noticia-imagem-destaque,
.noticia-midia-destaque {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.noticia-imagem-destaque img,
.noticia-midia-destaque img,
.noticia-midia-destaque video {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: contain;
}

.noticia-imagem-indisponivel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: #f2f2f2;
  color: #a3a3a3;
  font-size: 42px;
}
.thumb-item .noticia-imagem-indisponivel {
  min-height: 0;
  height: 100%;
  font-size: 24px;
}

.noticia-miniaturas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb-item {
  width: 110px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  background: #f3f3f3;
  transition: 0.2s ease;
}

.thumb-item.active {
  border-color: var(--red);
}

.noticia-galeria .imagem-carregando {
  background: linear-gradient(100deg, #ececec 20%, #f8f8f8 40%, #ececec 60%);
  background-size: 200% 100%;
  animation: noticia-skeleton 1.4s ease-in-out infinite;
}
.noticia-midia-destaque.imagem-carregando { min-height: 220px; }
.noticia-galeria .imagem-carregando > img { visibility: hidden; }
.noticia-galeria .thumb-item.active,
.noticia-galeria .thumb-item:focus-visible { border-color: var(--red); outline-color: var(--red); }
@keyframes noticia-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .noticia-galeria .imagem-carregando { animation: none; }
}

.thumb-item img,
.thumb-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.thumb-item.video::after {
  content: "\f144";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.btn-close-menu {
  display: none;
}

.banner-slide {
  position: relative;
  overflow: hidden;
}

.banner-youtube {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.banner-slide {
  position: relative;
  overflow: hidden;
  background: #000;
}

.banner-youtube-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#bannerYoutubePlayer,
.banner-youtube-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
}

.banner-youtube-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
}

.banner-slide {
  position: relative;
  overflow: hidden;
  background: #000;
}

.banner-youtube-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

#bannerYoutubePlayer,
.banner-youtube-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  z-index: 1;
}

.banner-youtube-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000 var(--topo-fundo, none) center center / cover no-repeat;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.banner-youtube-mask.is-hidden {
  opacity: 0;
}

.banner-youtube-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  cursor: default;
}


.heart {
  background: white;
  position: relative;
  height: 8px;
  width: 8px;
  transform: rotate(-45deg);
  transform-origin: center;
  animation: heartbeat 1.3s ease-in-out infinite;
  margin: 0 8px;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.heart::before {
  top: -5px;
  left: 0;
}

.heart::after {
  left: 5px;
  top: 0;
}

@keyframes heartbeat {
  0% {
    transform: rotate(-45deg) scale(1);
  }

  15% {
    transform: rotate(-45deg) scale(1.3);
  }

  30% {
    transform: rotate(-45deg) scale(1);
  }

  45% {
    transform: rotate(-45deg) scale(1.2);
  }

  60% {
    transform: rotate(-45deg) scale(1);
  }

  100% {
    transform: rotate(-45deg) scale(1);
  }
}

/* ==========================================================
   RESPONSIVIDADE - regras originais na ordem de carregamento
   ========================================================== */

/* ==========================================================
   RESPONSIVE.CSS — Cobertura completa baseada no style.css
   Breakpoints: 1200 → 1100 → 991 → 900 → 768 → 700 → 600 → 500 → 380
   ========================================================== */


/* ================= ≤ 1200px ================= */
@media (max-width: 1200px) {
  .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
  }

  .header-content {
    gap: 40px;
    padding: 0 20px;
  }

  .header-menu::before,
  .header-menu::after {
    display: none;
  }

  .header-menu .menu {
    gap: 18px;
  }

  .services {
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .services > a, .service-card, .service-card h3 { min-width: 0; }
  .service-card { width: 100%; height: auto; min-height: 80px; box-sizing: border-box; padding: 12px; }
  .service-card h3 { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
  .news-layout > *, .home-news-list article, .news-grid > * { min-width: 0; }
  .news-filter .filter-group, .news-filter .filter-period { min-width: 0; }
  .news-filter .filter-group input, .news-filter .filter-group select { min-width: 0; max-width: 100%; box-sizing: border-box; }

  .news-layout {
    gap: 16px;
  }

  .footer-grid {
    gap: 24px;
    padding: 10px 20px 0;
  }
}

@media (min-width: 1100.01px) and (max-width: 1200px) {
  .header-top-content { gap: 8px; }
  .header-top .top-left { flex-shrink: 0; }
  .header-top .top-right { flex-wrap: nowrap; gap: 2px; min-width: 0; }
  .header-top .top-right > a, .header-top .acessibilidade-btn { white-space: nowrap; padding-left: 7px; padding-right: 7px; }
  .header-top .search-container { width: clamp(160px, 20vw, 240px); flex-shrink: 1; }
  .header-top .search-container input { min-width: 0; }
}


/* ================= ≤ 1100px ================= */
@media (max-width: 1100px) {
  .gazette-layout {
    grid-template-columns: 1fr;
  }

  .edition-grid,
  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab {
    padding: 10px 40px;
  }
}


/* ================= ≤ 991px — MENU MOBILE ================= */
@media (max-width: 991px) {
    .recent-card h3 {
        margin-top: 10px;
    }
    .more-editions {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .more-editions .recent-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 15px;
        padding: 0;
    }
    .more-editions {
        width: 100% !important;
        max-width: none !important;
        display: block !important;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .more-editions {
        width: 100% ;
        display: block;
    }
    .gazette-layout {
        flex-direction: column !important; /* Empilha Calendário e Listagem */
        display: flex !important;
    }

    .gazette-sidebar {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-bottom: 20px;
    }

    .calendar-widget {
        margin: 0 auto;
        max-width: 100%;
    }

    /* Filtros ocupando 100% */
    .news-filter {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
    }

    .filter-group, .filter-period {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
    }

    .filter-group input {
        width: 100% !important;
        height: 45px;
    }

    .filter-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    /* Ajuste dos cards de edições para não sumirem */
    .recent-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
    }

    .recent-card {
        width: 100% !important;
        margin: 0 !important;
    }
    .header-top {
        display: block !important; 
    }
    
    .header-top-content {
        flex-direction: column;
        padding: 10px;
    }

    /* Esconde ícones sociais ou links irrelevantes para dar espaço à busca */
    .top-left, .social-icons {
        display: none; 
    }

    .search-container.search-container-live {
        width: 100% !important; 
        max-width: none !important;
        margin: 10px 0 !important;
        display: flex !important;
    }
    
    .search-container-live input {
        width: 100% !important;
    }

    .search-container input {
        width: 100%;
        border: none;
        padding: 8px;
        color: #333;
    }

    .search-container button {
        background: none;
        border: none;
        padding: 0 10px;
    }

    /* Ajuste para os resultados da busca ao vivo não sumirem */
    .search-live-results {
        width: 100%;
        left: 0;
        top: 100%;
        z-index: 10000;
    }    
    .container {
        margin: 0;
    }
    .header-menu .menu a {
        color: var(--text);
    }
    .header-menu {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 280px; 
        height: 100vh;
        background: #fff;
        z-index: 9999;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .header-menu.active {
        right: 0;
    }
    
    .btn-close-menu {
        position: absolute;
        top: 15px;
        left: 15px; 
        background: none;
        border: none;
        font-size: 30px;
        color: #333;
        cursor: pointer;
    }
    
    .menu-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        display: none; 
        z-index: 9998;
    }

    .menu-mobile-overlay.active {
        display: block;
    }

    body.menu-opened .header-menu {
        right: 0;
    }

    .menu-list {
        flex-direction: column;
        display: block;
    }
    
    .header-menu .menu-list {
        display: flex !important;
        flex-direction: column !important; 
        gap: 10px;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .menu-item {
        margin: 0;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .menu-item a {
        padding: 15px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #333;
        font-weight: 500;
    }

    .submenu {
        position: static;
        display: none; /* Escondido por padrão */
        background: #f9f9f9;
        box-shadow: none;
        padding-left: 15px;
        width: 100%;
    }
    .menu-item.has-submenu > a::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 12px;
        transition: transform 0.3s;
    }

    .menu-item.open > a::after {
        transform: rotate(180deg);
    }

    /* Overlay escuro ao fundo */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    body.menu-opened .menu-overlay {
        display: block;
    }
    /* Busca */
    .search-container {
    display: none;
    }
    
    /* Header */
    .header-content {
    gap: 20px;
    justify-content: space-between;
    }
    
    .header-bg {
    height: 10vh;
    }
    
    .logo-area img {
    height: 6vh;
    }
    
    .logo-text h1 {
    font-size: 20px;
    }
    
    .logo-text strong {
    font-size: 11px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        z-index: 1000;
        background: none;
        border: none;
        cursor: pointer;
    }

    .hamburger span {
        width: 25px;
        height: 2px;
        background: #333;
        transition: 0.3s;
    }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    .menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    height: auto;
    background: none;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    }
    
    .menu-item > a::after {
    display: none;
    }
    
    .menu-item:hover > a,
    .menu-item.active > a {
    background: #f5f5f5;
    color: var(--red, #c00000);
    height: auto;
    }
    .submenu li a {
    display: block;
    padding: 12px 28px;
    color: #444;
    font-size: 13px;
    border-bottom: 1px solid #ececec;
    }
    
    .submenu li a:hover {
    background: #efefef;
    color: var(--red, #c00000);
    }
    
    .menu-bar {
    display: none;
    }
    
    /* Header top simplificado */
    .top-left span {
    display: none;
    }
    
    /* Serviços 2 colunas */
    .services {
    grid-template-columns: repeat(2, 1fr);
    }
    
    /* Layouts de página interna */
    .noticia-layout,
    .law-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    }
    
    .contato-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    }
    
    .contato-form .form-row {
    grid-template-columns: 1fr;
    }
    
    .contato-hero h1 {
    font-size: 28px;
    }
    
    .news-main .thumb img {
    max-height: 35vh;
    }
    
    .btn-close-menu{
        display: block;
    }
}

/* Submenu hover apenas no desktop */
@media (min-width: 601px) and (max-width: 992px) {
    .veja-mais-noticias-item {
    flex: 0 0 calc((100% - 20px) / 2);
    min-width: calc((100% - 20px) / 2);
}
  .menu-item:hover > .submenu {
    display: block;
  }
}


/* ================= ≤ 900px ================= */
@media (max-width: 900px) {
  .header-menu .menu {
    gap: 12px;
    flex-wrap: wrap;
  }

  .services,
  .bids,
  .channels {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab {
    padding: 8px 30px;
    color: var(--text);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .noticia-layout {
    grid-template-columns: 1fr;
  }

  .gestao-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner {
    height: 300px;
  }

  .banner-wrapper {
    height: 300px;
  }

  .banner img {
    height: 30vh;
  }
}


@media (min-width: 769px) and (max-width: 991px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================= ≤ 768px ================= */
@media (max-width: 768px) {
    #mapa-ilustrado-png {
        width: 1200px; 
    }
    
    #modal-turismo {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
        top: 50% !important;
        transform: translateY(-50%) !important; 
        position: fixed !important; 
        margin: 0 auto;
    }

    .modal-turismo-body {
        flex-direction: column-reverse;
    }
    
    .modal-turismo-imagem img {
        max-height: 200px;
        width: 100%;
        object-fit: cover;
    }
  .news-filter .filter-group input, 
  .news-filter .filter-group select {
    width: 100% !important; 
    min-width: 350px !important;
  }
  
  .header-bg {
    height: 9vh;
  }

  .header-content {
    padding: 0 16px;
    gap: 12px;
  }

  .logo-bg {
    padding: 10px 14px;
  }

  .logo-text h1 {
    font-size: 18px;
  }

  .logo-text strong {
    font-size: 10px;
  }

  .logo-area img {
    height: 5vh;
  }

  /* Header top */
  .header-top {
    height: auto;
    padding: 6px 0;
  }

  .header-top-content {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .top-left {
    display: none;
  }

  .top-right {
    gap: 5px;
    font-size: 9px;
  }

  /* Banner */
  .banner {
    height: 240px;
  }

  .banner-wrapper {
    height: 240px;
  }

  .banner img {
    height: 28vh;
    border-radius: 0 0 16px 16px;
  }

  /* Serviços */
  .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .service-card h3 {
    font-size: 15px;
    white-space: normal;
  }

  .service-card {
    height: auto;
    padding: 12px;
    gap: 10px;
  }

  /* Notícias lista */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Filtros */
  .news-filter {
    flex-direction: column;
    gap: 12px;
  }

  .filter-period {
    flex-direction: column;
  }

  .filter-group input,
  .filter-group select {
    min-width: unset;
    width: 100%;
  }

  .filter-actions {
    justify-content: space-between;
    width: 100%;
  }

  .filter-actions .btn {
    flex: 1;
    justify-content: center;
  }

  /* Ano selector */
  .year-selector {
    gap: 8px;
  }

  .year-selector .year-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Notícia detalhe */
  .noticia-card {
    padding: 20px 16px;
  }

  .noticia-titulo {
    font-size: 22px;
  }

  .noticia-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .share {
    flex-wrap: wrap;
  }

  /* Lei detalhe */
  .law-details-card {
    padding: 20px 16px;
  }

  .law-title {
    font-size: 22px;
  }

  .law-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Ouvidoria */
  .ouvidoria-grid {
    grid-template-columns: 1fr;
  }

  .container-ouvidoria {
    padding: 20px 16px 24px;
  }

  .ouvidoria-title {
    font-size: 1.4rem;
  }

  /* Contato */
  .contato-form-card {
    padding: 24px 16px;
  }

  .contato-hero h1 {
    font-size: 26px;
  }

  .contato-hero p {
    font-size: 15px;
  }

  /* Institucional */
  .secretaria-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .secretaria-contato {
    flex-direction: column;
    width: 100%;
  }

  .secretaria-contato .barra {
    display: none;
  }

  .secretaria-pessoa {
    flex-direction: row;
    align-items: center;
  }

  .institucional-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .gestao-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Formulários */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contato-wrapper {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  footer {
    padding: 24px 16px;
  }

  .footer-bottom-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 14px 16px;
  }

  /* Diário oficial */
  .gazette-layout {
    grid-template-columns: 1fr;
  }

  .calendar-widget {
    height: auto;
  }

  /* Search live */
  .search-live-results {
    min-width: unset;
    width: 100%;
  }

  /* Acessibilidade */
  .acessibilidade-menu {
    right: auto;
    left: 0;
  }
}

@media (max-width: 767.98px) {
    .submenu li a{
        color: var(--white) !important;
    }
    
    .header-menu .submenu {
        display: none !important;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }

    .header-menu li.open > .submenu {
        display: block !important;
    }

    .header-menu li.open > a {
        font-weight: 700;
    }
}


/* ================= ≤ 700px ================= */
@media (max-width: 700px) {
  /* Leis */
  .law-item {
    padding: 15px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .law-info h4 {
    font-size: 15px;
    word-break: break-word; 
  }

  .law-info p {
    width: 100%;
  }

  .btn-view {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    display: flex;
  }

  /* Licitações item */
  .bid-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .container-mapa-turistico .title {
      margin-bottom: 0;
  }

  .bid-item .btn-view {
    align-self: flex-end;
    text-align: center;
  }

  .bid {
    padding: 14px 16px;
  }

  /* Ouvidoria */
  .ouvidoria-grid {
    grid-template-columns: 1fr;
  }

  /* Secretaria */
  .secretaria-card {
    padding: 16px;
  }

  /* Notícia info bar */
  .noticia-info-bar {
    flex-direction: column;
    gap: 8px;
  }

  /* Gestão */
  .gestao-cards {
    grid-template-columns: 1fr;
  }
}


/* ================= ≤ 600px ================= */
@media (max-width: 600px) {
        .veja-mais-noticias-item {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .veja-mais-noticias-card img {
        height: 200px;
    }
    .veja-mais-noticias-imagem { height: 200px; }

    .veja-mais-noticias-nav {
        justify-content: center;
    }

.thumb-item {
    cursor: pointer;
}

.thumb-item.active {
    border: 2px solid var(--red);
}
  /* Paginação */
  .page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 8px;
  }

  /* Modal turismo */
  .modal-turismo {
    width: 95vw;
    max-width: 95vw;
    left: 50% !important;
    transform: translateX(-50%);
    top: 10vh !important;
  }

  .modal-turismo-body {
    flex-direction: column;
  }

  .modal-turismo-imagem {
    width: 100%;
    min-width: unset;
    height: 180px;
  }

  /* Banner */
  .banner {
    height: 200px;
  }

  .banner-wrapper {
    height: 200px;
  }

  /* Notícias card */
  .news-card .thumb img {
    height: 140px;
  }
  .news-card .thumb { height: 140px; }

  /* Contato hero */
  .contato-hero h1 {
    font-size: 22px;
  }
  
  .tabs-content {
      padding: 20px 0;
  }

  /* Canal card */
  .channel-card h3 {
    font-size: 12px;
    white-space: normal;
  }

  /* Diário oficial */
  .edition-grid,
  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Share buttons */
  .share-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  /* Miniaturas notícia */
  .thumb-item {
    width: 80px;
    height: 56px;
  }

  /* Título seção */
  .title {
    font-size: 15px;
  }
}


/* ================= ≤ 500px ================= */
@media (max-width: 500px) {
  /* Serviços e canais: 1 coluna */
  .services,
  .bids,
  .channels {
    grid-template-columns: 1fr;
  }

  /* Logo */
  .logo-text h1 {
    font-size: 16px;
  }

  .logo-text strong {
    display: none;
  }

  .logo-area {
    gap: 8px;
  }

  /* Diário oficial */
  .edition-grid,
  .recent-grid {
    grid-template-columns: 1fr;
  }

  /* Notícia detalhe */
  .noticia-titulo {
    font-size: 20px;
  }

  .noticia-card {
    padding: 12px 8px;
  }

  /* Lei detalhe */
  .law-title {
    font-size: 20px;
  }

  .law-details-card {
    padding: 16px 12px;
  }

  /* Ouvidoria */
  .container-ouvidoria {
    padding: 16px 12px;
  }

  .ouvidoria-title {
    font-size: 1.2rem;
  }
  
  .ouvidoria-modern {
    padding: 8px !important;  
  }
  
    .ouvidoria-card-info {
        padding: 16px;
    }
    
    .ouvidoria-card-form {
        padding: 16px;
    }

  /* Paginação */
  .pagination-modern {
    gap: 5px;
  }

  /* Filtros */
  .news-filter {
    padding: 14px 12px;
  }

  /* Notícia info bar */
  .noticia-info-bar {
    padding: 12px;
    font-size: 0.85rem;
  }

  /* Tabs institucional */
  .institucional-tabs .tab {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* FAQ */
  .faq-trigger {
    font-size: 13px !important;
    padding: 12px 14px !important;
  }

  /* Botões */
  .btn {
    font-size: 0.8rem;
    padding: 11px 16px;
  }

  /* Year selector */
  .year-selector .year-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  
  
}


/* ================= ≤ 380px ================= */
@media (max-width: 380px) {
  /* Logo mínima */
  .logo-area img {
    height: 4vh;
  }

  .logo-text h1 {
    font-size: 14px;
  }

  /* Header top */
  .top-right {
    gap: 6px;
    font-size: 10px;
  }

  /* Service card */
  .service-card {
    height: auto;
    padding: 10px;
  }

  .service-card h3 {
    font-size: 11px;
  }

  /* Botões */
  .btn {
    font-size: 0.75rem;
    padding: 10px 12px;
  }

  .btn-view {
    font-size: 12px;
    padding: 8px 10px;
  }

  /* Paginação */
  .page-btn {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }

  /* Container */
  .container {
    padding: 0 12px;
  }

  /* Banner */
  .banner {
    height: 160px;
  }

  .banner-wrapper {
    height: 160px;
  }
}

@media (max-width: 600px) {
  .error-page {
    padding: 36px 0;
  }

  .error-page__content {
    padding: 42px 22px;
    border-radius: 18px;
  }

  .error-page__actions {
    flex-direction: column;
    max-width: 260px;
    margin-right: auto;
    margin-left: auto;
  }

  .error-page__actions .btn {
    justify-content: center;
  }
}

/* Carregamento dos cartões do prefeito e vice-prefeito */
.gestao-card { position: relative; }
.gestao-skeleton { display: none; }
.gestao-js .gestao-carregando > :not(.gestao-skeleton) { visibility: hidden; }
.gestao-js .gestao-carregando .gestao-skeleton { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 25px; background: var(--white); border-radius: inherit; }
.gestao-skeleton span { display: block; height: 14px; width: 55%; border-radius: 6px; background: linear-gradient(100deg, #e8e8e8 20%, #f7f7f7 40%, #e8e8e8 60%); background-size: 200% 100%; animation: gestao-skeleton 1.4s ease-in-out infinite; }
.gestao-skeleton span:first-child { width: 110px; height: 110px; flex: 0 0 110px; border-radius: 50%; }
.gestao-skeleton span:nth-child(2) { width: 40%; }
.gestao-skeleton span:last-child { width: 60%; }
@keyframes gestao-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .gestao-skeleton span { animation: none; } }

/* Cartão de detalhes da secretaria */
.secretaria-card.secretaria-detalhe { display: block; padding: 0; margin-bottom: 20px; overflow: hidden; border: 1px solid #e6e6e6; border-radius: 12px; background: #fff; }
.secretaria-detalhe .secretaria-header { background: var(--red); color: #fff; padding: 14px 20px; }
.secretaria-detalhe .secretaria-header h2 { margin: 0; color: #fff; font-size: calc(22px * var(--font-scale)); }
.secretaria-detalhe-corpo { padding: 20px; }
.secretaria-detalhe .secretaria-info { min-width: 0; padding-bottom: 20px; border-bottom: 1px solid #dedede; }
.secretaria-detalhe .secretaria-pessoa { display: flex; align-items: center; gap: 14px; }
.secretaria-detalhe .secretaria-pessoa img { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.secretaria-detalhe .pessoa-info { min-width: 0; }
.secretaria-detalhe .pessoa-info strong, .secretaria-detalhe .pessoa-info span { display: block; overflow-wrap: anywhere; }
.secretaria-detalhe .pessoa-info span { color: #777; margin-top: 4px; }
.secretaria-detalhe .secretaria-contato { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 30px; width: 100%; padding-top: 20px; }
.secretaria-detalhe .secretaria-dado strong { display: flex; align-items: center; gap: 8px; font-size: calc(14px * var(--font-scale)); }
.secretaria-detalhe .secretaria-dado i { color: var(--red); width: 16px; text-align: center; }
.secretaria-detalhe .secretaria-dado p { margin: 5px 0 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .secretaria-detalhe .secretaria-contato { grid-template-columns: 1fr; } }

/* Rodapé institucional */
.site-footer { background: var(--portal-footer, #820908); padding: 55px 0 48px; color: #fff; }
.site-footer .footer-grid { width: 100%; max-width: 1200px; padding: 0 2vh; box-sizing: border-box; display: grid; grid-template-columns: 1.2fr 0.8fr 1.1fr 1.45fr; gap: 32px; }
.site-footer .footer-grid h4 { color: #ffd27a; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 20px; }
.site-footer .footer-grid a { color: #fff !important; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.site-footer .footer-grid a::after { display: none; }
.site-footer .footer-grid a:hover { color: #ffd27a !important; }
.footer-brand-logo { display: inline-block !important; background: #fff; padding: 9px 14px; border-radius: 8px; }
.footer-brand-logo img { display: block; max-width: 200px; height: auto; }
.footer-brand p { font-weight: 600; font-size: 16px; margin: 18px 0 5px; }
.footer-brand > span, .footer-press p { color: #f2d4d1; font-size: 14px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.site-footer .footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; }
.footer-nav, .footer-press { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-nav h4, .footer-press h4 { margin-bottom: 11px !important; }
.footer-press p { margin: 0 0 4px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; padding: 0 0 13px; margin-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.16); }
.footer-contact-item > i { color: #ffd27a; width: 20px; margin-top: 4px; text-align: center; }
.footer-contact-item strong { display: block; color: #ffd27a; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }
.footer-contact-item span { display: block; line-height: 1.5; }
.site-footer .footer-contact-item a, .footer-contact-item span, .site-footer .footer-press a { font-size: calc(14px * var(--font-scale)); }
.footer-bottom { background: #660706; color: #fff; padding: 19px 0; }
.footer-bottom .footer-bottom-container { width: 100%; max-width: 1200px; padding: 0 2vh; box-sizing: border-box; gap: 20px; }
.footer-top-link { color: #ffd27a; display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; cursor: pointer; font: inherit; font-size: 13px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { color: #fff; font-size: 13px; }
@media (max-width: 1000px) { .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .site-footer .footer-grid, .footer-bottom .footer-bottom-container { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 600px) {
  .site-footer { padding: 38px 0; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom .footer-bottom-container { align-items: flex-start; text-align: left; }
}
@media (max-width: 380px) { .site-footer .footer-grid, .footer-bottom .footer-bottom-container { padding-left: 12px; padding-right: 12px; } }

/* ================= MENU LATERAL: NAVEGAÇÃO POR CLIQUE ================= */
@media (min-width: 1100.01px) {
  .header-menu .menu-list > .menu-item:last-child > .submenu {
    left: auto;
    right: 0;
  }
  .header-menu { height: auto; min-height: 48px; }
  .header-menu .menu { width: 100%; }
  .header-menu .menu-list { width: 100%; align-items: stretch; }
  .header-menu .menu-item { flex: 1 1 auto; }
  .header-menu .menu-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    height: 100%;
    padding: 10px clamp(8px, 1.1vw, 18px);
    line-height: 1.25;
  }
  .header-menu .menu-item:hover > a,
  .header-menu .menu-item.active > a { height: 100%; }
  .header-menu .menu-item:hover > .submenu,
  .header-menu .submenu li:hover > .submenu { display: block; }
  .header-menu .submenu li.has-submenu > a::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: auto;
    order: 2;
    flex-shrink: 0;
  }
  .header-menu .submenu li.has-submenu > a::before { content: '\f054'; }
  .header-menu .submenu li.has-submenu > a::after { content: none; }
}
@media (max-width: 1100px) {
  .header-top { display: block !important; height: auto; padding: 8px 0; }
  .header-top-content { display: block; padding: 0 16px; }
  .header-top .top-left, .header-top .social-icons { display: none; }
  .header-top .top-right { display: flex; width: 100%; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 8px; }
  .header-top .top-right > a, .header-top .acessibilidade-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px; white-space: nowrap; }
  .header-top .search-container.search-container-live { display: flex !important; flex: 1 1 230px; width: auto !important; max-width: 320px !important; margin: 0 !important; }
  .header-top .search-container-live input { min-width: 0; width: 100%; }
  .header-top .acessibilidade:hover .acessibilidade-menu,
  .header-top .acessibilidade:focus-within .acessibilidade-menu { display: none; }
  .header-top .acessibilidade.aberto .acessibilidade-menu { display: block; }
  .header-content { justify-content: space-between; }
  .header.scrolled { padding-top: 0; }
  .header.scrolled .header-top { position: static; }
  .header.scrolled .header-menu { position: fixed; top: 0; left: auto; }
  .header.scrolled .header-bg { transform: none; opacity: 1; pointer-events: auto; }

  .header-menu {
    position: fixed;
    inset: 0 0 0 auto;
    right: 0;
    width: min(88vw, 340px);
    height: 100dvh;
    display: block;
    overflow-y: auto;
    background: #fff;
    box-shadow: -12px 0 32px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 10000 !important;
  }

  .header-menu.active { right: 0; transform: translateX(0); }
  .menu-mobile-overlay.active { display: block; }
  .header-menu::before,
  .header-menu::after { display: none; }
  .header-menu .menu { display: block; padding: 62px 0 20px; }
  .header-menu .menu-list { display: block !important; }
  .header-menu .menu a { color: #303030; }

  .btn-close-menu {
    display: block;
    position: absolute;
    top: 10px;
    left: 14px;
    z-index: 1;
    background: transparent;
    border: 0;
    color: #333;
    font-size: 30px;
    cursor: pointer;
  }

  .menu-item { border-bottom: 1px solid #e7e7e7; }
  .menu-item > a,
  .header-menu .menu .menu-item > a {
    min-height: 52px;
    height: auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    color: #303030;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
  }

  .menu-item > a::after { display: none; }
  .header-menu li.has-submenu > a::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    order: 2;
    margin-left: 16px;
    color: #6b6b6b;
    font-size: 12px;
    transition: transform .2s ease;
  }
  .header-menu li.has-submenu.open > a::before { transform: rotate(180deg); }

  .menu-item > a:hover,
  .menu-item > a:focus-visible,
  .menu-item.active > a,
  .menu-item.open > a {
    height: auto;
    background: #f3f4f6;
    color: #9f0000;
  }

  .header-menu .submenu,
  .header-menu .menu-item:hover > .submenu,
  .header-menu .submenu li:hover > .submenu {
    display: none !important;
    position: static;
    min-width: 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
    background: #fafafa;
  }
  .header-menu li.open > .submenu,
  .header-menu .menu-item.open:hover > .submenu,
  .header-menu .submenu li.open:hover > .submenu { display: block !important; }
  .header-menu .submenu li > a {
    padding: 13px 22px 13px 34px;
    white-space: normal;
    color: #414141 !important;
    background: #fafafa;
    border-bottom-color: #e7e7e7;
  }
  .header-menu .submenu li > a:hover,
  .header-menu .submenu li > a:focus-visible {
    background: #eceff1;
    color: #8f0000 !important;
  }
  .header-menu .submenu .submenu li > a { padding-left: 48px; }
  .hamburger { display: flex; flex-direction: column; }
}

@media (max-width: 600px) {
  .header-top .top-right { justify-content: center; }
  .header-top .search-container.search-container-live { flex-basis: 100%; max-width: none !important; margin-top: 5px !important; }
  .header-top .acessibilidade-menu { right: 0; left: auto; }
}


/* Portal: regras de tema e abas da pagina inicial */
.home-publication-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin-bottom:10px;}
.home-publication-tabs > .tab {width:100%;min-width:0;padding:12px 8px;margin:0;white-space:normal;}
body {background-color:var(--portal-bg,#fbfbfb);background-image:var(--site-fundo,none);}
.header-top {background-color:var(--portal-top,var(--red));}
/* Decoracao restrita as margens externas do menu (fora da navegacao). */
.header-menu {background-color:var(--portal-menu,var(--red));background-image:none;}
.header-menu::before,.header-menu::after {
  top:0;
  bottom:auto;
  width:clamp(0px, calc((100% - 1200px) / 2), 220px);
  height:100%;
  background-image:var(--menu-fundo,none);
  background-size:cover;
  background-position:left center;
  background-repeat:no-repeat;
  pointer-events:none;
  z-index:0;
}
.header-menu::before {left:0;right:auto;}
.header-menu::after {right:0;left:auto;transform:scaleX(-1);}
@media (max-width:1200px) {
  .header-menu::before,.header-menu::after {display:none;}
}
@media (max-width:1100px) {
  .header-menu {background-color:#fff;}
}
.artisan-bar { background: var(--yellow); }
.site-footer {background-color:var(--portal-footer,var(--red));background-image:var(--rodape-fundo,none);}
@media(max-width:1100px){.header-bg{background-image:var(--topo-fundo-mobile,var(--topo-fundo,none));}.header-menu{background-image:none;}}
@media(min-width:1101px){.header-menu .menu a{color:var(--portal-menu-text,#fff);}.header-top a{color:var(--portal-top-text,#fff);}}
@media(max-width:480px){.home-publication-tabs > .tab{padding:10px 4px;font-size:12px;}}

@media (forced-colors: active) { .header-menu::before,.header-menu::after {display:none;} }


/* Transicao suave da decoracao para o fundo do menu.
   O lado direito ja e espelhado por transform:scaleX(-1). */
.header-menu::before,.header-menu::after {
  -webkit-mask-image:linear-gradient(to right,#000 0%,transparent 100%);
  mask-image:linear-gradient(to right,#000 0%,transparent 100%);
}

/* Virtua Brasil - componente de destaques independente do carrossel legado */
.destaque { position:relative; width:100%; aspect-ratio:var(--destaque-proporcao, 16 / 5); overflow:hidden; background:transparent; isolation:isolate; }
.destaque[hidden] { display:none; }
.destaque-palco { position:absolute; inset:0; overflow:hidden; background:transparent; }
.destaque-midia-link { position:absolute; inset:0; display:block; overflow:hidden; }
.destaque-palco img,.destaque-palco video { display:block; width:100%; height:100%; margin:0; border:0; border-radius:0; object-fit:var(--destaque-ajuste,cover); object-position:var(--destaque-posicao-x,50%) var(--destaque-posicao-y,50%); transform:scale(var(--destaque-zoom,1)); transform-origin:var(--destaque-posicao-x,50%) var(--destaque-posicao-y,50%); }
.destaque-youtube { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); overflow:hidden; background:transparent; }
.destaque-youtube iframe { display:block; width:100%; height:100%; border:0; }
.destaque button,.destaque-link { position:absolute; z-index:3; border:0; border-radius:6px; background:rgba(0,0,0,.7); color:#fff; cursor:pointer; padding:8px 12px; font:inherit; text-decoration:none; }
.destaque button:focus-visible,.destaque a:focus-visible { outline:3px solid #fff; outline-offset:-3px; }
.destaque-anterior { left:10px; top:50%; transform:translateY(-50%); }
.destaque-proximo { right:10px; top:50%; transform:translateY(-50%); }
.destaque-pausa { bottom:10px; left:10px; }
.destaque-link { bottom:10px; right:10px; }
.destaque-indicadores { position:absolute; z-index:3; bottom:12px; left:50%; transform:translateX(-50%); display:flex; gap:8px; }
.destaque-indicadores button { position:static; padding:0; width:12px; height:12px; border:1px solid white; border-radius:50%; }
.destaque-indicadores button[aria-current=true] { background:white; }

/* Virtua Brasil - proporcao e controles do novo componente */
@media (max-width:767px) {
  .destaque { aspect-ratio:var(--destaque-proporcao-mobile,16 / 5); }
  .destaque button,.destaque-link { font-size:12px; padding:6px 9px; }
  .destaque-indicadores button { padding:0; }
}

.header-top .top-left {display:block}
.municipio-menu {position:relative;color:white}
.municipio-menu summary {cursor:pointer}
.municipio-menu nav {position:absolute;left:0;top:100%;z-index:1000;background:white;color:#202020;padding:.75rem;width:min(18rem,85vw);max-height:65vh;overflow:auto;box-shadow:0 4px 16px #0003}
.header-top .municipio-menu nav a,.municipio-menu nav summary {display:block;color:#202020;padding:.5rem}

/* Navegação do cabeçalho: a faixa que contém o menu aberto fica acima da navegação principal. */
.header .header-top:has(.municipio-menu[open]) {
  position: relative;
  z-index: 10005;
  overflow: visible;
}
@media (min-width: 1101px) {
  .header.scrolled .header-top:has(.municipio-menu[open]) { position: fixed; }
}
.municipio-menu summary {
  display: flex;
  align-items: center;
  gap: .35em;
  list-style: none;
}
.municipio-menu summary::-webkit-details-marker { display: none; }
.municipio-menu summary::marker { content: ""; }
/* O primeiro summary já tem a seta ▾ no texto do cabeçalho. */
.header .municipio-menu nav {
  padding: 0;
  background: var(--portal-menu, var(--red));
  color: var(--portal-menu-text, white);
}
.header .municipio-menu nav a,
.header .municipio-menu nav summary {
  display: flex;
  align-items: center;
  gap: .35em;
  margin: 0;
  padding: .85rem 1rem;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  color: inherit;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
}
.header .municipio-menu nav details a { padding-inline-start: 1.75rem; }
.header .municipio-menu nav :is(summary,a):is(:hover,:focus-visible) {
  background: rgb(0 0 0 / 16%);
}
.header .municipio-menu nav summary::after,
.header .header-menu li.has-children > a::before {
  content: "▾";
  display: inline-block;
  position: static;
  font: inherit;
  font-size: .85em;
  color: inherit;
  margin: 0 0 0 .25em;
  order: 2;
  flex: none;
}
.header .header-menu li.has-children > a {
  display: flex;
  align-items: center;
}
.header .header-menu li.has-children > a::after { content: none; }

/* Navegacao unificada: escala do controle de acessibilidade existente. */
#topo { --nav-bg: var(--portal-menu, var(--red)); --nav-fg: var(--portal-menu-text, #fff); --nav-hover: var(--portal-menu-active, #a90000); }
#topo .header-top { font-size: .8125rem; height: auto; min-height: 40px; }
#topo .header-top-content { flex-wrap: wrap; gap: .5rem; }
#topo .header-top .top-right a, #topo .municipio-menu > summary { font-size: .8125rem; font-weight: 500; }
#topo .menu-list > li > a { font-size: .875rem; font-weight: 600; white-space: normal; height: auto; }
#topo .portal-submenu { background: var(--nav-bg); color: var(--nav-fg); padding: 0; border-radius: 0; list-style: none; }
#topo .portal-submenu > li, #topo .portal-submenu > details { margin: 0; padding: 0; border: 0; }
#topo .portal-submenu > a, #topo .portal-submenu > details > summary, #topo .portal-submenu > li > a {
 display: flex; align-items: center; justify-content: flex-start; gap: .5em; box-sizing: border-box;
 width: 100%; height: auto; min-height: 44px; padding: .7em 1.25rem; margin: 0;
 font-family: inherit; font-size: .8125rem; font-weight: 500; line-height: 1.45;
 text-transform: uppercase; text-decoration: none; text-align: left; white-space: normal; overflow-wrap: anywhere;
 color: var(--nav-fg) !important; background: var(--nav-bg); border: 0; border-bottom: 1px solid rgb(255 255 255 / 15%); box-shadow: none;
 transition: background-color 150ms; cursor: pointer;
}
#topo .portal-submenu > details > summary, #topo .portal-submenu > li.has-children > a { font-weight: 600; }
#topo .portal-submenu > a:hover, #topo .portal-submenu > details > summary:hover, #topo .portal-submenu > li:hover > a, #topo .portal-submenu > details[open] > summary { background: var(--nav-hover); }
#topo .portal-submenu :is(a,summary):focus-visible, #topo .menu-list > li > a:focus-visible, #topo .municipio-menu > summary:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
#topo .portal-submenu > details > summary::before, #topo .portal-submenu > li > a::after { content: none; }
#topo .portal-submenu > details > summary::after, #topo .header-menu li.has-children > a::before { content: "▾"; font-family: inherit; font-size: .75rem; font-weight: 400; position: static; display: inline-block; order: 2; margin: 0 0 0 .25em; color: currentColor; flex: none; }
#topo .portal-submenu > details[open] > summary::after { transform: rotate(180deg); }
#topo .municipio-menu .portal-submenu .portal-submenu > a, #topo .municipio-menu .portal-submenu .portal-submenu > details > summary { padding-inline-start: 2rem; }
#topo .municipio-menu > nav { width: min(22.5rem, 85vw); max-height: 65vh; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--nav-hover) var(--nav-bg); }
#topo .municipio-menu > nav::-webkit-scrollbar { width: 5px; }
#topo .municipio-menu > nav::-webkit-scrollbar-thumb { background: var(--nav-hover); border-radius: 5px; }
/* Linha inferior dos itens principais, sem afetar as setas ou submenus. */
#topo .menu-list > li > a { position: relative; }
#topo .menu-list > li > a::after {
  content: ""; display: block; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; margin: 0; background: var(--nav-fg);
  transition: width 150ms ease; pointer-events: none;
}
#topo .menu-list > li:hover > a::after,
#topo .menu-list > li > a:focus-visible::after { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  #topo .menu-list > li > a::after { transition: none; }
}
@media (min-width: 1101px) { #topo .menu-list { flex-wrap: wrap; } #topo .menu-item:focus-within > .submenu, #topo .submenu li:focus-within > .submenu { display: block; } }
@media (max-width: 1100px) { #topo .header-menu .submenu .submenu li > a { padding-inline-start: 2rem; } }
body.alto-contraste #topo .portal-submenu :is(a,summary) { color: #ff0 !important; background: #000 !important; border-bottom-color: #777; }
body.alto-contraste #topo .portal-submenu :is(a,summary):hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { #topo .portal-submenu :is(a,summary) { transition: none; } }

#topo .municipio-menu > nav::-webkit-scrollbar-track { background: var(--nav-bg); }
#topo .municipio-menu > nav::-webkit-scrollbar-button { display: none; }
#topo .portal-submenu :is(a,summary):hover { box-shadow: none; border-bottom: 1px solid rgb(255 255 255 / 15%); }
body.alto-contraste #topo .municipio-menu > nav { scrollbar-color: #ff0 #000; }
body.alto-contraste #topo .artisan-bar { background: #ff0 !important; }

/* Linha principal acima do submenu, inclusive quando aberto. */
#topo .header-menu .menu-list > li > a::after {
  content: ""; display: block; position: absolute; inset: auto 0 3px 0;
  width: auto; height: 2px; background: var(--white, #fff);
  transform: scaleX(0); transform-origin: left; transition: transform 150ms ease;
  z-index: 10000; pointer-events: none;
}
#topo .header-menu .menu-list > li:hover > a::after,
#topo .header-menu .menu-list > li:focus-within > a::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  #topo .header-menu .menu-list > li > a::after { transition: none; }
}

/* Linha branca nos itens dos submenus, sem alterar dimensoes ou setas. */
#topo .portal-submenu > a:is(:hover,:focus-visible),
#topo .portal-submenu > li > a:is(:hover,:focus-visible),
#topo .portal-submenu > details > summary:is(:hover,:focus-visible) {
  box-shadow: inset 0 -2px 0 var(--white, #fff);
}
body.alto-contraste #topo .portal-submenu :is(a,summary):is(:hover,:focus-visible) {
  box-shadow: inset 0 -2px 0 #ff0;
}

/* Links seguem as variaveis do tema institucional. */
a.tab:any-link { color: var(--text); }
.institucional-tabs a.tab:hover, .institucional-tabs a.tab:focus-visible { color: var(--red); border-color: var(--red); }
.institucional-tabs a.tab.active:any-link { background: var(--red); color: var(--white); border-color: var(--red); }
.secretaria-dado a:any-link { color: var(--text); text-decoration: underline; text-underline-offset: .15em; }
.secretaria-dado a:hover { color: var(--red); }
.institucional-tabs a:focus-visible, .secretaria-dado a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.error-page-blocos { width: 100%; min-width: 0; }
body.alto-contraste .institucional-tabs a.tab, body.alto-contraste .secretaria-dado a { color: #ff0 !important; background: #000 !important; }

/* Estrutura administrativa: cores do tema, sem altura fixa. */
.org-competencia { margin: 0 0 1rem; border: 1px solid var(--red); border-radius: .65rem; overflow: hidden; background: var(--white); }
.org-competencia summary { padding: 1rem 1.25rem; min-height: 44px; cursor: pointer; background: var(--red); color: var(--white); font-weight: 600; overflow-wrap: anywhere; }
.org-competencia summary:focus-visible, .org-node:focus-visible, .org-law:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.org-competencia-texto { padding: 1.25rem; color: var(--text); line-height: 1.65; overflow-wrap: anywhere; }
.org-law:any-link { color: var(--text); text-decoration: underline; }
.org-tree, .org-pending { list-style: none; padding: 0; margin: 1rem 0; }
.org-tree .org-tree { margin-inline-start: 1rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--red); }
.org-tree li { margin: .65rem 0; }
.org-pending { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: .75rem; }
.org-node:any-link { display: block; padding: .85rem; background: var(--red); color: var(--white); border-radius: .5rem; text-decoration: underline; overflow-wrap: anywhere; }
body.alto-contraste :is(.org-node,.org-competencia summary,.org-competencia-texto,.org-law) { background: #000 !important; color: #ff0 !important; }

/* Organograma e competencias: apresentacao institucional. */
.org-section-title { margin: 0 0 1.5rem; }
.org-directory-title { margin: 1.5rem 0 .75rem; }
.org-competencia > summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; list-style:none; }
.org-competencia > summary::-webkit-details-marker { display:none; }
.org-competencia > summary::after { content:''; width:.55em; height:.55em; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); flex:none; margin-right:.25rem; }
.org-competencia[open] > summary::after { transform:rotate(225deg); }
.org-node:any-link { display:flex; align-items:center; justify-content:center; text-align:center; min-height:4.5rem; height:100%; box-sizing:border-box; text-decoration:none; font-weight:600; }
.org-node:hover { background:var(--portal-menu-active,var(--red)); }
.org-pending { grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); align-items:stretch; }
.org-tree { display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; align-items:flex-start; }
.org-tree li { display:flex; flex-direction:column; align-items:center; flex:1 1 12rem; min-width:0; margin:0; }
.org-tree li > .org-node { width:min(100%,19rem); height:auto; }
.org-tree .org-tree { position:relative; width:100%; box-sizing:border-box; margin:1.5rem 0 0; padding:1rem 0 0; border:0; border-top:2px solid var(--red); }
.org-tree .org-tree::before { content:''; position:absolute; top:-1.5rem; left:50%; height:1.5rem; border-left:2px solid var(--red); }
.org-tree .org-tree > li { position:relative; }
.org-tree .org-tree > li::before { content:''; position:absolute; top:-1rem; left:50%; height:1rem; border-left:2px solid var(--red); }
@media(max-width:700px){ .org-tree,.org-tree .org-tree { display:block; } .org-tree li { margin:.75rem 0; align-items:stretch; } .org-tree li > .org-node { width:100%; } .org-tree .org-tree { width:auto; margin:.5rem 0 0 .75rem; padding:0 0 0 .75rem; border:0; border-left:2px solid var(--red); } .org-tree .org-tree::before,.org-tree .org-tree > li::before { display:none; } }

/* Organograma: arvore de vinculos confirmados, sem conexoes ficticias. */
#organograma .org-chart-scroll { overflow-x:auto; padding: .5rem 0 1rem; }
#organograma .org-tree { flex-wrap:nowrap; gap:0; width:max-content; min-width:100%; margin:0; padding:0; border:0; }
#organograma .org-tree li { flex:1 0 auto; padding:0 .35rem; min-width:0; }
#organograma .org-tree li > .org-node { width:10rem; min-height:3.5rem; font-size:.85rem; padding:.55rem; }
#organograma .org-tree .org-tree { margin-top:1.5rem; padding-top:1rem; border:0; }
#organograma .org-tree .org-tree > li::after { content:''; position:absolute; top:-1rem; left:0; right:0; border-top:2px solid var(--red); }
#organograma .org-tree .org-tree > li:first-child::after { left:50%; }
#organograma .org-tree .org-tree > li:last-child::after { right:50%; }
#organograma .org-pending { grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); }
#organograma .org-pending .org-node { font-size:.85rem; min-height:3.5rem; padding:.55rem; }
#organograma .org-chart-note { margin:0 0 1rem; font-size:.85rem; }
@media(max-width:700px){ #organograma .org-tree { display:block; width:auto; min-width:0; } #organograma .org-tree li { padding:0; } #organograma .org-tree li > .org-node { width:100%; } #organograma .org-tree .org-tree { margin:.5rem 0 0 .75rem; padding:0 0 0 .75rem; border-left:2px solid var(--red); } #organograma .org-tree .org-tree > li::after { display:none; } }

/* Organograma: eixo do Executivo e ramificacoes independentes do vice. */
#organograma .org-diagram { --org-line: var(--text); position:relative; padding:1rem 0; }
#organograma .org-chief { display:flex; justify-content:center; }
#organograma .org-chief .org-node, #organograma .org-deputy .org-node { width:12rem; min-height:3rem; font-size:.85rem; }
#organograma .org-deputy { position:relative; display:flex; justify-content:center; padding:1.5rem 0; }
#organograma .org-deputy::before { content:''; position:absolute; left:50%; top:0; bottom:0; border-left:2px solid var(--org-line); }
#organograma .org-deputy .org-node { position:relative; margin-left:15rem; }
#organograma .org-deputy .org-node::before { content:''; position:absolute; right:100%; top:50%; width:1.5rem; border-top:2px dashed var(--org-line); }
#organograma .org-branches, #organograma .org-branch { list-style:none; margin:0; padding:1.25rem 0 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap:1rem .75rem; position:relative; border-top:2px solid var(--org-line); }
#organograma .org-branches > li, #organograma .org-branch > li { position:relative; min-width:0; }
#organograma .org-branches > li::before, #organograma .org-branch > li::before { content:''; position:absolute; left:50%; top:-1.25rem; height:1.25rem; border-left:2px solid var(--org-line); }
#organograma .org-branches .org-node { font-size:.8rem; min-height:3.5rem; height:auto; padding:.65rem; }
#organograma .org-branch { margin-top:1rem; grid-template-columns:1fr; }
#organograma .org-diagram-caption { font-size:.8rem; text-align:center; }
@media(max-width:700px){ #organograma .org-deputy .org-node { margin-left:0; } #organograma .org-deputy::before, #organograma .org-deputy .org-node::before { display:none; } #organograma .org-branches { grid-template-columns:1fr; border-top:0; border-left:2px solid var(--org-line); padding:0 0 0 1rem; margin-left:.5rem; } #organograma .org-branches > li::before { top:1.75rem; left:-1rem; width:1rem; height:0; border-left:0; border-top:2px solid var(--org-line); } }

/* Organograma: uma unica faixa de secretarias, sem quebra de nivel. */
#organograma .org-chart-scroll { max-width:100%; min-width:0; overflow-x:auto; scrollbar-color:var(--red) transparent; }
#organograma .org-flat { width:max-content; min-width:100%; box-sizing:border-box; padding:1rem .5rem; }
#organograma .org-flat .org-deputy { min-height:5rem; }
#organograma .org-flat .org-deputy .org-node { margin-left:15rem; }
#organograma .org-flat .org-deputy::before, #organograma .org-flat .org-deputy .org-node::before { display:block; }
#organograma .org-flat .org-branches { display:flex; flex-wrap:nowrap; justify-content:center; align-items:stretch; gap:.5rem; border:0; margin:0; padding:1.25rem 0 0; }
#organograma .org-flat .org-branches > li { flex:0 0 7rem; margin:0; padding:0; }
#organograma .org-flat .org-branches > li::before { top:-1.25rem; left:50%; width:0; height:1.25rem; border:0; border-left:2px solid var(--org-line); }
#organograma .org-flat .org-branches > li::after { content:''; position:absolute; top:-1.25rem; left:-.25rem; right:-.25rem; border-top:2px solid var(--org-line); }
#organograma .org-flat .org-branches > li:first-child::after { left:50%; }
#organograma .org-flat .org-branches > li:last-child::after { right:50%; }
#organograma .org-flat .org-branches .org-node { height:100%; min-height:4.5rem; font-size:.72rem; padding:.45rem; }
#organograma .org-chart-scroll:focus-visible { outline:2px solid var(--red); outline-offset:2px; }

/* Servicos em destaque: colunas e alturas uniformes em todas as paginas. */
.services { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:1fr; gap:.75rem 1rem; align-items:stretch; }
.services > a { display:flex; min-width:0; width:100%; height:100%; box-sizing:border-box; }
.services .service-card { box-sizing:border-box; width:100%; min-width:0; height:100%; min-height:5rem; padding:.75rem 1rem; gap:.875rem; }
.services .service-card .icon { flex:0 0 2.25rem; width:2.25rem; height:2.25rem; }
.services .service-card .icon i { font-size:1rem; }
.services .service-card h3 { min-width:0; white-space:normal; overflow-wrap:anywhere; font-size:.875rem; line-height:1.35; }
@media(max-width:900px) { .services { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:500px) { .services { grid-template-columns:minmax(0,1fr); } }

/* Contatos e competencias do card compartilhado de secretaria. */
.secretaria-detalhe .secretaria-competencias { margin: 1.5rem 0 0; }
.secretaria-detalhe .secretaria-competencias .org-competencia-texto { overflow-wrap: anywhere; }
.secretaria-detalhe .secretaria-dado a:any-link { color: var(--text); text-decoration: none; }
.secretaria-detalhe .secretaria-dado a:hover { color: var(--red); text-decoration: underline; text-underline-offset: .15em; }
.secretaria-detalhe .secretaria-dado a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; text-decoration: underline; }

/* Submenus internos expansiveis, sem abertura lateral. */
#topo .header-menu .submenu li > .submenu-inline {
 position: static; inset: auto; width: 100%; min-width: 0; margin: 0; border-radius: 0; box-shadow: none;
 display: none !important;
}
#topo .header-menu .submenu li.open > .submenu-inline { display: block !important; }
#topo .header-menu .submenu-inline > li > a { padding-inline-start: 2rem; }
#topo .header-menu .submenu-inline .submenu-inline > li > a { padding-inline-start: 2.75rem; }
#topo .header-menu .submenu li.open > a { background: var(--nav-hover); box-shadow: inset 0 -2px 0 var(--nav-fg); }
#topo .header-menu .submenu li.open > a::before { transform: rotate(180deg); }
#topo .header-menu .submenu li.has-separate-toggle { position: relative; }
#topo .header-menu .submenu li.has-separate-toggle > a { padding-inline-end: 3rem; }
#topo .header-menu .submenu li.has-separate-toggle > a::before { content: none; }
#topo .header-menu .submenu-toggle { position: absolute; inset: 0 0 auto auto; width: 44px; height: 44px; border: 0; background: transparent; color: var(--nav-fg); cursor: pointer; }
#topo .header-menu .submenu-toggle::after { content: '\25BE'; display: inline-block; }
#topo .header-menu .submenu-toggle[aria-expanded=true]::after { transform: rotate(180deg); }
#topo .header-menu .submenu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (min-width: 1100.01px) {
 #topo .header-menu .menu-list > li > .submenu { width: min(20rem, 85vw); max-height: 65vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--nav-hover) var(--nav-bg); }
 #topo .header-menu .menu-list > li > .submenu::-webkit-scrollbar { width: 5px; }
 #topo .header-menu .menu-list > li > .submenu::-webkit-scrollbar-track { background: var(--nav-bg); }
 #topo .header-menu .menu-list > li > .submenu::-webkit-scrollbar-thumb { background: var(--nav-hover); border-radius: 5px; }
}
body.alto-contraste #topo .header-menu .submenu-toggle { color: #ff0; }
body.alto-contraste #topo .header-menu .menu-list > li > .submenu { scrollbar-color: #ff0 #000; }

/* Cabecalho contextual das secretarias */
.secretaria-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin:1.5rem 0;}
.secretaria-page-heading h1{margin:0;}
.secretaria-page-heading p{margin:.35rem 0 0;}
.secretaria-page-heading>.btn{flex-shrink:0;}
@media(max-width:600px){.secretaria-page-heading{flex-direction:column;align-items:flex-start;}}

/* Tipografia de textos legislativos */
.lei-organica h2,.lei-organica h3,.lei-organica h4,.lei-organica h5{margin-block:1.5rem .75rem}.lei-organica h2{color:var(--red)}.lei-organica p{margin-block:.65rem;line-height:1.8}.lei-organica .lei-recuo-1{padding-inline-start:1.25rem}.lei-organica .lei-recuo-2{padding-inline-start:1.875rem}

/* Espacamento global de secoes com listagem de documentos. */
.block:has(> .laws-list) > h2 { margin-block: 0 .5rem; }
.block:has(> .laws-list) > p { margin-block: 0 1rem; }
.block:has(> .laws-list) { margin-block-start: 2rem; }
.laws-list { gap: .75rem; }
.laws-list .law-info { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.laws-list .law-info > h4 { margin: 0; }


/* Preferencias de cookies - componente global */
#portal-cookie-dialog:not([open]) { display: none !important; }
#portal-cookie-dialog[open] {
  position: fixed; inset: 0; margin: auto; box-sizing: border-box;
  width: min(560px, calc(100% - 32px)); height: fit-content;
  max-height: calc(100dvh - 32px); overflow: auto;
  padding: clamp(20px, 4vw, 32px); border: 1px solid var(--red);
  border-top: 5px solid var(--red); border-radius: 16px;
  background: #fff; color: #222; box-shadow: 0 12px 48px rgba(0,0,0,.22);
  display: flex; flex-direction: column; gap: 16px;
  font: inherit; text-align: left;
}
#portal-cookie-dialog::backdrop { background: rgba(0,0,0,.48); }
#portal-cookie-dialog h2 { margin: 0; color: var(--red); font-size: 1.3rem; line-height: 1.3; }
#portal-cookie-dialog p { margin: 0; line-height: 1.6; }
#portal-cookie-dialog a { color: var(--red); text-decoration: underline; }
#portal-cookie-dialog button.btn { width: 100%; min-height: 44px; padding: 12px 16px; margin: 0; font: inherit; font-weight: 600; white-space: normal; text-align: center; }
#portal-cookie-dialog :focus-visible, #portal-cookie-settings:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
#portal-cookie-settings { margin: 12px 16px; }


/* Galeria de imagens reutilizavel */
.portal-galeria { margin-block: 28px; }
.portal-galeria h3 { margin-bottom: 14px; }
.portal-galeria-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.portal-galeria-grid a { display: block; border: 1px solid var(--red); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.portal-galeria-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: contain; }
.noticia-fonte { margin-block: 16px; }
@media (max-width: 600px) { .portal-galeria-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } }

/* Video nas chamadas de noticias: capa preservada ate iniciar. */
.news-card .thumb, .home-news-image, .veja-mais-noticias-imagem { position: relative; }
.noticia-video-chamada { position:absolute; inset:0; overflow:hidden; visibility:hidden; pointer-events:none; }
.noticia-video-chamada.is-playing { visibility:visible; }
.noticia-video-palco { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.noticia-video-palco iframe { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); border:0; pointer-events:none; max-width:none; }
.noticia-video-overlay { position:absolute; inset:0; z-index:2; pointer-events:auto; cursor:pointer; }
@media (prefers-reduced-motion:reduce) { .noticia-video-chamada { display:none; } }
