:root {
  --bg-color: #f4f4f4;
  --primary-color: #282c34;
  --text-color: #333;
  --accent-color: #007BFF;
  --white: #ffffff;
  --toast-bg: #4caf50;
  --toast-text: #fff;
  --btn-corrigir-default: #007BFF;
  --btn-corrigir-active: #004080;
  --emoji-item-bg-hover: rgba(0, 0, 0, 0.05); /* Sobreposição escura SUTIL para tema claro */
  --emoji-item-bg-active: rgba(0, 0, 0, 0.1); /* Sobreposição um pouco mais forte no clique */
}


[data-theme="dark"] {
  --bg-color: #1e1e1e;
  --primary-color: #111;
  --text-color: #e0e0e0;
  --accent-color: #4dabf7;
  --white: #1e1e1e;
  --toast-bg: #388e3c;
  --btn-corrigir-default: #4dabf7;
  --btn-corrigir-active: #003366;
  --emoji-item-bg-hover: rgba(255, 255, 255, 0.08); /* Sobreposição clara SUTIL para tema escuro */
  --emoji-item-bg-active: rgba(255, 255, 255, 0.12); /* Sobreposição um pouco mais forte no clique */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

header {
  background-color: var(--white);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
  position: relative;
}

.logo {
  max-width: 6rem;
  max-height: 4rem;
}

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

/* --- ESTILOS PARA O SELETOR DE IDIOMAS --- */
.logo-orbe-group {
    display: flex;
    align-items: center;
    gap: 4px; /* ajuste para o espaço desejado entre logo e orbe */
}

.lang-btn.lang-btn-orbe {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0;
    box-shadow: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}
.lang-btn.lang-btn-orbe:focus-visible,
.lang-btn.lang-btn-orbe:hover {
    box-shadow: none;
    outline: none;
}
.lang-btn.lang-btn-orbe .lang-flag {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: transform 0.2s;
}
.lang-btn.lang-btn-orbe:hover .lang-flag,
.lang-btn.lang-btn-orbe:focus-visible .lang-flag {
    transform: scale(1.18);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.header_link, button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 100px;
  text-align: center;
  text-decoration: none;
}

.header-buttons button:hover, .botoes_textarea:hover,
.header-buttons .header_link:hover {
  background-color: #0056b3;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--accent-color);
  cursor: pointer;
  margin-left: auto;
  z-index: 1100;
}

main {
  flex: 1 0 auto;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  width: 95%;
}

.title_principal_home,
.title_principal_contato,
.title_about {
  color: var(--accent-color);
  text-shadow: 0.1rem 0.05rem 0.05rem rgba(0, 0, 0, 0.15);
  font-size: 1.75rem;
  margin-bottom: 0.7rem;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.title_secundario_about {
  color: var(--accent-color);
  text-shadow: 0.1rem 0.05rem 0.05rem rgba(0, 0, 0, 0.15);
  font-size: 1.75rem;
  margin-bottom: 0.7rem;
  text-align: left;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.paragraph_about, p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1.05rem;
  color: var(--text-color);
  text-align: justify;
}

 legend {
    font-weight: bold;
    padding: 0 0.5rem;
    margin-left: 0.5rem;
    color: var(--accent-color);
}

.textarea_home {
  font-family: inherit;
  width: 100%;
  min-height: 200px; /* Altura mínima garantida */
  height: auto;      /* Permite crescer conforme o conteúdo */
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid var(--accent-color); /* Usa variável de cor */
  outline: rgb(77, 171, 247) solid 1px;
  border-radius: 5px;
  box-shadow: 0.05rem 0.05rem 0.05rem rgb(77, 171, 247, 0.3);
  resize: vertical;
  color: #000;
  background-color: #fff; /* Fundo branco explícito */
}

.textarea_home:focus {
  border-color: var(--accent-color);
  box-shadow: 0.2rem 0.2rem 0.4rem rgba(77, 171, 247, 0.4);
}



[data-theme="dark"] .textarea_home {
  background-color: #333;
  color: #f9f9f9;
  border-color: 1px solid #555;
}

[data-theme="dark"] .textarea_home:focus {
    border-color: var(--accent-color);
}

.header_link:active, button:active,
.contato-form button[type="submit"]:active {
  background-color: #0056b3;
  outline: none;
  box-shadow: none;
}

/* Anel de foco para navegação por teclado */
button:focus-visible,
.header_link:focus-visible,
.logo:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  background-color: var(--white);
  margin-top: 1rem;
  border-radius: 5px;
  border: #4dabf7 1px solid;
}

.text-stats-grid span {
  color: var(--accent-color);
}

.botoes {
  margin-top: 0.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.botoes button {
  background-color: var(--btn-corrigir-default);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  min-width: 180px;
  width: 180px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s;
}

/*.botoes {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}*/

.botoes button:hover:not(:disabled) {
  background-color: #0056b3;
}

#corrigirBtn.active {
  background-color: var(--btn-corrigir-active);
  cursor: wait;
}

footer p{
  text-align: center;
  background-color: var(--white);
  padding:1rem ;
  font-size: 0.9rem;
  box-shadow: 0 -3px 3px rgba(0, 0, 0, 0.2);
  text-shadow: 0.05rem 0.05rem 0.05rem rgba(0, 0, 0, 0.3);
  color: var(--text-color);
  margin-bottom: 0; 
   
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%) scale(0.9);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 5px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.4s ease, top 0.4s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  top: 50px;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

/* Toast de erro */
.toast.toast-error {
  background-color: #e53935 !important; /* Vermelho forte */
}

/* Toast de sucesso */
.toast.toast-success {
  background-color: #4CAF50; /* Verde */
}

/* Para o Inversor de Texto */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.tool-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.textarea-label {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: -0.5rem;
}

.textarea-output {
    background-color: #fff;
    color: #000;
}

[data-theme="dark"] .textarea-output {
    background-color: #333;
    color: #f9f9f9;
    border-color: #555;
}

.inverter-options {
    border: 1px solid #4dabf7;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    margin-top: 1.2rem;
}

.ordenador-options {
    border: 1px solid #4dabf7;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

.ordenador-options legend {
    font-weight: bold;
    padding: 0 0.5rem;
    margin-left: 0.5rem;
    color: var(--accent-color);
}

/* Regra para o container dos 3 botões de rádio */
.ordenador-options .inverter-options-type {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; /* Deixa os 3 itens equidistantes */
    align-items: center;
    gap: 1.2rem;
}

/* Regra para o segundo fieldset, que contém os 2 checkboxes */
/* Usamos um seletor mais específico para não afetar o primeiro fieldset */
fieldset.ordenador-options:not(:has(legend)) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; 
    align-items: center;
    gap: 2rem;
    border-color: #4dabf7; 
}

[data-theme="dark"] .inverter-options, .ordenador-options {
    border-color: 1px solid #4dabf7;
    
}

.inverter-options legend {
    font-weight: bold;
    padding: 0 0.5rem;
    margin-left: 1rem;
}

.inverter-options div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.inverter-options,.ordenador-options label {
    font-weight: bold;
}

/* ========================================= */
/* ESTILOS PARA O ÍCONE DE AJUDA (TOOLTIP)   */
/* ========================================= */

.option-with-tooltip {
    position: relative; /* Essencial para o posicionamento da dica */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-icon {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 50%;
    background-color: var(--text-color-light, #7b7575); /* Cor de fundo do ícone */
    color: var(--bg-color, #fff); /* Cor do texto (i) */
    font-size: 0.9rem;
    font-weight: bold;
    cursor: help;
    -webkit-tap-highlight-color: transparent;
}

/* A caixa de dica (escondida por padrão) */
.tooltip-icon::before {
    content: attr(data-tooltip); /* Pega o texto do atributo data-tooltip */
    position: absolute;
    bottom: 140%; /* Posiciona acima do ícone */
    left: 50%;
    transform: translateX(-50%);
    width: 280px; /* Largura da caixa de dica */
    padding: 0.8rem;
    border-radius: 6px;
    background: var(--primary-color);
    color: var(--bg-color);
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
    
    /* Animação */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* A pequena seta abaixo da caixa de dica */
.tooltip-icon::after {
    content: '';
    position: absolute;
    bottom: 140%;
    margin-bottom: -5px; /* Posiciona a seta na base da caixa */
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    
    /* Animação */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Mostra a dica no hover ou foco (para acessibilidade) */
.tooltip-icon:hover::before,
.tooltip-icon:hover::after,
.tooltip-icon:focus-within::before,
.tooltip-icon:focus-within::after {
    opacity: 1;
    visibility: visible;
}

/*Ferramenta Localizar e Substituir */
.textarea_home_localizador{
    min-height: auto;
    height: 2.5rem;
}

.textarea_label_localizador{
   font-weight: bold;
}

.tool-grid .tool-column-localizador {
    gap: 0.25rem; /* Experimente este valor. O original era 1rem. */
    margin-top:1rem;
}

.tool-grid-localizador{
  margin: 1.5rem 0 1rem 0;
}

.ordenador-options-localizador{
  margin-top: 1.5rem;
}

/* =============================================== */
/* ESTILOS PARA O CONTAINER DE ESTATÍSTICAS (GERADOR) */
/* =============================================== */

.stats-container {
  font-size: 0.8rem;
  color: #007bff;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: white;
  border: 1px solid #4dabf7;
  border-radius: 5px;
  min-height: 2.75rem;/* Garante uma altura mínima mesmo quando vazio */
  line-height: 1.5;
}

/* Garante que, se houver duas linhas de stats, elas fiquem uma abaixo da outra */
.stats-container span {
    display: block; 
}

.gerador-options {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

[data-theme="dark"] .stats-container {
    background-color: #2a2a2e; /* Um cinza escuro um pouco diferente do fundo */ 
    color: #fff;
}


/* =============================================== */
/* ESTILOS PARA A FERRAMENTA "LETRAS DIFERENTES"   */
/* =============================================== */
input.textarea_home {
    height: auto; /* Deixa o navegador calcular a altura com base no padding e fonte */
    min-height: unset; /* Remove a altura mínima de 200px, que vem da regra original */
    padding: 0.75rem 1rem; /* Um padding vertical um pouco menor fica melhor em inputs */
}

.tool-column-fontes {
  width: 100%;
  margin-bottom: 2rem;
}

.botoes-fontes{
  display: flex;
  justify-content: center;
  margin-top: 0rem;
  margin-bottom: 1.5rem;
}

.letras-card-resultado {
  display: flex;
  align-items: center; /* Alinha o texto e o botão verticalmente */
  gap: 1.5rem; /* Espaço entre o texto e o botão */
  background-color: var(--white);
  border: 1px solid  #4dabf7;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.letras-output-text {
  flex-grow: 1; /* Faz o texto ocupar todo o espaço disponível, empurrando o botão */
  font-size: 1.2rem;
  overflow-wrap: break-word; /* Permite que o navegador quebre a "palavra" longa */
  word-break: break-all; /* Uma garantia extra para forçar a quebra em todos os casos */
}

/* ====================================================== */
/* ESTILO FINAL PARA O BOTÃO DE COPIAR (ÍCONE)            */
/* ====================================================== */
/* 1. O container principal que segura todos os cartões de resultado */
#letras-resultados-container {
  display: grid;
  grid-template-columns: 1fr; /* Garante que os cartões fiquem um abaixo do outro */                 /* Espaço entre cada cartão */
}

/* 2. O cartão de resultado se torna a nossa "âncora" de posicionamento */
.letras-card-resultado {
  position: relative; /* <<< A CORREÇÃO DEFINITIVA ESTÁ AQUI */
}

/* 3. A caixa de texto de saída (que é um div) */
.letras-output-text {
  /* Estilos para parecer um campo de texto */
  background-color: var(--white);
  border-radius: 8px;
  font-size: 1.2rem; /* Tamanho de fonte um pouco maior para os estilos se destacarem */
  width: 100%;
  min-height: 1rem;
  padding: 0 3.5rem 0 0; /* Padding direito aumentado para dar espaço ao botão */
  display: flex;
  align-items: center;
  /* Regras de quebra de linha para textos longos */
  overflow-wrap: break-word;
  word-break: break-all;
}

/* O botão de copiar agora é um pequeno quadrado posicionado absolutamente */
.btn-copiar-letras {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;  /* Largura fixa e pequena */
  height: 38px; /* Altura fixa e pequena */
  min-width: unset; /* ANULA a regra min-width: 100px */
  padding: 0 !important; /* Remove qualquer padding extra */
  background: transparent;
  border: none;
  border-radius: 50%; /* Deixa o botão redondo para um efeito melhor no hover */
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent; /* Remove o destaque de toque no mobile */
}

.btn-copiar-letras:hover {
  opacity: 1;
  background: rgba(0,0,0,0.1) !important;
  width: 38px;
  height: 38px;
  min-width: unset;
  padding: 0 !important;
}

.btn-copiar-letras:active {
  background: rgba(0,0,0,0.15) !important; /* Fundo sutil que anula o azul global */
  opacity: 1;
}


[data-theme="dark"] .letras-output-text  {
    background-color: #333; /* Sua cor específica para os resultados */    
}

[data-theme="dark"] .letras-card-resultado {
    border-color:#4dabf7;
    background-color: #333;
}

/*ESTADO DE FOCO (PARA NAVEGAÇÃO COM TECLADO) */
.btn-copiar-letras:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

[data-theme="dark"] .btn-copiar-letras:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Estilo do ícone SVG dentro do botão (sem mudanças) */
.btn-copiar-letras svg {
  width: 22px;
  height: 22px;
  fill: var(--text-color);
}


/* =============================================== */
/* ESTILOS PARA A FERRAMENTA "EMOJIS"*/
/* =============================================== */

.tool-column-emojis {
  width: 100%;
  margin-bottom: 1.5rem;
}

.skin-tone-popup {
  position: absolute;
  bottom: 80%; /* Posiciona o menu um pouco acima do emoji */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  padding: 0.3rem;
  z-index: 20; /* Garante que ele fique acima de tudo */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, bottom 0.2s;
}
.skin-tone-button {
  border: none;
  background: none;
  font-size: 1.5rem;
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* 1. O container da grade de emojis */
.emoji-grid {
  display: grid;
  /* Colunas responsivas, com tamanho mínimo de 50px */
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); 
  gap: 1rem;
  background-color: var(--white);
  border: 1px solid  #4dabf7;
  border-radius: 8px;
  padding: 0.88rem 0.88rem 0.88rem 0.88rem; /* Removemos o padding superior para evitar espaço extra */
  margin-top: 1.5rem; /* Adicionamos padding de volta para dar espaço da borda */
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); /* Uma sombra interna sutil */
  min-height: 200px; /* Garante uma altura mínima para não parecer vazio */
  margin-bottom: 1rem; /* Espaço abaixo da grade */
}

/* 2. O estilo de cada emoji individual (mais compacto) */
.emoji-item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 3rem; /* REDUZIDO para um tamanho mais sutil */
  padding: 0.25rem; /* REDUZIDO para menos espaço interno */
  color: var(--accent-color);
  background-color: transparent; /* Fundo padrão (branco no tema claro) */
  border: none;      /* Borda sutil no tema claro */
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
  min-width: unset; 
  position: relative;
}

.skin-tone-button:hover {
  background-color: #e0e0e0;
}

/* 3. A ANIMAÇÃO DE HOVER OTIMIZADA */
.emoji-item:hover{
  background-color: var(--emoji-item-bg-hover); /* Usa a variável correta para o tema */
  transform: scale(1.25);                        /* ANIMAÇÃO de aumento */
  z-index: 10;
}

.emoji-item:active {
  background-color: var(--emoji-item-bg-active); /* Usa a variável correta para o tema */
  transform: scale(1.1);                          /* Efeito de pressionar */
  transition-duration: 0.05s;
}

[data-theme="dark"] .skin-tone-popup {
  background-color: #444;
}

[data-theme="dark"] .skin-tone-button:hover {
  background-color: #555;
}

[data-theme="dark"] .emoji-item:hover {
  background-color: #444444; /* Tom mais escuro que #333 para o hover */
}

[data-theme="dark"] .emoji-item:active {
  background-color: #555555;
}

[data-theme="dark"] .emoji-item {
  background-color: #333; /* Fundo escuro para o modo noturno */
  border-color: #444;
}

[data-theme="dark"] .emoji-grid {
  background-color: #333; /* Fundo escuro para o modo noturno */
}

.emoji-placeholder {
  /* Garante que o placeholder ocupe o mesmo espaço que o emoji final */
  aspect-ratio: 1 / 1;
  width: 100%;
}

/* ESTILO PARA O SEPARADOR DE GRUPOS DE EMOJIS            */
.emoji-group-separator {
  /* Ocupa a largura toda da grade para criar a quebra de linha */
  grid-column: 1 / -1; 
  /* Cria o "espaço duplo" (ajuste a altura como preferir) */
  height: 1.5rem; 
  /* Garante que ele seja completamente invisível */
  visibility: hidden;
}

/* Evita que o primeiro separador crie um espaço no topo da grade */
.emoji-group-separator:first-child {
    height: 0;
}

/* ================================================= */
/* ESTILOS FINAIS E COMPLETOS PARA AS CAIXAS DE AJUDA */
/* ================================================= */

.option-with-tooltip, .legend-container {
    position: relative; /* Essencial para o posicionamento da dica */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background-color: var(--text-color-light, #888);
    color: var(--bg-color, #fff);
    font-size: 0.8rem;
    font-weight: bold;
    cursor: help;
    -webkit-tap-highlight-color: transparent; /* Remove o destaque de toque no mobile */
}

/* A caixa de dica (escondida por padrão) */
.tooltip-icon::before {
    content: attr(data-tooltip); /* Pega o texto do atributo */
    position: absolute;
    bottom: 150%; /* Posiciona acima do ícone */
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 0.8rem;
    border-radius: 6px;
    background: var(--primary-color);
    color: var(--bg-color);
    text-align: justify;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Garante que a dica não interfira com o mouse */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* A pequena seta abaixo da caixa de dica */
.tooltip-icon::after {
    content: '';
    position: absolute;
    bottom: 150%;
    margin-bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    z-index: 19;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mostra a dica no hover ou foco (para acessibilidade) */
.tooltip-icon:hover::before,
.tooltip-icon:hover::after,
.tooltip-icon:focus-within::before,
.tooltip-icon:focus-within::after {
    opacity: 1;
    visibility: visible;
}

/* Modificador para a dica abrir para baixo */
.tooltip-icon.tooltip-opens-down::before {
    bottom: auto;
    top: 150%;
}

.tooltip-icon.tooltip-opens-down::after {
    bottom: auto;
    top: 150%;
    margin-bottom: 0;
    margin-top: -5px;
    transform: translateX(-50%) rotate(225deg);
}

.ordenador-options .inverter-options-type > div,
.inverter-options > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem; /* Espaço pequeno entre o input, o label e o ícone '?' */
}

[data-theme="dark"] .tooltip-icon::before {
background-color: var(--primary-color); /* Mantém o fundo primário do tema escuro */
color: var(--text-color); /*Usa a cor de texto padrão do tema escuro (mais clara) */
border: 1px solid var(--accent-color); /* Adiciona uma borda sutil para destacar */
}

[data-theme="dark"] .tooltip-icon::after {
background-color: var(--primary-color); /* Mantém a cor da "seta" consistente */
border-bottom: 1px solid var(--accent-color); /* Continua a borda para a "seta" */
border-left: 1px solid var(--accent-color);
}

/* =============================================== */
/* ESTILOS PARA O CONTEÚDO EDUCATIVO - 4 SEÇÕES   */
/* =============================================== */

/* Seções principais */
.content-section {
    margin: 3rem 0;
    padding: 0 1rem;
}

.content-section .container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2563eb; /* Mesma cor azul do H1 */
    font-size: 1.8rem;
    font-weight: 700;
}

.guide-content {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.guide-content > p {
    font-size: 1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 2rem;
    text-align: justify;
}

.guide-content h3 {
    color: #2563eb;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Grade de casos de uso */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #2563eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.use-case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.use-case-card h4 {
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.use-case-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case-card li {
    padding: 0.4rem 0;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.use-case-card li:last-child {
    border-bottom: none;
}

.use-case-card strong {
    color: #1f2937;
    font-weight: 600;
}

/* Grade de dicas */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tip-card {
    background: #eff6ff;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
    transition: transform 0.2s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
}

.tip-card h3 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.tip-card p {
    color: #1e40af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Seção FAQ */
.faq-container {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.faq-item summary:hover {
    background: #e5e7eb;
}

.faq-item[open] summary {
    background: #2563eb;
    color: white;
}

.faq-item p {
    padding: 1.5rem;
    margin: 0;
    background: white;
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Grade de exemplos */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.example-card {
    background: #f0f9ff;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #0ea5e9;
    transition: transform 0.2s ease;
}

.example-card:hover {
    transform: translateY(-2px);
}

.example-card h3 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.example-text p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

/* Primeiro parágrafo - especificidade mais alta */
.example-text p:first-child {
    color: #1e40af !important;
    font-style: italic !important;
    background: rgba(59, 130, 246, 0.1) !important;
    padding: 0.75rem !important;
    border-radius: 6px !important;
    border-left: 3px solid #3b82f6 !important;
    font-weight: normal !important;
}

/* CSS específico APENAS para a página do extrator */
.examples-section .example-text p:nth-last-child(2) {
    color: #059669 !important;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #059669;
}

/* Segundo parágrafo (último quando há 2 parágrafos) */


.example-text .example-efficiency {
    color: #7c3aed !important;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #7c3aed;
    margin-top: 0.5rem;
}

.example-text .efficiency-note strong {
    color: var(--accent-color);
}

/* Tema dark para a seção de exemplos */
[data-theme="dark"] .content-section {
    background: var(--bg-color);
}

[data-theme="dark"] .guide-content,
[data-theme="dark"] .tips-grid,
[data-theme="dark"] .faq-container,
[data-theme="dark"] .examples-grid {
    background: #333;
    border-color: #555;
}

[data-theme="dark"] .use-case-card,
[data-theme="dark"] .tip-card,
[data-theme="dark"] .example-card {
    background: #2a2a2e;
    border-color: #555;
}

[data-theme="dark"] .use-case-card:hover,
[data-theme="dark"] .tip-card:hover,
[data-theme="dark"] .example-card:hover {
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.15);
}

[data-theme="dark"] .use-case-card h4,
[data-theme="dark"] .tip-card h3,
[data-theme="dark"] .example-card h3 {
    color: var(--accent-color);
}

[data-theme="dark"] .use-case-card li,
[data-theme="dark"] .tip-card p,
[data-theme="dark"] .example-text p {
    color: var(--text-color);
    border-color: #555;
}

[data-theme="dark"] .faq-item {
    border-color: #555;
    background: #2a2a2e;
}

[data-theme="dark"] .faq-item summary {
    background: #333;
    color: var(--text-color);
    border-color: #555;
}

[data-theme="dark"] .faq-item summary:hover {
    background: #444;
}

[data-theme="dark"] .faq-item[open] summary {
    background: var(--accent-color);
    color: #fff;
}

[data-theme="dark"] .faq-item p {
    background: #2a2a2e;
    color: var(--text-color);
}

[data-theme="dark"] .section-title {
    color: var(--accent-color);
}

[data-theme="dark"] .content-section strong,
[data-theme="dark"] .content-section b {
    color: #ffffff; /* ou outra cor com bom contraste */
}

[data-theme="dark"] .use-case-card strong,
[data-theme="dark"] .use-case-card b {
    color: #ffffff;
}


/* Formulário de contato */
.form-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.form-row label {
  min-width: 90px;
  margin-bottom: 0;
  text-align: left;
}

.form-row input,
.form-row textarea {
  flex: 1;
  margin-bottom: 0;
}

.contato-form {
  max-width: 600px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.20);
}

.contato-form label {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.08rem;
}

.contato-form .textarea_contato {
  min-height: 80px;
  max-height: 180px;
  resize: vertical;
}

.contato-form .input_contato,
.contato-form .textarea_contato {
  padding: 0.4rem;
  border: 1.5px solid var(--accent-color);
  border-radius: 5px;
  font-size: 1.08rem;
  font-family: inherit;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.2s;
}

.contato-form .input_contato:focus,
.contato-form .textarea_contato:focus {
  border: 2px solid var(--accent-color) !important;
  outline: none !important;
  box-shadow: none !important;
}

.contato-form .input_contato {
    /* Força o input a ocupar 100% do espaço que seu container (.form-row) permite */
    width: 100%;

    /* Permite que o input encolha para qualquer tamanho, mesmo muito pequeno */
    min-width: 0;

    /* Garante que o padding e a borda fiquem "para dentro", não causando estouro */
    box-sizing: border-box;
}

.contato-form button[type="submit"] {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-size: 1.08rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.contato-form button[type="submit"]:hover {
  background: #0056b3;
}

#contato-feedback {
  text-align: center;
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 1rem;
  font-size: 1.05rem;
}

[data-theme="dark"] .contato-form label,
[data-theme="dark"] .paragraph_about,
[data-theme="dark"] p{
  color: var(--text-color) !important;
}

[data-theme="dark"] .title_secundario_about{
  color: var(accent-color);
}

/* ========================================= */
/* ESTILOS PARA A GRADE DE FERRAMENTAS (HOME) */
/* ========================================= */

.tool-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* <<< AJUSTADO PARA 3 COLUNAS */
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: var(--white);
    border: 1px solid transparent; /* Borda transparente para não "pular" no hover */
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover, .tool-card:focus-visible {
    transform: translateY(-5px); /* Efeito de "levantar" */
     box-shadow: 0 0 15px rgba(77, 171, 247, 0.6), 0 6px 15px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
    outline: none;
}
 
.tool-icon-container {
    background-color: var(--accent-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tool-icon-container img {
    width: 45px;
    height: 45px;
    /* Para SVGs brancos, isso pode ser útil. Se usar PNGs coloridos, pode remover. */
    filter: brightness(0) invert(1); 
}

.tool-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.tool-card-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color-light);
    margin-bottom: 0;
}
/* Força o alinhamento centralizado para a descrição no desktop */
.tool-card .tool-card-description {
    text-align: center;
}


/* Responsivo */
@media (min-width: 701px) and (max-width:842px){
.tooltip-icon.tooltip-align-left::before {
    left: 0;
    transform: translateX(0);
}
.tooltip-icon.tooltip-align-left::after {
    left: 1rem; 
    transform: translateX(0) rotate(45deg);
}

}

@media (max-width: 700px) {
  main {
    width: 100%;
    max-width: 98vw;
    margin: 0.5rem auto;
    padding: 0 0.2rem;
  }

  .hamburger {
      display: none; /* Esconde o hamburger neste breakpoint específico*/ 
  }

  .title_principal_home, .title_principal_contato, .title_about {
    font-size: 1.25rem;
    margin-top: 0.8rem;
  }

  @media (min-width: 489px) {
  .emoji-grid {
    /* Layout intermediário para ter entre 6 e 8 colunas */
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
  }

  .emoji-item {
    font-size: 2.25rem;
  }
}

.tooltip-icon.tooltip-align-left::before {
    left: 0;
    transform: translateX(0);
}


.tooltip-icon.tooltip-align-left::after {
    left: 1rem; 
    transform: translateX(0) rotate(45deg);
}

  .contato-form {
    max-width: 98vw;
    padding: 1rem;
    border-radius: 8px;
  }

  .main_contato {
    padding: 0 0.2rem;
  }

  .contato-form label,
  .contato-form .input_contato,
  .contato-form .textarea_contato,
  .contato-form button[type="submit"] {
    font-size: 1rem;
  }
}

@media (max-width: 688px) and (min-width:601px){
  /*orbe bandeira*/
  .lang-btn.lang-btn-orbe .lang-flag {
    width: 28px;
    height: 28px;
  }
  header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  .logo-orbe-group {
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .header-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    display: flex;
  }
    
}

@media (max-width: 600px) and (min-width:489px) {
  main {
    max-width: 100vw;
    margin: 0.2rem auto;
    padding: 0 0.8rem;
  }

  header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  .logo {
    font-size: 1.3rem;
  }
 .logo-orbe-group {
    gap: 1rem; /* Menor espaço entre logo e orbe */
  }
  .lang-btn.lang-btn-orbe {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .lang-btn.lang-btn-orbe .lang-flag {
    width: 28px;
    height: 28px;
  }

  .header-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    display: flex; /* Garante que seja visível neste breakpoint */
  }
   
  .title_principal_home {
    font-size: 1.3rem;
    margin-top: 0.8rem;
  }

  .title_principal_contato, .title_about {
    font-size: 1.25rem;
    margin-top: 0.8rem;
  }
  
  .botoes{
    gap: 0.6rem;
  }

  .botoes button {
    min-width: 120px;
    flex: 1;
    max-width: 100%;
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
  }

  .text-stats-grid {
    grid-template-columns: 1fr;
    padding: 0.4rem 0.2rem;
  }

  .emoji-grid {
    /* Layout intermediário para ter entre 6 e 8 colunas */
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
  }
 
  .emoji-item {
    font-size: 2rem;
  }

  .tool-showcase-grid {
        /* Muda a grade de 3 para 2 colunas */
     grid-template-columns: repeat(2, 1fr);
     gap: 1.2rem;
  }

.tool-showcase-grid{
  margin-top: 1rem;
}

  .form-row {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
  }

  .form-row label {
    min-width: 80px;
    margin-bottom: 0;
    text-align: left;
  }

  .main_contato {
    padding: 0 0.8rem;
  }

  .toast {
    font-size: 0.8rem;
    padding: 0.5rem 0.5rem;
    top: 0.8rem;
  }

  .toast-error {
   background-color: #e53935 !important; /* vermelho forte */
   color: #fff !important;
  }

  .footer{
    font-size: 0.8rem;
    padding: 0.4rem;
  }
}

@media (min-width: 329px) and (max-width: 442px) {
  .break-point{
    display: block;
  }
}

 /*H1 do Extrator de Dados e Limpeza de Texto*/
@media (min-width: 320px) and (max-width: 392px) {
    .title_principal_home .quebra-titulo {
        display: block;
    }
}

@media (max-width: 488px) {
  body {
    overflow-x: hidden;
    height: 100vh;
  }

 /* main*/.main_contador {
    padding: 0 0.3rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: calc(100vh - 100px);
    min-height: 0;
  }

   .main_inversor {
    max-width: 100vw;
    margin: 0.2rem auto;
    padding: 0 0.8rem;
    }

   header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0rem;
    text-align: left;
    position: relative;
    width: 100%;
    padding: 0.5rem 0.7rem;
    box-shadow:0 2px 2px rgba(0, 0, 0, 0.15);
  }

  .title_about, .title_principal_contato {
    font-size: 1.3rem;
    margin-top: 1.2rem;
    margin-bottom: 0.7rem;
  }

  .title_principal_home{
    margin-top: 0.7rem;
  }

  .title_principal_contato{
    margin-top: 3rem;
  }

   .paragraph_about, p{
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    line-height: 1.4;
  }

  .title_secundario_about{
    font-size: 1.05rem;
    color: var(--accent-color);
    text-shadow: 0.1rem 0.05rem 0.05rem rgba(0, 0, 0, 0.15);
  }

  .logo {
    margin-left: 0;
    max-width: 3rem;
    max-height: 1.8rem;
    margin: 0;
  }

  .logo img {
    max-width: 100%;
    height: auto;
  }
 .logo-orbe-group {
    gap: 10px; /* Menor espaço entre logo e orbe */
  }
  .lang-btn.lang-btn-orbe {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .lang-btn.lang-btn-orbe .lang-flag {
    width: 22px;
    height: 22px;
  }


   .header-buttons {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: row;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0.8rem 0;
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }

  .header-buttons.open {
    display: flex;
  }

  .header-buttons button, .header_link {
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    min-width: 70px;
  }

  .hamburger {
    display: block;
    margin-right: 0;
    margin-left: auto;
    font-size: 1.4rem;
    padding: 0.2rem 0.4rem;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    z-index: 1100;
  }

   .botoes {
    gap: 0.6rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
  }

  .botoes button {
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    min-width: 90px;
    width: 100%;
  }

  .botoes button, .header-buttons button, .header_link {
    padding: 0.3rem 0.5rem;
  }

  .botoes,
  .text-stats-grid {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
  }

  .text-stats-grid {
    font-size: 1rem;
    margin-top: 1.5rem;
    padding: 0.4rem;
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .inverter-options {
    font-size: 0.9rem;
    margin: 0.4rem 0 .8rem 0;
    padding: 0.4rem;
    gap: 0.3rem;
  }

  .ordenador-options {
    padding: 0.5rem, 0.8rem;
  }

  .ordenador-options legend {
    font-size: 1rem;
  }

  .ordenador-options input{
    font-size: 0.7rem;
  }

  .ordenador-options label {
    font-weight: bold;
    font-size: 1rem;
  }

  fieldset.ordenador-options:not(:has(legend)){
    gap:0.8rem;
  }

   .toast {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
    top: 0.6rem;
    text-align: center;
  }
  
/*ferramenta Localizar e Substituir */

.textarea_home_localizador {
  height: 1.8rem;
  font-size: 1rem;
}

.textarea_label_localizador{
font-size: 1rem; ;
}

.tool-grid-localizador{
  margin-top: 0;
  gap: 0.5rem;
}

.ordenador-options-localizador {
    margin-top: 1rem;
}

/*Extrator de Dados e Limpeza de Texto */
.tool-grid-extrator{
  gap:0.5rem;
}
#extrator-btn-processar{
  font-size: 1.1rem;
}

/*gerador de hashtags*/
.stats-container{
  margin-top: 0;
}

/*gerador de fontes*/
.letras-output-text{
  font-size: 1rem
}

.tool-column-fontes {
  margin-bottom: 1rem;
}

.botoes-fontes{
  margin-top: 0rem;
  margin-bottom: 1.5rem;
}

/*Ferramenta de Emojis */
.emoji-grid {
  display: grid;
  /* Define um tamanho mínimo menor para caber mais colunas no celular (aprox. 7-8 colunas) */
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  /* O restante dos estilos que já tínhamos */
  background-color: var(--white);
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  min-height: 200px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.emoji-item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  /* Tamanho de fonte menor, ideal para toque no celular */
  font-size: 2rem;
  padding: 0.25rem;
  color: var(--accent-color);
  background-color: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  min-width: unset;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}

.emoji-item:hover {
  background-color: var(--emoji-item-bg-hover);
  transform: scale(1.25);
  z-index: 10;
}

.emoji-item:active {
  background-color: var(--emoji-item-bg-active);
  transform: scale(1.1);
  transition-duration: 0.05s;
}

/* ========================================= */
/* AJUSTES RESPONSIVOS PARA O ÍCONE DE AJUDA */
/* ========================================= */


.option-with-tooltip {
    gap: 0.4rem;
}

.tooltip-icon {
    width: 1rem;
    height: 1rem;
    line-height: 1rem;
    font-size: 1rem;
}

.tooltip-icon::before {
    width: 180px; 
    padding: 0.6rem 1rem 0.6rem 1rem;
    font-size: 0.9rem; 
    text-align: justify;
}

.tooltip-icon.tooltip-align-left::before {
    left: 0;
    transform: translateX(0);
}


.tooltip-icon.tooltip-align-left::after {
    left: 1rem; 
    transform: translateX(0) rotate(45deg);
}

/* ================================================= */
/* RESPONSIVIDADE DA GRADE DE FERRAMENTAS (HOME)     */
/* ================================================= */

    .tool-showcase-grid {
        /* A grade se desfaz e vira uma única coluna */
        grid-template-columns: 1fr; 
        gap: 1rem;
        margin-top: 1rem;
    }

    .tool-card {
        /* O layout do card muda para horizontal */
        flex-direction: row; 
        text-align: left;
        padding: 1rem;
    }

    .tool-card {
    flex-direction: row; 
    justify-content: space-between; /* Empurra os itens para os extremos */
    align-items: center;
    text-align: left;
    padding: 1rem;
}

    .tool-icon-container {
        /* Ajusta o tamanho do ícone */
        width: 60px;
        height: 60px;
        margin-right: 1rem;
        margin-bottom: 0;
        flex-shrink: 0; /* Impede que o ícone encolha */
    }

    .tool-icon-container img {
        width: 30px;
        height: 30px;
    }

    .tool-card-title {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .tool-card-description {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .tool-card-description-inverte{
      text-align: right;

    }
}


  .contato-form label {
    font-size: 1rem;
  }

  .contato-form {
    gap: 0.1rem;
    padding: 1rem 1rem;
  }

  .contato-form button[type="submit"] {
    font-size: 1rem;
    margin-top: 0.1rem;
  }

  .contato-form .input_contato,
  .contato-form .textarea_contato {
    font-size: 1rem;
  }

  footer p{
  text-align: center;
  background-color: var(--white);
  padding:0.6rem ;
  font-size: 0.8rem;
  box-shadow: 0 -3px 3px rgba(0, 0, 0, 0.2);
  text-shadow: 0.05rem 0.05rem 0.05rem rgba(0, 0, 0, 0.3);
  color: var(--text-color);
  margin-bottom: 0;  
  }

  .tool-grid {
    display: grid;
    grid-template-columns: 2fr; /* <-- Define 2 colunas lado a lado */
    gap: 1.5rem;
    align-items: flex-start;
  }

  .textarea_contador{
    font-size: 1rem;
  }

    /* .textarea_home*/ .textarea_home_contador{
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 100%;
    height: 100%;
    width: 100%;
    margin-bottom: 0.5rem;
    resize: none;
    box-sizing: border-box;
    overflow-y: auto;
  }

  /*.textarea_home*/ .textarea-output, .textarea-input{
    font-size: 1rem;
    /*margin-bottom: 0.5rem;*/
    resize: none;
    box-sizing: border-box;
    min-height: 200px; /* <-- Novo valor, mais compacto */
    height: auto;
  }

  /* para conteudo educativo*/
@media (max-width: 445px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 375px) {
    .content-section {
        padding: 0 0.25rem;
    }
    
    .guide-content,
    .tips-grid,
    .faq-container,
    .examples-grid {
        padding: 1rem 0.75rem;
    }
    
    .use-cases-grid {
        gap: 0.75rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 320px) {
    .use-case-card,
    .tip-card,
    .example-card {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}
@media print {
    /* Reset geral para impressão */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ocultar elementos de navegação e interface */
    header, 
    footer, 
    nav, 
    .hamburger, 
    .theme-toggle, 
    .lang-btn, 
    .lang-btn-orbe,
    .logo-orbe-group .lang-btn,
    .no-print {
        display: none !important;
    }
    
    /* Configurações do body */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    /* Títulos otimizados para impressão */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .title_principal_home {
        font-size: 18pt !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    /* Grid de ferramentas na homepage */
    .tool-showcase-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin: 1rem 0 !important;
    }
    
    .tool-card {
        border: 1px solid black !important;
        padding: 10px !important;
        margin: 0 !important;
        page-break-inside: avoid !important;
        text-decoration: none !important;
    }
    
    .tool-card-title {
        font-size: 11pt !important;
        font-weight: bold !important;
        margin-bottom: 5px !important;
    }
    
    .tool-card-description {
        font-size: 9pt !important;
    }
    
    /* Ícones das ferramentas */
    .tool-icon-container {
        display: none !important;
    }
    
    /* Seções de conteúdo educacional */
    .content-section {
        margin: 1rem 0 !important;
        page-break-inside: avoid !important;
    }
    
    .section-title {
        font-size: 14pt !important;
        font-weight: bold !important;
        border-bottom: 1px solid black !important;
        padding-bottom: 3px !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Cards de casos de uso */
    .use-cases-grid,
    .tips-grid,
    .examples-grid {
        display: block !important;
    }
    
    .use-case-card,
    .tip-card,
    .example-card {
        border: 1px solid black !important;
        padding: 8px !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid !important;
    }
    
    .use-case-card h4,
    .tip-card h3,
    .example-card h3 {
        font-size: 11pt !important;
        margin-bottom: 5px !important;
    }
    
    .use-case-card ul {
        margin-left: 15px !important;
    }
    
    .use-case-card li {
        font-size: 9pt !important;
        margin-bottom: 2px !important;
    }
    
    /* FAQ Section */
    .faq-container {
        display: block !important;
    }
    
    .faq-item {
        border: 1px solid black !important;
        margin-bottom: 8px !important;
        padding: 8px !important;
        page-break-inside: avoid !important;
    }
    
    .faq-item summary {
        font-weight: bold !important;
        font-size: 10pt !important;
        cursor: default !important;
    }
    
    .faq-item p {
        font-size: 9pt !important;
        margin-top: 5px !important;
    }
    
    /* Área de ferramentas específicas */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Textareas e inputs nas ferramentas */
    textarea,
    input[type="text"] {
        border: 1px solid black !important;
        background: white !important;
        color: black !important;
        font-size: 10pt !important;
        padding: 5px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Botões - simplificados para impressão */
    button,
    .btn {
        border: 1px solid black !important;
        background: white !important;
        color: black !important;
        padding: 3px 8px !important;
        font-size: 9pt !important;
        margin: 2px !important;
    }
    
    /* Área de resultados */
    .resultado,
    .output-area,
    #resultado {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
        padding: 10px !important;
        margin: 10px 0 !important;
        font-size: 10pt !important;
    }
    
    /* Estatísticas e contadores */
    .stats,
    .counter-display {
        border: 1px solid black !important;
        padding: 5px !important;
        margin: 5px 0 !important;
        font-size: 9pt !important;
    }
    
    /* Links - mostrar URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 8pt !important;
        color: black !important;
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
    
    /* Quebras de página estratégicas */
    .content-section {
        page-break-before: auto !important;
    }
    
    /* Ocultar elementos decorativos */
    .toast,
    .loading,
    .overlay,
    .modal {
        display: none !important;
    }
    
    /* Emojis e símbolos - manter visíveis mas pequenos */
    .emoji-item,
    .symbol-item {
        display: inline !important;
        font-size: 8pt !important;
        margin: 1px !important;
        padding: 1px !important;
        border: none !important;
    }
    
    /* Grid de emojis para impressão */
    .emoji-grid,
    .symbol-grid {
        line-height: 1.2 !important;
    }
    
    /* Eficiência no espaço */
    p {
        margin-bottom: 0.3rem !important;
        font-size: 10pt !important;
        line-height: 1.3 !important;
    }
    
    /* Footer customizado para impressão */
    footer {
        display: block !important;
        text-align: center !important;
        font-size: 8pt !important;
        margin-top: 2rem !important;
        border-top: 1px solid black !important;
        padding-top: 10px !important;
    }
}