/* ===== Cabeçalho, navegação, rodapé e botão flutuante ===== */

/* Header */
.site-header {
  position: relative;   /* contexto p/ o menu mobile; não é mais fixo */
  z-index: 100;         /* mantém o menu aberto acima das seções seguintes */
  background: var(--white);
  box-shadow: 0 1px 0 rgba(28, 64, 107, .06);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 32px;
}
.nav__logo { height: 112px; width: auto; }

/* logo/hambúrguer visíveis só no mobile */
.nav__brand { display: none; }
.nav__toggle { display: none; }

.nav__menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 24px;
}
.nav__menu a {
  color: var(--navy);
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 400;
  transition: color .2s;
}
.nav__menu a:hover { color: var(--green); }
.nav__center { display: flex; }
.nav__center a:hover { color: inherit; }

/* Rodapé */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .6); }
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 34px;
  font-size: 15px;
  letter-spacing: .3px;
}
.site-footer a:hover { color: var(--white); }

/* Botão flutuante WhatsApp */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  transition: transform .2s, background .2s;
}
.wa-float:hover { transform: scale(1.08); background: var(--green-dark); }
.wa-float img { width: 34px; height: 34px; }

/* Botão flutuante "voltar ao topo" (aparece ao rolar) */
.to-top {
  position: fixed;
  right: 30px;
  bottom: 100px;        /* logo acima do botão do WhatsApp */
  z-index: 200;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, background .2s, visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #16375c; transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }

/* ===== Mobile / tablet ===== */
@media (max-width: 900px) {
  .nav { padding-block: 16px; }
  .nav__brand { display: block; }
  .nav__brand .nav__logo { height: 60px; }

  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
  }
  .nav__toggle span {
    width: 26px; height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: .3s;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav__menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__menu.open { max-height: 340px; }
  .nav__menu li a { display: block; padding: 14px 24px; }
  .nav__center { display: none; }

  .site-footer .container { flex-direction: column; text-align: center; }
}
