/* ===== HEADER BASE ===== */
.header-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
header {
  background: #2c3e50;
  color: #fff;
  padding: 1rem 2rem;
  position: sticky; /* fixa no scroll */
  top: 0; /* gruda no topo */
  z-index: 1000; /* fica acima do conteúdo */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo / Título */
header h1 {
  font-size: 1.25rem;
  margin: 0;
  white-space: nowrap; /* evita quebrar em mobile */
}

/* ===== NAV DESKTOP ===== */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0.25rem 0;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav ul li a:hover {
  color: #1abc9c;
}

/* Botão hamburger escondido no desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* ===== NAV MOBILE ===== */
@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 100%; /* aparece logo abaixo do header */
    right: 0.5rem;
    left: 0.5rem; /* ocupa quase toda largura */
    background: #2e3a46;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  header h1 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    white-space: nowrap; /* evita quebrar em mobile */
  }

  nav.open {
    max-height: 400px; /* altura suficiente p/ links */
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    display: block;
    padding: 1rem;
    font-size: 1rem;
  }

  .nav-toggle {
    display: block;
  }
}
