/*
Theme Name: ABFU Master
Theme URI: https://abfu.dk
Author: ABFU
Description: Shared lightweight WordPress theme for ABFU Brand og Førstehjælp domains. Content, images, banners and contact details are edited entirely from wp-admin (ACF fields + native pages) — no page builder required.
Version: 1.16.2
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abfu-master
*/

/* ====================================================================
   Fonts — self-hosted, no external font/CDN requests. Archivo covers its
   whole 400–900 weight range from one variable-font file; IBM Plex Mono
   ships as two static weights (400/500) for reference codes/dates/labels.
   ==================================================================== */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/archivo-variable.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

/* ====================================================================
   Design tokens — technical inspection-report register: cool near-black
   ink on pale grey-green paper, sharp corners (radius 0) throughout.
   ==================================================================== */
:root {
  --ink: #191c1a;
  --ink-soft: #565b56;
  --paper: #eef0ec;
  --surface: #ffffff;
  --brand-red: #a30026;
  --brand-red-dark: #7d001d;
  /* Header/footer bar only — kept separate from --brand-red (used
     everywhere else: buttons, links, hero) so this stays scoped instead
     of retinting the whole site's accent color. */
  --header-footer-red: #8a011b;
  --header-footer-red-dark: #6b0114;
  --amber: #a97a2e;
  --dark: #191c1a;
  --line: #c7ccc3;
  --focus: #1f6feb;

  --font-body: "Archivo", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --container: 1180px;
  --radius: 0;
}

/* ====================================================================
   Reset & base
   ==================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Native cross-document View Transitions: a soft cross-fade between full
   page navigations, no JS at all. Unsupported browsers (older Safari/
   Firefox) just navigate normally — this is pure progressive enhancement,
   nothing to fall back to. Gated behind prefers-reduced-motion ourselves,
   since the browser doesn't do that for us. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: ease-out;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-red); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--brand-red-dark); }

h1, h2 {
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.55em;
  color: var(--ink);
}
h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.55em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 3.4vw + 1rem, 3.4rem); color: var(--ink); }
h2 { font-size: clamp(1.3rem, 1.4vw + 1rem, 1.7rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75em;
}
.eyebrow b { color: var(--brand-red); font-weight: 500; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--dark);
  color: #fff;
  padding: 0.6em 1em;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; fill: currentColor; }

/* ====================================================================
   Layout shell: single-row full-width landing header, sticky on scroll,
   no side nav.
   ==================================================================== */
.site-shell { display: block; }
.site-content { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }

/* One element doing double duty as both the full-width sticky/bg/border
   chrome AND the centered content row: the "container" width constraint
   is done here with padding rather than a nested margin:auto div, since
   the Site Editor's template-part canvas errors on nested core/group
   blocks around dynamic ServerSideRender children. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-footer-red);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
  padding-block: 0.9rem;
  padding-inline: max(1.25rem, calc((100% - var(--container)) / 2));
}
/* .site-header has no explicit block "layout" set, so WordPress defaults
   it to "flow" and adds a margin-top on every child after the first via
   `.wp-block-group-is-layout-flow > * + *`. That fights this row's own
   flex/align-items:center. Two class selectors here outweighs core's one
   regardless of stylesheet load order. */
.site-header > .site-branding,
.site-header > .primary-nav,
.site-header > .site-header__actions {
  margin-block: 0;
}

.site-branding {
  display: block;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
}
.site-branding:hover { color: #fff; }
.site-branding img.custom-logo { max-width: 220px; max-height: 56px; height: auto; }
.site-branding__text {
  display: block;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}
.site-branding__tagline {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: #f3d9d3;
  margin-top: 0.2rem;
  white-space: normal;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.8vw, 0.75rem);
  flex-wrap: wrap;
}
.primary-nav li { position: relative; }
.primary-nav a {
  display: block;
  padding: 0.4em 0.1em;
  color: #f3d9d3;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.primary-nav a:hover,
.primary-nav li.current-menu-item > a,
.primary-nav li.current_page_item > a {
  color: #fff;
  border-bottom-color: #fff;
}

/* Sub-menus: reveal on hover/focus. */
.primary-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  top: 100%; left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 40;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a,
.primary-nav .sub-menu a:hover { padding: 0.55em 1rem; border-bottom: none; color: var(--ink); }
.primary-nav .sub-menu a:hover { background: var(--paper); }

.site-header__actions { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.site-header__phone {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.site-header__phone .icon { color: #fff; }
.site-header__phone:hover { color: #f3d9d3; }
.site-header__cta {
  display: inline-block;
  background: #fff;
  border: 1px solid #fff;
  color: var(--header-footer-red);
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  padding: 0.65em 1.3em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.site-header__cta:hover { background: #f1eceb; }

.nav-toggle {
  display: none;
  background: var(--ink);
  border: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  cursor: pointer;
  flex-shrink: 0;
}

/* 1200px, not the more usual ~900px: with 5 nav items plus a long site
   title, the nav's own natural fit breaks as early as ~1120px, so the
   switch to the hamburger needs a wide safety margin above that. */
@media (max-width: 1200px) {
  .site-header__phone { display: none; }
  .site-header__cta { display: none; }
  .nav-toggle { display: inline-flex; }

  /* The nav drops down *inside* the sticky header (grows its box) rather
     than a fixed full-screen overlay — sidesteps having to know the
     header's exact pixel height, which a fixed-position panel would
     otherwise need. */
  .site-header { flex-wrap: wrap; }
  .primary-nav {
    flex-basis: 100%;
    order: 10;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease;
  }
  .primary-nav.is-open { max-height: 80vh; overflow-y: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-top: 0.5rem; }
  .primary-nav li { border-bottom: 1px solid rgba(255,255,255,0.25); }
  .primary-nav a { padding: 0.9em 0.1em; border-bottom: none; }
  .primary-nav .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-top: 1px solid var(--line);
    border-radius: 0;
    padding-left: 1rem;
  }
  .primary-nav .sub-menu li { border-bottom-color: var(--line); }
}

/* ====================================================================
   Page banner (full-width image at the top of a page) + hero.
   ==================================================================== */
.page-banner { margin-bottom: 0; }
.page-banner img { width: 100%; max-height: 360px; object-fit: cover; }

/* Plain paper background by default (the "Feltrapport" report-header look —
   no photo, dark ink text); switches to the dark full-bleed photo treatment
   only when a background image is actually set (:has(.hero__media)), since
   the dark overlay only makes sense over a photo. */
.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero:has(.hero__media) {
  background: var(--dark);
  color: #fff;
  border-bottom: none;
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Single overlay (not stacked with image opacity) — dark enough on the text
   side for contrast, light enough elsewhere that the photo actually reads. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(20,20,20,0.82) 15%, rgba(20,20,20,0.3) 80%);
}
.hero__inner {
  position: relative;
  width: 100%;
  padding-block: clamp(3rem, 9vw, 5.5rem);
}
.hero__inner--with-specsheet {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 860px) {
  .hero__inner--with-specsheet { grid-template-columns: 1fr 320px; gap: 3rem; }
}
.hero-specsheet { position: relative; }
.hero .eyebrow { color: var(--ink-soft); }
.hero:has(.hero__media) .eyebrow { color: var(--amber); }
.hero:has(.hero__media) h1 { color: #fff; }
.hero__text p {
  font-size: 1.1rem;
  max-width: 52ch;
  color: var(--ink-soft);
}
.hero:has(.hero__media) .hero__text p { color: #f1f1f1; }
.hero__cta {
  display: inline-block;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  padding: 0.95em 2.1em;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: background-color 0.18s ease;
}
.hero__cta:hover {
  background: var(--brand-red-dark);
  color: #fff;
}

/* ====================================================================
   Banners (front-page category-style tiles)
   ==================================================================== */
.banners { padding-block: clamp(2.5rem, 5vw, 4rem); }
/* This element is both .container and .banners__grid on one <div> —
   zero out .container's own padding-inline here so the border sits
   flush against the cards instead of leaving a gap. */
.banners__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  padding-inline: 0;
}
.banners__grid > * { border-right: 1px solid var(--line); }
.banners__grid > *:last-child { border-right: none; }
@media (max-width: 900px) {
  .banners__grid { grid-template-columns: 1fr; }
  .banners__grid > * { border-right: none; border-bottom: 1px solid var(--line); }
  .banners__grid > *:last-child { border-bottom: none; }
}

.banner-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  transition: background-color 0.18s ease;
}
.banner-card:hover { color: var(--ink); background: var(--paper); }
.banner-card__media { aspect-ratio: 4 / 3; background: var(--paper); position: relative; overflow: hidden; }
.banner-card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.banner-card:hover .banner-card__media img { transform: scale(1.04); }
.banner-card__fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-red);
}
.banner-card__fallback .icon { width: 2rem; height: 2rem; stroke-width: 1.4; }
.banner-card__body { padding: 1.75rem; }
.banner-card__title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.banner-card__text {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  line-height: 1.5;
}
.banner-card__cta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-red);
  font-weight: 500;
  margin-top: 0.9rem;
}

/* ====================================================================
   Latest news — front-page section and the /nyheder/ archive.
   ==================================================================== */
.news-section { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.news-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.news-section__head h2 { margin: 0; }
.news-section__all {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.news-section__all:hover { color: var(--brand-red); border-color: var(--brand-red); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.news-grid--archive { margin-top: 0; }
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.news-card__media { display: block; aspect-ratio: 3 / 2; background: var(--paper); position: relative; overflow: hidden; }
.news-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--brand-red); }
.news-card__fallback .icon { width: 2rem; height: 2rem; stroke-width: 1.4; }
.news-card__body { padding: 1.5rem; }
.news-card__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 0.7em;
}
.news-card__title { font-size: 1rem; font-weight: 700; margin: 0 0 0.5em; }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a:hover { color: var(--brand-red); }
.news-card__excerpt { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 0.8em; }
.news-card__cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-red);
  font-weight: 500;
  border-bottom: 1px solid var(--brand-red);
  text-decoration: none;
}
.single-back-link { padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2.5rem 0 3rem;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  height: 2.4em;
  padding-inline: 0.5em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.pagination .page-numbers.current { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.pagination .page-numbers:hover:not(.current) { border-color: var(--brand-red); color: var(--brand-red); }

/* ====================================================================
   Contact section — plain on the paper background, form labels in mono,
   the contact-info panel styled as a "specsheet".
   ==================================================================== */
.contact { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.contact__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) {
  .contact__inner { grid-template-columns: 1fr; }
}

.contact-form-panel h2 { color: var(--ink); }

.contact-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 1.5rem;
}
.contact-card dt {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1rem;
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 0.2rem 0 0; font-weight: 500; color: var(--ink); }
.contact-card dd a { color: var(--ink); }

/* Contact Form 7 styling */
.wpcf7-form p { margin-bottom: 0.9rem; }
.wpcf7-form label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4em;
  color: var(--ink-soft);
}
.wpcf7-form-control {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7em 0.85em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.wpcf7-form-control:focus {
  border-color: var(--header-footer-red);
  outline: 1px solid var(--header-footer-red);
  outline-offset: 0;
}
textarea.wpcf7-form-control { min-height: 130px; resize: vertical; }
.wpcf7-submit {
  width: 100%;
  background: var(--brand-red);
  color: #fff;
  border: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9em;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.wpcf7-submit:hover { background: var(--brand-red-dark); }
.wpcf7-not-valid-tip { color: var(--brand-red-dark); font-size: 0.85rem; margin-top: 0.3rem; }
.wpcf7-response-output {
  margin-top: 1rem;
  padding: 0.8em 1em;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink);
}
.wpcf7-mail-sent-ok { border-color: #2e7d4f; }
.wpcf7-validation-errors, .wpcf7-mail-sent-ng { border-color: var(--brand-red); }

.contact-fallback { font-size: 1.05rem; }

/* ====================================================================
   Generic page content
   ==================================================================== */
.page-hero { padding-block: 2rem 1rem; }
.entry-content { padding-block: 1.5rem 2.5rem; max-width: 72ch; }
.entry-content h2 { margin-top: 1.5em; color: var(--brand-red); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content img { margin-block: 1em; }

/* ====================================================================
   Footer — multi-column layout (contact / pages / other sites) above a
   slim copyright/social-icons bar.
   ==================================================================== */
.before-footer {
  background: var(--surface);
  color: var(--ink-soft);
  border-top: 4px solid var(--header-footer-red);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
}
.before-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}
@media (max-width: 720px) {
  .before-footer__grid { grid-template-columns: 1fr; }
}
.footer-col__title {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1em;
}
.footer-col__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  font-size: 0.92rem;
}
.footer-col__list a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-col__list a:hover { color: var(--header-footer-red); }
.footer-col__list--contact li { color: var(--ink-soft); line-height: 1.5; }

.site-footer {
  background: var(--header-footer-red);
  color: #f3d9d3;
  padding-block: 1.1rem;
}
.site-footer a { color: #fff; }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0; padding: 0;
}
.social-links__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.social-links__item .icon { width: 19px; height: 19px; }
.social-links__item:hover {
  background: #fff;
  border-color: #fff;
  color: var(--header-footer-red);
}

/* ====================================================================
   404
   ==================================================================== */
.not-found { padding-block: clamp(3rem, 8vw, 5rem); text-align: center; }
.not-found__code {
  margin: 0 0 0.25em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--brand-red);
}

/* ====================================================================
   Global "Kontakt os" modal — printed once in footer.php, opened by the
   header's phone-cta button on pages with no real #kontakt section
   (see main.js). Reuses .contact-form-panel's/.wpcf7-form's existing
   styles for the form itself, just adds the overlay/panel chrome.
   ==================================================================== */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}
.contact-modal[hidden] { display: none; }
.contact-modal.is-open { pointer-events: auto; }
.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 28, 26, 0.6);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.contact-modal.is-open .contact-modal__backdrop { opacity: 1; }
.contact-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-top: 4px solid var(--header-footer-red);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.contact-modal.is-open .contact-modal__panel { opacity: 1; transform: none; }
.contact-modal__panel h2 { color: var(--ink); }
.contact-modal__panel .contact__inner { margin-top: 0.25rem; }
.contact-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.contact-modal__close .icon { width: 16px; height: 16px; }
.contact-modal__close:hover { border-color: var(--header-footer-red); color: var(--header-footer-red); }
body.contact-modal-open { overflow: hidden; }

/* ====================================================================
   Scroll-reveal (progressive enhancement; content visible without JS)
   ==================================================================== */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
