/* 
   PORTAL MUNICIPAL DE TRÊS PASSOS / RS
   SISTEMA DE DESIGN E ESTILOS - NOVO FRONTEND PREMIUM
   Totalmente Acessível (WCAG / e-MAG) e Responsivo (Celulares/Tablets)
*/

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

/* --- VARIÁVEIS DO DESIGN SYSTEM (TEMA CLARO PADRÃO) --- */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Paleta de Cores (Tema Claro) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --border-color: rgba(15, 23, 42, 0.08);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --brand-primary: #1783bf;
  --brand-hover: #0f6696;
  --brand-light: rgba(23, 131, 191, 0.1);
  --brand-gradient: linear-gradient(135deg, #1783bf 0%, #005496 100%);
  
  --accent-color: #25d366;
  --accent-hover: #1ebd58;
  
  /* Sistema de Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  
  /* Transições padrão */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- TEMA ESCURO (DARK MODE) --- */
body.theme-dark {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --border-color: rgba(255, 255, 255, 0.06);
  
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  
  --brand-primary: #38bdf8;
  --brand-hover: #0ea5e9;
  --brand-light: rgba(56, 189, 248, 0.12);
  --brand-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* --- TEMA ALTO CONTRASTE (ACESSIBILIDADE e-MAG) --- */
body.theme-highcontrast {
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-tertiary: #111111;
  --border-color: #ffffff;
  
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #ffff00;
  
  --brand-primary: #ffff00;
  --brand-hover: #ffff00;
  --brand-light: #000000;
  --brand-gradient: none;
  
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
  
  --border-radius-sm: 0px;
  --border-radius-md: 0px;
  --border-radius-lg: 0px;
}

body.theme-highcontrast * {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.theme-highcontrast a {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

body.theme-highcontrast a:hover,
body.theme-highcontrast a:focus {
  color: #ff0000 !important;
}

body.theme-highcontrast button, 
body.theme-highcontrast input, 
body.theme-highcontrast select, 
body.theme-highcontrast textarea {
  border: 2px solid #ffffff !important;
  outline: 2px solid #ffffff !important;
}

/* --- TAMANHOS DE FONTE DINÂMICOS (ACESSIBILIDADE A-, A, A+) --- */
html.font-scale-1 { font-size: 80% !important; }
html.font-scale-2 { font-size: 90% !important; }
html.font-scale-3 { font-size: 100% !important; }
html.font-scale-4 { font-size: 112% !important; }
html.font-scale-5 { font-size: 125% !important; }

/* --- RESETS E DEFINIÇÕES GERAIS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline-color: var(--brand-primary);
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--brand-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-primary);
  font-size: 1rem;
  border: none;
  background: none;
  cursor: pointer;
}

/* --- FOCO ACESSÍVEL --- */
*:focus-visible {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 2px !important;
}

/* --- LAYOUT CONTAINER DE TELA CHEIA (FULL-WIDTH) --- */
.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container-fluid-custom {
  width: 100%;
  max-width: 100%;
  padding-left: 5%;
  padding-right: 5%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1920px) {
  .container-fluid-custom {
    padding-left: 8%;
    padding-right: 8%;
  }
}

/* --- CABEÇALHO PREMIUM FIXO --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 80px;
  height: auto;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 3px solid var(--brand-primary);
  box-shadow: 0 2px 16px rgba(23, 131, 191, 0.10);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

body.theme-dark .site-header {
  background-color: rgba(17, 24, 39, 0.95);
  border-bottom: 3px solid var(--brand-primary);
}

body.theme-highcontrast .site-header {
  background-color: #000000 !important;
  border-bottom: 2px solid #ffffff !important;
  position: fixed !important;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Marca / Brasão */
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--brand-primary);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Ações e Acessibilidade */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.accessibility-panel {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.access-control-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.access-control-btn:hover {
  background-color: var(--brand-light);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.access-control-btn svg {
  stroke: currentColor;
}

/* Alternador de Tema */
.theme-toggle-btn {
  color: var(--text-secondary);
}

/* Menu Hambúrguer */
.menu-toggle-btn {
  background: var(--brand-gradient);
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.menu-toggle-btn:hover {
  opacity: 0.95;
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* --- RESPONSIVIDADE DO CABEÇALHO (SMARTPHONES) --- */
@media (max-width: 520px) {
  .site-header {
    min-height: unset;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand-link {
    gap: 8px;
  }

  .brand-logo {
    height: 38px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.7rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 4px;
  }

  /* Compacta o painel de acessibilidade */
  .accessibility-panel {
    gap: 2px;
    padding: 3px;
  }

  .access-control-btn {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .menu-toggle-btn {
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  /* Aumenta margem do conteúdo para o cabeçalho em duas linhas */
  .main-content {
    margin-top: 130px;
  }
}

/* --- GAVETA DO MENU LATERAL (OFF-CANVAS DRAWER) --- */
.menu-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--border-color);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Links do Menu Lateral */
.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-nav-item {
  display: flex;
  flex-direction: column;
}

.drawer-accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 8px 12px;
  padding-left: 8px;
  border-left: 3px solid var(--brand-primary);
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  text-align: left;
  transition: var(--transition-fast);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.drawer-accordion-trigger:hover {
  color: var(--brand-primary);
  background-color: var(--bg-tertiary);
}

.accordion-arrow {
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s;
}

.drawer-accordion-trigger[aria-expanded="true"] .accordion-arrow {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.drawer-accordion-trigger[aria-expanded="true"] {
  color: var(--text-primary);
}

.drawer-nav-sublist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, margin-top 0.35s ease;
  margin-top: 0;
}

.drawer-nav-sublist.open {
  max-height: 800px; /* Suficiente para acomodar todos os links do submenu */
  opacity: 1;
  margin-top: 8px;
}

.drawer-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.drawer-nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--brand-primary);
  padding-left: 16px;
}

/* Acessibilidade: Utilitário Oculto Visualmente */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Campo de Busca do Menu Gaveta */
.drawer-search-wrapper {
  margin-bottom: 20px;
  padding: 0 4px;
}

.drawer-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  transition: var(--transition-fast);
}

.drawer-search-box:focus-within {
  border-color: var(--brand-primary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.drawer-search-box .search-icon {
  color: var(--text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.drawer-search-box input {
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  padding: 0;
}

.drawer-search-box input::placeholder {
  color: var(--text-muted);
}

.drawer-search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.drawer-search-clear-btn:hover {
  color: var(--text-primary);
}

/* Destaque de Termo Pesquisado (Premium) */
.drawer-nav-link mark {
  background-color: rgba(23, 131, 191, 0.2);
  color: var(--brand-primary);
  font-weight: 700;
  border-radius: 2px;
  padding: 0 2px;
}

body.theme-dark .drawer-nav-link mark {
  background-color: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

/* Fundo escurecido da gaveta */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- CONTEÚDO PRINCIPAL (MAIN) --- */
.main-content {
  margin-top: 80px;
  flex: 1;
  padding-top: 32px;
  padding-bottom: 64px;
}

body.theme-highcontrast .main-content {
  margin-top: 20px;
}

/* --- SLIDER HERO DE TELA INTEIRA (GLASSMORPHISM) --- */
.hero-slider-section {
  margin-bottom: 48px;
}

.hero-slider {
  position: relative;
  height: 520px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-slides-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

/* Overlay do Gradiente */
.hero-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(9, 13, 22, 0.95) 0%, rgba(9, 13, 22, 0.4) 50%, transparent 100%);
}

/* Caption (Glassmorphism) */
.hero-caption {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  padding: 30px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10;
  max-width: 800px;
  transition: var(--transition-smooth);
}

body.theme-dark .hero-caption {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-date {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--brand-primary);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-title a {
  color: #ffffff !important;
}

.hero-title a:hover {
  text-decoration: underline;
}

.hero-excerpt {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Controles do Slider */
.slider-control-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-smooth);
}

.slider-control-btn:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-50%) scale(1.1);
}

.slider-control-prev { left: 24px; }
.slider-control-next { right: 24px; }

/* Indicadores do Slider */
.slider-indicators {
  position: absolute;
  bottom: 20px;
  right: 40px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-indicator-dot {
  width: 24px;
  height: 6px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
}

.slider-indicator-dot.active {
  width: 48px;
  background-color: var(--brand-primary);
}

/* --- DUAL GRID LAYOUT: CONTEÚDO PRINCIPAL DE TELA CHEIA --- */
.content-grid-system {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}

@media (max-width: 1200px) {
  .content-grid-system {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* --- SEÇÃO DE ÚLTIMAS NOTÍCIAS (CARDS PREMIUM COM MICRO-ANIMAÇÕES) --- */
.section-header-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}

.section-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  margin-bottom: 0;
}

.section-main-title::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

.view-all-link-btn {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

.view-all-link-btn:hover {
  background-color: var(--brand-light);
  color: var(--brand-primary);
}

/* Grid de cards de Notícias */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .news-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Premium de Notícia */
.premium-news-card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.premium-news-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(23, 131, 191, 0.25);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.premium-news-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-info-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.card-content-block {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-news-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-news-title a {
  color: var(--text-primary);
}

.card-news-title a:hover {
  color: var(--brand-primary);
}

.card-news-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-action {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-read-more-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-read-more-btn:hover {
  color: var(--brand-hover);
  padding-left: 4px;
}

/* --- SEÇÃO LATERAL (ASIDE) COM ACESSO RÁPIDO E GESTOR --- */
.aside-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-widget {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--brand-primary);
}

/* Botões do Painel Lateral */
.sidebar-btn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.premium-sidebar-btn:hover {
  background-color: var(--brand-light);
  border-color: rgba(23, 131, 191, 0.15);
  color: var(--brand-primary);
  transform: translateX(4px);
}

.premium-sidebar-btn svg {
  stroke: var(--text-muted);
  transition: var(--transition-fast);
}

.premium-sidebar-btn:hover svg {
  stroke: var(--brand-primary);
  transform: translateX(2px);
}

/* Banner de Link da Ouvidoria / Transparência */
.premium-ad-banner {
  display: block;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.premium-ad-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.premium-ad-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.premium-ad-banner:hover img {
  transform: scale(1.04);
}

/* --- PAINEL DE SERVIÇOS EM ABAS INTERATIVAS (TABS SYSTEM) --- */
.tabs-section-block {
  margin-top: 48px;
  margin-bottom: 48px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.tabs-navigation-list {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid var(--bg-tertiary);
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-nav-btn {
  padding: 12px 24px;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.tab-nav-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  transition: var(--transition-fast);
}

.tab-nav-btn.active {
  color: var(--brand-primary);
}

.tab-nav-btn.active::after {
  background-color: var(--brand-primary);
}

.tab-nav-btn:hover {
  color: var(--brand-primary);
  background-color: var(--bg-tertiary);
}

/* Conteúdo das Abas */
.tab-content-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

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

@media (max-width: 992px) {
  .tab-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tab-links-grid {
    grid-template-columns: 1fr;
  }
}

.tab-link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.tab-link-card:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tab-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background-color: var(--brand-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tab-card-icon svg {
  width: 24px;
  height: 24px;
}

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

.tab-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tab-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- BANNER DE PARCEIROS E LINKS ÚTEIS (GRID PREMIUM) --- */
.partners-section {
  margin-bottom: 64px;
}

.partners-carousel-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .partners-carousel-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .partners-carousel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.partner-card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  height: 100px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.partner-card-link img {
  max-height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.partner-card-link:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.partner-card-link:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* --- BUSCA DENTRO DA PÁGINA (MODERNO) --- */
.search-hero-block {
  position: relative;
  z-index: 15;
  margin-bottom: 40px;
  background: var(--brand-gradient);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.search-hero-title {
  color: #ffffff !important;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.search-hero-subtitle {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.search-form-wrapper {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input-field {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 18px;
  color: #ffffff;
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
}

.search-input-field::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-select-field {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: var(--font-primary);
  font-size: 0.95rem;
}

.search-select-field option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.search-submit-btn {
  flex-shrink: 0;
  background-color: #ffffff;
  color: var(--brand-primary) !important;
  padding: 12px 28px;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.search-submit-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* --- RESPONSIVIDADE DO FORMULÁRIO DE BUSCA (MOBILE) --- */
@media (max-width: 520px) {
  .search-form-wrapper {
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }

  .search-input-field {
    width: 100%;
    padding: 14px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
  }

  .search-select-field {
    width: 100%;
    padding: 13px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
  }

  .search-submit-btn {
    width: 100%;
    text-align: center;
    padding: 14px;
    justify-content: center;
  }
}

/* --- TABELAS DINÂMICAS E DETALHES DE CONCURSOS/LICITAÇÕES --- */
.premium-card-wrapper {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 32px;
  margin-bottom: 32px;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.premium-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-data-table th {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color);
}

.premium-data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.premium-data-table tbody tr:hover {
  background-color: rgba(23, 131, 191, 0.02);
}

.action-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--brand-light);
  color: var(--brand-primary) !important;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
}

.action-download-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff !important;
}

.action-download-btn.btn-orange {
  background-color: #f97316;
  color: #ffffff !important;
}

.action-download-btn.btn-orange:hover {
  background-color: #ea580c;
  color: #ffffff !important;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-active { background-color: rgba(37, 211, 102, 0.15); color: #15803d; }
.status-closed { background-color: rgba(100, 116, 139, 0.15); color: #475569; }

/* --- RODAPÉ SEMÂNTICO PREMIUM --- */
.site-footer {
  background: var(--brand-gradient);
  color: #ffffff;
  padding-top: 64px;
  padding-bottom: 32px;
  border-top: 4px solid var(--brand-primary);
}

body.theme-dark .site-footer {
  background: #0d1117;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-highcontrast .site-footer {
  background-color: #000000 !important;
  border-top: 2px solid #ffffff !important;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 1024px) {
  .footer-main-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
  }
}

.footer-widget h3 {
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-widget h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: #ffffff;
}

body.theme-highcontrast .footer-widget h3::after {
  background-color: #ffffff !important;
}

.footer-info-text {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.footer-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-info-list li {
  display: flex;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.9rem;
}

.footer-info-list li svg {
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.7);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.9rem;
  display: inline-block;
  transition: var(--transition-fast);
}

.footer-links-list a:hover {
  color: #ffffff !important;
  padding-left: 4px;
}

/* Redes Sociais e Brasão */
.footer-brand-logo {
  height: 80px;
  width: auto;
  margin-bottom: 16px;
}

.footer-social-wrapper {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  transition: var(--transition-smooth);
}

.footer-social-icon:hover {
  background-color: #ffffff;
  color: var(--brand-primary) !important;
  transform: translateY(-2px);
}

/* Direitos Autorais */
.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* --- WHATSAPP FLOATING BUTTON (ELEGANT) --- */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.floating-whatsapp-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.4);
}

/* --- ANIMAÇÕES --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- SUPORTE A LEITORES DE TELA E ESCONDER --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- ESTILOS PREMIUM PARA TABELAS, IMAGENS E MÍDIAS DENTRO DE NOTÍCIAS E ARTIGOS --- */
.article-body-content table, 
.news-body-content table {
  width: 100% !important;
  margin: 28px 0;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-body-content th, 
.news-body-content th {
  background-color: var(--brand-primary);
  color: #ffffff !important;
  font-weight: 700;
  padding: 14px 18px;
  text-align: left;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.article-body-content td, 
.news-body-content td {
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-body-content tr:nth-child(even), 
.news-body-content tr:nth-child(even) {
  background-color: var(--bg-tertiary);
}

.article-body-content tr:hover, 
.news-body-content tr:hover {
  background-color: var(--brand-light);
}

/* Responsividade das tabelas */
@media (max-width: 768px) {
  .article-body-content table, 
  .news-body-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Ajustes de imagens e vídeos embutidos */
.article-body-content img, 
.news-body-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--border-radius-sm);
  margin: 10px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.article-body-content iframe, 
.news-body-content iframe {
  max-width: 100% !important;
  border-radius: var(--border-radius-sm);
  margin: 24px auto;
  display: block;
  box-shadow: var(--shadow-md);
  border: none;
}

/* --- ESTILOS DE PARÁGRAFO E FONTE PARA NOTÍCIAS E ARTIGOS --- */
.article-body-content,
.article-body-content p,
.article-body-content span,
.article-body-content div,
.article-body-content li,
.article-body-content a,
.article-body-content strong,
.article-body-content em,
.article-body-content blockquote {
  font-family: var(--font-primary) !important;
}

.article-body-content p {
  text-indent: 2.5rem !important; /* Espaçamento no início do parágrafo (recuo) */
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important; /* Espaçamento vertical entre parágrafos */
  text-align: justify !important;
}

/* Evitar que imagens, tabelas e vídeos herdem recuo de texto */
.article-body-content p img,
.article-body-content p iframe,
.article-body-content p table {
  text-indent: 0 !important;
}

/* Alinhamento de listas com os parágrafos */
.article-body-content ul,
.article-body-content ol {
  padding-left: 2.5rem !important; /* Alinha o marcador com o início do parágrafo */
  margin-left: 0 !important;
  margin-bottom: 1.5rem !important;
}

.article-body-content li {
  margin-bottom: 0.5rem !important;
  font-family: var(--font-primary) !important;
}

/* Listas aninhadas */
.article-body-content ul ul,
.article-body-content ul ol,
.article-body-content ol ul,
.article-body-content ol ol {
  padding-left: 1.5rem !important;
  margin-bottom: 0 !important;
}


/* --- RESPONSIVIDADE GERAL PARA SMARTPHONES (≤ 480px) --- */
@media (max-width: 480px) {
  /* Reduz padding lateral dos cards em todas as subpáginas */
  .premium-card-wrapper {
    padding: 16px;
  }

  /* Bloco de busca interno das subpáginas */
  .premium-card-wrapper > div[style*="padding: 24px"],
  .premium-card-wrapper > div[style*="padding:24px"] {
    padding: 12px !important;
  }

  /* Bloco de busca hero (index e pesquisa) */
  .search-hero-block {
    padding: 24px 16px;
  }

  /* Painel de abas de serviços */
  .tabs-section-block {
    padding: 20px 14px;
  }

  /* Cabeçalho não encolhe desnecessariamente */
  .brand-subtitle {
    display: none;
  }

  /* Controles da barra de exportação ficam em coluna */
  .search-controls-wrapper {
    flex-direction: column;
    align-items: flex-start !important;
  }

  /* Formulários internos de busca – botão ocupa linha inteira */
  .premium-card-wrapper form[style*="flex"] button[type="submit"],
  .premium-card-wrapper form[style*="flex"] a.premium-sidebar-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* --- ABAS DE PESQUISA COM DESTAQUE AZUL PREMIUM --- */
.search-tabs {
  background-color: var(--bg-tertiary) !important;
  padding: 6px !important;
  border-radius: var(--border-radius-md) !important;
  border: 1px solid var(--border-color) !important;
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
}

.search-tabs .tab-nav-btn {
  border-radius: var(--border-radius-sm) !important;
  padding: 10px 18px !important;
  border: 1px solid transparent !important;
  color: var(--text-secondary) !important;
  background-color: var(--bg-secondary) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: var(--transition-smooth) !important;
  box-shadow: var(--shadow-sm) !important;
}

.search-tabs .tab-nav-btn::after {
  display: none !important; /* Remove a linha padrão de baixo */
}

.search-tabs .tab-nav-btn.active {
  background: var(--brand-gradient, #1783bf) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-color: transparent !important;
  box-shadow: var(--shadow-md) !important;
}

.search-tabs .tab-nav-btn.active span {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.search-tabs .tab-nav-btn:hover:not(.active) {
  background-color: var(--brand-light) !important;
  color: var(--brand-primary) !important;
  border-color: rgba(23, 131, 191, 0.2) !important;
  transform: translateY(-1px) !important;
}

/* --- PREMIUM SOCIAL SHARING BAR --- */
.premium-share-container {
  margin-top: 24px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

.premium-share-title {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
}

.premium-share-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: relative !important;
}

.share-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--text-muted) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.share-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
  stroke: none !important;
}

.share-btn:hover {
  transform: scale(1.2) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.share-btn.whatsapp:hover {
  color: #25d366 !important;
}

.share-btn.facebook:hover {
  color: #1877f2 !important;
}

.share-btn.email:hover {
  color: #ea4335 !important;
}

.share-btn.instagram:hover {
  color: #e1306c !important;
}

.share-btn.copy-link:hover {
  color: var(--brand-primary) !important;
}

.share-tooltip {
  font-size: 0.75rem !important;
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
  display: none;
  position: absolute !important;
  bottom: 100% !important;
  right: 0 !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  padding: 4px 8px !important;
  border-radius: var(--border-radius-sm) !important;
  box-shadow: var(--shadow-sm) !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
  z-index: 10 !important;
}

/* --- ESTILOS DE IMPRESSÃO PREMIUM (@media print) --- */
@media print {
  /* Configuração Geral da Página */
  @page {
    margin: 15mm 20mm;
    size: A4;
  }
  
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  body.theme-highcontrast *,
  body.theme-dark * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #cccccc !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Ocultar Elementos de Interface Não Relevantes */
  .top-redirect-bar,
  .accessibility-panel,
  .header-actions,
  .drawer-overlay,
  .menu-drawer,
  .site-footer,
  #enquete-widget,
  .premium-sidebar-btn,
  .search-controls-wrapper,
  .export-actions-container,
  .pagination-container,
  .slider-control-btn,
  .slider-indicators,
  .enquete-card-floating,
  .drawer-search-wrapper,
  footer,
  button,
  a.card-read-more-btn,
  a.action-download-btn,
  form,
  .search-hero-section,
  .search-controls-wrapper,
  #copy-tooltip,
  .premium-share-container,
  .aside-sidebar {
    display: none !important;
  }

  /* Ajustar e Mostrar Apenas o Cabeçalho Logotipo */
  .site-header {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    background: #ffffff !important;
    border-bottom: 2px solid #005496 !important;
    padding: 12px 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
  }

  .brand-logo {
    height: 52px !important;
    width: auto !important;
    display: block !important;
    filter: none !important;
  }

  .brand-title {
    color: #005496 !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    display: block !important;
  }

  .brand-subtitle {
    display: block !important;
    color: #475569 !important;
    font-size: 0.8rem !important;
  }

  /* Ajuste de Espaçamento do Conteúdo */
  .main-content {
    margin-top: 20px !important;
    padding-top: 0 !important;
  }

  /* Remover decorações e sombras de cards */
  .premium-card-wrapper {
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* Título Principal de Artigos e Notícias */
  h1 {
    font-size: 20pt !important;
    color: #000000 !important;
    margin-top: 15px !important;
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
  }

  /* Hero Slider (Notícias/Artigos Imagens) */
  .hero-slider {
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    display: block !important;
  }

  .hero-slides-container {
    height: auto !important;
  }

  .hero-slide {
    position: relative !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: 320px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-color: #ffffff !important;
  }

  .hero-slide::after {
    display: none !important; /* Remove overlay escuro */
  }

  .hero-caption {
    position: relative !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 8px 12px !important;
    margin-top: 8px !important;
    border-radius: 4px !important;
  }

  .hero-excerpt {
    color: #000000 !important;
  }

  /* Corpo do Texto da Notícia / Artigo */
  .article-body-content {
    font-size: 11pt !important;
    line-height: 1.6 !important;
    color: #000000 !important;
  }

  .article-body-content a {
    color: #005496 !important;
    text-decoration: underline !important;
  }

  /* Tabelas na Impressão */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 16px 0 !important;
  }

  th, td {
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    color: #000000 !important;
  }

  th {
    background-color: #f1f5f9 !important;
    font-weight: bold !important;
  }

  /* Quebra de Página Inteligente */
  article, .premium-card-wrapper {
    page-break-inside: avoid !important;
  }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA BUSCA POR VOZ E HISTÓRICO DE BUSCA (AUTOPREENCHIMENTO)
   ========================================================================== */

/* Container do Input de Busca */
.search-input-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Ajuste do Padding do input para não cobrir o botão do microfone */
.search-input-container .search-input-field {
  padding-right: 48px !important;
  width: 100%;
}

/* Botão de Pesquisa por Voz (Microfone) */
.voice-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 5;
}

.voice-search-btn:hover {
  background-color: var(--brand-light);
  color: var(--brand-primary);
  transform: translateY(-50%) scale(1.05);
}

/* Tonalidade clara específica para quando o buscador possui fundo azul (Hero) */
.search-hero-section .voice-search-btn {
  color: rgba(255, 255, 255, 0.7) !important;
}

.search-hero-section .voice-search-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Estado de Gravação Pulsante */
.voice-search-btn.recording {
  color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.15);
  animation: voice-pulse 1.4s infinite ease-in-out;
}

@keyframes voice-pulse {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Dropdown do Histórico de Busca Autocomplete */
.search-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 999;
  overflow: hidden;
  animation: dropdown-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Itens da lista do histórico */
.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

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

.autocomplete-item:hover {
  background-color: var(--bg-tertiary);
}

.autocomplete-term-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: left;
}

.autocomplete-term-wrapper svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.autocomplete-delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
  background: transparent;
  border: none;
  cursor: pointer;
}

.autocomplete-delete-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444 !important;
}

/* Cabeçalho/Rodapé do Dropdown de Histórico */
.autocomplete-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.autocomplete-clear-all-btn {
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.autocomplete-clear-all-btn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.autocomplete-close-btn:hover {
  color: var(--text-primary) !important;
  transform: scale(1.2);
}

/* Ajuste para Alto Contraste */
body.theme-highcontrast .autocomplete-item:hover {
  background-color: #ffff00 !important;
}
body.theme-highcontrast .autocomplete-item:hover * {
  color: #000000 !important;
}
body.theme-highcontrast .voice-search-btn.recording {
  border: 3px solid #ff0000 !important;
  color: #ff0000 !important;
}

/* ==========================================================================
   ESTILOS PREMIUM PARA CURSOR CUSTOMIZADO SEGUIDOR (ACESSIBILIDADE E DESIGN)
   ========================================================================== */
@media (pointer: fine) {
  /* Oculta cursor do sistema apenas quando o cursor customizado está ativo */
  body.custom-cursor-active,
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active input,
  body.custom-cursor-active select,
  body.custom-cursor-active textarea,
  body.custom-cursor-active [role="button"] {
    cursor: none !important;
  }

  .custom-cursor-dot,
  .custom-cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    display: none; /* Oculto por padrão, ativado por JS */
    transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  }

  /* Ponto Central */
  body.custom-cursor-active .custom-cursor-dot {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--brand-primary);
  }

  /* Anel Seguidor */
  body.custom-cursor-active .custom-cursor-outline {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid var(--brand-primary);
    opacity: 0.55;
  }

  /* Efeito Hover nos Elementos Clicáveis */
  body.custom-cursor-active.cursor-hovering .custom-cursor-outline {
    width: 46px;
    height: 46px;
    background-color: rgba(23, 131, 191, 0.15);
    border-color: var(--brand-primary);
    opacity: 0.85;
  }

  body.custom-cursor-active.cursor-hovering .custom-cursor-dot {
    width: 4px;
    height: 4px;
    opacity: 0.4;
  }

  /* Mudança para branco sobre fundo azul (Hero) para alto contraste e visibilidade */
  body.custom-cursor-active.on-blue-bg .custom-cursor-dot {
    background-color: #ffffff !important;
  }

  body.custom-cursor-active.on-blue-bg .custom-cursor-outline {
    border-color: #ffffff !important;
  }

  body.custom-cursor-active.on-blue-bg.cursor-hovering .custom-cursor-outline {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
  }
}

/* Modo Alto Contraste: Força a desativação completa do cursor customizado */
body.theme-highcontrast .custom-cursor-dot,
body.theme-highcontrast .custom-cursor-outline {
  display: none !important;
}
body.theme-highcontrast,
body.theme-highcontrast * {
  cursor: auto !important;
}

/* ==========================================================================
   ESTILOS DO WIDGET DE CAMPANHAS DE CONSCIENTIZAÇÃO MENSAL (LAÇOS E TOOLTIPS)
   ========================================================================== */
.search-campaign-widget {
  position: absolute;
  top: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  z-index: 10;
}

.campaign-ribbon-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efeito de sobreposição elegante para quando há mais de um laço no mês */
.campaign-ribbon-item:nth-child(n+2) {
  margin-left: -14px;
  z-index: 2;
}

.campaign-ribbon-item:hover {
  transform: scale(1.22) rotate(-5deg);
  z-index: 5 !important;
}

.campaign-ribbon-svg {
  width: 32px;
  height: 40px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
  transition: var(--transition-smooth);
}

/* Adiciona contorno fino para laços muito claros como o Branco de Janeiro */
.campaign-ribbon-item[style*="--ribbon-border"] .campaign-ribbon-svg {
  filter: drop-shadow(0 0 1px var(--ribbon-border)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

/* Balão Informativo (Tooltip) */
.campaign-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background-color: rgba(15, 23, 42, 0.95);
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Seta apontando para cima no balão */
.campaign-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(15, 23, 42, 0.95) transparent;
}

.campaign-ribbon-item:hover .campaign-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Garante legibilidade do texto interno do tooltip */
.campaign-tooltip strong {
  color: var(--brand-primary) !important;
  font-weight: 700;
}

/* Responsividade: Ajusta posicionamento em telas móveis */
@media (max-width: 520px) {
  .search-campaign-widget {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 15px;
    justify-content: center;
  }
}

/* --- PORTAL ALERT RIBBON (FAIXA DE ALERTA SUPERIOR) --- */
.portal-alert-ribbon {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 2px solid var(--brand-primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-md);
  position: relative;
  animation: slideDownAlert 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  transition: padding 0.3s ease, background 0.3s ease;
}

/* Estado Minimizado */
.portal-alert-ribbon.is-minimized {
  padding: 0.45rem 1.25rem;
  cursor: pointer;
}

.portal-alert-ribbon.is-minimized:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

.alert-ribbon-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.alert-ribbon-slides-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 0; /* Evita quebra de flexbox */
}

/* Conteúdo no Estado Expandido */
.alert-ribbon-content-expanded {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.alert-slide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  animation: fadeInAlertSlide 0.35s ease-in-out;
}

.alert-ribbon-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 280px;
}

.alert-ribbon-badge {
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.alert-ribbon-text {
  line-height: 1.4;
}

.alert-ribbon-text strong {
  font-weight: 700;
  color: var(--brand-primary);
}

.alert-ribbon-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-ribbon-btn {
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.alert-ribbon-btn:hover {
  background: var(--brand-primary);
  color: #ffffff;
}

/* Conteúdo no Estado Minimizado */
.alert-ribbon-content-minimized {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.alert-slide-mini {
  width: 100%;
  animation: fadeInAlertSlide 0.35s ease-in-out;
}

.alert-ribbon-minimized-title {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.alert-ribbon-minimized-title strong {
  color: var(--brand-primary);
  margin-right: 2px;
}

/* Sino animado no estado minimizado */
.alert-bell-icon {
  animation: alertBellRing 4s ease-in-out infinite;
  flex-shrink: 0;
}

/* Controles de Navegação e Toggle */
.alert-ribbon-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.alert-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-nav-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.alert-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.alert-counter {
  min-width: 28px;
  text-align: center;
  user-select: none;
}

/* Botão de Toggle Minimizar/Maximizar */
.alert-ribbon-toggle-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.alert-ribbon-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Suporte para o Modo Escuro */
body.theme-dark .portal-alert-ribbon {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border-bottom: 2px solid var(--brand-primary);
}

body.theme-dark .portal-alert-ribbon.is-minimized:hover {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.theme-dark .alert-ribbon-text strong,
body.theme-dark .alert-ribbon-minimized-title strong {
  color: var(--brand-primary);
}

/* Suporte para Alto Contraste */
body.theme-highcontrast .portal-alert-ribbon {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

body.theme-highcontrast .alert-ribbon-badge {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.theme-highcontrast .alert-ribbon-text strong,
body.theme-highcontrast .alert-ribbon-minimized-title strong {
  color: #ffff00 !important;
}

body.theme-highcontrast .alert-ribbon-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
}

body.theme-highcontrast .alert-ribbon-btn:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.theme-highcontrast .alert-bell-icon {
  color: #ffff00 !important;
  animation: none !important;
}

body.theme-highcontrast .alert-nav-controls {
  border-color: #ffffff !important;
  background: #000000 !important;
}

body.theme-highcontrast .alert-nav-btn {
  color: #ffffff !important;
}

body.theme-highcontrast .alert-nav-btn:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

/* Animações */
@keyframes slideDownAlert {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInAlertSlide {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes alertBellRing {
  0%, 100% { transform: rotate(0); }
  4% { transform: rotate(15deg); }
  8% { transform: rotate(-15deg); }
  12% { transform: rotate(10deg); }
  16% { transform: rotate(-10deg); }
  20% { transform: rotate(0); }
}

/* Ajustes de Responsividade */
@media (max-width: 768px) {
  .alert-slide {
    flex-direction: column;
    align-items: stretch;
  }
  .alert-ribbon-actions {
    justify-content: space-between;
    width: 100%;
    margin-top: 0.25rem;
  }
  .alert-ribbon-btn {
    flex: 1;
    text-align: center;
  }
}







