/* Evita sobreposicao do menu sobre o logo/selo em telas grandes */
@media (min-width: 1024px) {
  header .max-w-\[1600px\] {
    gap: 1rem !important;
    align-items: center !important;
  }

  header .logo-seal-wrapper {
    flex-shrink: 0 !important;
    min-width: max-content !important;
    position: relative;
    z-index: 10;
  }
}

/* Entre 1024px e 1399px: mantem menu e botoes em UMA UNICA LINHA,
   reduzindo espacamentos e fontes para caber */
@media (min-width: 1024px) and (max-width: 1399px) {
  header .max-w-\[1600px\] {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto !important;
    gap: 0.75rem !important;
  }

  header nav.hidden.lg\:flex.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav.lg\:flex.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav {
    display: flex !important;
    justify-content: flex-start !important;
    padding-left: 0.75rem !important;
  }

  header .max-w-\[1600px\] > div:last-child {
    grid-column: 3 !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
  }

  header button[aria-label="Menu de navegacao"],
  header button[aria-label="Menu de navegação"] {
    display: none !important;
  }

  header nav button,
  header nav a {
    font-size: 13px !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
  }

  header .max-w-\[1600px\] > div:last-child button,
  header .max-w-\[1600px\] > div:last-child a,
  .header-btn-compact {
    font-size: 12px !important;
    padding: 0.4rem 0.7rem !important;
  }
}

/* A partir de 1400px: menu desktop visivel em 1 linha com mais espaco */
@media (min-width: 1400px) {
  header .max-w-\[1600px\] {
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto !important;
    gap: 2rem !important;
  }

  header nav.hidden.lg\:flex.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav.lg\:flex.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav.items-center.justify-center.gap-1.xl\:gap-2.h-full,
  header nav {
    display: flex !important;
    justify-content: flex-start !important;
    padding-left: 1.5rem !important;
    grid-row: 1 !important;
    grid-column: 2 !important;
  }

  header .max-w-\[1600px\] > div:last-child {
    grid-row: 1 !important;
    grid-column: 3 !important;
    justify-content: flex-end !important;
  }

  header button[aria-label="Menu de navegacao"],
  header button[aria-label="Menu de navegação"] {
    display: none !important;
  }
}

/* Ajuste fino dos botoes e menu em telas intermediarias */
@media (min-width: 1024px) and (max-width: 1280px) {
  header nav button,
  header nav a {
    font-size: 12px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  header .max-w-\[1600px\] > div:last-child button,
  header .max-w-\[1600px\] > div:last-child a,
  .header-btn-compact {
    font-size: 11px !important;
    padding: 0.35rem 0.6rem !important;
  }
}
