/**
 * Fixed header offset + duplicate page title hiding — client: CMT
 *
 * Two things this does:
 *   1. Hide .entry-header (h1.wp-block-post-title)
 *      → Each subpage already has its own title (h1/h2) inside the content,
 *        so the title the template outputs automatically is a duplicate.
 *
 *   2. Make main's padding-top equal to the header height
 *      → header-scroll.js turns the header into position:fixed (.yk-header-static)
 *        and pulls it out of the document flow, so the body is pushed down by that
 *        height to prevent overlap.
 *
 * Value: js/header-offset.js measures the actual height of the desktop bar
 *     (__header-wrap) and writes it into --yk-header-h. It measures only the bar
 *     that is actually visible rather than the whole header, so the value never
 *     gets inflated by mobile elements mixed in.
 *     ★ Two past mistakes:
 *        (1) calc(header height + spacing-small) "added" extra → give the header
 *            height "only".
 *        (2) Measuring the whole header mixed in mobile element heights → measure
 *            only the desktop bar.
 *
 * Home: JS sets --yk-header-h to 0px on the home page → the offset disappears
 * automatically.
 */

:root {
  /* Fallback before JS loads. Measured height of the desktop bar (__header-wrap):
     Kontakt button ~56px + padding-block 1.25rem×2 (40px) + border 1px ≈ 97px.
     JS replaces this value with the real rendered height immediately, so a close
     approximation is good enough.
     (The previous 133px was an inflated value that measured the whole header =
      desktop bar + elements remaining in the flow, so the padding was excessive) */
  --yk-header-h: 97px;
}

@media (max-width: 1023.98px) {
  :root {
    --yk-header-h: 60px; /* Fixed mobile header height */
  }
}

/* 1. Hide the duplicate page title */
.wp-site-blocks main .entry-header {
  display: none;
}

/* 2. Push the body down by the header height (exactly the header height, no calc) */
.wp-site-blocks > header.yk-header-static ~ main,
.wp-site-blocks > header.site-header ~ main {
  padding-top: var(--yk-header-h) !important;
}
