/* ============================================================
   Master Blends — cabeçalho e menu, compartilhado pelas páginas
   index.html · orcamento.html · comunicados.html

   Duas variantes de barra, ambas com o mesmo menu hambúrguer:
     .topo      → páginas estáticas (orcamento, comunicados)
     .mb-mobile → index.html, onde a barra desktop vem do bundle
                  React e esta só aparece abaixo de 48rem
   Ponto de troca: 48rem (768px), medido — o menu desktop precisa
   de ~745px para caber em uma linha.
   ============================================================ */

/* ---- Barra (páginas estáticas) ---- */
.topo {
  background: #ff6600;
}
.topo__linha {
  margin: 0 auto;
  width: min(1520px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}
@media (min-width: 48rem) {
  .topo__linha { padding: 0.75rem 0; }
}

.topo__marca {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
/* O logo é 1080×349: altura fixa e largura automática preservam a
   proporção. Caixa quadrada com object-contain achatava a imagem. */
.topo__marca img {
  height: 2.5rem;
  width: auto;
  display: block;
}

.topo__dir {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  min-width: 0;
}
.topo__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 2.15rem);
  min-width: 0;
}
.topo__nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: clamp(0.85rem, 1.1vw, 1.075rem);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.topo__nav a:hover,
.topo__nav a:focus-visible { color: #fff; }
.topo__nav a[aria-current] { color: #fff; font-weight: 600; }

.topo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  padding: 0.7rem 1.4rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.topo__cta:hover { background: #fff; color: #0f4a3c; }
.topo__cta svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.topo a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Barra mobile do index.html ---- */
.mb-mobile {
  display: none;
  background: #ff6600;
  position: relative;
  z-index: 60;
}
@media (max-width: 47.999rem) {
  .mb-mobile { display: block; }
}
.mb-mobile__linha {
  margin: 0 auto;
  width: min(1520px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}
.mb-mobile__marca { display: inline-flex; align-items: center; }
.mb-mobile__marca img { height: 2.5rem; width: auto; display: block; }

/* ---- Hambúrguer ---- */
.mb-burger { display: none; }
@media (max-width: 47.999rem) {
  .topo__dir { display: none; }
  .mb-burger { display: inline-flex; }
}

.mb-burger {
  appearance: none;
  background: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.7rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.mb-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Barras de 2px com vão de 5px → centros em -7, 0, +7. */
.mb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mb-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mb-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mb-burger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- Painel aberto pelo hambúrguer ---- */
.mb-painel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.mb-painel.is-aberto { display: block; }
.mb-painel ul {
  margin: 0 auto;
  width: min(1520px, 94vw);
  padding: 0.25rem 0 1rem;
  list-style: none;
}
.mb-painel a {
  display: block;
  padding: 0.9rem 0.15rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.mb-painel a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.mb-painel li:last-child a {
  margin-top: 0.85rem;
  border-bottom: 0;
  background: #fff;
  color: #0f4a3c;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 600;
}
