/* Variáveis para uma gestão de design mais fácil */
:root {
  --cor-primaria: #4A6FA5;
  --cor-secundaria: #6D9872;
  --cor-acento: #FF9B54;
  --cor-fundo: #F8F5F0;
  --cor-texto: #2D3E4F;
  --cor-suave: #E8E2D9;
  --cor-sucesso: #5CB85C;
  --cor-aviso: #F0AD4E;
  --cor-erro: #D9534F;
  --cor-link: #495057;
  --sombra-leve: 0 2px 4px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 15px;
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  color: var(--cor-texto);
  font-weight: 600;
}

h1 {
  font-size: 2em;
  text-align: center;
  margin: 0 0 15px 0;
}

h2 {
  font-size: 1.6em;
  margin: 0 0 12px 0;
}

p {
  color: var(--cor-texto);
  font-size: 1em;
  margin: 0 0 12px 0;
}

a {
  color: var(--cor-link);
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

button {
  background: linear-gradient(145deg, var(--cor-primaria), #3A5A80);
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(74, 111, 165, 0.25);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1em;
  margin: 10px 0;
}

button:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 111, 165, 0.3);
}

button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

#btn-iniciar-questionario {
  background: var(--cor-secundaria);
  color: white;
  padding: 16px 32px;
  border-radius: 40px;
  font-size: 1.1em;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(109, 152, 114, 0.35);
  margin-top: 25px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

#btn-iniciar-questionario:hover:enabled {
  background: var(--cor-secundaria);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(109, 152, 114, 0.45);
  filter: brightness(1.08);
}

#btn-iniciar-questionario:active:enabled {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 3px 8px rgba(109, 152, 114, 0.3);
}


#btn-iniciar-questionario:disabled {
  background: linear-gradient(145deg, #b0b0b0, #909090);
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: not-allowed;
  color: #f0f0f0;
}

#btn-iniciar-questionario::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

#btn-iniciar-questionario:hover:enabled::after {
  left: 100%;
}

/* FORMULÁRIOS E INPUTS */
input[type="text"], 
input[type="email"], 
input[type="tel"] {
  border: 1px solid #e1e5eb;
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  transition: all 0.2s ease;
  margin: 8px 0;
  background-color: white;
  width: 100%;
}

a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--cor-acento);
  outline-offset: 2px;
}

input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #b0b0b0;
  border-radius: 50%;
  margin-right: 5px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
}

input[type="radio"]:checked {
  border-color: var(--cor-primaria);
}

input[type="radio"]:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--cor-primaria);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Garante o contorno de foco para os labels de radio buttons */
input[type="radio"]:focus + label {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 2px;
}

/* SEÇÕES DO QUESTIONÁRIO - CORRIGIDO (ESPAÇAMENTO REDUZIDO) */
.block-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 15px; /* REDUZIDO de 30px */
  margin-bottom: 15px; /* REDUZIDO de 30px */
  scroll-margin-top: 15px; /* ADICIONADO para rolagem */
  position: relative;
}

/* Seu código para o container do bloco */
.block-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 15px;
  margin-bottom: 15px;
  scroll-margin-top: 15px;
  position: relative;
}

/* NOVO CÓDIGO - Adicione este bloco ABAIXO do código acima */
.block-section h3 {
  background-color: var(--cor-suave); /* Cor de fundo suave para o destaque */
  color: var(--cor-texto); /* Garante que a cor do texto seja legível */
  padding: 12px 15px; /* Espaçamento interno para o título */
  margin: 0; /* Remove a margem padrão para um visual mais limpo */
  border-radius: 8px 8px 0 0; /* Arredonda apenas os cantos superiores para se integrar ao bloco */
  font-weight: 700; /* Deixa o texto do título em negrito */
  font-size: 1.15em; /* Ajuste de tamanho para melhor proporção */
  box-shadow: var(--sombra-leve); /* Adiciona uma sombra sutil para profundidade */
}

.block-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.block-section.nao-respondido {
  animation: pulse 2s infinite;
  border: 2px solid var(--cor-erro);
  background-color: rgba(220, 53, 69, 0.05);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.statement-group {
  margin-bottom: 12px; /* REDUZIDO de 20px */
  padding: 12px; /* REDUZIDO de 22px 20px */
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* SOMBRA MAIS SUAVE */
}

label.stmt {
  display: block;
  margin-bottom: 8px; /* REDUZIDO de 15px */
  font-weight: 600;
  color: var(--cor-texto);
  line-height: 1.4;
  font-size: 1em;
  padding: 0 5px;
}

.options-row {
  display: flex;
  gap: 6px; /* REDUZIDO de 12px */
  margin-top: 8px; /* REDUZIDO de 15px */
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 5px; /* REDUZIDO de 10px 5px */
}

label[for^="block-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border-radius: 50%;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8em;
  border: 2px solid transparent;
  color: var(--cor-texto);
}

label[for^="block-"]:hover {
  background-color: var(--cor-suave);
  color: var(--cor-texto);
  transform: scale(1.05);
}

input[type="radio"]:checked + label[for^="block-"] {
  background-color: var(--cor-primaria);
  color: white;
  border: 2px solid var(--cor-primaria);
}

/* SEÇÃO DE APRESENTAÇÃO */
#apresentacao {
  text-align: center;
  padding: 20px; /* REDUZIDO de 40px 20px */
  background: linear-gradient(135deg, #f8f5f0 0%, #ffffff 100%);
  border-radius: 12px;
  margin-bottom: 20px; /* REDUZIDO de 30px */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* SOMBRA MAIS SUAVE */
}

/* RESULTADOS */
#resultados-conteudo {
  margin-top: 25px; /* REDUZIDO de 30px */
}

.block-result {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-left: 4px solid var(--cor-primaria);
  padding: 15px; /* REDUZIDO de 20px */
  margin-bottom: 15px; /* REDUZIDO de 25px */
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.block-result:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.block-result h4 {
  margin: 0 0 8px 0; /* REDUZIDO de 10px */
  color: #444;
}

/* BARRAS DE PROGRESSO */
.progress-bar-container {
  height: 10px;
  border-radius: 8px;
  background-color: var(--cor-suave);
  overflow: hidden;
  margin: 8px 0; /* REDUZIDO de 10px */
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.score-1-10 { background-color: var(--cor-sucesso); }
.score-11-15 { background-color: var(--cor-aviso); }
.score-16-20 { background-color: var(--cor-erro); }

/* ESTADOS DE VALIDAÇÃO */
.nao-respondido {
  border: 2px solid var(--cor-erro);
  background-color: #fff8f8;
  box-shadow: 0 0 5px rgba(217, 83, 79, 0.2);
}

.campo-invalido {
  border-color: var(--cor-erro);
  box-shadow: 0 0 5px rgba(217, 83, 79, 0.5);
}

.campo-valido {
  border-color: var(--cor-sucesso);
  box-shadow: 0 0 5px rgba(92, 184, 92, 0.5);
}

/* AVISOS E MENSAGENS */
.aviso-preenchimento {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cor-erro);
  font-weight: 600;
  margin-top: 10px; /* REDUZIDO de 15px */
  font-size: 0.9em;
}

.aviso-preenchimento::before {
  content: '⚠️';
  font-size: 1.2em;
}

.aviso-importante {
  font-weight: bold;
  font-size: 1em;
  color: var(--cor-primaria);
  text-align: center;
  margin-top: 12px; /* REDUZIDO de 20px */
  margin-bottom: 12px; /* REDUZIDO de 20px */
}

/* ESCALA GUIA */
.escala-guia {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0; /* REDUZIDO de 20px */
  padding: 8px 12px; /* REDUZIDO de 10px 20px */
  background-color: var(--cor-suave);
  border: 1px solid #e0e6ed;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  font-weight: 500;
  color: var(--cor-texto);
  font-size:0.9em;
}

.escala-guia span {
  flex-grow: 1;
  text-align: center;
  line-height: 1.2;
  padding: 0 3px;
}

.repetida-entre-blocos {
  background-color: var(--cor-primaria);
  color: white;
  font-weight: 600;
  margin-top: 12px; /* REDUZIDO de 15px */
  margin-bottom: 12px; /* REDUZIDO de 15px */
}

/* ELEMENTOS DIVERSOS */
iframe {
  display: block;
  margin: 15px auto; /* REDUZIDO de 20px */
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--sombra-leve);
}

html {
  scroll-behavior: smooth;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  body {
    padding: 10px;
    font-size: 1.1em; /* Adicionado para aumentar o texto geral no mobile */
  }

  /* ADICIONE O CÓDIGO ABAIXO AQUI */
  input[type="text"],
  input[type="email"],
  input[type="tel"] {
    font-size: 1.1em; /* Aumenta a fonte dos campos de entrada */
    font-weight: bold; /* Aplica negrito ao texto */
  }

  .statement-group .stmt {
    font-size: 1.1em; /* ADICIONADO para aumentar o texto das perguntas no mobile */
  }

  h1 {
    font-size: 1.6em;
  }

  h2 {
    font-size: 1.4em;
  }

  .statement-group {
    padding: 12px 10px; /* REDUZIDO de 18px 15px */
    margin-bottom: 12px; /* REDUZIDO de 15px */
  }
  
  label.stmt {
    padding: 0 3px;
    margin-bottom: 10px; /* REDUZIDO de 12px */
    font-size: 1em;
  }
  
  .options-row {
    padding: 6px 3px; /* REDUZIDO de 8px 3px */
    gap: 8px;
    margin-top: 10px; /* REDUZIDO de 12px */
  }

  #btn-iniciar-questionario {
    padding: 14px 25px; /* REDUZIDO de 16px 30px */
    font-size: 1.1em;
    width: 100%;
    max-width: 280px;
    margin-top: 20px; /* REDUZIDO de 25px */
  }

  .block-section {
    padding: 12px; /* REDUZIDO de 25px 20px */
    margin-bottom: 18px; /* REDUZIDO de 25px */
    scroll-margin-top: 15px; /* REDUZIDO de 20px */
  }


  label[for^="block-"] {
    width: 24px;
    height: 24px;
    font-size: 0.8em;
  }

  .escala-guia {
    background-color: var(--cor-secundaria); /* Adiciona um fundo para destaque */
    color: white;
    border-radius: 12px; /* Adiciona cantos arredondados para harmonizar */
    flex-direction: row; /* CORRIGIDO: Agora os itens ficarão lado a lado */
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    padding: 7px 3px;
    font-size: 0.9em; /* Ajuste para ter uma proporção melhor com o restante do texto */
  }
  
  .escala-guia.repetida-entre-blocos {
    background-color: var(--cor-secundaria); /* Adiciona um fundo para destaque */
    color: white;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    padding: 7px 3px;
  }
  
  .escala-guia span {
  font-size: 1em; /* Aumentado para maior visibilidade */
  font-weight: bold; /* Deixa o texto da escala em negrito */
  margin: 2px 3px;
  flex-basis: auto;
  white-space: nowrap;
  }
  
  .escala-guia span:last-child {
    border-bottom: none;
  }

  /* Estilo para a barra de aviso de instrução */
  .aviso-importante {
  background-color: var(--cor-suave);
  color: var(--cor-secundaria);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px; /* Adiciona espaçamento entre o aviso e a próxima seção */
  font-weight: bold; /* Adiciona negrito */
  font-size: 1.1em; /* Aumenta a fonte */

  }
  
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
  }
}

/* REMOVER ESTILOS CONFLITANTES */
.escala-fixa-guia, 
.scale-explanation {
  display: none !important;
}

/* Estilos para a barra que se repete entre os blocos */
.repetida-entre-blocos {
  margin-top: 12px; /* REDUZIDO de 15px */
  margin-bottom: 12px; /* REDUZIDO de 15px */
  padding: 8px 15px; /* REDUZIDO de 10px 20px */
}