/* Shared Sprogselskabet header for ordinary scrollable pages */

.ss-site-header-shell,
.ss-site-header-shell * {
  box-sizing: border-box;
}

/*
 * The shell stays in normal document flow as a spacer.
 * The actual header is fixed to the viewport. This is deliberate: Elementor
 * containers can interfere with position: sticky (especially when an
 * ancestor has overflow/transform rules), while fixed remains reliable.
 */
.ss-site-header-shell {
  position: relative;
  z-index: 9990;
  width: 100%;
  height: var(--ss-site-header-height, 86px);
  margin: 0;
  padding: 0;
  font-family: "Geist", sans-serif;
}

.ss-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: var(--ss-site-header-height, 86px);
  margin: 0;
  padding: 0 clamp(28px, 6vw, 92px);
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #102f33;
}

/* The WordPress admin bar is present only for logged-in administrators. */
.admin-bar .ss-site-header {
  top: 32px;
}

/*
 * The header itself never gets a white/frosted surface. Instead the logo,
 * navigation and outline pill independently switch between dark and light
 * ink according to the rendered background underneath them.
 *
 * The JS recognises data-ss-header-theme="dark|light" on page sections as
 * an explicit override, and otherwise falls back to the computed background
 * colour under each header zone.
 */
.ss-site-header__brand {
  justify-self: start;
  width: clamp(72px, 5.5vw, 88px);
  line-height: 0;
}

.ss-site-header__brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: none;
  opacity: 1;
  transition: filter .18s ease, opacity .18s ease;
}

.ss-site-header-shell[data-ss-brand-ink="light"]
.ss-site-header__brand img {
  filter: brightness(0) invert(1);
  opacity: .92;
}

.ss-site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(31px, 3.4vw, 54px);
}

.ss-site-header__nav a {
  position: relative;
  padding: 7px 0 10px;
  color: rgba(16,47,51,.60);
  font-size: clamp(12px, .93vw, 14px);
  font-weight: 520;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, text-shadow .18s ease;
}

.ss-site-header__nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width .28s cubic-bezier(.2,.7,.2,1);
}

.ss-site-header__nav a:hover,
.ss-site-header__nav a.is-active {
  color: #102f33;
}

.ss-site-header-shell[data-ss-nav-ink="light"]
.ss-site-header__nav a {
  color: rgba(255,255,255,.68);
  text-shadow: 0 1px 10px rgba(0,0,0,.10);
}

.ss-site-header-shell[data-ss-nav-ink="light"]
.ss-site-header__nav a:hover,
.ss-site-header-shell[data-ss-nav-ink="light"]
.ss-site-header__nav a.is-active {
  color: #fff;
}

.ss-site-header__nav a.is-active::after {
  width: 100%;
}

/* Compact outline pill: transparent fill, thin adaptive border. */
.ss-site-header__menu-button {
  justify-self: end;
  width: 50px;
  height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid rgba(16,47,51,.30) !important;
  border-radius: 999px;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}

.ss-site-header__menu-button[hidden] {
  display: none !important;
}

.ss-site-header__menu-button span {
  display: block;
  height: 1.5px;
  border-radius: 999px;
  background: #102f33;
  transition: width .18s ease, background-color .18s ease;
}

.ss-site-header__menu-button span:first-child { width: 17px; }
.ss-site-header__menu-button span:last-child { width: 11px; }

.ss-site-header__menu-button:hover {
  background: transparent !important;
  border-color: rgba(16,47,51,.50) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.ss-site-header__menu-button:hover span:last-child { width: 17px; }

.ss-site-header-shell[data-ss-menu-ink="light"]
.ss-site-header__menu-button {
  border-color: rgba(255,255,255,.48) !important;
}

.ss-site-header-shell[data-ss-menu-ink="light"]
.ss-site-header__menu-button span {
  background: rgba(255,255,255,.94);
}

.ss-site-header-shell[data-ss-menu-ink="light"]
.ss-site-header__menu-button:hover {
  border-color: rgba(255,255,255,.76) !important;
}

.ss-site-menu-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ss-site-menu {
  position: fixed;
  inset: 0;
  z-index: 99999;
  visibility: hidden;
  opacity: 1;
  pointer-events: none;
  transition: visibility 0s linear .28s;
}

.ss-site-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: none;
}

.ss-site-menu__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  background: rgba(13,15,15,.16);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transform: translateZ(0);
  will-change: opacity, backdrop-filter;
  transition: opacity .12s ease;
}

.ss-site-menu.is-open .ss-site-menu__backdrop {
  opacity: 1;
  transition: none;
}

.ss-site-menu__panel {
  position: absolute;
  top: 22px;
  right: 22px;
  width: min(370px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  padding: 20px 22px 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(31,31,31,.91);
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
  box-shadow: 0 26px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035);
  opacity: 0;
  transform: translateY(-8px) scale(.975);
  transform-origin: top right;
  transition: opacity .24s ease, transform .28s cubic-bezier(.22,.75,.22,1);
}

.ss-site-menu.is-open .ss-site-menu__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ss-site-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 30px;
}

.ss-site-menu__label {
  color: rgba(255,255,255,.38);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ss-site-menu__close {
  position: relative;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.78);
  cursor: pointer;
}

.ss-site-menu__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.ss-site-menu__close span:first-child { transform: translate(-50%,-50%) rotate(45deg); }
.ss-site-menu__close span:last-child { transform: translate(-50%,-50%) rotate(-45deg); }

.ss-site-menu__content {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.ss-site-menu__content::-webkit-scrollbar { display: none; }

.ss-site-menu .ss-nav-column {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.ss-site-menu .ss-nav-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 22px;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.91) !important;
  text-decoration: none !important;
  transition: color .2s ease, transform .2s ease;
}

.ss-site-menu .ss-nav-link:hover {
  color: #fff !important;
  transform: translateX(3px);
}

.ss-site-menu .ss-nav-title {
  color: inherit !important;
  font-size: 22px !important;
  font-weight: 470 !important;
  line-height: 1.3 !important;
  letter-spacing: -.015em !important;
}

.ss-site-menu .ss-nav-arrow {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: rgba(255,255,255,.34) !important;
  transition: color .2s ease, transform .2s ease;
}

.ss-site-menu .ss-nav-link:hover .ss-nav-arrow {
  color: rgba(255,255,255,.78) !important;
  transform: translateX(3px);
}

.ss-site-menu .ss-nav-arrow svg {
  width: 15px !important;
  height: 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.5 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.ss-site-menu .ss-account-wrap {
  margin: 28px 0 0 !important;
  padding: 22px 0 0 !important;
  border-top: 1px solid rgba(255,255,255,.10) !important;
}

.ss-site-menu .ss-account-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-height: 40px;
  margin: 0 !important;
  padding: 0 19px !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.9) !important;
  font-size: 13px !important;
  font-weight: 520 !important;
  text-decoration: none !important;
}

@media (max-width: 782px) {
  .admin-bar .ss-site-header { top: 46px; }
}

@media (max-width: 767px) {
  /*
   * Mobile uses one compact row. The full three-link navigation is hidden
   * here because it duplicates the menu button and made the header feel
   * tall and visually crowded on narrow screens. All destinations remain
   * available in the menu panel.
   */
  .ss-site-header-shell {
    height: var(--ss-site-header-height, 68px);
  }

  .ss-site-header {
    height: var(--ss-site-header-height, 68px);
    padding: 0 16px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr;
  }

  .ss-site-header__brand {
    grid-column: 1;
    grid-row: 1;
    width: 60px;
  }

  .ss-site-header__menu-button {
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    height: 28px;
    gap: 4px;
  }

  .ss-site-header__menu-button span:first-child { width: 17px; }
  .ss-site-header__menu-button span:last-child { width: 11px; }
  .ss-site-header__menu-button:hover span:last-child { width: 17px; }

  .ss-site-header__nav {
    display: none;
  }

  .ss-site-menu__panel {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
    padding: 18px 18px 21px;
    border-radius: 15px;
  }

  .ss-site-menu__top { margin-bottom: 24px; }
  .ss-site-menu .ss-nav-link { padding: 11px 1px !important; }
  .ss-site-menu .ss-nav-title { font-size: 20px !important; }
  .ss-site-menu .ss-account-wrap { margin-top: 24px !important; padding-top: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-site-header,
  .ss-site-header__nav a,
  .ss-site-header__nav a::after,
  .ss-site-header__menu-button,
  .ss-site-header__menu-button span,
  .ss-site-menu,
  .ss-site-menu__backdrop,
  .ss-site-menu__panel,
  .ss-site-menu .ss-nav-link,
  .ss-site-menu .ss-nav-arrow {
    transition: none !important;
  }
}

/* TEMA owns the background behind the transparent header. Keep the usual
   spacer on other pages. The shortcode widget must also leave the flex flow
   so Elementor does not retain a gap for an otherwise zero-height widget. */
body:has(.spf-catalog):has([data-ss-site-header-shell]) {
  --ss-site-header-height: 86px;
  --ss-catalog-heading-gap: 48px;
}
body:has(.spf-catalog) .ss-site-header-shell {
  height: 0;
}
body:has(.spf-catalog) .elementor-widget-shortcode:has([data-ss-site-header-shell]):not(:has(.spf-catalog)) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
}
body:has([data-ss-site-header-shell]) .spf-catalog {
  padding-top: calc(var(--ss-site-header-height) + var(--ss-catalog-heading-gap));
}
@media (max-width: 767px) {
  body:has(.spf-catalog):has([data-ss-site-header-shell]) {
    --ss-site-header-height: 68px;
    --ss-catalog-heading-gap: 32px;
  }
}
