:root {
  --primary: #22A1A3;
  --secondary: #2143A3;
  --accent: #7D31B0;
  --highlight: #C94DA4;
  --bg: #FFFFFF;
  --text: #222;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  font-size: 1.25rem; /* Aumento proporcional (150%) */
}

/* Header */
header {
  background: var(--secondary);
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

#start,
#end {
  width: 100%;
  max-width: 600px;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  border: 2px solid #22A1A3;
  border-radius: 12px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  margin-bottom: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.25rem;
}

/* Hero */
.hero {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  text-align: center;
  padding: 5rem 2.5rem;
  font-size: 1.4rem;
}
/* Autocomplete suggestions */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(34, 161, 163, 0.15);
  max-height: 260px;
  overflow-y: auto;
  z-index: 12000;
  margin-top: 6px;
  padding: 0;
  border: 2px solid var(--primary);
  overflow: hidden;
}

.autocomplete-list li {
  list-style: none;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--secondary);
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
  border-bottom: 1px solid #e0e0e0;
  user-select: none;
}

.autocomplete-list li:last-child {
  border-bottom: none;
}

.autocomplete-list li:hover,
.autocomplete-list li:focus {
  background-color: var(--primary);
  color: var(--bg);
  outline: none;
}

.autocomplete-list li:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.autocomplete-list li:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}


/* Onda sonora horizontal */
.sound-wave {
  width: 100%;
  height: 24px;
  margin-top: 1.5rem;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--highlight));
  background-size: 200% auto;
  animation: waveMove 2s linear infinite;
  border-radius: 12px;
  filter: brightness(1.2);
}

@keyframes waveMove {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Seções */
section {
  padding: 4rem 2.5rem;
}

h2 {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
}

/* Botões */
button {
  background: var(--highlight);
  color: white;
  padding: 1rem 1.6rem;
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover,
button:focus {
  background: var(--accent);
  outline: none;
}

section hr {
  margin: 0.5rem 0;
}

section p {
  margin: 0.25rem 0;
}

/* Seção de transcrição ajustada para ficar igual às outras funcionalidades */
#transcricao {
  padding: 0;              /* Sem espaçamento extra */
  background: var(--bg);   /* Fundo branco igual às outras seções */
  box-shadow: none;        /* Remove sombra */
  margin-top: 1.5rem;
}

#transcricao h2 {
  font-size: 2rem;         /* Igual aos outros títulos */
  color: var(--secondary);
  margin-bottom: 1rem;
  text-align: left;
}

#transcricao-texto {
  min-height: auto;        /* Ajusta altura automática */
  padding: 0;              /* Sem fundo interno */
  border: none;            /* Sem borda */
  font-size: 1.25rem;      /* Igual às fontes principais */
  line-height: 1.4;
  color: var(--text);
  text-align: left;
  background: none;        /* Remove fundo cinza */
}

/* Ajuste do título da transcrição em celulares */
@media (max-width: 500px) {
  #transcricao h2 {
    font-size: 1.7rem;  /* reduz do 2rem para algo menor */
  }

  #transcricao-texto {
    font-size: 1.3rem;    /* também reduz o texto da transcrição se necessário */
  }
}



#btn-transcricao {
  display: inline-block;   /* Igual aos outros botões */
  margin: 0;               /* Remove centralização forçada */
  padding: 1rem 1.6rem;    /* Igual aos outros botões */
  font-size: 1.25rem;
  border-radius: 12px;     /* Igual aos outros botões */
  background: var(--highlight);
  color: white;
  cursor: pointer;
}

#btn-transcricao:hover,
#btn-transcricao:focus {
  background: var(--accent);
  outline: none;
}

/* Caixa de transcrição das falas ao redor da pessoa */
#transcricao-voz {
  padding: 1rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: #f9f9f9;       /* Caixa destacada */
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 1rem;
  color: var(--text);
}


/* Linha separadora entre transcrição e mapa */
.transcricao-separador {
  width: 100%;
  height: 0.2px;
  background: #0000007e; /* cor preta */
  margin: 2rem 0;
  border-radius: 1px;
}



/* Mapa */
#mapa {
  height: 450px;
  margin-top: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
}

/* Cartões de feedback */
.feedback-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  flex: 1 1 280px;
  padding: 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 15px;
  background: #f9f9f9;
  box-sizing: border-box;
  font-size: 1.1rem;
}

/* Formulários */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

/* Rodapé */
footer {
  background: var(--secondary);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  font-size: 1.2rem;
}

/* Onda sonora animada central */
.wave-center {
  width: 100%;
  height: 60px;
  margin-top: 1.5rem;
}

.wave-container {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 100px;
  justify-content: center;
}

.bar {
  width: 16px;
  height: 60px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--highlight));
  border-radius: 8px;
  animation: waveAnim 1.3s infinite ease-in-out;
}

.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes waveAnim {
  0%, 100% { height: 60px; }
  50% { height: 120px; }
}

/* remove espaço extra entre Como Funciona e Detector de Som */
#como-funciona {
  padding-bottom: 0rem; /* reduz o fundo só dessa seção */
}

#detector-som {
  #detector-som {
  margin-top: -0.5em; /* zera a margem de cima só nessa seção */
}
}


/* Nome do som detectado */
#nomeSomDetectado {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  margin-top: 1.5rem;
  background-color: #f3e6f6;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  user-select: none;
}

/* Lista de feedbacks */
#lista-feedbacks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  font-size: 1.4rem;
}

#lista-feedbacks li {
  margin-bottom: 0.8rem;
  background: #f2f2f2;
  padding: 0.8rem;
  border-radius: 8px;
}

/* Sliders */
.slider-container {
  position: relative;
  margin-bottom: 2rem;
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 10px;
  user-select: none;
}

.slider-labels span {
  flex: 1;
  text-align: center;
}

.slider-feedback {
  font-size: 1.4rem;
  color: #2143A3;
  margin-top: 6px;
  text-align: center;
}

input[type=range] {
  width: 100%;
  cursor: pointer;
  -webkit-appearance: none;
  background: var(--bg);
  appearance: none;
  border-radius: 10px;
  height: 10px;
  margin: 0;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
}

input[type=range]::-moz-range-track {
  height: 10px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
}

input[type=range]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  background: var(--highlight);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
  border: none;
  margin-top: -7px;
  -webkit-appearance: none;
}

input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--highlight);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
  border: none;
}

input[type=range]::-webkit-slider-thumb:hover,
input[type=range]::-moz-range-thumb:hover {
  background-color: var(--secondary);
}

/* Seção sonora com ícone */
.sonora-section {
  padding: 60px 30px;
  background-color: var(--bg);
  text-align: left;
  font-family: 'Segoe UI', sans-serif;
}

.sonora-title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.sonora-title h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin: 0;
}

.sonora-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sonora-button {
  background-color: var(--highlight);
  color: white;
  font-size: 1.25rem;
  padding: 14px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sonora-button:hover,
.sonora-button:focus {
  background-color: var(--primary);
  outline: none;
}



/* Responsividade */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0;
  }

  nav a {
    padding: 0.6rem 0;
    width: 100%;
    display: block;
  }

  .hero,
  section {
    padding: 2.5rem 1.5rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  button {
    font-size: 1.1rem;
    padding: 0.8rem 1.2rem;
  }

  #mapa {
    height: 350px;
  }

  .feedback-cards {
    flex-direction: column;
  }

  .card {
    flex: 1 1 100%;
  }

  .wave-container {
    gap: 10px;
  }

  #nomeSomDetectado {
    font-size: 1.6rem;
    padding: 0.8rem;
  }

  .slider-labels span {
    font-size: 1rem;
  }

  /* Desktop e tablets */
.sonora-title, .interprete-title {
  display: flex;
  align-items: center;
  gap: 14px; /* espaço entre foto e título */
}

/* Celulares muito pequenos */
@media (max-width: 400px) {
  .sonora-title {
    flex-direction: row;       /* ícone ao lado do título */
    align-items: center;       /* centraliza verticalmente */
    gap: 10px;                 /* mantém o espaçamento */
  }
}

@media (max-width: 768px) {
  section {
    padding: 2.5rem 1.5rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  button, .interprete-button, .sonora-button {
    font-size: 1.1rem;
    padding: 12px 20px;
  }
}


  .sonora-title h2 {
    font-size: 1.5rem;
  }

  .sonora-button {
    font-size: 1.1rem;
    padding: 12px 20px;
  }

  footer {
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  header, section, .hero {
    padding: 1.5rem;
  }

  nav ul {
    font-size: 1rem;
  }

  .bar {
    width: 10px;
  }

  .sonora-button {
    width: 100%;
    text-align: center;
  }
}

/* Menu responsivo toggle */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  nav {
    width: 100%;
  }

  nav ul {
    display: none;
    background-color: var(--secondary);
    width: 100%;
    flex-direction: column;
    padding: 1rem;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0;
  }

  nav ul.open {
    display: flex;
    margin-bottom: 1rem;
  }
}

.interprete-section {
  padding: 60px 30px;
  background-color: var(--bg); /* Fundo branco igual às outras seções */
  text-align: left;
  font-family: 'Segoe UI', sans-serif;
}

.interprete-title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.interprete-title h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin: 0;
}

.interprete-description {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  max-width: 800px;
}

.interprete-button {
  background-color: var(--highlight);
  color: white;
  font-size: 1.25rem;
  padding: 14px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.interprete-button:hover,
.interprete-button:focus {
  background-color: var(--accent); /* Fica roxo quando passa o mouse */
  outline: none;
}

@media (max-width: 768px) {
  .interprete-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .interprete-title h2 {
    font-size: 1.5rem;
  }

  .interprete-button {
    font-size: 1.1rem;
    padding: 12px 20px;
    width: 100%;
    text-align: center;
  }
}


@media (max-width: 400px) {
  header, section, .hero {
    padding: 1.5rem;
  }

  nav ul {
    font-size: 1rem;
  }

  .bar {
    width: 10px;
  }

  .interprete-button {
    width: 100%;              /* Botão ocupa 100% da largura */
    text-align: left;       /* Texto centralizado */
  }
}


/* Ajuste para títulos e campos de endereço no mapa */
#mapa-interativo h2 {
  margin-bottom: 1.5rem; /* espaço entre título e campo origem */
}

#start {
  margin-bottom: 0.6rem; /* espaço consistente abaixo do campo origem */
}

#end {
  margin-bottom: 1.2rem; /* dá mais respiro antes do botão ou mapa */
}

/* Botões mais proporcionais ao restante */
button, 
#btn-transcricao, 
.sonora-button, 
.interprete-button {
  margin-top: 1rem;   /* distância mínima de cima */
  margin-bottom: 1rem; /* distância embaixo */
}

/* Parágrafos das seções com espaço consistente */
section p {
  margin-bottom: 1rem;
}
