/* global-styles.css */
/* Este arquivo contém estilos globais para componentes reutilizáveis como barra de acessibilidade,
   cabeçalho, rodapé, banner de cookies, botões de navegação, e padrões de formulário. */

/* Regra de foco genérica para compatibilidade com navegadores mais antigos */
*:focus {
    outline: 3px solid var(--cor-foco-acessibilidade, yellow); /* Fallback para amarelo */
    outline-offset: 2px;
}
.submenu {
  display: none;
}

.submenu.open {
  display: block;
}

.has-submenu > a::after {
  content: " ▾";
  float: right;
  font-size: 0.8rem;
}


/* Variáveis CSS para acessibilidade */
:root {
    --cor-foco-acessibilidade: yellow; /* Cor padrão do foco */
    --espacamento-linha: 1.5; /* Espaçamento de linha padrão */
    --espacamento-letra: 0em; /* Espaçamento de letra padrão */
}

/* Fontes */
.font-nunito { font-family: 'Nunito Sans', sans-serif; }
.font-inter { font-family: 'Inter', sans-serif; }

/* Cores Padrão do Site - Ajustadas para WCAG AAA (7:1 contraste) */
/* COLE ESTE BLOCO CORRIGIDO NO LUGAR DO ANTIGO */
body {
    background-color: #f9fafb;
    color: #1F2937;
    line-height: var(--espacamento-linha);
    letter-spacing: var(--espacamento-letra); 
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 96px; /* Altura corrigida: 36px (barra) + 60px (header) */
}
.bg-white { background-color: #ffffff; }
.bg-blue-50 { background-color: #eff6ff; } /* Similar ao Tailwind blue-50 */
.text-[#1A3E74] { color: #1A3E74; } /* Cor azul escuro da identidade - Contraste OK no fundo claro */
.hover\:text-[#1A3E74]:hover { color: #1A3E74; }
.bg-[#1A3E74], .bg-blue-900 { background-color: #1A3E74; }
.hover\:bg-blue-900:hover { background-color: #122A50; } /* Um tom de azul mais escuro para hover - Ajustado para AAA */
.border-gray-300 { border-color: #d1d5db; } /* Para linhas finas */

/* Cor dos botões flutuantes: BG-Blue-600 */
.bg-blue-600 { background-color: #2563eb; } /* Tailwind blue-600 */
.hover\:bg-blue-700:hover { background-color: #1d4ed8; } /* Tailwind blue-700 para hover */

#barraAcessibilidade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1A3E74;
    color: #fff;
    z-index: 100000;
    padding: 4px 20px; /* Padding vertical reduzido */
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: auto; /* Altura automática */
    height: 36px; /* Altura fixa para a barra */
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 8px;
}

#barraAcessibilidade button {
    padding: 4px 10px; /* Padding reduzido */
    height: 28px; /* Altura dos botões reduzida */
    /* O resto das propriedades do botão permanece igual */
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

#barraAcessibilidade button:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Fundo sutil ao passar o mouse */
    border-color: white; /* Borda mais visível ao passar o mouse */
}

/* Foco visível aprimorado para todos os elementos interativos */
#barraAcessibilidade button:focus-visible,
a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 3px solid var(--cor-foco-acessibilidade); /* Cor de destaque para acessibilidade, agora variável */
    outline-offset: 2px; /* Afasta o outline da borda */
}

#barraAcessibilidade button svg {
    width: 16px; /* Tamanho do ícone */
    height: 16px; /* Tamanho do ícone */
    stroke: currentColor; /* Usa a cor do texto do botão */
    stroke-width: 2.5; /* Espessura da linha do SVG */
}

/* Ajuste do cabeçalho principal */
header {
    position: fixed;
    top: 36px; /* Posição corrigida: logo abaixo da barra de acessibilidade */
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    height: 60px; /* Altura do header reduzida */
    box-sizing: border-box;
}

/* Ajuste dos botões de foco na barra de acessibilidade desktop */
#barraAcessibilidade .color-option {
    width: 32px; /* Ajustado para ser quadrado e ter uma altura similar aos outros botões */
    height: 32px; /* Ajustado para ser quadrado */
    border-radius: 5px; /* Formato quadrado */
    border: 2px solid rgba(255, 255, 255, 0.5); /* Borda clara e sutil */
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box; /* Inclui borda no tamanho */
}

#barraAcessibilidade .color-option.selected {
    border-color: var(--cor-foco-acessibilidade); /* Destaca a cor selecionada */
    transform: scale(1.1); /* Um pequeno efeito de escala */
}
#barraAcessibilidade .color-option:hover {
    transform: scale(1.1);
    border-color: white;
}

/* Modo de Alto Contraste */
.contraste-alto {
    background-color: #000 !important;
    color: #ffff00 !important;
    /* Inverter cores de links para melhor contraste */
    --tw-text-opacity: 1 !important;
    color: rgba(255, 255, 0, var(--tw-text-opacity)) !important; /* Amarelo para texto principal */
}
.contraste-alto a {
    color: #00ffff !important; /* Ciano para links em alto contraste */
}
.contraste-alto .bg-white,
.contraste-alto .bg-blue-50,
.contraste-alto .bg-gray-50,
.contraste-alto .response-area {
    background-color: #333 !important; /* Fundos de seções em cinza escuro */
    color: #ffff00 !important;
}
.contraste-alto .text-gray-700,
.contraste-alto .text-gray-800,
.contraste-alto .text-gray-600,
.contraste-alto .text-[#1A3E74],
.contraste-alto .news-card h3,
.contraste-alto .news-card p,
.contraste-alto .gemini-actions .action-btn {
    color: #ffff00 !important; /* Todo o texto em amarelo */
}
.contraste-alto .bg-blue-900,
.contraste-alto .bg-[#1A3E74] {
    background-color: #000 !important; /* Rodapé e botões principais em preto */
    color: #ffff00 !important;
}
.contraste-alto .hover\:bg-blue-900:hover,
.contraste-alto .ai-feature-button:hover {
    background-color: #111 !important; /* Hover em preto mais claro */
}
.contraste-alto .border-gray-300,
.contraste-alto .gemini-actions {
    border-color: #ffff00 !important; /* Bordas em amarelo */
}

/* Modo Escuro */
.dark-mode {
    background-color: #1a202c !important; /* Cor de fundo escura */
    color: #e2e8f0 !important; /* Cor de texto clara */
}
.dark-mode .bg-white,
.dark-mode .bg-blue-50,
.dark-mode .bg-gray-50,
.dark-mode .response-area {
    background-color: #2d3748 !important; /* Fundos de seções em cinza mais escuro */
    color: #e2e8f0 !important;
}
.dark-mode .text-gray-700,
.dark-mode .text-gray-800,
.dark-mode .text-gray-600,
.dark-mode .text-[#1A3E74],
.dark-mode .news-card h3,
.dark-mode .news-card p,
.dark-mode .gemini-actions .action-btn {
    color: #e2e8f0 !important; /* Todo o texto em cinza claro */
}
.dark-mode .bg-blue-900,
.dark-mode .bg-[#1A3E74] {
    background-color: #1a202c !important; /* Rodapé e botões principais em preto */
    color: #e2e8f0 !important;
}
.dark-mode .hover\:bg-blue-900:hover,
.dark-mode .ai-feature-button:hover {
    background-color: #4a5568 !important; /* Hover em cinza mais claro */
}
.dark-mode .border-gray-300,
.dark-mode .gemini-actions {
    border-color: #4a5568 !important; /* Bordas em cinza */
}

.fonte-dislexia {
    font-family: 'OpenDyslexic', Arial, sans-serif;
}

/* Custom Modal Styles */
#customModal {
    transition: opacity 0.3s ease-in-out;
}
/* Modal Overlay: Oculto por padrão, mas presente para leitores de tela */
#customModal.hidden {
    opacity: 0;
    pointer-events: none;
    /* Adicionado para acessibilidade: move para fora da tela quando oculto */
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
}
/* Modal Overlay: Visível */
#customModal:not(.hidden) {
    opacity: 1;
    /* Restaura a posição e tamanho quando visível */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}
.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 700px; /* Increased max-width for video */
    text-align: center;
    position: relative;
}
.modal-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1F2937;
}
.modal-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}
.modal-content button {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}
.modal-content button:hover {
    background-color: #1d4ed8;
}
.modal-close-btn {
    position: absolute;
    top: 1rem; /* Adjusted */
    right: 1rem; /* Adjusted */
    background: none;
    border: none;
    font-size: 2rem; /* Made larger */
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem; /* Added padding for easier click */
    border-radius: 50%; /* Rounded for better touch target */
    transition: background-color 0.2s ease;
}
.modal-close-btn:hover {
    background-color: #e5e7eb; /* Light background on hover */
}

/* --- Estilo para o botão "Voltar ao Topo" --- */
#backToTopBtn {
    position: fixed;
    bottom: 20px; /* Posicionado acima do rodapé */
    right: 20px;
    background-color: rgba(26, 62, 116, 0.8); /* Cor institucional com transparência */
    color: white;
    font-size: 0.875rem; /* Equivalente a text-sm */
    padding: 0.5rem 1rem; /* Equivalente a px-4 py-2 */
    border-radius: 9999px; /* Equivalente a rounded-full */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); /* Sombra */
    transition: background-color 0.2s ease; /* Transição */
    z-index: 99990; /* Acima do conteúdo normal, abaixo da barra de acessibilidade */
    display: none; /* Inicialmente oculto, será mostrado com JS */
    cursor: pointer; /* Indica que é clicável */
    font-family: 'Inter', sans-serif; /* Garante a fonte Inter */
}
#backToTopBtn:hover {
    background-color: rgba(18, 42, 80, 0.9); /* Tom mais escuro no hover com mais opacidade */
}

/* Classes para controle de visibilidade */
.desktop-only {
    display: none; /* Hidden by default, shown by JS/media query */
}

.pwa-only {
    display: none; /* Hidden by default, shown by JS/media query */
}

/* --- PWA/Mobile Specific Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    body {
        /* Adjust padding-top for new header and accessibility bar layout in PWA */
        padding-top: 90px; /* Example: Adjust based on new compact header height */
    }

    /* Header adjustments */
    header {
        top: 0; /* Header is now at the very top */
        height: auto; /* Allow height to adjust */
        padding-top: 10px; /* Add some padding */
        padding-bottom: 10px;
    }

    .desktop-only {
        display: none !important; /* Force hide desktop elements on small screens */
    }

    .pwa-only {
        display: block !important; /* Force show PWA elements on small screens */
    }

    header nav.desktop-nav {
        display: none; /* Hide original nav on small screens */
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .hamburger-button {
        display: block; /* Show hamburger button on small screens */
        background: none;
        border: none;
        font-size: 1.5rem; /* Reduced font size */
        color: #1A3E74;
        cursor: pointer;
        padding: 0.4rem; /* Adjusted padding to make it significantly smaller */
        margin-left: 1rem;
        order: -1; /* Place it before the logo */
    }

    /* *** CORREÇÃO APLICADA AQUI *** */
    .hamburger-button svg {
        display: block;
    }
    .hamburger-button .hidden {
        display: none;
    }


    .off-canvas-menu {
        position: fixed;
        top: 0; /* Start from the top of the viewport */
        left: -100%; /* Initially hidden */
        width: 65%; /* Ajustado para 65% da largura */
        height: 100vh; /* Full viewport height */
        background-color: #fff;
        transition: left 0.3s ease-in-out;
        z-index: 100000;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        padding-top: 20px;
    }

    .off-canvas-menu.is-open {
        left: 0;
    }

    .off-canvas-menu ul {
        flex-direction: column;
        padding: 20px 0; /* Ajustado padding vertical */
        gap: 5px; /* Reduzido o espaçamento entre os itens do menu principal */
    }

    .off-canvas-menu ul li a {
        display: block;
        padding: 12px 20px; /* Ajustado padding para maior área de toque */
        font-size: 1.15rem; /* Aumentado o tamanho da fonte */
        color: #1F2937;
        border-bottom: 1px solid #eee;
        transition: background-color 0.2s ease;
    }

    .off-canvas-menu ul li a:hover {
        background-color: #f0f0f0; /* Adicionado hover effect */
    }

    .off-canvas-menu ul li:last-child a {
        border-bottom: none;
    }

    .off-canvas-menu ul ul { /* Submenus */
        padding: 0; /* Resetar padding para submenus */
        margin-top: 0; /* Resetar margem superior para submenus */
    }

    .off-canvas-menu ul ul li a { /* Itens de submenu */
        padding: 10px 20px 10px 35px; /* Ajustado padding para indentação */
        font-size: 1rem; /* Tamanho de fonte ligeiramente menor para subitens */
        background-color: #f9f9f9; /* Fundo ligeiramente diferente para submenus */
        border-bottom: 1px solid #f0f0f0;
    }

    .off-canvas-menu ul ul li:last-child a {
        border-bottom: none;
    }


    #pwaAcessibilidadeBar {
        position: fixed;
        top: 0;
        left: -100%; /* Initially hidden off-screen */
        width: 85%; /* Ajustado para 85% da largura */
        height: 100vh;
        background-color: #1A3E74;
        color: #fff;
        z-index: 100000;
        padding: 20px;
        flex-direction: column; /* Stack buttons vertically */
        align-items: flex-start; /* Align buttons to the left */
        gap: 15px; /* More spacing for vertical stack */
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        justify-content: flex-start; /* Align content to the top */
        display: flex; /* Ensure it's a flex container */
    }

    #pwaAcessibilidadeBar.is-open {
        left: 0;
    }

    /* Individual Floating buttons for PWA */
    #accessibilityToggleButton,
    .vw-access-button, /* VLibras button */
    #backToTopBtn {
        position: fixed;
        left: auto; /* Ensure left is not set by default */
        transition: bottom 0.3s ease, background-color 0.2s ease, transform 0.2s ease, left 0.3s ease, top 0.3s ease; /* Add left and top to transition for smooth drag */
        z-index: 99990; /* Default z-index for floating buttons */
    }

    /* Specific positioning for each button */
    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        display: block; /* Always visible for PWA */
        width: auto;
        height: auto;
        padding: 0.5rem 1rem;
        border-radius: 9999px;
    }

    .vw-access-button { /* VLibras button */
        bottom: 80px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 12px !important;
        background-color: #1A3E74 !important;
        color: white !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 99992;
    }

    #accessibilityToggleButton {
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 99992 !important;
        background-color: #1A3E74 !important;
        color: white !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    }

    /* Newsletter form container adjustments for smaller screens */
    #newsletters-section {
        padding-left: 16px; /* Equivalente a px-4 */
        padding-right: 16px; /* Equivalente a px-4 */
    }

    /* Adjusted for new grid layout */
    .newsletter-form-container {
        display: grid;
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 1rem;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .newsletter-email-input {
        max-width: 100%; /* Remove max-width for fluid behavior */
        width: 100%; /* Take full width of parent */
    }

    .newsletter-consent-checkbox-group {
        width: 100%;
        justify-content: flex-start; /* Alinhado à esquerda */
    }

    .newsletter-subscribe-button {
        width: 100%; /* Take full width */
    }

    /* Styles for PWA Accessibility Bar Submenus */
    .pwa-submenu-header {
        width: 100%;
        background-color: #122A50; /* Slightly darker blue for submenu headers */
        color: white;
        padding: 10px 15px;
        border-radius: 8px;
        margin-bottom: 10px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: bold;
    }

    .pwa-submenu-content {
        width: 100%;
        display: none; /* Hidden by default */
        flex-direction: column;
        gap: 10px;
        padding: 10px 20px; /* Ajustado o padding horizontal para 20px */
        margin-bottom: 15px;
    }

    .pwa-submenu-content.is-open {
        display: flex; /* Show when open */
    }

    /* Ensure buttons inside submenus maintain their styles */
    #pwaAcessibilidadeBar .pwa-submenu-content button {
        width: 100%; /* Full width within submenu */
        padding: 10px 15px; /* Increased padding for better touch target and visual */
        background-color: rgba(255, 255, 255, 0.15); /* Slightly more opaque background */
        border: 1px solid rgba(255, 255, 255, 0.4); /* Slightly more visible border */
        border-radius: 5px;
        color: white;
        font-size: 1rem;
        justify-content: flex-start; /* Align text to start */
        transition: background-color 0.2s ease, border-color 0.2s ease; /* Smooth transition */
    }

    #pwaAcessibilidadeBar .pwa-submenu-content button:hover {
        background-color: rgba(255, 255, 255, 0.3); /* More pronounced hover effect */
        border-color: white;
    }

    /* Ajuste para o tamanho dos ícones SVG dentro dos botões do submenu PWA */
    #pwaAcessibilidadeBar .pwa-submenu-content button svg {
        width: 18px; /* Slightly larger icon */
        height: 18px; /* Slightly larger icon */
        stroke: currentColor;
        stroke-width: 2.5;
    }

    #pwaAcessibilidadeBar .pwa-submenu-content .color-option {
        width: 38px; /* Slightly larger color option */
        height: 38px; /* Slightly larger color option */
        border-radius: 5px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        box-sizing: border-box;
        flex-shrink: 0;
    }

    #pwaAcessibilidadeBar .pwa-submenu-content .color-option:hover {
        transform: scale(1.1);
        border-color: white;
    }

    /* Adjust the row for color options within the submenu */
    #pwaAcessibilidadeBar .pwa-submenu-content .flex.space-x-1 {
        width: 100%;
        justify-content: flex-start; /* Align color options to the start */
    }
}

/* NEW CSS FOR NEWSLETTER SECTION */
#newsletters-section {
    background-color: #fcfdff; /* blue-50 ajustado para AAA */
    padding: 2rem;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* shadow-lg */
    margin: 2rem auto; /* Center the section */
    text-align: left; /* Adjusted to left-align content */
}

.newsletter-heading {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #001f3f; /* text-[#1A3E74] ajustado para AAA */
    margin-bottom: 1rem;
    text-align: center; /* CENTRALIZED */
}

.newsletter-description {
    font-size: 1.125rem; /* text-lg */
    color: #2d3748; /* text-gray-700 ajustado para AAA */
    margin-bottom: 1.5rem;
    text-align: center; /* CENTRALIZED */
}

.newsletter-form-container {
    display: grid; /* Changed to grid */
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 1rem; /* space-y-4 */
    align-items: flex-start; /* Align items to the start (left) */
}

@media (min-width: 768px) { /* For desktop, two columns */
    .newsletter-form-container {
        grid-template-columns: auto 1fr; /* Label column, then input/button column */
        align-items: center; /* Vertically align items in the grid */
    }
    .newsletter-form-container label {
        grid-column: 1; /* Label always in the first column */
    }
    .newsletter-form-container .newsletter-email-input-wrapper {
        grid-column: 2; /* Input in the second column */
    }
    .newsletter-form-container .newsletter-consent-and-button-group {
        grid-column: 2; /* Consent and button group in the second column */
        justify-content: flex-end; /* Align to the right within the second column */
    }
}


.newsletter-email-input {
    width: 100%;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-md */
    font-size: 1rem; /* text-base */
    color: #1f2937; /* text-gray-900 */
    box-sizing: border-box; /* Include padding in width */
}

.newsletter-email-input:focus {
    outline: none;
    border-color: #2563eb; /* focus:border-blue-500 */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); /* focus:ring focus:ring-blue-200 */
}

.newsletter-consent-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space-x-2 */
    width: 100%; /* Take full width within its container */
    justify-content: flex-start; /* Ensure left alignment on smaller screens */
}

.newsletter-consent-checkbox {
    height: 1.25rem; /* h-5 */
    width: 1.25rem; /* w-5 */
    color: #2563eb; /* text-blue-600 */
    border-color: #d1d5db; /* border-gray-300 */
    border-radius: 0.25rem; /* rounded */
    cursor: pointer;
    flex-shrink: 0; /* Prevents checkbox from shrinking */
}

.newsletter-consent-label {
    font-size: 0.875rem; /* text-sm */
    color: #2d3748; /* text-gray-700 ajustado para AAA */
    cursor: pointer;
    text-align: left; /* Ensure label text is left-aligned */
    flex-grow: 1; /* Allow label to take available space */
}

.newsletter-subscribe-button {
    width: 100%; /* Default to full width for mobile */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    background-color: #1A3E74; /* bg-[#1A3E74] */
    color: white;
    font-weight: 600; /* font-semibold */
    border-radius: 0.5rem; /* rounded-md */
    transition: background-color 0.2s ease;
    cursor: pointer;
}

@media (min-width: 768px) {
    .newsletter-subscribe-button {
        width: auto; /* Auto width on desktop to fit content */
        min-width: 150px; /* Ensure a minimum width */
    }
}

.newsletter-subscribe-button:hover:not(:disabled) {
    background-color: #122A50; /* hover:bg-blue-900 */
}

.newsletter-subscribe-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-error-message {
    color: #8B0000; /* text-red-500 ajustado para AAA */
    font-size: 0.875rem; /* text-sm */
    margin-top: 0.5rem;
    display: none; /* Hidden by default */
    text-align: left; /* Ensure error message is left-aligned */
}

/* Breadcrumb Styles */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* text-gray-700 ajustado para AAA */
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    text-align: left; /* Ensure breadcrumb is left-aligned */
    width: 100%; /* Take full width to respect parent padding */
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li a {
    color: #2d3748; /* text-gray-800 ajustado para AAA */
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb li a:hover {
    color: #1A3E74; /* hover:text-[#1A3E74] */
    text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #4b5563; /* text-gray-700 ajustado para AAA */
}

.breadcrumb li:last-child {
    color: #1A3E74; /* text-[#1A3E74] */
    font-weight: 600; /* font-semibold */
}

/* Styling for scrollable submenus */
.scrollable-submenu {
    max-height: 300px; /* Adjust as needed */
    overflow-y: auto;
}

/* Estilos base para o corpo da página */
body {
    padding-top: 64px; /* Espaço para a topbar fixa */
    min-height: 100vh; /* Garante que o body ocupe no mínimo 100% da altura da viewport */
    display: flex;
    flex-direction: column; /* Organiza os filhos em coluna */
    background-color: #f9fafb; /* Cor de fundo principal mais clara */
    color: #1F2937; /* Cor de texto padrão */
    font-family: 'Inter', sans-serif; /* Fonte padrão do corpo */
    margin: 0;
}

/* Ajuste para o main para empurrar o rodapé para baixo */
main {
    flex-grow: 1; /* Permite que o conteúdo principal ocupe todo o espaço restante */
}

/* Oculta o botão de menu mobile para a sidebar, pois ela não existirá nesta página */
/* Mantido para compatibilidade com topbar111.js que pode ter essa referência */
#menuToggle {
    display: none !important;
}

/* --- Cookie Consent Banner Styles --- */
/* COLE ESTE BLOCO CORRIGIDO NO LUGAR DO ANTIGO */
#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1A3E74;
    color: #fff;
    padding: 1rem;
    z-index: 100001; /* <-- VALOR AUMENTADO PARA COLOCÁ-LO NA FRENTE */
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#cookieConsentBanner.show {
    display: flex; /* Mostra o banner */
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Slide up */
}

#cookieConsentBanner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

#cookieConsentBanner .cookie-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap; /* Permite quebrar em telas menores */
}

#cookieConsentBanner button {
    background-color: #2563eb; /* Tailwind blue-600 */
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap; /* Evita quebra de linha no texto do botão */
}

#cookieConsentBanner button.secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#cookieConsentBanner button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Responsive adjustments for cookie banner */
@media (min-width: 768px) {
    #cookieConsentBanner {
        flex-direction: row; /* Layout em linha para desktop */
        justify-content: space-between;
        padding: 1rem 2rem;
    }
    #cookieConsentBanner .cookie-buttons {
        justify-content: flex-end;
    }
}

/* Estilos de cores e textos globais */
.text-dark-blue { color: #1A3E74; } /* Azul Escuro */
.text-light-blue { color: #004d99; } /* Azul Claro ajustado para AAA */
.text-gray-custom { color: #2d3748; } /* Cinza ajustado para AAA */
.text-success-green { color: #006400; } /* Verde ajustado para AAA */
.text-black-custom { color: #1f2937; } /* Cor para textos padrão ajustado para AAA */
.text-red-600 { color: #8B0000; } /* Tailwind red-600 para mensagens de erro, ajustado para AAA */

/* Padrão de Botões (Componentes CSS para reuso) */
.btn-primary {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    background-color: #1A3E74; /* Cor primária azul escuro */
    color: #FFF;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary:hover { background-color: #122c54; } /* Tom mais escuro no hover */
.btn-secondary {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    background-color: #003366; /* Cor secundária azul claro, ajustado para AAA */
    color: #FFF;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-secondary:hover { background-color: #002244; } /* Tom mais escuro no hover */
.btn-success {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background-color: #006400; /* Verde, ajustado para AAA */
    color: #FFF;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-success:hover { background-color: #004d00; }

/* Estilos para a área de resultado da calculadora (Componente específico) */
.resultado {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e0f2fe; /* Tailwind blue-50 */
    border-radius: 0.5rem;
    font-weight: 600;
    color: #000080; /* text-dark-blue ajustado para AAA */
    text-align: left;
    white-space: pre-wrap; /* Mantém quebras de linha no texto */
    display: flex; /* Para alinhar ícone e texto */
    align-items: flex-start; /* Alinha o ícone no topo do texto */
    flex-direction: column; /* Coloca ícone e texto em colunas */
    gap: 0.5rem; /* Espaçamento entre ícone e texto */
}
.resultado.text-red-600 { /* Classe para mensagens de erro (fundo) */
    background-color: #fee2e2; /* Tailwind red-100 */
    color: #8B0000; /* Tailwind red-600 ajustado para AAA */
}
.resultado.text-success-green { /* Classe para mensagens de sucesso (fundo) */
    background-color: #d4edda; /* Light green */
    color: #006400; /* Dark green */
}
.resultado strong {
    display: block; /* Garante que o strong ocupe sua própria linha */
    margin-bottom: 0.5rem; /* Espaçamento abaixo do strong */
}

/* Cores de resultado ajustadas para APGAR */
.resultado.bg-apgar-normal { background-color: #D4EDDA; color: #006400; } /* Verde para Normal (ajustado AAA) */
.resultado.bg-apgar-moderate { background-color: #FFF3CD; color: #856404; } /* Amarelo para Moderado (ajustado AAA) */
.resultado.bg-apgar-severe { background-color: #F8D7DA; color: #8B0000; } /* Vermelho para Grave (ajustado AAA) */

/* Cores de resultado ajustadas para APACHE II */
.resultado.bg-apache-low { background-color: #D4EDDA; color: #006400; } /* Verde para Baixo Risco (ajustado AAA) */
.resultado.bg-apache-medium { background-color: #FFF3CD; color: #856404; } /* Amarelo para Médio Risco (ajustado AAA) */
.resultado.bg-apache-high { background-color: #F8D7DA; color: #8B0000; } /* Vermelho para Alto Risco (ajustado AAA) */
.resultado.bg-info-orange-light { background-color: #ffeeba; border-color: #ffb366; color: #856404; } /* Para alertas (ajustado AAA) */


/* Estilos para a referência/bibliografia (Componente específico) */
.ref {
    margin-top: 2rem;
    font-size: 14px;
    color: #2d3748; /* text-gray-custom ajustado para AAA */
    text-align: left;
}

/* Espaçamento para o conteúdo abaixo da topbar fixa */
.main-content-wrapper {  
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 64px; /* Garante que o conteúdo comece abaixo da topbar fixa (64px de altura) */
    width: 100%;
    max-width: 1280px; /* max-w-screen-xl (Tailwind 7xl) */
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem; /* p-8 px-4 */
}

/* Estilos para o banner de segurança/metas */
.meta-seguranca {
    font-size: 0.875rem; /* text-sm */
    color: #1f2937; /* text-black-custom ajustado para AAA */
    margin-top: 1.5rem; /* mt-6 */
    margin-bottom: 1.5rem; /* Added for spacing */
    font-style: italic;
    border-top: 1px solid #e5e7eb; /* border-gray-200 */
    padding-top: 1rem; /* pt-4 */
    text-align: left; /* Alinhar à esquerda */
}

/* Otimização de Elementos Interativos (Touch Targets) para labels */
label {
    padding-top: 0.5rem; /* Ajuste para dar mais espaço acima da label */
    padding-bottom: 0.5rem; /* Ajuste para dar mais espaço abaixo da label */
    display: block; /* Garante que o padding funcione como bloco */
    cursor: pointer; /* Indica que a label pode ser clicada */
    text-align: left; /* Ensure labels are left-aligned */
}

/* Estilo para o modal de mensagem */
.message-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease-in-out; /* Added transition */
    opacity: 0; /* Start hidden for fade-in */
}
.message-modal-overlay.show {
    opacity: 1; /* Show for fade-in */
}
.message-modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
}
.message-modal-close {
    color: #aaa;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}
.message-modal-close:hover {
    color: #1F2937;
}

/* Estilos específicos para o novo quadrado de insulina */
.insulina-info {
    font-size: 0.75rem; /* text-xs */
    line-height: 1.2; /* Espaçamento entre linhas reduzido */
    margin-bottom: 0.5rem; /* Margem inferior para espaçamento curto */
    text-align: left; /* Ensure text is left-aligned */
    color: #1f2937; /* text-black-custom ajustado para AAA */
    background-color: #f3f4f6; /* bg-gray-100 ajustado para AAA */
    margin-bottom: 1.5rem; /* Added for spacing */
}
.insulina-info p {
    margin-bottom: 0.25rem; /* Reduzir ainda mais o espaçamento entre parágrafos */
}
.insulina-info strong {
    font-size: 0.875rem; /* text-sm */
}

/* Esconder setas (spinners) em inputs tipo number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Estilo para a "tabela separada" dos inputs */
.input-box-wrapper {
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-md */
    padding: 1rem; /* p-4 */
    margin-bottom: 1rem; /* mb-4 */
    background-color: #fff; /* bg-white */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

/* Style for the bar below the title */
.title-bar {
    width: 100%; /* Will be set by JS */
    height: 3px;
    background-color: #1A3E74; /* Dark blue color */
    margin: 0.5rem auto 1.5rem auto; /* Top margin, auto horizontal, bottom margin */
    border-radius: 1.5px; /* Slightly rounded corners */
}

/* SR-Only adjustments for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.focus-within\:not-sr-only:focus-within {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
}

/* Tooltip style */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.tooltip-icon-button { /* Changed from .tooltip-icon to .tooltip-icon-button */
    background: none;
    border: none;
    color: #1A3E74; /* Dark blue for the info icon */
    cursor: help;
    font-size: 0.9rem;
    padding: 0; /* Remove default button padding */
    display: inline-flex; /* Align icon and ensure it's a small target */
    align-items: center;
    justify-content: center;
    width: 24px; /* Make it a decent touch target */
    height: 24px; /* Make it a decent touch target */
    border-radius: 50%; /* Make it round */
    vertical-align: middle; /* Align with text */
}

.tooltip-icon-button:hover,
.tooltip-icon-button:focus {
    background-color: rgba(0, 0, 0, 0.05); /* Light hover/focus background */
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #ffffff; /* Changed to white */
    color: #1F2937; /* Dark text for contrast on white */
    text-align: center;
    border-radius: 6px;
    padding: 10px; /* Increased padding */
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the icon */
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 0.75rem;
    line-height: 1.2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Added shadow */
    border: 1px solid #e0e0e0; /* Subtle border */
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent; /* Changed to white */
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:focus-within .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styles for granular cookie modal */
#granularCookieModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100002; /* Higher than customModal */
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease-in-out; /* Added transition */
    opacity: 0; /* Start hidden for fade-in */
}
#granularCookieModal.show {
    display: flex;
    opacity: 1; /* Show for fade-in */
}
.granular-modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: left;
}
.granular-modal-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1F2937;
}
.granular-modal-content p {
    margin-bottom: 1rem;
    color: #4b5563;
}
.granular-modal-content .checkbox-group {
    margin-bottom: 1rem;
}
.granular-modal-content .checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: #1F2937;
}
.granular-modal-content .checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    height: 1.25rem;
    width: 1.25rem;
    flex-shrink: 0;
    accent-color: #1A3E74; /* Custom color for checkbox */
}
.granular-modal-content .checkbox-group .description {
    font-size: 0.875rem;
    color: #4b5563;
    margin-left: 1.75rem; /* Align with checkbox text */
    margin-top: -0.25rem; /* Adjust spacing */
    display: block;
}
.granular-modal-content .modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.granular-modal-content .modal-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}
.granular-modal-content .modal-buttons .btn-save {
    background-color: #1A3E74;
    color: white;
}
.granular-modal-content .modal-buttons .btn-save:hover {
    background-color: #122A50;
}
.granular-modal-content .modal-buttons .btn-cancel {
    background-color: #e5e7eb;
    color: #4b5563;
}
.granular-modal-content .modal-buttons .btn-cancel:hover {
    background-color: #d1d5db;
}

/* Styles for Keyboard Shortcuts Modal */
#keyboardShortcutsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100003; /* Higher than granularCookieModal */
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}
#keyboardShortcutsModal.show {
    opacity: 1;
}
.keyboard-modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    position: relative;
    text-align: left;
}
.keyboard-modal-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1F2937;
}
.keyboard-modal-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.keyboard-modal-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}
.keyboard-modal-content strong {
    color: #1F2937;
}

/* Estilos para o menu de navegação principal (desktop) */
.desktop-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem; /* space-x-6 */
}

.desktop-nav li {
    position: relative;
}

.desktop-nav li a,
.desktop-nav li button {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    text-decoration: none;
    font-weight: 500; /* font-medium */
    color: #4B5563; /* text-gray-700 */
    transition: color 0.2s ease;
    background: none; /* Remove fundo padrão de botão */
    border: none; /* Remove borda padrão de botão */
}

.desktop-nav li a:hover,
.desktop-nav li button:hover {
    color: #1A3E74; /* hover:text-[#1A3E74] */
}

/* Estilos para dropdowns (submenus) no desktop */
.desktop-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); /* shadow-lg */
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.5rem 0; /* py-2 */
    width: 14rem; /* w-56 */
    z-index: 30; /* z-30 */
    display: none; /* hidden */
    flex-direction: column;
    min-width: max-content; /* Garante que o dropdown se ajuste ao conteúdo mais longo */
}

.desktop-nav li.group:hover > ul {
    display: flex; /* group-hover:block, mas usando flex para manter a coluna */
}

.desktop-nav ul ul li a,
.desktop-nav ul ul li button {
    padding: 0.5rem 1rem; /* px-4 py-2 */
    color: #4B5563; /* text-gray-700 */
    white-space: nowrap; /* Evita quebra de linha */
    transition: background-color 0.2s ease;
    background: none;
    border: none;
    text-align: left; /* Garante alinhamento à esquerda para itens de menu */
}

.desktop-nav ul ul li a:hover,
.desktop-nav ul ul li button:hover {
    background-color: #F3F4F6; /* hover:bg-gray-100 */
}

/* Estilos para sub-submenus (dropdowns aninhados) no desktop */
.desktop-nav ul ul ul {
    left: 100%; /* Posiciona o sub-submenu à direita do pai */
    top: 0;
    width: 16rem; /* w-64 */
    z-index: 40; /* z-40 */
}

.desktop-nav li.group/sub:hover > ul {
    display: flex; /* group-hover/sub:block */
}

/* Estilos para o menu off-canvas (mobile) */
.off-canvas-menu {
    position: fixed;
    top: 0;
    left: -100%; /* Inicialmente oculto */
    width: 65%; /* Ajustado para 65% da largura */
    height: 100vh;
    background-color: #fff;
    transition: left 0.3s ease-in-out;
    z-index: 100000;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    padding-top: 20px;
}

.off-canvas-menu.is-open {
    left: 0;
}

.off-canvas-menu ul {
    list-style: none;
    flex-direction: column;
    padding: 20px 0;
    gap: 5px;
}

.off-canvas-menu ul li button,
.off-canvas-menu ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 1.15rem;
    color: #1F2937;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    width: 100%; /* Garante que o botão/link ocupe a largura total */
    text-align: left; /* Alinha o texto à esquerda */
    background: none; /* Remove fundo padrão de botão */
    border: none; /* Remove borda padrão de botão */
}

.off-canvas-menu ul li button:hover,
.off-canvas-menu ul li a:hover {
    background-color: #f0f0f0;
}

.off-canvas-menu ul li:last-child button,
.off-canvas-menu ul li:last-child a {
    border-bottom: none;
}

.off-canvas-menu ul ul { /* Submenus no mobile */
    padding: 0;
    margin-top: 0;
}

.off-canvas-menu ul ul li a { /* Itens de submenu no mobile */
    padding: 10px 20px 10px 35px; /* Indentação */
    font-size: 1rem;
    background-color: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
}

.off-canvas-menu ul ul li:last-child a {
    border-bottom: none;
}

/* Overlay para o menu off-canvas (mobile) */
.menu-overlay {
    display: none; /* Oculto por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 99998; /* Abaixo do menu, acima do conteúdo */
}

.menu-overlay.is-open {
    display: block;
}

/* ==========================================================================
   Rodapé
   ========================================================================== */

footer {
    background-color: #1A3E74; /* bg-[#1A3E74] */
    color: white;
    padding: 1rem 0; /* CORREÇÃO: Reduzido ainda mais para um rodapé mais compacto */
    font-family: 'Inter', sans-serif;
}

footer .max-w-7xl {
    max-width: 1280px; /* max-w-7xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem; /* px-4 */
    padding-right: 1rem; /* px-4 */
}

footer .border-b {
    border-bottom: 1px solid;
    border-color: white;
    padding-bottom: 0.75rem; /* CORREÇÃO: Reduzido para diminuir o espaço */
    margin-bottom: 0.75rem; /* CORREÇÃO: Reduzido para diminuir o espaço */
}

footer img {
    height: auto;
    width: auto;
    max-width: 80px; /* max-w-[80px] */
    max-height: 80px; /* max-h-[80px] */
}

footer h5 {
    font-weight: 700; /* font-bold */
    margin-bottom: 0.5rem; /* mb-2 */
    font-size: 1rem; /* Tamanho da fonte mantido para hierarquia */
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.5; /* space-y-1 */
}

/* CORREÇÃO: Diminui o tamanho da fonte dos links do rodapé */
footer ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.875rem; /* Equivalente a text-sm do Tailwind */
}

/* CORREÇÃO: Diminui o tamanho da fonte do parágrafo "Nosso Compromisso" */
footer p {
    font-size: 0.875rem;
}

footer ul li a:hover {
    text-decoration: underline;
}

footer .flex.space-x-4 {
    gap: 1rem; /* space-x-4 */
}

footer .footer-social-icon {
    color: white;
    font-size: 1.25rem; /* text-xl - Tamanho dos ícones mantido */
    transition: color 0.2s ease;
}

footer .footer-social-icon:hover {
    color: #E5E7EB; /* Lighter white on hover */
}

footer .vertical-divider-footer-stretched {
    width: 1px;
    background-color: white;
    margin: 0 2rem; /* mx-8 */
    align-self: stretch; /* Make it stretch vertically */
}

/* Ajustes para o layout do rodapé em telas maiores (desktop) */
@media (min-width: 768px) { /* md breakpoint em Tailwind é 768px */
    footer .md\:flex {
        display: flex;
        justify-content: space-between;
        align-items: flex-start; /* Garante que todas as colunas alinhem no topo */
        gap: 2rem; /* space-x-8 no Tailwind é 2rem */
    }

    footer .flex-1.flex-col.md\:flex-row {
        flex-direction: row;
        justify-content: flex-end;
        align-items: flex-start;
        gap: 1rem;
    }

    footer .mb-6 {
        margin-bottom: 0 !important;
    }

    footer .vertical-divider-footer-stretched {
        display: block;
    }
}

/* Mobile adjustments for footer (max-width: 767px) */
@media (max-width: 768px) {
    footer .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }

    footer .footer-socials {
        justify-content: center;
    }

    footer .flex-1.flex-col.md\:flex-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    footer .mb-6 {
        margin-bottom: 1.5rem;
    }
}

/* Estilo para o menuOverlay no celular */
#menuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7); /* fundo escuro transparente */
  z-index: 50; /* deve ser MENOR do que o menu lateral (offCanvas) */
  display: none; /* começa invisível */
}
/* --- ESTILOS PARA ACESSIBILIDADE (MOBILE) --- */
#accessibilityToggleButton {
    display: none; /* Escondido por padrão, mostrado por media query */
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: #1A3E74; /* Fundo azul escuro */
    color: white; /* Ícone branco */
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 99990;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem; /* Tamanho do ícone */
}

#pwaAcessibilidadeBar {
    position: fixed;
    top: 0;
    left: -100%; /* Começa fora da tela */
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background-color: #1A3E74;
    color: #fff;
    z-index: 100001;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto;
}

#pwaAcessibilidadeBar.is-open {
    left: 0;
}

#pwaAcessibilidadeBar .pwa-acessibilidade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

#pwaAcessibilidadeBar .pwa-acessibilidade-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

#pwaAcessibilidadeBar .pwa-acessibilidade-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

#pwaAcessibilidadeBar button {
    width: 100%;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    text-align: left;
}
#pwaAcessibilidadeBar button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
#pwaAcessibilidadeBar .color-options-pwa {
    display: flex;
    gap: 10px;
    justify-content: space-around;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}
#pwaAcessibilidadeBar .color-options-pwa .color-option {
    width: 38px;
    height: 38px;
    padding: 0;
}

/* Media Query para ativar a visualização móvel */
@media (max-width: 768px) {
    #barraAcessibilidade {
        display: none; /* Esconde a barra de desktop */
    }
    #accessibilityToggleButton {
        display: flex; /* Mostra o botão flutuante */
    }
    body {
        padding-top: 90; /* Remove o espaçamento do topo no mobile */
    }
}
#offCanvasMenu.is-open {
  transform: translateX(0);
}

.submenu {
  display: none;
}

.submenu.open {
  display: block !important;
}
/* ==========================================================================
   Anulação de Estilos Específica para a Página de Vacinas
   ========================================================================== */
/* Esta regra anula o estilo global da classe .resultado APENAS na página 
  de vacinas (que tem a classe .pagina-vacinas no body). 
  Isto garante que o resultado gerado pelo JavaScript mantenha a sua 
  formatação original sem ser afetado pelo estilo padrão do site.
*/
.pagina-vacinas .resultado {
    padding: 0;
    border: none;
    background: none;
    margin-top: 1.5rem; /* Restaura o espaçamento vertical */
    display: block; /* Garante que não seja um container flex */
    font-weight: normal; /* Restaura o peso da fonte padrão */
    color: inherit; /* Herda a cor do texto do elemento pai */
    white-space: normal; /* Restaura o comportamento padrão de quebra de linha */
}

/* --- Ajustes de tamanho e fonte para o conteúdo do resultado na página de vacinas --- */
/* Reduz o tamanho da fonte e o espaçamento para um visual mais compacto. */

.pagina-vacinas .resultado .bg-blue-50 {
    padding: 1rem; /* Reduz o preenchimento geral do container de resultados */
}

.pagina-vacinas .resultado h3 {
    font-size: 1.125rem; /* Reduz o título principal (era text-xl) */
    margin-bottom: 0.75rem;
}

.pagina-vacinas .resultado .mb-4.p-4 {
    padding: 0.75rem; /* Reduz o preenchimento dos quadros individuais */
    margin-bottom: 0.75rem; /* Reduz o espaçamento entre os quadros */
}

.pagina-vacinas .resultado h4 {
    font-size: 1rem; /* Reduz o nome da vacina (era font-bold) */
    margin-bottom: 0.25rem;
}

.pagina-vacinas .resultado p {
    font-size: 0.875rem; /* Reduz o texto dos detalhes da vacina */
    line-height: 1.4; /* Melhora a legibilidade */
}
.goog-te-banner-frame.skiptranslate { display: none !important; } 
body { top: 0 !important; }
#google_translate_element .goog-te-gadget-simple { border: none; background-color: transparent; }

/* --- Ajustes para o Menu Global (Desktop) --- */
/* 1. Alinha o logo à esquerda e o menu à direita */
header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

header .header-content > div:first-child {
    flex-grow: 0;
    flex-shrink: 0;
}

header .header-content > nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

/* 2. Garante o tamanho da fonte para todos os itens do menu */
.desktop-nav > ul > li > a,
.desktop-nav > ul > li > button {
    font-size: 12px !important;
    text-align: right !important; /* Força o alinhamento à direita */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Alinha o conteúdo à direita */
    gap: 5px;
}

/* 2 e 5. Alinhamento dos nomes e ícones */
.desktop-nav > ul > li > button > svg,
.desktop-nav > ul > li > a > svg {
    order: -1; /* Move o ícone para a esquerda do texto */
    margin-left: 0 !important;
    margin-right: 5px;
}

/* 3 e 4. Corrige a abertura lateral dos submenus e o alinhamento dos subitens */
.desktop-nav ul ul {
    position: absolute;
    top: 100% !important; /* Força o submenu a abrir para baixo */
    left: 0 !important; /* Alinha o submenu à esquerda do item pai */
    right: auto !important; /* Desabilita o alinhamento à direita que causa o erro */
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    padding: 5px 0;
}

/* Corrige o alinhamento dos sub-submenus (para o caso de "Acessibilidade Digital", "Sustentabilidade Digital", etc) */
.desktop-nav ul ul ul {
    position: absolute;
    top: 0 !important; /* Alinha o submenu no topo do item pai */
    left: 100% !important; /* Abre o submenu à direita */
    right: auto !important;
    z-index: 1001;
}

.desktop-nav ul li:hover > ul,
.desktop-nav ul ul.open {
    display: flex;
}

/* 3. Garante que os nomes dos subitens quebrem a linha para caber na caixa */
.desktop-nav ul ul li a {
    font-size: 12px !important;
    padding: 8px 15px;
    text-align: left !important;
    border-bottom: 1px solid #eee;
    white-space: normal;
    word-wrap: break-word;
}

.desktop-nav ul ul li:last-child a {
    border-bottom: none;
}
/* --- Ajustes para o botão Gerenciar preferências de cookies no rodapé --- */
.cookies-footer .btn-manage-cookies {
    /* Diminui o padding para reduzir o tamanho do botão */
    padding: 0.25rem 0.75rem; 
    /* Reduz o tamanho da fonte para que o texto caiba em uma linha */
    font-size: 0.75rem; 
    /* Garante que o texto não quebre para uma nova linha */
    white-space: nowrap; 
    /* Outros ajustes de estilo se necessário */
    min-width: unset;
    height: auto;
    line-height: normal;
}
