/* Cores base para o tema (preto, branco, verde) */
:root {
    --ap-dark-bg: #1a1a1a; /* Cinza escuro para fundos (topo, rodapé) */
    --ap-light-bg: #f5f5f5; /* Cinza muito claro para fundos (meio) */
    --ap-text-dark: #333333; /* Texto escuro */
    --ap-text-light: #ffffff; /* Texto claro */
    --ap-primary-green: #388E3C; /* Verde principal para links/destaques */
    --ap-hover-green: #4CAF50; /* Verde mais escuro para hover */
    --ap-border-color: #cccccc; /* Borda padrão */
}

/* Estilos para a barra de acessibilidade em si */
#ap-acessibilidade-bar {
    background-color: var(--ap-dark-bg); /* Fundo da barra */
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #999999; /* Borda da barra */
    position: relative;
    z-index: 99999; /* Garante que a barra fique no topo, acima de tudo */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* Sombra mais escura */
    display: flex; /* Para alinhar os botões */
    justify-content: center; /* Centraliza os botões */
    align-items: center;
    flex-wrap: wrap; /* Quebra linha se a tela for pequena */
}

#ap-acessibilidade-bar button {
    background-color: #333333; /* Cor dos botões */
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px; /* Espaçamento entre botões */
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px; /* Reduzido em 2px */
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: flex; /* Para alinhar ícone e texto */
    align-items: center;
    gap: 5px; /* Espaço entre ícone e texto */
    white-space: nowrap; /* Evita que o texto quebre em várias linhas */
}

#ap-acessibilidade-bar button:hover {
    background-color: #444444; /* Cor dos botões no hover */
    transform: translateY(-1px); /* Pequeno efeito ao passar o mouse */
}

#ap-acessibilidade-bar button:active {
    background-color: #555555; /* Cor dos botões ao clicar */
    transform: translateY(0);
}

/* --- Ajuste para Mobile: Oculta botões e mantém texto em A+/A- --- */
@media (max-width: 768px) { /* Defina o breakpoint que melhor se adapta ao seu tema */
    #ap-acessibilidade-bar button {
        padding: 8px 12px; /* Ajusta o padding para um botão menor */
        gap: 0; /* Remove o espaçamento entre ícone e texto */
        min-width: 44px; /* Garante um tamanho mínimo para toque acessível (WCAG) */
        justify-content: center; /* Centraliza o ícone no botão */
		margin:5px;
    }

    #ap-acessibilidade-bar button i {
        margin-right: 0 !important; /* Garante que não haja margem à direita do ícone */
    }

    /* Oculta o texto para todos os botões, exceto A+ e A- */
    #ap-acessibilidade-bar button:not(#ap-increase-font):not(#ap-decrease-font) {
        font-size: 0; /* Esconde o texto sem remover o elemento */
        width: 0; /* Ajuda a colapsar o espaço */
        overflow: hidden; /* Garante que o texto não "vaze" */
        padding: 8px 12px !important;
        margin: 0;
        line-height: 0;
		margin:5px;
    }

    /* Garante que o ícone para esses botões tenha um bom tamanho */
    #ap-acessibilidade-bar button:not(#ap-increase-font):not(#ap-decrease-font) .fas {
        font-size: 1.2em;
        margin: 0; /* Garante que não haja margem extra */
    }

    /* Faz o botão de reset ficar invisível em mobile 
    #ap-acessibilidade-bar #ap-reset-acessibilidade {
        display: none; /* Oculta completamente o botão 
    }*/

    /* Garante que o texto A+ e A- fiquem visíveis e bem formatados */
    #ap-acessibilidade-bar #ap-increase-font,
    #ap-acessibilidade-bar #ap-decrease-font {
        font-size: 12px; /* Mantém o tamanho da fonte para o texto A+ e A- */
        width: auto; /* Permite que o botão se ajuste ao conteúdo */
        padding: 8px 12px; /* Restaura o padding para estes botões */
        gap: 5px; /* Restaura o gap entre o ícone e o texto */
    }
}


/* Estilos de base para os modos de acessibilidade */

/* --- MODO CLARO --- */
body.ap-light-mode {
    background-color: var(--ap-light-bg) !important; /* Fundo muito claro para o body */
    color: var(--ap-text-dark) !important; /* Texto mais escuro para contraste */
    min-height: 100vh;
    width: 100%;
}

/* Seletores abrangentes para texto e links em MODO CLARO */
body.ap-light-mode p,
body.ap-light-mode h1, body.ap-light-mode h2, body.ap-light-mode h3,
body.ap-light-mode h4, body.ap-light-mode h5, body.ap-light-mode h6,
body.ap-light-mode li, body.ap-light-mode span,
body.ap-light-mode small, body.ap-light-mode b, body.ap-light-mode i,
body.ap-light-mode strong, body.ap-light-mode em,
body.ap-light-mode label, body.ap-light-mode th, body.ap-light-mode td,
body.ap-light-mode blockquote, body.ap-light-mode pre,
body.ap-light-mode .entry-content,
body.ap-light-mode .widget-title,
body.ap-light-mode .widget,
body.ap-light-mode .comment-body,
body.ap-light-mode .site-title,
body.ap-light-mode .site-description,
body.ap-light-mode .entry-meta,
body.ap-light-mode .post-info,
body.ap-light-mode .news-description,
body.ap-light-mode .read-more,
body.ap-light-mode .wp-block-heading,
body.ap-light-mode .wp-block-paragraph,
body.ap-light-mode .wp-block-list,
body.ap-light-mode .wp-block-quote,
body.ap-light-mode .wp-block-code,
body.ap-light-mode .wp-block-preformatted,
body.ap-light-mode .wp-block-pullquote,
body.ap-light-mode .wp-block-table,
body.ap-light-mode .wp-block-latest-posts__post-title,
body.ap-light-mode .wp-block-categories__list,
body.ap-light-mode .elementor-heading-title,
body.ap-light-mode .elementor-widget-text-editor,
body.ap-light-mode .bricks-heading,
body.ap-light-mode .bricks-text,
body.ap-light-mode .oxygen-headline,
body.ap-light-mode .oxygen-text-block,
body.ap-light-mode .ast-heading,
body.ap-light-mode .ast-single-post-content p,
body.ap-light-mode .site-content p,
body.ap-light-mode .entry-title,
body.ap-light-mode .post-title,
body.ap-light-mode .news-title,
body.ap-light-mode .post-content,
body.ap-light-mode .archive-title,
body.ap-light-mode .page-title {
    color: var(--ap-text-dark) !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Links em MODO CLARO */
body.ap-light-mode a:not([class*="button"]):not(.wp-block-button__link),
body.ap-light-mode .menu-item a,
body.ap-light-mode .nav-link {
    color: var(--ap-primary-green) !important; /* Verde principal para links */
}
body.ap-light-mode a:hover:not([class*="button"]):not(.wp-block-button__link),
body.ap-light-mode .menu-item a:hover,
body.ap-light-mode .nav-link:hover {
    color: var(--ap-hover-green) !important; /* Verde mais escuro no hover */
}

/* Fundo de elementos específicos em MODO CLARO */
body.ap-light-mode .site-header,
body.ap-light-mode .site-footer,
body.ap-light-mode .main-navigation,
body.ap-light-mode .widget-area,
body.ap-light-mode .article-card,
body.ap-light-mode .news-block,
body.ap-light-mode .single-post-container,
body.ap-light-mode .search-form,
body.ap-light-mode .wp-block-group,
body.ap-light-mode .wp-block-cover,
body.ap-light-mode .wp-block-latest-posts,
body.ap-light-mode .wp-block-categories,
body.ap-light-mode .wp-block-column,
body.ap-light-mode .wp-block-media-text,
body.ap-light-mode .gb-container,
body.ap-light-mode .elementor-section,
body.ap-light-mode .elementor-column,
body.ap-light-mode .bricks-section,
body.ap-light-mode .oxygen-section,
body.ap-light-mode .ast-container,
body.ap-light-mode .site-content,
body.ap-light-mode .content-area,
body.ap-light-mode .primary,
body.ap-light-mode .secondary,
body.ap-light-mode .widget,
body.ap-light-mode .menu,
body.ap-light-mode .sub-menu,
body.ap-light-mode .comment-respond,
body.ap-light-mode .form-allowed-tags,
body.ap-light-mode .comment-form input[type="text"],
body.ap-light-mode .comment-form input[type="email"],
body.ap-light-mode .comment-form input[type="url"],
body.ap-light-mode .comment-form textarea {
    background-color: #ffffff !important; /* Fundo branco para seções internas */
    border-color: var(--ap-border-color) !important;
}

body.ap-light-mode button,
body.ap-light-mode input[type="submit"],
body.ap-light-mode input[type="button"],
body.ap-light-mode .wp-block-button__link,
body.ap-light-mode .button,
body.ap-light-mode .elementor-button,
body.ap-light-mode .bricks-button,
body.ap-light-mode .oxygen-button {
    background-color: var(--ap-primary-green) !important;
    color: var(--ap-text-light) !important;
    border-color: var(--ap-primary-green) !important;
}
body.ap-light-mode button:hover,
body.ap-light-mode input[type="submit"]:hover,
body.ap-light-mode input[type="button"]:hover,
body.ap-light-mode .wp-block-button__link:hover,
body.ap-light-mode .button:hover,
body.ap-light-mode .elementor-button:hover,
body.ap-light-mode .bricks-button:hover,
body.ap-light-mode .oxygen-button:hover {
    background-color: var(--ap-hover-green) !important;
    border-color: var(--ap-hover-green) !important;
}
/* FIM MODO CLARO */


/* --- MODO ESCURO --- */
body.ap-dark-mode {
    background-color: var(--ap-dark-bg) !important; /* Fundo escuro para o body */
    color: var(--ap-text-light) !important; /* Texto claro para contraste */
    min-height: 100vh;
    width: 100%;
}

/* Seletores abrangentes para texto e links em MODO ESCURO */
body.ap-dark-mode p,
body.ap-dark-mode h1, body.ap-dark-mode h2, body.ap-dark-mode h3,
body.ap-dark-mode h4, body.ap-dark-mode h5, body.ap-dark-mode h6,
body.ap-dark-mode li, body.ap-dark-mode span,
body.ap-dark-mode small, body.ap-dark-mode b, body.ap-dark-mode i,
body.ap-dark-mode strong, body.ap-dark-mode em,
body.ap-dark-mode label, body.ap-dark-mode th, body.ap-dark-mode td,
body.ap-dark-mode blockquote, body.ap-dark-mode pre,
body.ap-dark-mode .entry-content,
body.ap-dark-mode .widget-title,
body.ap-dark-mode .widget,
body.ap-dark-mode .comment-body,
body.ap-dark-mode .site-title,
body.ap-dark-mode .site-description,
body.ap-dark-mode .entry-meta,
body.ap-dark-mode .post-info,
body.ap-dark-mode .news-description,
body.ap-dark-mode .read-more,
body.ap-dark-mode .wp-block-heading,
body.ap-dark-mode .wp-block-paragraph,
body.ap-dark-mode .wp-block-list,
body.ap-dark-mode .wp-block-quote,
body.ap-dark-mode .wp-block-code,
body.ap-dark-mode .wp-block-preformatted,
body.ap-dark-mode .wp-block-pullquote,
body.ap-dark-mode .wp-block-table,
body.ap-dark-mode .wp-block-latest-posts__post-title,
body.ap-dark-mode .wp-block-categories__list,
body.ap-dark-mode .elementor-heading-title,
body.ap-dark-mode .elementor-widget-text-editor,
body.ap-dark-mode .bricks-heading,
body.ap-dark-mode .bricks-text,
body.ap-dark-mode .oxygen-headline,
body.ap-dark-mode .oxygen-text-block,
body.ap-dark-mode .ast-heading,
body.ap-dark-mode .ast-single-post-content p,
body.ap-dark-mode .site-content p,
body.ap-dark-mode .entry-title,
body.ap-dark-mode .post-title,
body.ap-dark-mode .news-title,
body.ap-dark-mode .post-content,
body.ap-dark-mode .archive-title,
body.ap-dark-mode .page-title {
    color: var(--ap-text-light) !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Links em MODO ESCURO */
body.ap-dark-mode a:not([class*="button"]):not(.wp-block-button__link),
body.ap-dark-mode .menu-item a,
body.ap-dark-mode .nav-link {
    color: var(--ap-primary-green) !important; /* Verde principal para links */
}
body.ap-dark-mode a:hover:not([class*="button"]):not(.wp-block-button__link),
body.ap-dark-mode .menu-item a:hover,
body.ap-dark-mode .nav-link:hover {
    color: var(--ap-hover-green) !important; /* Verde mais escuro no hover */
}

/* Fundo de elementos específicos em MODO ESCURO */
body.ap-dark-mode .site-header,
body.ap-dark-mode .site-footer,
body.ap-dark-mode .main-navigation,
body.ap-dark-mode .widget-area,
body.ap-dark-mode .article-card,
body.ap-dark-mode .news-block,
body.ap-dark-mode .single-post-container,
body.ap-dark-mode .search-form,
body.ap-dark-mode .wp-block-group,
body.ap-dark-mode .wp-block-cover,
body.ap-dark-mode .wp-block-latest-posts,
body.ap-dark-mode .wp-block-categories,
body.ap-dark-mode .wp-block-column,
body.ap-dark-mode .wp-block-media-text,
body.ap-dark-mode .gb-container,
body.ap-dark-mode .elementor-section,
body.ap-dark-mode .elementor-column,
body.ap-dark-mode .bricks-section,
body.ap-dark-mode .oxygen-section,
body.ap-dark-mode .ast-container,
body.ap-dark-mode .site-content,
body.ap-dark-mode .content-area,
body.ap-dark-mode .primary,
body.ap-dark-mode .secondary,
body.ap-dark-mode .widget,
body.ap-dark-mode .menu,
body.ap-dark-mode .sub-menu,
body.ap-dark-mode .comment-respond,
body.ap-dark-mode .form-allowed-tags,
body.ap-dark-mode .comment-form input[type="text"],
body.ap-dark-mode .comment-form input[type="email"],
body.ap-dark-mode .comment-form input[type="url"],
body.ap-dark-mode .comment-form textarea {
    background-color: #2a2a2a !important; /* Um cinza um pouco mais claro que o dark-bg para seções internas */
    border-color: #555555 !important;
}
body.ap-dark-mode .portal{color:#eee;background-color: #222}
body.ap-dark-mode button,
body.ap-dark-mode input[type="submit"],
body.ap-dark-mode input[type="button"],
body.ap-dark-mode .wp-block-button__link,
body.ap-dark-mode .button,
body.ap-dark-mode .elementor-button,
body.ap-dark-mode .bricks-button,
body.ap-dark-mode .oxygen-button {
    background-color: var(--ap-primary-green) !important;
    color: var(--ap-text-light) !important;
    border-color: var(--ap-primary-green) !important;
}
body.ap-dark-mode button:hover,
body.ap-dark-mode input[type="submit"]:hover,
body.ap-dark-mode input[type="button"]:hover,
body.ap-dark-mode .wp-block-button__link:hover,
body.ap-dark-mode .button:hover,
body.ap-dark-mode .elementor-button:hover,
body.ap-dark-mode .bricks-button:hover,
body.ap-dark-mode .oxygen-button:hover {
    background-color: var(--ap-hover-green) !important;
    border-color: var(--ap-hover-green) !important;
}
/* FIM MODO ESCURO */


/* --- ALTO CONTRASTE --- */
body.ap-high-contrast {
    background-color: #000 !important;
    color: #fff !important;
    min-height: 100vh;
    width: 100%;
}

/* Estilos de cor para texto e links em ALTO CONTRASTE */
body.ap-high-contrast p,
body.ap-high-contrast h1, body.ap-high-contrast h2, body.ap-high-contrast h3,
body.ap-high-contrast h4, body.ap-high-contrast h5, body.ap-high-contrast h6,
body.ap-high-contrast li, body.ap-high-contrast span,
body.ap-high-contrast small, body.ap-high-contrast b, body.ap-high-contrast i,
body.ap-high-contrast strong, body.ap-high-contrast em,
body.ap-high-contrast label, body.ap-high-contrast th, body.ap-high-contrast td,
body.ap-high-contrast blockquote, body.ap-high-contrast pre,
body.ap-high-contrast .entry-content,
body.ap-high-contrast .widget-title,
body.ap-high-contrast .widget,
body.ap-high-contrast .comment-body,
body.ap-high-contrast .site-title,
body.ap-high-contrast .site-description,
body.ap-high-contrast .entry-meta,
body.ap-high-contrast .post-info,
body.ap-high-contrast .news-description,
body.ap-high-contrast .read-more,
body.ap-high-contrast .wp-block-heading,
body.ap-high-contrast .wp-block-paragraph,
body.ap-high-contrast .wp-block-list,
body.ap-high-contrast .wp-block-quote,
body.ap-high-contrast .wp-block-code,
body.ap-high-contrast .wp-block-preformatted,
body.ap-high-contrast .wp-block-pullquote,
body.ap-high-contrast .wp-block-table,
body.ap-high-contrast .wp-block-latest-posts__post-title,
body.ap-high-contrast .wp-block-categories__list,
body.ap-high-contrast .elementor-heading-title,
body.ap-high-contrast .elementor-widget-text-editor,
body.ap-high-contrast .bricks-heading,
body.ap-high-contrast .bricks-text,
body.ap-high-contrast .oxygen-headline,
body.ap-high-contrast .oxygen-text-block,
body.ap-high-contrast .ast-heading,
body.ap-high-contrast .ast-single-post-content p,
body.ap-high-contrast .site-content p,
body.ap-high-contrast .entry-title,
body.ap-high-contrast .post-title,
body.ap-high-contrast .news-title,
body.ap-high-contrast .post-content,
body.ap-high-contrast .archive-title,
body.ap-high-contrast .page-title {
    color: #fff !important;
}

/* Links em alto contraste */
body.ap-high-contrast a:not([class*="button"]):not(.wp-block-button__link),
body.ap-high-contrast .menu-item a,
body.ap-high-contrast .nav-link {
    color: #00ffff !important; /* Ciano para links */
}
body.ap-high-contrast a:hover:not([class*="button"]):not(.wp-block-button__link),
body.ap-high-contrast .menu-item a:hover,
body.ap-high-contrast .nav-link:hover {
    color: #00dddd !important; /* Ciano mais escuro no hover */
}

/* Fundo de elementos específicos em alto contraste */
body.ap-high-contrast .site-header,
body.ap-high-contrast .site-footer,
body.ap-high-contrast .main-navigation,
body.ap-high-contrast .widget-area,
body.ap-high-contrast .article-card,
body.ap-high-contrast .news-block,
body.ap-high-contrast .single-post-container,
body.ap-high-contrast .search-form,
body.ap-high-contrast .wp-block-group,
body.ap-high-contrast .wp-block-cover,
body.ap-high-contrast .wp-block-latest-posts,
body.ap-high-contrast .wp-block-categories,
body.ap-high-contrast .wp-block-column,
body.ap-high-contrast .wp-block-media-text,
body.ap-high-contrast .gb-container,
body.ap-high-contrast .elementor-section,
body.ap-high-contrast .elementor-column,
body.ap-high-contrast .bricks-section,
body.ap-high-contrast .oxygen-section,
body.ap-high-contrast .ast-container,
body.ap-high-contrast .site-content,
body.ap-high-contrast .content-area,
body.ap-high-contrast .primary,
body.ap-high-contrast .secondary,
body.ap-high-contrast .widget,
body.ap-high-contrast .menu,
body.ap-high-contrast .sub-menu,
body.ap-high-contrast .comment-respond,
body.ap-high-contrast .form-allowed-tags,
body.ap-high-contrast .comment-form input[type="text"],
body.ap-high-contrast .comment-form input[type="email"],
body.ap-high-contrast .comment-form input[type="url"],
body.ap-high-contrast .comment-form textarea {
    background-color: #1a1a1a !important;
    border-color: #444 !important;
}

body.ap-high-contrast button,
body.ap-high-contrast input[type="submit"],
body.ap-high-contrast input[type="button"],
body.ap-high-contrast .wp-block-button__link,
body.ap-high-contrast .button,
body.ap-high-contrast .elementor-button,
body.ap-high-contrast .bricks-button,
body.ap-high-contrast .oxygen-button {
    background-color: #ffff00 !important; /* Fundo amarelo para botões */
    color: #000 !important; /* Texto preto para botões */
    border-color: #ffff00 !important;
}
/* FIM ALTO CONTRASTE */


/* --- INVERTER CORES (Contraste Negativo) --- */
body.ap-inverted-contrast {
    filter: invert(100%) hue-rotate(180deg);
    overflow-x: hidden !important;
    position: relative;
    width: 100vw;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Elementos que não devem ser invertidos */
body.ap-inverted-contrast img,
body.ap-inverted-contrast video,
body.ap-inverted-contrast iframe,
body.ap-inverted-contrast .no-invert,
body.ap-inverted-contrast .wp-block-image,
body.ap-inverted-contrast .wp-block-gallery,
body.ap-inverted-contrast .elementor-background-overlay,
body.ap-inverted-contrast .bricks-background-overlay,
body.ap-inverted-contrast .site-logo img,
body.ap-inverted-contrast .custom-logo img,
body.ap-inverted-contrast .wp-custom-header img,
body.ap-inverted-contrast .entry-thumbnail img,
body.ap-inverted-contrast .avatar,
body.ap-inverted-contrast .wp-block-image img,
body.ap-inverted-contrast .wp-block-cover__image-background,
body.ap-inverted-contrast .has-background-image {
    filter: invert(100%) hue-rotate(180deg);
}
/* FIM INVERTER CORES */


/* --- ESCALA DE CINZA --- */
body.ap-grayscale {
    filter: grayscale(100%);
    overflow-x: hidden !important;
    position: relative;
    width: 100vw;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Elementos que não devem ser em escala de cinza */
body.ap-grayscale img,
body.ap-grayscale video,
body.ap-grayscale iframe,
body.ap-grayscale .no-grayscale,
body.ap-grayscale .wp-block-image,
body.ap-grayscale .wp-block-gallery,
body.ap-grayscale .elementor-background-overlay,
body.ap-grayscale .bricks-background-overlay,
body.ap-grayscale .site-logo img,
body.ap-grayscale .custom-logo img,
body.ap-grayscale .wp-custom-header img,
body.ap-grayscale .entry-thumbnail img,
body.ap-grayscale .avatar,
body.ap-grayscale .wp-block-image img,
body.ap-grayscale .wp-block-cover__image-background,
body.ap-grayscale .has-background-image {
    filter: grayscale(0%);
}
/* FIM ESCALA DE CINZA */


/* IMPORTANTE: INSPETOR DE ELEMENTOS DO NAVEGADOR (F12) É SEU MELHOR AMIGO!
   Mesmo com todos esses seletores, cada tema WordPress é único.
   Se algum elemento não estiver respondendo, use o F12 (Inspecionar Elemento)
   para verificar as regras CSS do seu tema para aquele elemento.
   Você precisará adicionar os seletores específicos do seu tema (classes, IDs, etc.)
   dentro das regras de .ap-high-contrast, .ap-inverted-contrast, .ap-light-mode, .ap-dark-mode
   para garantir a cobertura completa.
   Sempre use `!important` para garantir que as regras de acessibilidade sobrescrevam as do tema.
*/