:root {
  --bg-paper: #fafaf7;
  --bg-card: #ffffff;
  --text-main: #2c302e;
  --text-muted: #6b726c;
  --accent-green: #3b5a40;
  --border-light: #e4e3db;
  --hero-bg: #35505e;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-paper);
  color: var(--text-main);
  line-height: 1.6;
}

/* --- Header --- */
header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--accent-green);
  font-weight: 600;
}
.logo span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* --- Seção Destaque (Hero Banner) --- */
.hero-banner {
  display: flex;
  width: 100%;
  height: 450px;
  background-color: var(--hero-bg);
  color: white;
  flex-direction: row;
}

.hero-content {
  flex: 0 0 35%;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h2 {
  font-family: "Inter", sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}
.hero-content p {
  color: #d1d9dd;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.btn-ver-passeio {
  display: inline-block;
  background-color: #27ae60;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  width: max-content;
  transition: 0.2s;
}
.btn-ver-passeio:hover {
  background-color: #219653;
}

/* Carrossel de Imagens */
.hero-carousel {
  flex: 1;
  position: relative;
  background: #111;
}
.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease-in-out;
}
.carousel-metadata {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(15, 15, 15, 0.9);
  padding: 8px 20px;
  box-sizing: border-box;
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #ccc;
  align-items: center;
}
.meta-nome-popular {
  color: white;
  font-weight: 600;
}
.meta-nome-cientifico {
  font-style: italic;
  color: #aaa;
  margin-right: 15px;
}

/* --- Corpo Principal --- */
main {
  padding: 3rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Área de Busca Central */
.search-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  text-align: center;
}
.search-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  margin: 0 0 1rem 0;
  color: var(--accent-green);
}
.search-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.autocomplete-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  text-align: left;
}
.main-search-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.1rem;
  font-family: "Inter", sans-serif;
  border: 2px solid var(--border-light);
  border-radius: 30px;
  box-sizing: border-box;
  transition: 0.3s;
  background: var(--bg-card);
}
.main-search-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Caixa de sugestões da busca pública */
#caixaSugestoesPublica {
  display: none;
  position: absolute;
  top: 100%;
  left: 5%;
  right: 5%;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  z-index: 10;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
}
.sugestao-item {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sugestao-item:hover {
  background: #f9f9f9;
}
.sugestao-item:last-child {
  border-bottom: none;
}
.sug-pop {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
}
.sug-cien {
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--accent-green);
  font-size: 0.9rem;
}

/* Grids Genéricos */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  margin-top: 4rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin: 0;
  color: var(--text-main);
}
.btn-view-all {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
}
.btn-view-all:hover {
  text-decoration: underline;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #d1d0c7;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}
.image-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-paper);
  margin-bottom: 1rem;
  position: relative;
  border-radius: 4px;
}
.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.card:hover .image-wrapper img {
  transform: scale(1.03);
}

.meta-group h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.meta-group .sci-name {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-green);
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--border-light);
}
.meta-group .details {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trip-card .trip-location {
  font-size: 0.9rem;
  color: var(--accent-green);
  margin-bottom: 5px;
  display: block;
}
.trip-card .details {
  border-top: 1px dotted var(--border-light);
  padding-top: 8px;
  margin-top: 8px;
}

/* Efeito de Carrossel ao passar o mouse (Hover) nas Espécies */
.image-wrapper.carousel-hover {
  position: relative;
  overflow: hidden;
}
.carousel-hover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
.carousel-hover img.active {
  opacity: 1;
}

@media (max-width: 900px) {
  .hero-banner {
    flex-direction: column;
    height: auto;
  }
  .hero-content {
    padding: 2rem;
  }
  .hero-carousel {
    height: 350px;
  }
}
