:root {
  --vermelho: #aa151b;
  --amarelo: #f1bf00;
  --fundo-creme: #fff9f0;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--fundo-creme);
  color: #333;
  overflow-x: hidden;
}

#capa-hero {
  position: relative;
  height: 100vh;
  background: linear-gradient(180deg, #d66161 0%, #f2bb66 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 20px;
}

.btn-voltar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--vermelho);
  color: white;
  padding: 14px 22px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 9999;
  opacity: 1;
}

.btn-voltar:hover {
  background: var(--amarelo);
  transform: translateY(-3px) scale(1.05);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#capa-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(50px, 10vw, 80px);
  font-weight: 700;
}

#capa-hero p {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 300;
  margin-top: 10px;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  background-color: var(--vermelho);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 60px;
  width: 100%;
}

nav button {
  flex: 1;
  min-width: 0;
  border: none;
  background-color: var(--vermelho);
  color: white;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  padding: 15px 5px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
}

nav button.active {
  background-color: var(--amarelo);
  color: black;
}

section {
  padding: 40px 5%;
  display: none;
  max-width: 1200px;
  margin: auto;
}

section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

h2 {
  font-family: "Playfair Display", serif;
  color: var(--vermelho);
  font-size: 32px;
  margin: 30px 0 20px 0;
}

.card-texto {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 0px solid transparent;
}

.card-texto:hover,
.card-texto:active {
  border-left: 10px solid var(--amarelo);
  transform: translateX(10px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.grid-cidades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.card-cidade {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: 0.3s;
}

.card-cidade:hover {
  transform: translateY(-5px);
}

.card-cidade .img-box {
  width: 100%;
  height: 220px;
  background-color: #eee;
}

.card-cidade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cidade .info-bar {
  padding: 20px;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
}

.mapa-container {
  width: 100%;
  height: 450px;
  border-radius: 20px;
  overflow: hidden;
  border: 8px solid white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: 25px;
  overflow: hidden;
  position: relative;
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.modal-info {
  padding: 30px;
  text-align: center;
}

.modal-info h3 {
  font-size: 26px;
  color: var(--vermelho);
  margin-bottom: 10px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 35px;
  color: white;
  cursor: pointer;
  text-shadow: 0 0 10px #000;
  z-index: 10;
}

footer {
  background: var(--vermelho);
  color: white;
  text-align: center;
  padding: 50px 20px;
  margin-top: 50px;
  font-size: small;
}

.footer-btns {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.footer-btns button {
  background: var(--amarelo);
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav {
    min-height: 45px;
  }

  nav button {
    font-size: 10px;
    padding: 8px 2px;
    min-height: 45px;
    line-height: 1.1;
  }

  section {
    padding: 30px 4%;
  }

  h2 {
    font-size: 28px;
  }

  .grid-cidades {
    grid-template-columns: 1fr;
  }

  .mapa-container {
    height: 320px;
  }
}

@media (max-width: 480px) {
  nav {
    min-height: 42px;
  }

  nav button {
    font-size: 8.5px;
    padding: 7px 1px;
    min-height: 42px;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .card-texto {
    padding: 18px 20px;
  }

  .card-texto:hover,
  .card-texto:active {
    transform: none;
  }

  .modal-card img {
    height: 220px;
  }

  .modal-info {
    padding: 22px;
  }

  .btn-voltar {
    position: fixed;
    bottom: 20px;
    left: 20px;

    background: var(--vermelho);
    color: white;

    padding: 14px 22px;
    border-radius: 50px;

    text-decoration: none;
    font-weight: 600;
    font-size: 16px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);

    transition: 0.3s ease;
    z-index: 999;
  }

  .btn-voltar:hover {
    background: var(--amarelo);
    transform: translateY(-3px) scale(1.05);
  }

  .footer-btns {
    flex-direction: column;
  }

  .footer-btns button {
    width: 100%;
  }
}
