* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Adjust based on sticky header height */
}

body {
    font-family: 'Montserrat', sans-serif;
}

/* --- VARIÁVEIS --- */
/* Variáveis encapsuladas para evitar vazamento de estilo */
/* Container principal do carrossel */
.carousel-container {
    position: relative;
    width: 100%;
    padding: 40px 0;
}

/* Modificado para PERMITIR ver os cards saindo pelas bordas com elegância */
.carousel-track-container {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
}

/* Linha que segura os cards */
.carousel-track {
    display: flex;
    gap: 30px; /* Espaçamento maior entre eles */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: stretch; /* Alinha a altura de todos os cards */
}

/* CARDS: Ajustados para exibir exatamente 3 de forma visível e proporcional */
.carousel-card {
    flex: 0 0 calc((100% - 60px) / 3); 
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
    /* Todos os cards com tamanho idêntico, nítidos e opacos */
    transform: scale(1);
    opacity: 1;
    filter: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* CARD ATIVO (O que está no centro) */
.carousel-card.active {
    transform: scale(1); /* Mantém o mesmo tamanho dos outros */
    opacity: 1;
    filter: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

/* Estilização interna dos textos e botões */
.card-icon {
    font-size: 3rem;
    color: #004587; /* Cor azul escura baseada na sua imagem */
    margin-bottom: 20px;
}

.card-title {
    color: #004587;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    min-height: 55px; /* Mantém alinhamento caso o título quebre linha */
}

.card-desc {
    color: #555555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1; /* Faz a descrição ocupar o espaço disponível e empurra o botão */
}

.btn-read {
    background: #004587;
    color: #fff;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    margin-top: auto; /* Garante o alinhamento na base */
}

.btn-read:hover {
    background: #002d59;
}

/* Cabeçalho do Carrossel (Simplificado) */
.carousel-header {
    display: block;
    margin-bottom: 25px;
    width: 100%;
}

.carousel-header .section-title {
    margin-bottom: 0 !important;
}

.carousel-nav-buttons {
    display: none;
}

/* Botões do Carrossel posicionados nas laterais com contraste premium */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: none;
    color: #004587; /* Azul escuro oficial */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-btn:hover {
    background: #004587;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 73, 143, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

/* Responsividade para Telas Menores */
@media (max-width: 1280px) {
    .carousel-prev {
        left: 10px;
    }
    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 992px) {
    .carousel-card {
        flex: 0 0 60%; /* Em tablets o card central domina mais a tela */
    }
}

@media (max-width: 650px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .carousel-prev {
        left: 5px;
    }
    .carousel-next {
        right: 5px;
    }
    .carousel-card {
        flex: 0 0 85%; /* Quase tela cheia no celular */
        transform: scale(1);
        opacity: 1;
    }
    .carousel-card.active {
        transform: scale(1);
    }
}
:root {
    --pmg-primary: #003366;
    --pmg-accent: #00D2D3;
    --pmg-text: #333333;
    --pmg-bg: #ffffff;
}

/* Container principal com ID único */
#pmg-section-container {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 850px;
    margin: 2rem auto;
    padding: 40px;
    background-color: var(--pmg-bg);
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
    color: var(--pmg-text);
}

.pmg-main-title {
    color: var(--pmg-primary);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
}

.pmg-main-title b {
    color: var(--pmg-accent);
    font-weight: 800;
}

.pmg-content-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
}

/* Bloco de destaque para o Gabinete */
.pmg-highlight-aside {
    background: #f0fbfc;
    border-left: 5px solid var(--pmg-accent);
    padding: 25px;
    margin: 35px 0;
    border-radius: 4px;
}

.pmg-sub-header {
    color: var(--pmg-primary);
    font-size: 1.4rem;
    margin: 40px 0 20px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Estrutura de Lista de Secretarias */
.pmg-competencies-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pmg-card-org {
    background: #f9f9f9;
    padding: 18px 22px;
    border-radius: 8px;
    border: 1px solid #ececec;
}

.pmg-card-org strong {
    color: var(--pmg-primary);
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.pmg-footer-statement {
    margin-top: 45px;
    text-align: center;
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}
    /* Estilo do Container Principal */
    .dashboard-guide {
        background-color: #f8f9fa;
        padding: 25px;
        border-radius: 8px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        color: #333;
        max-width: 900px;
        line-height: 1.6;
    }

    /* Título principal em Azul Escuro */
    .dashboard-guide h2 {
        color: #1a2a4e;
        font-size: 1.4rem;
        margin-top: 0;
        text-transform: uppercase;
        border-bottom: 2px solid #1a2a4e;
        padding-bottom: 10px;
    }

    /* Parágrafo de introdução */
    .dashboard-guide p.intro {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    /* Lista de Tópicos */
    .dashboard-list {
        list-style: none;
        padding: 0;
    }

    /* Item da Lista */
    .dashboard-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    /* Estilo do Ícone/Emoji */
    .icon {
        font-size: 1.5rem;
        min-width: 45px; /* Garante que o texto não "empurre" o ícone */
        text-align: center;
        margin-right: 15px;
        filter: grayscale(0.2); /* Deixa os emojis um pouco mais sóbrios */
    }

    /* Estilo do Texto */
    .content strong {
        color: #1a2a4e;
        font-weight: 800;
        letter-spacing: 0.5px;
    }

    .content span {
        color: #555;
    }

.full-width-line {
    width: 100%;
    height: 5px;
    display: block;
    background: linear-gradient(90deg, #0047BB, #00D2D3, #8bc34a, #ffdf00);
    position: relative;
    z-index: 1;
}

.full-width-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    z-index: 2;
    animation: fadeLineGradient 4s infinite alternate ease-in-out;
}

@keyframes fadeLineGradient {
    0%, 20% { opacity: 0; }
    80%, 100% { opacity: 1; }
}

:root {
    /* Cores Oficiais do Portal MT */
    --color-gov-blue: #0047BB;
    --color-gov-blue-light: #1A5FFF;
    --color-yellow-mt: #ffdf00;
    /* Amarelo institucional */

    --color-text-main: #333333;
    --color-text-light: #777777;
    --color-bg-light: #f9f9f9;
    --color-white: #ffffff;
    --color-accent-woman: #00D2D3;
    /* Neon Turquoise accent */

    /* Novas Cores para Rodapé (Tons de azul do Footer MT) */
    --color-emerg-1: #002b5e;
    --color-emerg-2: #003670;
    --color-emerg-3: #004587;
    --color-emerg-4: #0056a3;

    --font-main: 'Inter', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);

    /* Cores da Assistente Ixpia (Baseadas na imagem) */
    --assistant-primary: #001b3d;
    /* Azul Marinho Profundo */
    --assistant-secondary: #0056a3;
    /* Azul Real do Uniforme */
    --assistant-accent: #ffdf00;
    /* Amarelo Estrela */
    --assistant-white: #ffffff;
    --assistant-text: #1a1a1a;

    /* Padronização de Fontes */
    --fs-xs: 0.75rem;
    /* Extra Pequeno (Legendas, Notas) */
    --fs-sm: 0.875rem;
    /* Pequeno (Topbar, Botões menores) */
    --fs-base: 1rem;
    /* Base (Texto corrido) */
    --fs-md: 1.125rem;
    /* Médio (Destaques, Subtítulos) */
    --fs-lg: 1.5rem;
    /* Grande (Títulos de Seção, H3) */
    --fs-xl: 2.25rem;
    /* Extra Grande (H2) */
    --fs-xxl: 3.5rem;
    /* Gigante (Banner Principal) */
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TOPBAR --- */
.topbar {
    background-color: var(--color-gov-blue);
    transition: background 0.3s ease;
}

.topbar.topbar-scrolled {
    background-color: #d1208a !important;
    color: var(--color-white);
}

.topbar:hover {
    background-color: #d1208a !important;
}

.topbar-scrolled {
    padding: 2px 0;
    font-size: var(--fs-sm);
    position: sticky;
    top: 0;
    z-index: 1100;
    /* Higher than header z-index */
    font-weight: 500;
}

.topbar-container {
    display: flex;
    justify-content: space-between; /* Joga os links para a esquerda e sociais/acessibilidade para a direita */
    align-items: center;           /* Alinha tudo perfeitamente na linha horizontal central */
    max-width: 1500px;             /* Modifique para a largura padrão do seu site (ex: 1200px ou 1400px) */
    width: 100%;
    margin: 0 auto;                /* Centraliza o bloco na tela */
    padding: 0 20px;               /* Margem de segurança nas laterais para telas menores */
}

.topbar-nav {
    display: flex;
    gap: 24px;
}

.topbar-nav a {
    opacity: 0.8;
}

.topbar-nav a:hover {
    opacity: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.accessibility-tools,
.topbar-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accessibility-tools a,
.topbar-social a {
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.accessibility-tools a:hover,
.topbar-social a:hover {
    opacity: 1;
}

.accessibility-tools {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding-right: 20px;
}

/* --- CABEÇALHO (HEADER) ESTILO HERO --- */
.main-header {
    background-color: var(--color-white);
    width: 100%;
    aspect-ratio: 1366 / 400;
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
    overflow: hidden;
    margin-top: 0px; /* Espaço entre o topo da página e o banner */
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: -1;
}

.hero-bg.active {
    opacity: 1;
}

.hero-bg-1 {
    background-image: url('/static/assets/banner_otimizado.png');
}

.hero-bg-2 {
    background-image: url('/static/assets/banner02.png');
}

.hero-bg-3 {
    background-image: url('/static/assets/banner03.png');
}

.hero-bg-4 {
    background-image: url('/static/assets/banner04.png');
}

.hero-bg-5 {
    background-image: url('/static/assets/banner05.png');
}

.hero-bg-6 {
    background-image: url('/static/assets/banner06.png');
}

.hero-bg.active {
    animation: bgPan 16s ease-in-out infinite alternate;
}

@keyframes bgPan {
    0% { background-position: left top; }
    100% { background-position: center top; }
}

/* Faixa Superior com Título */
/* Faixa Superior com Título */
.header-top-bar {
    /* Background removed to show image directly */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    
    width: 100%;
    padding: 20px 0; /* Slightly more padding for spacing */
    
    /* Removed border-bottom for a cleaner look */
    border-bottom: none;
    
    position: relative; /* Changed from sticky to follow banner */
    z-index: 1000;
}
.header-top-bar-container {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: center;
    justify-content: center;
    gap: 15px; /* Reduced gap for vertical layout */
    text-align: center;
}

.header-logo-small img {
    height: 80px; /* Increased size for better prominence */
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.header-main-title {
    color: var(--color-gov-blue); /* Changed back to blue as requested */
    font-size: 2.5rem; /* Increased for more impact */
    font-weight: 800; /* Bolder for better visibility */
    text-transform: none;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Conteúdo Hero (Busca) */
.header-content-hero {
    flex: 1;
    display: flex;
    align-items: center; /* Centraliza verticalmente o conteúdo */
    justify-content: center;
    padding: 50px 0 30px 0; /* Ajuste de espaçamento superior limpo */
}

.header-hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alinha o conteúdo mais à direita */
    width: 100%;
    padding-right: 160px; /* Desloca um pouco o campo de busca para a esquerda */
}

.hero-search-wrapper {
    width: 100%;
    max-width: 600px; /* Decreased width for a more compact look */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 25px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-search-bar {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent background */
    backdrop-filter: blur(10px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    padding: 4px; /* Reduced padding for a thinner look */
}

.hero-search-bar input {
    flex: 1;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    color: #000;
    background: transparent; /* Allows the container's transparency to show */
}

.hero-search-bar button {
    background: var(--color-gov-blue);
    color: var(--color-white);
    border: none;
    padding: 0 35px; /* Reduced button width */
    border-radius: 35px;
    font-size: 1rem; /* Slightly smaller font */
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hero-search-bar button:hover {
    background: var(--color-gov-blue-light);
}

.hero-popular-tags {
    color: #000; /* Changed to black as requested */
    font-size: 0.8rem; /* Reduced font size */
    display: flex;
    gap: 8px; /* Reduced gap */
    align-items: center;
}

.hero-popular-tags strong {
    font-weight: 700;
}

.hero-popular-tags a {
    color: #000; /* Changed to black as requested */
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7); /* More opaque background for visibility */
    padding: 2px 8px; /* Reduced padding */
    border-radius: 12px; /* Smaller radius */
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.hero-popular-tags a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .header-top-bar-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-main-title {
        font-size: 1.4rem;
    }
    
    .hero-search-wrapper {
        padding: 0 20px;
    }
    
    .hero-search-bar button {
        padding: 0 25px;
    }
    
    .hero-popular-tags {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* 1. O Bloco de Fundo do Menu (Ocupa 100% da tela de ponta a ponta) */
.main-nav {
    width: 100%;
    background-color: #ffffff; /* Defina a cor de fundo do seu menu */
    border-bottom: 2px solid #ebebeb; /* Linha sutil opcional abaixo do menu */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.main-nav.nav-scrolled {
    background: linear-gradient(90deg, #A770EF, #60146f) !important;
    border-bottom: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.main-nav.nav-scrolled ul li a {
    color: white !important;
}

.main-nav.nav-scrolled ul li a::after {
    background-color: white !important;
}

/* 2. O Container do Menu (ESTA É A CHAVE)
   Ele DEVE ter as mesmas propriedades de largura máxima que demos à topbar */
.main-nav .container {
    max-width: 1200px;      /* Deixado igual ao valor usado na topbar (1200px) */
    width: 100%;
    margin: 0 auto;         /* Centraliza perfeitamente na tela */
    padding: 0 20px;        /* Mesma margem de segurança nas laterais */
}

/* 3. Distribuição dos Itens do Menu na Horizontal */
.main-nav ul {
    display: flex;
    justify-content: space-between; /* Distribui os links igualmente de uma ponta a outra do container */
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 4. Estilização dos Links - Efeito Acolhedor */
.main-nav ul li {
    display: inline-block;
}

.main-nav ul li a {
    display: block;
    padding: 12px 18px;    
    text-decoration: none;
    color: #4a4a4a; /* Tom mais suave e acolhedor que o preto puro */
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-radius: 30px; /* Borda arredondada para suavidade */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

/* Linha sutil que cresce do centro */
.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0%;
    height: 3px;
    background-color: #A770EF;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(-50%);
    border-radius: 3px;
}

/* Efeito ao passar o mouse */
.main-nav ul li a:hover {
    color: #A770EF;
    background-color: rgba(167, 112, 239, 0.08); /* Fundo super suave */
    transform: translateY(-2px); /* Leve elevação acolhedora */
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 60%; /* A linha cresce de forma elegante */
}

/* Link Ativo */
.main-nav ul li a.active {
    color: #A770EF;
    font-weight: 700;
    background-color: rgba(167, 112, 239, 0.04);
}

/* --- CONTEÚDO PRINCIPAL (GRID) --- */
.main-content {
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
}

.header-top-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
    /* Added subtle shadow for depth */
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    color: var(--color-gov-blue);
    font-family: 'Inter', sans-serif;
    font-size: var(--fs-xl);
    border-left: 6px solid #A2006D; /* Barra vertical estilo SP Mulher Segura */
    padding-left: 15px;
}

.section-icon {
    font-size: 2.5rem;
    color: var(--color-gov-blue);
}

.title-light {
    font-weight: 800;
    font-style: italic;
    color: var(--color-gov-blue);
    text-transform: none;
    /* "Uma" is usually not all caps in this style */
}

.title-accent {
    font-weight: 800;
    color: var(--color-green-neon);
}

.title-bold {
    font-weight: 800;
    color: var(--color-gov-blue);
}

.section-title .text-light-italic {
    font-style: italic;
    color: #777;
    font-weight: 700;
}

.section-title .text-accent {
    color: var(--color-accent-woman);
    font-weight: 800;
}

.section-title .text-bold {
    color: var(--color-gov-blue);
    font-weight: 800;
}

/* Variantes Brancas para Fundos Escuros */
.section-title.white-title,
.section-title.white-title .section-icon,
.section-title.white-title strong {
    color: var(--color-white);
}

.section-title.white-title .section-title-bar {
    background: var(--color-white);
}

.section-title.white-title .text-light-italic {
    color: rgba(255, 255, 255, 0.8);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border-radius: 16px;
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0047BB, #00D2D3, #8bc34a, #ffdf00);
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    z-index: 2;
    animation: fadeLineGradient 4s infinite alternate ease-in-out;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: #e2f2ed;
    /* Light green-ish background like the example */
    color: #10b981;
    /* Green icon color like the example */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: all var(--transition-fast);
}

.service-card:hover .icon-box {
    transform: scale(1.1);
    background-color: #10b981;
    color: white;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-subtitle {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: none;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4f46e5;
    /* Purple/Blue color like the example */
    line-height: 1.2;
    margin-bottom: 15px;
}

.card-desc {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 90%;
}

.card-footer {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 10px;
}

/* --- RODAPÉ DE EMERGÊNCIA --- */
.emergency-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding-bottom: 20px;
    z-index: 10;
    pointer-events: none;
    /* Deixa clicar no que tem atrás se não for nos cards */
}

.emergency-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.emergency-card {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 6px;
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.emergency-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.emergency-card:hover::before,
.emergency-card:active::before {
    opacity: 1;
}

.emergency-card:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #A770EF, #60146f) !important;
}

.emergency-card .number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--color-white);
    color: var(--color-text-main);
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 15px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.emergency-card .text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.emergency-card .text strong {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Cores específicas dos cards (Atualizadas para mais escuras) */
.color-dark-1 {
    background-color: var(--color-emerg-1);
}

.color-dark-2 {
    background-color: var(--color-emerg-2);
}

.color-dark-3 {
    background-color: var(--color-emerg-3);
}

.color-dark-4 {
    background-color: var(--color-emerg-4);
}


/* --- ELEMENTOS FLUTUANTES --- */
.fab-libras {
    position: fixed;
    top: 150px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--color-gov-blue);
    color: var(--color-white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 100;
    transition: transform 0.2s;
}

.fab-libras:hover {
    transform: scale(1.1);
}

.fab-assistant {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-assistant:hover {
    transform: scale(1.1) translateY(-5px);
}

.fab-assistant .avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    border: 3px solid var(--color-white);
}

.fab-assistant .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    background-color: var(--assistant-accent);
    border-radius: 50%;
    border: 2px solid var(--color-white);
    box-shadow: 0 0 10px var(--assistant-accent);
}

/* --- JANELA DO CHATBOT --- */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background-color: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.chat-window.maximized {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    transform: translateY(0) scale(1);
}

.chat-header {
    border-bottom: 2px solid var(--assistant-accent);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--assistant-accent);
    background-color: var(--color-white);
}

.chat-header-text h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.chat-header-text span {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chat-close-btn, .chat-maximize-btn {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.chat-close-btn:hover, .chat-maximize-btn:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.message.bot {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #444;
    border-bottom-left-radius: 2px;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.chat-option-btn {
    background-color: #e2d6ff;
    color: #5a2e96;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-block;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-option-btn:hover {
    background-color: #bfa3ff;
    transform: translateY(-1px);
}

.message.user {
    align-self: flex-end;
    background-color: var(--assistant-secondary);
    color: var(--color-white);
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 10px 15px 5px;
    background-color: var(--color-white);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ebebeb;
    padding: 12px 15px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: #8c71d6;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #9275e3;
    color: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 1.1rem;
}

.chat-send-btn:hover {
    background-color: #7b5bc9;
}

.chat-typing {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-bottom: 10px;
    display: none;
}

/* --- SEÇÃO REGISTRO DE OCORRÊNCIA (MODELO MT EM PERSPECTIVA - VERSÃO COMPACTA) --- */
.occurrence-section {
    background-color: #EFEFEF;
    padding: 30px 0;
    /* Reduced from 60px */
    color: #000000;
    position: relative;
    overflow: hidden;
}

.occurrence-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.occurrence-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.occurrence-text-side {
    flex: 1;
    max-width: 500px;
}

.occurrence-text-side h2 {
    font-size: var(--fs-lg);
    /* Reduced from xl */
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    color: #000000;
}

.occurrence-text-side p {
    font-size: var(--fs-sm);
    /* Reduced from base */
    line-height: 1.6;
    color: #000000;
    margin-bottom: 20px;
}

.btn-explore {
    display: inline-block;
    background-color: var(--color-yellow-mt);
    color: #000;
    padding: 10px 20px;
    /* Reduced from 14x28 */
    border-radius: 6px;
    font-weight: 800;
    font-size: var(--fs-xs);
    /* Reduced from sm */
    text-transform: none;
    transition: all var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.occurrence-image-side {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.occurrence-image-side img {
    max-width: 450px;
    /* Limited width */
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .occurrence-container {
        flex-direction: column;
        text-align: center;
    }

    .occurrence-image-side {
        justify-content: center;
    }
}

/* --- CARROSSEL DE MATERIAIS EDUCATIVOS (MODELO CARDS) --- */

.carousel-section {
    background-color: var(--color-gov-blue);
    color: var(--color-white);
    padding: 40px 0;
    position: relative;
    z-index: 3;
}

.carousel-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.carousel-section:hover::before,
.carousel-section:active::before {
    opacity: 1;
}

.carousel-section > .container {
    position: relative;
    z-index: 1;
}

.carousel-title {
    color: var(--color-white);
    text-align: left;
    margin-bottom: 30px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.title-icon-svg.light {
    color: var(--color-accent-woman);
}

/* --- GRADE DE MATERIAIS DA BIBLIOTECA (modulo6_educativos.html) --- */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.library-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.library-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0047BB, #00D2D3, #8bc34a, #ffdf00);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.library-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.library-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.library-card:hover::after {
    opacity: 1;
}

.library-card .card-icon {
    font-size: 2.5rem;
    color: var(--color-gov-blue, #004587);
    margin-bottom: 15px;
}

.library-card .card-title {
    color: var(--color-gov-blue, #004587);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    min-height: auto;
    text-align: center;
}

.library-card .card-desc {
    color: #555555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.library-card .btn-read {
    background: var(--color-gov-blue, #004587);
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.library-card .btn-read:hover {
    background: var(--color-emerg-1, #002d59);
}

/* --- MT FOOTER OFICIAL --- */
.mt-footer {
    width: 100%;
    position: relative;
    font-size: 0.85rem;
    margin-top: auto;
}

/* Seção de Links */
.footer-links-grid {
    background-color: #f2f2f2;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    color: #4a4a4a;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
    transition: color var(--transition-fast);
}

.footer-column a i {
    font-size: 0.7rem;
    color: #888;
}

.footer-column a:hover {
    color: var(--color-gov-blue);
}

.footer-column a:hover i {
    color: var(--color-gov-blue);
}

/* Seção Institucional */
.footer-institutional {
    background-color: var(--color-white);
    padding: 40px 0;
}

.footer-inst-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-logo-social {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    color: var(--color-gov-blue);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e5e5e5;
    color: #555;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--color-gov-blue);
    color: var(--color-white);
}

.footer-info {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-info strong {
    color: var(--color-gov-blue);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.footer-back-to-top {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.footer-back-to-top button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--color-gov-blue);
    color: var(--color-white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.footer-back-to-top:hover button {
    background-color: var(--color-gov-blue-light);
}

.footer-back-to-top span {
    color: var(--color-gov-blue);
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Barra Azul Final */
.footer-bottom-bar {
    background-color: #0047BB;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 15px 0;
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.footer-bottom-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #A770EF, #60146f);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.footer-bottom-bar:hover::before,
.footer-bottom-bar:active::before {
    opacity: 1;
}

.footer-bottom-bar .container {
    position: relative;
    z-index: 1;
}

.footer-bottom-bar strong {
    color: var(--color-white);
}

/* Seção de Telefones de Emergência (Integrada ao Layout e unificada visualmente com o footer) */
.emergency-footer {
    position: relative;
    width: 100%;
    background: #f2f2f2;
    /* Mesma cor do início do rodapé oficial */
    padding: 40px 0 20px 0;
    z-index: 2;
}

/* Responsividade Básica */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .header-art {
        display: none;
        /* Esconde arte em telas menores */
    }

    .header-title {
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .emergency-container {
        flex-wrap: wrap;
    }

    .emergency-card {
        flex: 1 1 calc(50% - 10px);
        margin-bottom: 5px;
    }

    .full-width-line {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        display: block;
        height: auto;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inst-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo-social {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .emergency-card {
        flex: 1 1 100%;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Previne que o laço de fundo invisível cause vazamento de espaço em branco ou rolagem infinita no final da página */
.background-ribbon {
    display: none;
}

/* --- ALTO CONTRASTE / EFEITO DARK (ACESSIVEL) --- */
body.dark-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
    --color-bg-light: #000000;
    --color-white: #ffffff; /* Correção crítica: manter branco para contrastar em fundos escuros */
    --color-text-main: #ffffff;
    --color-text-light: #dddddd;
    --color-gov-blue: #ffff00; /* High contrast yellow */
    --color-gov-blue-light: #ffea00;
    --color-accent-woman: #00ffff; /* High contrast cyan */
    --pmg-bg: #121212;
    --pmg-text: #ffffff;
    --pmg-primary: #ffff00;
    --pmg-accent: #00ffff;
}

/* Transição suave e premium para acessibilidade (apenas em elementos específicos para não quebrar animações 3D/carrossel) */
body,
.topbar,
.main-header,
.main-nav,
.main-nav a,
.service-card,
.carousel-card,
.goal-item,
.feature-item,
.library-card,
.premium-card,
.question-card,
.mt-footer,
.footer-bottom-bar,
.chat-window,
.chat-header,
.message,
.option-content,
.doc-category-card,
.doc-category-header,
.doc-item,
.dashboard-guide,
.dashboard-item,
.form-wrapper-premium,
.step-number,
.doc-search-input,
.search-input-premium,
.hero-search-bar,
.map-sidebar,
.popup-premium-header,
.popup-premium-body {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, font-size 0.2s ease !important;
}

/* Ajustes específicos para o Alto Contraste */
body.dark-contrast .topbar {
    background-color: #121212 !important;
    border-bottom: 2px solid #ffff00;
}

body.dark-contrast .topbar-nav a,
body.dark-contrast .accessibility-tools a,
body.dark-contrast .topbar-social a {
    color: #ffffff !important;
    opacity: 1 !important;
}

body.dark-contrast .accessibility-tools a:hover,
body.dark-contrast .topbar-social a:hover {
    color: #ffff00 !important;
}

body.dark-contrast .main-header {
    background-color: #000000 !important;
    border-bottom: 2px solid #ffff00;
}

body.dark-contrast .main-header::before {
    filter: brightness(0.12) contrast(1.8) grayscale(1) !important; /* Deixa a imagem hero super escura e acessível */
}

body.dark-contrast .header-main-title {
    color: #ffff00 !important;
    text-shadow: 0 0 15px #000000;
}

body.dark-contrast .main-nav {
    background-color: #121212 !important;
    border-bottom: 2px solid #ffff00;
}

body.dark-contrast .main-nav a {
    color: #ffffff !important;
}

body.dark-contrast .main-nav a:hover,
body.dark-contrast .main-nav a.active {
    color: #ffff00 !important;
    border-bottom: 2px solid #ffff00;
}

body.dark-contrast .section-title,
body.dark-contrast .section-title strong,
body.dark-contrast .pmg-main-title,
body.dark-contrast .pmg-main-title b {
    color: #ffffff !important;
}

body.dark-contrast .section-title .text-accent,
body.dark-contrast .section-title strong[style*="color"] {
    color: #00ffff !important;
}

body.dark-contrast .section-icon,
body.dark-contrast .title-icon-svg svg {
    color: #ffff00 !important;
    fill: #ffff00 !important;
}

/* Forçar fundos escuros e bordas claras nos blocos anteriormente brancos */
body.dark-contrast .footer-institutional {
    background-color: #121212 !important;
    border-top: 1px solid #ffffff;
}

body.dark-contrast .service-card,
body.dark-contrast .carousel-card,
body.dark-contrast .goal-item,
body.dark-contrast .feature-item,
body.dark-contrast .library-card,
body.dark-contrast .premium-card,
body.dark-contrast .question-card {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Elementos com Estilos Inline no HTML (Acessibilidade, Metas e Busca) */
body.dark-contrast .feature-item,
body.dark-contrast .goal-item {
    background: #121212 !important;
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

body.dark-contrast .feature-item i[style*="color"],
body.dark-contrast .feature-item h3,
body.dark-contrast .goal-item h3 {
    color: #ffff00 !important;
}

body.dark-contrast .feature-item p,
body.dark-contrast .goal-item p {
    color: #ffffff !important;
}

/* Barra de Busca na Biblioteca de Materiais Educativos */
body.dark-contrast .search-library-wrapper > div {
    background: #000000 !important;
    background-color: #000000 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

body.dark-contrast .search-library-wrapper i {
    color: #ffff00 !important;
}

body.dark-contrast #librarySearchInput {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Caixa de Alerta na página de Ocorrências */
body.dark-contrast .alert-box {
    background: #121212 !important;
    background-color: #121212 !important;
    border: 2px solid #ff3333 !important;
    border-left: 10px solid #ff3333 !important;
}

body.dark-contrast .alert-box h3,
body.dark-contrast .alert-box p,
body.dark-contrast .alert-box strong {
    color: #ffffff !important;
}

body.dark-contrast .alert-box h3 i {
    color: #ff3333 !important;
}

/* Conheça o Portal (Aside e Cards) */
body.dark-contrast .pmg-highlight-aside {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-left: 5px solid #00ffff !important;
    color: #ffffff !important;
}

body.dark-contrast .pmg-card-org {
    background: #121212 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

body.dark-contrast .pmg-card-org strong {
    color: #ffff00 !important;
}

body.dark-contrast .pmg-footer-statement {
    color: #dddddd !important;
    border-top: 1px solid #222222 !important;
}

/* Hover nos Cards e Itens */
body.dark-contrast .service-card:hover,
body.dark-contrast .carousel-card:hover,
body.dark-contrast .goal-item:hover,
body.dark-contrast .feature-item:hover,
body.dark-contrast .library-card:hover,
body.dark-contrast .premium-card:hover,
body.dark-contrast .question-card:hover {
    border-color: #ffff00 !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5) !important;
}

body.dark-contrast .card-title,
body.dark-contrast .card-subtitle,
body.dark-contrast .card-desc,
body.dark-contrast .question-text,
body.dark-contrast .pmg-content-text {
    color: #ffffff !important;
}

body.dark-contrast .icon-box,
body.dark-contrast .card-icon {
    color: #ffff00 !important;
}

body.dark-contrast .btn-read,
body.dark-contrast .btn-explore,
body.dark-contrast .btn-fonar,
body.dark-contrast .btn-next,
body.dark-contrast .btn-finish,
body.dark-contrast .pill-btn.active,
body.dark-contrast .doc-action-btn,
body.dark-contrast .chat-send-btn {
    background-color: #ffff00 !important;
    color: #000000 !important;
    font-weight: 800 !important;
    border: 2px solid #ffff00 !important;
}

body.dark-contrast .btn-read:hover,
body.dark-contrast .btn-explore:hover,
body.dark-contrast .btn-fonar:hover,
body.dark-contrast .btn-next:hover,
body.dark-contrast .btn-finish:hover,
body.dark-contrast .pill-btn.active:hover,
body.dark-contrast .doc-action-btn:hover,
body.dark-contrast .chat-send-btn:hover {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #000000 !important;
}

body.dark-contrast .btn-back {
    background-color: #222222 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .btn-back:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

body.dark-contrast .pill-btn {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .pill-btn:hover {
    border-color: #ffff00 !important;
    color: #ffff00 !important;
}

body.dark-contrast .occurrence-section {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .occurrence-text-side,
body.dark-contrast .occurrence-text-side a {
    color: #ffffff !important;
}

body.dark-contrast .emergency-footer,
body.dark-contrast .emergency-section-header {
    background-color: #000000 !important;
}

body.dark-contrast .emergency-card {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .emergency-card:hover {
    border-color: #ffff00 !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5) !important;
}

body.dark-contrast .emergency-card .number {
    color: #ffff00 !important;
}

body.dark-contrast .emergency-card strong,
body.dark-contrast .emergency-card span {
    color: #ffffff !important;
}

body.dark-contrast .mt-footer {
    background-color: #121212 !important;
    border-top: 2px solid #ffff00;
}

body.dark-contrast .footer-info,
body.dark-contrast .footer-info p,
body.dark-contrast .footer-bottom-bar span {
    color: #ffffff !important;
}

body.dark-contrast .footer-info strong,
body.dark-contrast .footer-bottom-bar strong {
    color: #ffff00 !important;
}

body.dark-contrast .footer-bottom-bar {
    background-color: #000000 !important;
    border-top: 1px solid #ffff00;
}

/* Chatbot Acessível */
body.dark-contrast .chat-window {
    background-color: #121212 !important;
    border: 2px solid #ffff00 !important;
}

body.dark-contrast .chat-header {
    background-color: #ffff00 !important;
    background: #ffff00 !important;
    color: #000000 !important;
}

body.dark-contrast .chat-header h4,
body.dark-contrast .chat-header span {
    color: #000000 !important;
}

body.dark-contrast .chat-close-btn {
    color: #000000 !important;
}

body.dark-contrast .message.bot {
    background-color: #222222 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

body.dark-contrast .message.user {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 1px solid #ffff00 !important;
}

body.dark-contrast .chat-input-area {
    background-color: #121212 !important;
    border-top: 1px solid #ffff00 !important;
}

body.dark-contrast .chat-input-area input {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

/* FONAR & Diagnóstico */
body.dark-contrast .form-wrapper-premium {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .form-container {
    background: #121212 !important;
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

body.dark-contrast .form-header h1 {
    color: #ffff00 !important;
}

body.dark-contrast .form-header p {
    color: #dddddd !important;
}

body.dark-contrast .step-number {
    background-color: #222222 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .step-item.active .step-number,
body.dark-contrast .step.active {
    background-color: #ffff00 !important;
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
}

body.dark-contrast .step-item.completed .step-number,
body.dark-contrast .step.completed {
    background-color: #00ffff !important;
    background: #00ffff !important;
    color: #000000 !important;
    border-color: #00ffff !important;
}

body.dark-contrast .step-item span,
body.dark-contrast .step {
    color: #ffffff !important;
}

body.dark-contrast .step-item.active span {
    color: #ffff00 !important;
}

body.dark-contrast .option-content,
body.dark-contrast .option-label {
    border-color: #ffffff !important;
    color: #ffffff !important;
    background: #000000 !important;
    background-color: #000000 !important;
}

body.dark-contrast .option-btn:hover .option-content,
body.dark-contrast .option-label:hover {
    background-color: #222222 !important;
    background: #222222 !important;
    border-color: #ffff00 !important;
}

body.dark-contrast .option-btn input:checked + .option-content,
body.dark-contrast input[type="radio"]:checked + .option-label {
    background-color: #ffff00 !important;
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
}

/* Documentos & Legislação */
body.dark-contrast .doc-category-card {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .doc-category-header {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-bottom: 2px solid #ffffff !important;
}

body.dark-contrast .doc-item {
    border-bottom: 1px solid #ffffff !important;
    color: #ffffff !important;
}

body.dark-contrast .doc-item:hover {
    background-color: #222222 !important;
}

body.dark-contrast .doc-item-title {
    color: #ffff00 !important;
}

body.dark-contrast .doc-item-desc {
    color: #dddddd !important;
}

body.dark-contrast .doc-item-icon-box {
    background-color: #222222 !important;
    color: #ffff00 !important;
    border: 1px solid #ffff00 !important;
}

/* Guia do Dashboard / Estatísticas */
body.dark-contrast .dashboard-guide {
    background-color: #121212 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}

body.dark-contrast .dashboard-guide h2 {
    color: #ffff00 !important;
    border-bottom: 2px solid #ffff00 !important;
}

body.dark-contrast .dashboard-guide p.intro {
    color: #ffffff !important;
}

body.dark-contrast .content strong {
    color: #ffff00 !important;
}

body.dark-contrast .content span {
    color: #ffffff !important;
}

/* Campos de Busca Acessíveis */
body.dark-contrast .doc-search-input,
body.dark-contrast .search-input-premium,
body.dark-contrast .hero-search-bar {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.dark-contrast .doc-search-input:focus,
body.dark-contrast .search-input-premium:focus,
body.dark-contrast .hero-search-bar:focus-within {
    border-color: #ffff00 !important;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5) !important;
}

body.dark-contrast .doc-search-icon,
body.dark-contrast .search-icon-premium {
    color: #ffff00 !important;
}

/* Mapa da Rede de Proteção (Leaflet Sidebar e Popups) */
body.dark-contrast .map-sidebar {
    background: #000000 !important;
    border-left: 2px solid #ffffff !important;
}

body.dark-contrast .results-count {
    color: #ffff00 !important;
}

body.dark-contrast .popup-premium-header {
    background-color: #121212 !important;
    color: #ffff00 !important;
    border-bottom: 2px solid #ffff00 !important;
}

body.dark-contrast .popup-premium-body {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.dark-contrast .btn-maps-premium {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffff00 !important;
}

body.dark-contrast .btn-maps-premium:hover {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Input Placeholders */
body.dark-contrast input::placeholder {
    color: #bbbbbb !important;
}

/* Suporte de Font Sizing Dinâmico via CSS */
body {
    transition: font-size 0.2s ease !important;
}

/* ==========================================================================
   ESTILO DA TOPBAR SUPERIOR CUSTOMIZADA (MODELO GOVMT)
   ========================================================================== */
.topbar {
    background-color: #0047BB !important; /* Cor exata do azul institucional MT */
    padding: 8px 0 !important;
    font-family: var(--font-main);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.topbar-container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.topbar-logo {
    color: #ffffff !important;
    font-family: var(--font-main);
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    letter-spacing: -1px !important;
    text-transform: lowercase !important;
    line-height: 1 !important;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.topbar-logo:hover {
    opacity: 0.85;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-nav a {
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.topbar-nav a:hover {
    opacity: 1;
}

.topbar-sep {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.75rem;
    font-weight: 300;
    user-select: none;
    margin: 0 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.accessibility-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: none !important; /* Removemos a borda antiga */
    padding-right: 0 !important;
}

.accessibility-tools a {
    color: #ffffff !important;
    font-size: 0.85rem;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
}

.accessibility-tools a:hover {
    opacity: 1;
}

.accessibility-tools .tool-font {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-social a {
    color: #ffffff !important;
    font-size: 0.85rem !important;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.topbar-social a:hover {
    opacity: 1;
}

/* Botão ENTRAR Customizado */
.topbar-btn-login {
    background: #ffffff !important;
    color: #0047BB !important;
    border: 2px solid #ffffff !important;
    padding: 5px 16px !important;
    border-radius: 5px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    transition: all var(--transition-fast) !important;
    margin-left: 5px;
}

.topbar-btn-login:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Responsividade do Topbar */
@media (max-width: 992px) {
    .topbar {
        padding: 10px 0 !important;
    }
    
    .topbar-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .topbar-left {
        flex-direction: column;
        gap: 8px;
    }
    
    .topbar-right {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .topbar-sep {
        display: none !important; /* Esconde barras no mobile para quebrar linha bonito */
    }
}

/* ================================================================
   BOTÃO FLUTUANTE LIBRAS — visual personalizado
   ================================================================ */
.fab-libras {
    position: fixed !important;
    top: 150px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0047BB, #0066FF) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 71, 187, 0.5) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    z-index: 9000 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.fab-libras:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 20px rgba(0, 71, 187, 0.7) !important;
}

/* Botão nativo do VLibras — escondido para usarmos apenas o nosso customizado */
[vw-access-button], .vw-access-button, .access-button-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Oculta textos e banners nativos do VLibras que possam aparecer */
div[vw] .access-button-text,
div[vw] .vw-access-button-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Custom Language Selector Styles */
.custom-lang-selector {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}
.custom-lang-selector .lang-btn {
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
}
.custom-lang-selector .lang-btn:hover {
    background: #002244;
}
.custom-lang-selector .lang-dropdown {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 60px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, top 0.2s;
    z-index: 9999;
}
.custom-lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    top: 110%;
}
.custom-lang-selector .lang-dropdown li {
    padding: 8px 16px;
    color: #003366;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.custom-lang-selector .lang-dropdown li:hover {
    background: #f0f0f0;
}

/* Ocultar Barra do Google Translate */
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0px !important; }
.goog-tooltip { display: none !important; }
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }
.skiptranslate iframe { display: none !important; }

/* --- EFEITO ACOLHEDOR (LAÇOS NAS LATERAIS) --- */
.background-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999; /* Máxima visibilidade */
}

/* Laço Esquerdo (Lilás/Roxo) */
.background-ribbon::before {
    content: "";
    display: block;
    position: absolute;
    top: 20%;
    left: 0;
    width: 150px;
    height: 500px;
    background: linear-gradient(135deg, #A770EF, #60146f);
    border-radius: 0 250px 250px 0;
    opacity: 0.8;
    transform-origin: left center;
    animation: wave-ribbon-left 6s ease-in-out infinite alternate;
    box-shadow: 10px 0 30px rgba(96, 20, 111, 0.5);
}

/* Laço Direito (Ciano/Azul) */
.background-ribbon::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 10%;
    right: 0;
    width: 150px;
    height: 450px;
    background: linear-gradient(135deg, #60146f, #A770EF);
    border-radius: 250px 0 0 250px;
    opacity: 0.8;
    transform-origin: right center;
    animation: wave-ribbon-right 8s ease-in-out infinite alternate;
    box-shadow: -10px 0 30px rgba(96, 20, 111, 0.5);
}

@keyframes wave-ribbon-left {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(1.3); }
}

@keyframes wave-ribbon-right {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(1.3); }
}

/* Separador de Seções */
.section-separator {
    border: none;
    height: 4px;
    background: linear-gradient(90deg, #A770EF, #60146f, #A770EF);
    margin: 40px 0;
    width: 100%;
    border-radius: 2px;
}

/* --- ESTILOS DO NOVO REDESIGN --- */

.main-header-new {
    width: 100%;
    background-color: #fff;
    border-bottom: 4px solid var(--color-gov-green);
    position: relative;
}

.new-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.main-nav-new {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav-new .container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav-new ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.main-nav-new .nav-sep {
    color: #ccc;
    margin: 0 12px;
    font-size: 0.9rem;
    font-weight: 300;
}

.main-nav-new a {
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 0;
    position: relative;
    transition: color var(--transition-fast);
}

.main-nav-new a:hover, .main-nav-new a.active {
    color: #000;
}

.main-nav-new a.active::after, .main-nav-new a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #d1208a; /* Pink active line */
}

/* Novo Cabeçalho de Seções */
.new-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.new-section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.new-section-title .pipe {
    color: #333;
    font-weight: 400;
    margin-right: 5px;
}

.new-section-line {
    flex-grow: 1;
    height: 2px;
    background-color: #000;
    margin: 0 20px;
}

.new-section-btn {
    background-color: #d1208a;
    color: #fff;
    border: none;
    padding: 8px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.new-section-btn:hover {
    background-color: #b01974;
    color: #fff;
}

/* Variação para fundo escuro */
.theme-dark .new-section-title, .theme-dark .new-section-title .pipe { color: #fff; }
.theme-dark .new-section-line { background-color: #fff; }

/* Estrutura Base das Novas Seções */
.new-section {
    padding: 60px 0;
}
.new-section.bg-white { background-color: #ffffff; }
.new-section.bg-blue { background-color: #0b3c8f; color: #fff; } /* var(--color-gov-blue) aprox */
.new-section.bg-gray { background-color: #e5e5e5; }

.new-section-content {
    display: flex;
    gap: 40px;
    align-items: center;
}
.new-section-text { flex: 1.6; }
.new-section-image { flex: 1; display: flex; justify-content: center; }

.new-section-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #333;
}
.theme-dark .new-section-text p { color: #fff; }

/* Grid de botões de emergência novo formato (Mockup) */
.emergency-cards-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap; /* Forçar uma linha */
    background-color: #f2f2f2;
    padding: 10px;
    border-radius: 4px;
    margin-top: 20px;
    width: 100%;
}

.new-emergency-card {
    display: flex;
    flex: 1;
    min-width: 0; /* Permitir que encolham */
    background-color: #003a70; /* Azul escuro do mockup */
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.new-emergency-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.new-emergency-card .card-number {
    background-color: #fff;
    color: #003a70;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-emergency-card .card-text {
    color: #fff;
    font-size: 0.6rem;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.new-emergency-card .card-text strong {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

/* Responsividade Adicionada - Fix */
.responsive-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.material-card {
    width: 100%;
    max-width: 250px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    color: #000;
    text-align: center;
    flex: 1 1 250px;
}

.servico-card {
    width: 100%;
    max-width: 280px;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #fff;
    flex: 1 1 280px;
}

.institucional-card {
    width: 100%;
    max-width: 250px;
    height: 180px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    flex: 1 1 250px;
}

.institucional-card:hover {
    transform: scale(1.05);
}

.planos-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.planos-text {
    flex: 1 1 100%;
    max-width: 60%;
}

@media (max-width: 768px) {
    .planos-text {
        max-width: 100%;
    }
    .new-section-content {
        flex-direction: column;
        text-align: center;
    }
    .new-section-image img {
        max-width: 100% !important;
        margin-top: 20px;
    }
    .new-section-image iframe {
        max-width: 100% !important;
    }
    .carousel-nav-btn {
        display: none;
    }
}

/* --- Ajustes Globais de Responsividade (Mobile) --- */
@media (max-width: 992px) {
    /* Navegação Topo */
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
    }
    .nav-sep {
        display: none;
    }
    .main-nav ul li a {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer-inst-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-logo-social {
        align-items: center;
        flex-direction: column;
    }
    .footer-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .main-header {
        aspect-ratio: auto;
        min-height: 450px;
    }
    .hero-content {
        padding-top: 40px;
        align-items: center;
        text-align: center;
    }
    .hero-popular-tags {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-search-wrapper {
        width: 100%;
    }
    
    /* Emergency Cards (Botões Azuis) */
    .emergency-cards-wrapper {
        flex-wrap: wrap; /* Permite que os cartões quebrem linha */
        justify-content: center;
    }
    .new-emergency-card {
        min-width: 140px;
        flex: 1 1 45%; /* Cada cartão ocupa 45% (2 colunas) */
    }
}

@media (max-width: 480px) {
    /* Chat Window */
    .chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(100%);
    }
    .chat-window.active {
        transform: translateY(0);
    }
    #maximizeChat {
        display: none !important; /* Esconde no celular pois já é fullscreen */
    }
    
    .chat-messages {
        flex: 1; /* Ocupa o resto do espaço na tela inteira */
    }
}

/* --- PADRÃO PORTAL MT (NAVEGAÇÃO, TÍTULOS E FILTROS) --- */

/* Navegação Topo */
.mt-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: space-between;
}

.mt-nav-list li a {
    text-transform: uppercase;
    color: #1e5ba3; /* Azul do Portal MT */
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mt-nav-list li a:hover {
    color: #004ea8;
}

.mt-nav-list li a i {
    font-size: 0.7rem; /* Seta menorzinha para o dropdown */
}

/* Título de Seção (Ex: SERVIÇOS PÚBLICOS) */
.mt-section-header {
    text-align: center;
    margin: 40px 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mt-section-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.mt-section-icon {
    color: #004ea8; /* Azul escuro do ícone */
    font-size: 2.2rem;
}

.mt-section-divider {
    width: 1px;
    height: 45px;
    background-color: #bbb;
    margin: 0 15px;
}

.mt-section-title {
    font-size: 1.8rem;
    font-weight: 400;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mt-section-underline {
    width: 50px;
    height: 5px;
    background-color: #004ea8;
    margin-top: 10px;
    border-radius: 5px;
}

/* Botões de Filtro (Pílulas) */
.mt-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 40px 0;
    flex-wrap: wrap;
}

.mt-filter-btn {
    padding: 8px 20px;
    border-radius: 25px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #666;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
}

.mt-filter-btn:hover {
    border-color: #888;
    color: #333;
}

.mt-filter-btn.active {
    background-color: #004ea8;
    color: #fff;
    border-color: #004ea8;
    font-weight: 600;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    display: none !important;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-dropdown-content li {
    width: 100%;
}

.nav-dropdown-content li a {
    color: #333333 !important;
    padding: 12px 20px !important;
    text-decoration: none !important;
    display: block !important;
    width: 100%;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.nav-dropdown-content li a::after {
    display: none !important;
}

.nav-dropdown-content li a:hover {
    background-color: #f8fafc;
    color: var(--color-gov-blue) !important;
}

.nav-dropdown-content.show {
    display: block !important;
}
