/* Tema Escuro - Corrigido para melhor contraste */
body.theme-dark {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* CORREÇÃO DO FUNDO DA PÁGINA INTEIRA */
body.theme-dark .pkp_structure_page {
    background-color: #1a1a1a !important;
}

/* Conteúdo principal */
body.theme-dark .pkp_structure_main,
body.theme-dark .pkp_structure_content,
body.theme-dark .page,
body.theme-dark .obj_article_summary,
body.theme-dark .cmp_article_details,
body.theme-dark .cmp_notification,
body.theme-dark .obj_issue_toc {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Sidebar */
body.theme-dark .pkp_structure_sidebar {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* RODAPÉ COMPLETO - fundo escuro, mas sem forçar cor dos links */
body.theme-dark .pkp_structure_footer_wrapper,
body.theme-dark .pkp_structure_footer,
body.theme-dark .pkp_footer,
body.theme-dark .pkp_footer_content {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* Título da revista - BRANCO (não azul) */
body.theme-dark .pkp_site_name a,
body.theme-dark .pkp_site_name {
    color: #ffffff !important;
}

/* Textos pretos/cinza -> BRANCO */
body.theme-dark,
body.theme-dark h1,
body.theme-dark h2, 
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6,
body.theme-dark p,
body.theme-dark li,
body.theme-dark span,
body.theme-dark div:not([class*="pkp_navigation"]):not([class*="header"]):not(.cursor-indicator) {
    color: #e0e0e0 !important;
}

/* SEÇÕES ESPECÍFICAS - Corrigindo o fundo branco */
body.theme-dark .sections {
    background-color: #1a1a1a !important;
}

body.theme-dark .section {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Títulos das seções H2 e H3 */
body.theme-dark .section h2,
body.theme-dark .section h3 {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-bottom: none !important;
    padding: 15px;
    margin: 0;
}

/* Lista de artigos dentro das seções */
body.theme-dark .section .cmp_article_list,
body.theme-dark .section .articles {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Itens individuais dos artigos */
body.theme-dark .section .obj_article_summary {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
}

/* Títulos dos artigos */
body.theme-dark .section .obj_article_summary .title a {
    color: #90caf9 !important;
    background-color: transparent !important;
}

body.theme-dark .section .obj_article_summary .title a:hover {
    color: #5c85a7ff  !important;
}

/* Metadados dos artigos */
body.theme-dark .section .obj_article_summary .meta,
body.theme-dark .section .obj_article_summary .authors {
    background-color: transparent !important;
    color: #cccccc !important;
}

/* --- REGRAS PERSONALIZADAS PARA BOTÕES DE DOWNLOAD (TEMA ESCURO) --- */

/* Caso o ícone seja via ::before, ::after ou SVG */
body.theme-dark .pkp_site_nav_toggle::before,
body.theme-dark .pkp_site_nav_toggle::after {
    color: #37653a !important;
    background: transparent !important;
}

body.theme-dark .pkp_site_nav_toggle svg {
    fill: #37653a !important;
}

/* 🔴 BOTÃO PDF (Letra Rosa Choque: #FF007F) - TEMA ESCURO */
body.theme-dark a.galley_link.pdf,
body.theme-dark a.pdf {
    background-color: transparent !important; /* Fundo transparente ou #1a1a1a */
    color: #FF007F !important; /* Cor da letra é Vermelha */
    border-color: #FF007F !important;
}

body.theme-dark a.galley_link.pdf:hover,
body.theme-dark a.pdf:hover {
    background-color: rgba(237, 28, 36, 0.1) !important; /* Um leve fundo vermelho transparente no hover */
    border-color: #ff71b8ff !important;
}

/* 🔵 BOTÃO IMAGEM (Letra Azul Claro: #90caf9) - TEMA ESCURO - CORRIGIDO PARA .galley_link.file */
body.theme-dark a.galley_link.file,
body.theme-dark a.file {
    background-color: transparent !important; /* Fundo transparente ou #1a1a1a */
    color: #90caf9 !important; /* Cor da letra é Azul Claro */
    border-color: #90caf9 !important;
}

body.theme-dark a.galley_link.file:hover,
body.theme-dark a.file:hover {
    background-color: rgba(181, 222, 255, 0.1) !important; /* Um leve fundo azul claro transparente no hover */
    border-color: #90caf9 !important;
}

/* --- REGRAS PERSONALIZADAS PARA BOTÕES DE DOWNLOAD (TEMA CLARO) --- */

/* 🔴 BOTÃO PDF (Letra Rosa Choque: #FF007F) - TEMA CLARO */
body:not(.theme-dark) a.galley_link.pdf,
body:not(.theme-dark) a.pdf {
    background-color: transparent !important; /* Fundo transparente ou branco */
    color: #FF007F !important; /* Altera a cor do texto para Vermelho */
    border-color: #FF007F !important; /* Mantém a borda vermelha para destacar */
}

body:not(.theme-dark) a.galley_link.pdf:hover,
body:not(.theme-dark) a.pdf:hover {
    background-color: rgba(237, 28, 36, 0.1) !important; /* Um leve fundo vermelho transparente no hover */
    border-color: #FF007F !important;
}

/* 🔵 BOTÃO IMAGEM (Letra Azul Claro: #90caf9) - TEMA CLARO - CORRIGIDO PARA .galley_link.file */
body:not(.theme-dark) a.galley_link.file,
body:not(.theme-dark) a.file {
    background-color: transparent !important; /* Fundo transparente ou branco */
    color: #006798 !important; /* Cor da letra é Azul Claro */
    border-color: #90caf9 !important;
}

body:not(.theme-dark) a.galley_link.file:hover,
body:not(.theme-dark) a.file:hover {
    background-color: #a9e4ffff !important; /* Um leve fundo azul claro transparente no hover */
    border-color: #90caf9 !important;
}

body.theme-dark .section .obj_galley_link:hover {
    background-color: #2d2d2d !important;
}

/* Cards e containers */
body.theme-dark .obj_article_summary:not(.section .obj_article_summary),
body.theme-dark .cmp_notification,
body.theme-dark .pkp_controllers_grid,
body.theme-dark .pkp_controllers_grid .header,
body.theme-dark .panel {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Formulários */
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Tabelas */
body.theme-dark table {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.theme-dark th,
body.theme-dark td {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* BOTÕES DE SUBMISSÃO - FUNDO ESCURO */
body.theme-dark .pkp_button,
body.theme-dark .pkp_button_primary,
body.theme-dark .submit,
body.theme-dark [class*="submit"],
body.theme-dark [class*="submission"],
body.theme-dark .btn,
body.theme-dark .button,
body.theme-dark input[type="submit"],
body.theme-dark input[type="button"],
body.theme-dark button:not(.theme-toggle-btn) {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.theme-dark .pkp_button:hover,
body.theme-dark .pkp_button_primary:hover,
body.theme-dark .submit:hover,
body.theme-dark [class*="submit"]:hover,
body.theme-dark .btn:hover,
body.theme-dark .button:hover,
body.theme-dark input[type="submit"]:hover,
body.theme-dark input[type="button"]:hover,
body.theme-dark button:not(.theme-toggle-btn):hover {
    background-color: #2d2d2d !important;
    border-color: #555 !important;
}

/* Botões específicos de ação primária */
body.theme-dark .pkp_button_primary,
body.theme-dark .submit_btn,
body.theme-dark .action_button {
    background-color: #1e88e5 !important;
    color: #ffffff !important;
    border-color: #1976d2 !important;
}

body.theme-dark .pkp_button_primary:hover,
body.theme-dark .submit_btn:hover,
body.theme-dark .action_button:hover {
    background-color: #2196f3 !important;
    border-color: #90caf9 !important;
}

/* PRESERVAR MENUS - Não aplicar tema escuro nos menus de navegação */
/* CORREÇÃO: Fundo opaco no menu mobile/desktop tema escuro */
/* MENU PRINCIPAL: cor de fundo escura */
body.theme-dark nav:not(.cmp_breadcrumbs),
body.theme-dark .pkp_navigation_primary,
body.theme-dark .pkp_navigation_user {
    background-color: #2E4832 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* BREADCRUMBS: cor de fundo mais clara ou transparente */
body.theme-dark nav.cmp_breadcrumbs {
    background-color: transparent !important;
    color: #b0b0b0 !important; /* ou escolha outra cor conforme desejar */
    border-color: transparent !important;
}

/* CORREÇÃO: Fundo do submenu de categorias (ul dentro de li.has_submenu) */
body.theme-dark .has_submenu,
body.theme-dark .has_submenu ul {
    background-color: #1a1a1a !important; /* Cor de fundo escura padrão */
    border-color: #444 !important;
}

/* GARANTIR que o tema claro funcione corretamente */
body:not(.theme-dark) .pkp_structure_page,
body:not(.theme-dark) .pkp_structure_main,
body:not(.theme-dark) .pkp_structure_content,
body:not(.theme-dark) .page,
body:not(.theme-dark) .pkp_structure_footer_wrapper,
body:not(.theme-dark) .pkp_structure_footer,
body:not(.theme-dark) .pkp_footer,
body:not(.theme-dark) .sections,
body:not(.theme-dark) .section,
body:not(.theme-dark) .section h2,
body:not(.theme-dark) .section h3,
body:not(.theme-dark) .section .obj_article_summary,
body:not(.theme-dark) .obj_article_summary,
body:not(.theme-dark) .pkp_button,
body:not(.theme-dark) .pkp_button_primary,
body:not(.theme-dark) .obj_galley_link {
    background-color: initial !important;
    color: initial !important;
    border-color: initial !important;
}

/* Transição suave */
body, 
body .pkp_structure_page,
body .pkp_structure_main,
body .pkp_structure_content,
body .page,
body .pkp_structure_footer,
body .obj_article_summary,
body .section,
body .sections {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* TROCA DE IMAGEM DO OJS COM FILTRO - Versão invertida */
body.theme-dark .pkp_brand_footer img {
    filter: invert(1) brightness(2) !important;
}

/* Garantir que a imagem volte ao normal no tema claro */
body:not(.theme-dark) .pkp_brand_footer img {
    filter: none !important;
}

/* Botão de tema */
	.theme-toggle-btn {
	    width: 28px;
	    height: 28px;
	    background: transparent;
	    border: none;
	    cursor: pointer;
	    font-size: 18px;
	    padding: 0;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    margin-left: 10px;
	}
	
	.theme-toggle-item {
	    display: flex;
	    align-items: center;
	}
	
	/* ÚLTIMO TRECHO: botão hamburguer, para SOBRESCREVER! (Aumento de Especificidade) */
body.theme-dark .pkp_structure_head .pkp_site_nav_toggle {
    background-color: #2E4832 !important;
    color: #fff !important;
    border-color: #2E4832 !important;
}
body.theme-dark .pkp_structure_head .pkp_site_nav_toggle:hover {
    background-color: #1e371dff !important;
    color: #fff !important;
    border-color: #1e371dff !important;
}

/* Forçar cor azul no bloco de idiomas (tema claro e escuro) */
/* Tema escuro: azul #42a5f5 */
body.theme-dark .pkp_block.block_language li,
body.theme-dark .pkp_block.block_language li span,
body.theme-dark .pkp_block.block_language li a,
body.theme-dark .pkp_block.block_language li a span {
    color: #42a5f5 !important;
}

/* Tema claro: azul #42a5f5 */
body:not(.theme-dark) .pkp_block.block_language li,
body:not(.theme-dark) .pkp_block.block_language li span,
body:not(.theme-dark) .pkp_block.block_language li a,
body:not(.theme-dark) .pkp_block.block_language li a span {
    color: #42a5f5 !important;
}

/* Hover (se quiser manter diferente por tema) */
body.theme-dark .pkp_block.block_language li a:hover,
body.theme-dark .pkp_block.block_language li a:hover span {
    color: #004c66 !important;
}

body:not(.theme-dark) .pkp_block.block_language li a:hover,
body:not(.theme-dark) .pkp_block.block_language li a:hover span {
    color: #004c66 !important;
}


/* Forçar azul apenas nos links do rodapé em tema escuro */
body.theme-dark .pkp_footer,
body.theme-dark .pkp_footer * {
    color: inherit !important;
}

/* Rodapé – links no TEMA ESCURO (forçar por cima de tudo) */
body.theme-dark .pkp_footer a,
body.theme-dark .pkp_footer a:link,
body.theme-dark .pkp_footer a:visited,
body.theme-dark .pkp_footer a:hover,
body.theme-dark .pkp_footer a:focus {
    color: #42a5f5 !important;
}

@media (min-width: 992px) {
  /* Barrinha branca no dropdown do MENU PRINCIPAL (tema claro e escuro) */
  body .pkp_navigation_primary.pkp_nav_list > li > ul a:hover,
  body .pkp_navigation_primary.pkp_nav_list > li > ul a:focus {
    border-left-width: 0.357rem !important;  /* mesmo valor de @half */
    border-left-style: solid !important;
    border-left-color: #ffffff !important;
    color: #ffffff !important;
  }
}

/* Desativar animações de View Transition */
::view-transition-group(root) {
  animation: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

/* Popup de tema selecionado */
.theme-toast {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toast--visible {
  opacity: 1;
  transform: scale(1);
}

.theme-toast__content {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  text-align: center;
  min-width: 220px;
  max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.theme-toast__emoji {
  font-size: 56px;
  display: block;
  margin-bottom: 8px;
}

.theme-toast__label {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
}

/* ============================================================
   1. REGRA DO HEADER PARA TODOS OS DISPOSITIVOS v=1.4
   ============================================================ */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    z-index: 10000 !important;
    background-color: #ffffff; /* Fundo inicial branco */
    /* Sombra inicial fortalecida */
    box-shadow: 0px 10px 30px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Espaçamento padrão do corpo */
body {
    padding-top: 100px !important; 
}

/* ============================================================
   2. APENAS PARA PC (Telas maiores que 992px)
   ============================================================ */
@media (min-width: 992px) {
    
    body {
        padding-top: 140px !important; /* Espaço para o header inicial maior */
    }

    header {
        height: auto; 
        min-height: 140px; 
        overflow: visible !important;
    }

    /* --- ESTADO COMPACTO AO ROLAR --- */
    header.header-scrolled {
        height: 60px !important; 
        min-height: 60px !important;
        background-color: #2E4832 !important; /* Verde da revista */
        overflow: hidden !important;
        /* Sombra bem forte ao rolar */
        box-shadow: 0px 10px 30px 0 rgba(0, 0, 0, 0.3) !important;
    }

    /* SINCRONIZAÇÃO: Garante que o verde interno não apareça antes da hora */
    header .pkp_site_name,
    header .pkp_head_wrapper,
    header .is_text {
        background-color: transparent !important; 
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        transition: all 0.5s ease !important;
    }

    /* Ajustes do título no estado compacto (Alinhado à margem zero) */
    header.header-scrolled .pkp_site_name,
    header.header-scrolled .pkp_head_wrapper {
        margin: 0 !important;
        padding: 0 0px !important;
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    header.header-scrolled .pkp_site_name a {
        color: #ffffff !important;
        font-size: 18px !important;
        text-decoration: none !important;
        line-height: 60px !important;
    }

/* 8. ANIMAÇÃO DE ENTRADA DO TÍTULO DO SITE (Refinada) */
.pkp_page_index .pkp_site_name { 
    /* Começa bem acima da tela para simular que veio do preloader */
    transform: translateY(-100px); 
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1) !important; 
}

@media (max-width: 991px) {
    /* Garante que o título possa animar no mobile */
    .pkp_page_index .pkp_site_name {
        display: block !important; /* Garante que o transform funcione */
        transform: translateY(-80px); /* Ponto de partida mobile */
        transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.23, 1, 0.32, 1) !important;
    }

    .pkp_page_index .pkp_site_name.pkp_site_name--visible {
        transform: translateY(0);
    }
}

.pkp_page_index .pkp_site_name.pkp_site_name--visible { 
    transform: translateY(0); 
}


    /* Esconder menus e busca no PC ao rolar */
    header.header-scrolled nav, 
    header.header-scrolled .pkp_navigation_user,
    header.header-scrolled .pkp_structure_search {
        display: none !important;
    }
}

/* ============================================================
   3. AJUSTES PARA TEMA ESCURO (body.theme-dark)
   ============================================================ */
/* Fortalece as sombras no tema escuro para dar contraste real */
body.theme-dark header {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

body.theme-dark header.header-scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    /* Linha fina opcional para separar o header escuro do conteúdo */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================================
   4. APENAS PARA MOBILE
   ============================================================ */
@media (max-width: 991px) {
    header {
        height: auto !important;
        transition: none !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    body {
        padding-top: 80px !important;
    }
}

/* ADICIONAL */
/* ESTADO 3: OCULTO - Adicione isso para permitir o movimento de saída */
header.header-hidden {
    transform: translateY(-100%) !important;
    box-shadow: none !important;
}

/* Ajuste na transição original para suportar o transform */
header {
    /* Mantive seu cubic-bezier e adicionei 'transform' na lista */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Garante que o título não fique "órfão" se o header sumir no mobile */
@media (max-width: 991px) {
    header {
        /* Mudança necessária: habilitar transição no mobile para o efeito de sumir funcionar */
        transition: transform 0.5s ease !important; 
    }
}
/* FIM DO CÓDIGO DE ESTILO PARA O HEADER COM TRANSIÇÃO E TEMA ESCURO */
/* ============================================================ */

/* ============================================================
   1. RESET E OCULTAR SCROLL PADRÃO
   ============================================================ */
html, body { 
    overflow-x: hidden !important; 
    width: 100%; 
    margin: 0; 
    padding: 0; 
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar, 
body::-webkit-scrollbar { 
    display: none !important; 
}

/* ============================================================
   2. NOVA BARRA DE PROGRESSO DE SCROLL (antes do Header)
   ============================================================ */
#header-progress-bar {
    position: fixed;
    left: 0;
    width: 0%;
    height: 3px; /* Aumentei um pouco para o efeito aparecer */
    background: linear-gradient(90deg, #b08d57, #ffffff); /* Exemplo: Marrom para Branco */
    z-index: 10001;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(176, 141, 87, 0.6); 
    transition: width 0.2s ease-out;
}

/* Adicionamos a transição apenas quando o header for esconder, 
   para bater com o efeito de slide do menu */
header.header-hidden ~ #header-progress-bar,
.header-hidden + #header-progress-bar {
    transition: width 0.1s linear, top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Garante que o header tenha fundo sólido para cobrir a barra se necessário */
header {
    z-index: 9999 !important;
    background-color: #ffffff; /* Ou a cor do seu header */
}


/* Opcional: Adicione uma sombra para destacar quando o header sumir */
#header-progress-bar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ============================================================
   3. BOTÃO VOLTAR AO TOPO (Seu Estilo Original Preservado)
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 52px;
    min-width: 52px;
    max-width: 52px;
    background-color: #2E4832;
    color: #ffffff;
    border: none;
    border-radius: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
    overflow: visible !important;
    transition: 
        opacity 0.5s ease, 
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s,
        padding 0.6s ease !important;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top.hide-bottom {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(40px) !important;
}

/* --- VERSÃO PC (Legenda) --- */
@media (min-width: 992px) {
    .back-to-top.label-visible { max-width: 350px; }
    .back-to-top-label {
        font-family: "Lato", sans-serif;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        transition: opacity 0.4s ease, max-width 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .back-to-top.label-visible .back-to-top-label { opacity: 1; max-width: 200px; padding-left: 20px; }
    .back-to-top.collapsed { max-width: 52px !important; padding: 0 !important; }
    .back-to-top.collapsed .back-to-top-label { opacity: 0 !important; max-width: 0 !important; padding: 0 !important; }
}

/* Força o fundo verde na legenda mesmo no Modo Escuro */
body.theme-dark .back-to-top,
body.theme-dark .back-to-top-icon,
body.theme-dark .back-to-top.label-visible {
    background-color: #2E4832 !important;
}

body.theme-dark .back-to-top-label {
    background-color: #2E4832 !important; /* Cor de fundo da legenda */
    color: #ffffff !important;           /* Cor do texto branco */
}

/* Garante que o pulso também continue verde */
body.theme-dark .back-to-top.pulse-active::before, 
body.theme-dark .back-to-top.pulse-active::after {
    background-color: #2E4832 !important;
}

/* ÍCONE */
.back-to-top-icon {
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; background-color: #2E4832; border-radius: 50%; position: relative; z-index: 2;
}
.back-to-top-icon svg { width: 28px; height: 50px; }

/* VERSÃO MOBILE */
@media (max-width: 991px) {
    .back-to-top {
        width: 48px !important; max-width: 48px !important; height: 48px !important;
        min-width: 48px !important; padding: 0 !important; bottom: 20px; right: 20px;
    }
    .back-to-top-label { display: none !important; }
    .back-to-top-icon { width: 48px !important; height: 48px !important; margin: 0 !important; }
    .back-to-top-icon svg { width: 24px !important; height: 24px !important; }
}

/* ANIMAÇÃO PULSO */
.back-to-top.pulse-active::before, .back-to-top.pulse-active::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; background-color: #2E4832; z-index: -1; opacity: 0;
    pointer-events: none; animation: pulse-once 2s ease-out 2;
}
.back-to-top.pulse-active::after { animation-delay: 0.5s; }
@keyframes pulse-once {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.8); opacity: 0; }
}
