/* layout.css — header, footer e estruturas de página */

/* ===== HEADER ============================================================ */
.cabecalho {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--azul);
  color: #fff;
}

.cabecalho__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-4);
}

.logo {
  display: inline-flex;
  align-items: center;
}
.logo img {
  display: block;
  height: 30px; /* mesmo porte do antigo logo em texto (1.9rem) */
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: var(--peso-medio);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--raio-pill);
  background: #fff;
  color: var(--azul);
  white-space: nowrap;
  transition: background var(--dur-rapido) var(--ease-padrao),
    color var(--dur-rapido);
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  background: var(--verde);
  color: var(--azul-tinta);
}

.social {
  display: flex;
  gap: var(--space-2);
}
.social a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--raio-pill);
  color: var(--azul);
  background: #fff;
  transition: transform var(--dur-rapido) var(--ease-suave), background var(--dur-rapido);
}
.social a:hover {
  background: var(--verde);
  transform: translateY(-2px);
}
.social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* Botão hambúrguer (mobile) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--raio-md);
  color: #fff;
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
}

/* Botão de fechar dentro do painel do menu (injetado por menu.js) — só no mobile */
.nav__fechar {
  display: none;
}

/* ===== FOOTER ============================================================ */
.rodape {
  background: var(--azul);
  color: #fff;
}
.rodape__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-6);
  flex-wrap: wrap;
}
.rodape__base {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-block: var(--space-4);
  font-size: var(--fs-xs);
  opacity: 0.7;
  text-align: center;
}

/* ===== GRIDS ============================================================= */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* ===== RESPONSIVO ======================================================== */
@media (max-width: 880px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-3);
    background: var(--azul-escuro);
    padding: calc(var(--space-9)) var(--space-5) var(--space-5);
    transform: translateX(100%);
    transition: transform var(--dur-medio) var(--ease-suave);
    z-index: var(--z-overlay);
  }
  .nav[data-aberto="true"] {
    transform: translateX(0);
  }
  .nav__link {
    text-align: center;
  }
  .nav__fechar {
    display: grid;
    place-items: center;
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
    border-radius: var(--raio-pill);
    background: #3a3ab4; /* branco a 14% sobre --azul-escuro (opaco p/ análise de contraste) */
    color: #fff;
  }
  .nav__fechar svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
  }
  body.nav-aberto {
    overflow: hidden;
  }
}
