:root {
  --ve-site-header-fallback: 80px;
  --ve-site-header-offset: var(--ve-site-header-fallback);
  --ve-landing-header-fallback: 64px;
  --ve-landing-header-height: var(--ve-landing-header-fallback);
  --ve-landing-safe-gap: 1.25rem;
}

/* estado inicial antes do JS rodar */
.landing-header {
  width: 100%;
  z-index: 1030;
  background-color: var(--bs-body-bg, #fff);
  transition: box-shadow .2s ease-in-out;
}

.page-template-page-landing .landing-header .landing-header-inner,
.page-template-page-landing-php .landing-header .landing-header-inner {
  padding-top: calc(0.5rem + 2px) !important;
  padding-bottom: calc(0.5rem - 2px) !important;
}

/* fixo no template da landing para evitar salto visual na carga */
.page-template-page-landing .landing-header,
.page-template-page-landing-php .landing-header,
.landing-header.is-fixed {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--ve-site-header-offset, 0px);
}

/* shadow/elevation when the user scrolls */
.landing-header.header-scrolled {
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, 0.08);
}

html.ve-has-landing {
  scroll-behavior: smooth;
}

/* empurra o conteudo inicial abaixo do menu flutuante */
.page-template-page-landing #hero,
.page-template-page-landing-php #hero {
  margin-top: calc(var(--ve-landing-header-height, 0px) + var(--ve-landing-safe-gap));
}

.page-template-page-landing section[id],
.page-template-page-landing-php section[id] {
  scroll-margin-top: calc(
    var(--ve-site-header-offset, 0px) + var(--ve-landing-header-height, 0px) + var(--ve-landing-safe-gap)
  );
}

:root[data-bs-theme="dark"] .page-template-page-landing a:not(.btn):not(.nav-link),
:root[data-bs-theme="dark"] .page-template-page-landing-php a:not(.btn):not(.nav-link) {
  color: #0d6efd;
}

:root[data-bs-theme="dark"] .page-template-page-landing a:not(.btn):not(.nav-link):hover,
:root[data-bs-theme="dark"] .page-template-page-landing-php a:not(.btn):not(.nav-link):hover,
:root[data-bs-theme="dark"] .page-template-page-landing a:not(.btn):not(.nav-link):focus-visible,
:root[data-bs-theme="dark"] .page-template-page-landing-php a:not(.btn):not(.nav-link):focus-visible {
  color: #0b5ed7;
}

@media (prefers-reduced-motion: reduce) {
  html.ve-has-landing {
    scroll-behavior: auto;
  }

  .landing-header {
    transition: none;
  }
}
