.tools-section {
  margin-top: 3rem;
}

.tools-header {
  max-width: 700px; 
  text-align: center; 
  margin: 0 auto 4rem auto; 
}

.tools-header h2 {
  font-family: "DM Sans", Sans-serif;
  color: #474752;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 0.5rem; 
  position: relative; 
  padding-bottom: 0.5rem; 
}

.tools-header h2::after {
  content: "";
  display: block;
  width: 80px; 
  height: 4px;
  background: var(--color);
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
}

.tools-header p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
}

.search-component {
  max-width: 800px;
  margin: 2rem auto;
  position: relative;
}

.search-input-group {
  display: flex;
  gap: 15px;
  align-items: center; 
}

#aula-input {
  flex-grow: 1;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  border: 2px solid #ddd; 
  border-radius: 50px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  box-shadow: none; 
}

#aula-input:focus {
  border-color: var(--color);
}

.search-btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    background: transparent;
    color: var(--color);
    border: 2px solid var(--color); 
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    box-shadow: none; 
}

.search-btn:hover {
    background: var(--color);
    color: #fff;
    box-shadow: 0 5px 15px var(--color2); 
}

.autocomplete-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid #eee; 
  border-top: none;
  border-bottom: none;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
  transition: background-color 0.2s;
}

.autocomplete-item:hover {
  background-color: #f0f0f0;
}

.results-card {
  min-width: 300px;
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

.results-card h3 {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color); 
  padding-bottom: 0.5rem;
}

.hidden {
  display: none !important;
}

.error-card {
  background: #fde8e8;
  border: 1px solid #f9bdbd;
  box-shadow: none;
  color: #cc0000;
}

.mapa {
  max-width: 1200px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  color: #444;
  font-family: "DM Sans", sans-serif;
  line-height: 1.7;
}

@media (max-width: 992px) {
  .search-component {
    max-width: 90%; 
    margin: 2rem auto;
  }

  .search-btn {
    padding: 0.75rem 0.3rem !important;
  }

  .search-input-group {
    gap: 15px;
    justify-content: space-between; 
    align-items: center;
  }
  
  #aula-input {
      flex-grow: 1; 
  }
  
  .search-btn {
    text-align: center;
    padding: 0.75rem 1.4rem; 
  }

  .results-card {
    max-width: 90%;
  }
  
  .autocomplete-results {
    top: calc(100% + 5px); 
  }
}

@media (max-width: 600px) {

  .tools-header h2 {
    font-size: 2rem;
    text-align: center;
  }

  .tools-header p {
    font-size: 1rem;
    text-align: center;
  }
  
  .search-component {
    max-width: 100%;
    padding: 0 1rem;
    margin: 1.5rem auto;
  }

  .search-input-group {
    justify-content: space-between;
    gap: 10px; 
  }

  #aula-input {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    flex-grow: 1; 
  }
  
  .search-btn {
    padding: 0.7rem;
    font-size: 0.9rem;
    min-width: 80px; 
  }

  .results-card {
    max-width: 100%;
    padding: 1.5rem;
    margin: 1.5rem auto;
  }

  .results-card h3 {
    font-size: 1.2rem;
  }
  
  .result-detail p {
    font-size: 0.95rem;
  }

  .autocomplete-results {
    top: calc(100% + 5px); 
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
  section {
    margin: 0 2rem !important;
  }
}