/* Container dos botões */
.nav-wrapper {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  margin: 30px 0;
  background: transparent;
}

/* Quando sticky estiver ativo, a classe sticky-active será adicionada via JS */
.nav-wrapper.sticky-active {
  background: rgba(249, 249, 249, 0);
}

/* Barra de botões no topo */
.anos-nav.top {
  display: inline-flex;
  gap: 16px;
  padding: 16px 24px;
  background: #f9f9f9;
  border-radius: 10px;
  border: none;
  box-sizing: border-box;
  margin-bottom: 20px;
}

/* Botões */
.anos-nav.top button {
  appearance: none;
  border: none;
  background: #a7b2c2; 
  color: #fff;
  padding: 6px 22px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
  line-height: 1.2;        /* diminui espaço vertical */
}

/* Hover dos botões */
.anos-nav.top button:hover {
  transform: translateY(-2px);
}

/* Botão ativo */
.anos-nav.top button.active {
  background: #0a2b57;
  color: #fff;
}

/* Títulos dos anos */
.year-title {
  color: #002352 !important;
  font-size: 24pt;
  font-weight: bold;
  text-align: center;
  margin: 30px 0 10px;
  scroll-margin-top: 80px; /* para scroll seguro com header fixo */
}

/* ===== Celulares (até 576px) ===== */
@media (max-width: 576px) {
  .anos-nav.top {
    white-space: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
  }

  .anos-nav.top button {
    min-width: 60px;
    font-size: 14px;
    padding: 6px 12px;
  }

  .year-title {
    font-size: 20pt;
    margin: 20px 0 8px;
  }

  .nav-wrapper {
    margin: 20px 0;
  }
}

/* ===== Tablets (577px a 992px) ===== */
@media (min-width: 577px) and (max-width: 992px) {
  .anos-nav.top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .anos-nav.top button {
    font-size: 17px;
    padding: 8px 20px;
  }

  .year-title {
    font-size: 22pt;
    margin: 25px 0 10px;
  }
}

/* ===== Desktops (993px em diante) ===== */
@media (min-width: 993px) {
  .anos-nav.top {
    flex-wrap: nowrap;
    justify-content: center;
  }

  .anos-nav.top button {
    font-size: 18px;
  }
}
