/* Header component styles */
.cabecalho {
  position: relative;
  z-index: 1000;
  background-color: var(--fundo-superficie);
  border-bottom: var(--borda-suave);
  box-shadow: var(--sombra-card);
}

.cabecalho__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--espaco-4);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-desktop);
  min-height: 64px;
}

.cabecalho__marca {
  display: flex;
  align-items: center;
  gap: var(--espaco-2);
  text-decoration: none;
  color: var(--texto-principal);
  flex-shrink: 0;
}

.cabecalho__marca:hover {
  color: var(--texto-link-hover);
}

.cabecalho__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.cabecalho__nome {
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-titulo);
  font-size: 1.125rem;
  line-height: 1.2;
  white-space: nowrap;
}

.cabecalho__alternador {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--raio-botao);
  cursor: pointer;
  transition: background-color var(--transicao-rapida);
}

.cabecalho__alternador:hover {
  background-color: var(--fundo-superficie-alt);
}

.cabecalho__alternador-linha {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--texto-principal);
  border-radius: 1px;
  transition: transform var(--transicao-rapida), opacity var(--transicao-rapida);
}

.cabecalho__alternador[aria-expanded="true"] .cabecalho__alternador-linha:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cabecalho__alternador[aria-expanded="true"] .cabecalho__alternador-linha:nth-child(2) {
  opacity: 0;
}

.cabecalho__alternador[aria-expanded="true"] .cabecalho__alternador-linha:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.cabecalho__navegacao {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.cabecalho__lista {
  display: flex;
  align-items: center;
  gap: var(--espaco-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cabecalho__item {
  margin: 0;
  padding: 0;
}

.cabecalho__item + .cabecalho__item {
  margin: 0;
}

.cabecalho__link {
  display: inline-block;
  padding: var(--espaco-2) var(--espaco-3);
  font-family: var(--fonte-corpo);
  font-weight: var(--peso-medio);
  font-size: var(--tamanho-pequeno);
  line-height: 1.2;
  color: var(--texto-principal);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--raio-botao);
  transition: color var(--transicao-rapida), background-color var(--transicao-rapida);
}

.cabecalho__link:hover {
  color: var(--texto-link-hover);
  background-color: var(--fundo-superficie-alt);
  text-decoration: underline dotted var(--verde-campo);
  text-underline-offset: 3px;
}

.cabecalho__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--espaco-2) var(--espaco-4);
  font-family: var(--fonte-corpo);
  font-weight: var(--peso-medio);
  font-size: var(--tamanho-pequeno);
  line-height: 1.2;
  color: var(--texto-invertido);
  background-color: var(--verde-campo);
  border: var(--borda-destaque);
  border-radius: var(--raio-botao);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transicao-rapida), border-color var(--transicao-rapida);
}

.cabecalho__cta:hover {
  background-color: var(--verde-profundo);
  border-color: var(--verde-profundo);
  color: var(--texto-invertido);
}

/* Mobile styles */
@media (max-width: 1024px) {
  .cabecalho__container {
    flex-wrap: wrap;
    min-height: 56px;
  }

  .cabecalho__marca {
    flex: 1;
  }

  .cabecalho__alternador {
    display: flex;
    order: 2;
  }

  .cabecalho__navegacao {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--fundo-superficie);
    border-bottom: var(--borda-suave);
    box-shadow: var(--sombra-elevada);
    padding: var(--espaco-4);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .cabecalho__navegacao[data-aberto="true"] {
    display: flex;
  }

  .cabecalho__lista {
    flex-direction: column;
    align-items: stretch;
    gap: var(--espaco-2);
    width: 100%;
  }

  .cabecalho__item {
    width: 100%;
  }

  .cabecalho__link {
    display: block;
    padding: var(--espaco-3) var(--espaco-4);
    font-size: var(--tamanho-corpo);
    text-align: left;
  }

  .cabecalho__cta {
    order: 1;
    margin-inline-start: auto;
  }
}

@media (max-width: 480px) {
  .cabecalho__container {
    padding-inline: var(--container-padding-mobile);
  }

  .cabecalho__logo {
    width: 28px;
    height: 28px;
  }

  .cabecalho__nome {
    font-size: 1rem;
  }

  .cabecalho__cta {
    padding: var(--espaco-2) var(--espaco-3);
    font-size: var(--tamanho-legenda);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cabecalho__alternador-linha,
  .cabecalho__link,
  .cabecalho__cta {
    transition: none;
  }
}