
/*
 * AVANTHY — CABEÇALHO FIXO DEFINITIVO
 *
 * Mantém o cabeçalho visível durante toda a navegação.
 * A altura é calculada automaticamente pelo JavaScript.
 */

:root {
  --avanthy-fixed-header-height: 78px;
}

html {
  scroll-padding-top:
    calc(
      var(--avanthy-fixed-header-height)
      + 18px
    );
}

body.avanthy-fixed-header-page {
  padding-top:
    var(--avanthy-fixed-header-height) !important;
}

body.avanthy-fixed-header-page > header,
body.avanthy-fixed-header-page header.avanthy-fixed-header {
  position: fixed !important;

  top: 0 !important;
  right: 0 !important;
  left: 0 !important;

  z-index: 10000 !important;

  width: 100% !important;
  margin: 0 !important;

  transform: none !important;

  box-shadow:
    0 10px 32px
    rgba(0, 20, 45, 0.16) !important;

  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease !important;
}

body.avanthy-fixed-header-page
header.avanthy-fixed-header.is-scrolled {
  box-shadow:
    0 14px 38px
    rgba(0, 20, 45, 0.24) !important;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.avanthy-fixed-header-page
:is(
  section[id],
  div[id],
  main[id]
) {
  scroll-margin-top:
    calc(
      var(--avanthy-fixed-header-height)
      + 18px
    );
}

/*
 * O menu mobile precisa permanecer abaixo
 * do cabeçalho fixo.
 */

@media (max-width: 960px) {
  :root {
    --avanthy-fixed-header-height: 72px;
  }

  body.avanthy-fixed-header-page
  .avanthy-mobile-menu-panel {
    top:
      calc(
        var(--avanthy-fixed-header-height)
        + 8px
      ) !important;
  }

  body.avanthy-fixed-header-page
  .main-navigation {
    top:
      calc(
        var(--avanthy-fixed-header-height)
        + 10px
      ) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.avanthy-fixed-header-page > header,
  body.avanthy-fixed-header-page
  header.avanthy-fixed-header {
    transition: none !important;
  }
}
