/*
 * Modern design layer for herzfuerherz.de
 * Loaded after the original TYPO3 stylesheets (the <link> is injected by
 * scripts/clean_mirror.py, which also keeps this file across reruns).
 * Brand stays: red-orange, heart logo, Mukta. What changes: no orange frame
 * around the window, a slim sticky header with a donate button, a wider
 * fluid layout, card-style news, a slide-in menu on phones.
 * Behaviour lives in ../scripts/modern.js.
 */

/* Layout: one fluid column (max 1240px) inside full-width bands
   (header, banner, content, footer). */
:root {
  --red: #ff3d1a;          /* brand colour, from the logo and old frame */
  --red-deep: #d92f0f;     /* buttons and footer, white text stays readable */
  --red-ink: #c4280b;      /* red text and links on white (AA contrast) */
  --ink: #2b2224;          /* warm near-black for text */
  --muted: #6e6264;        /* dates, captions, meta text */
  --line: #f0e4e0;         /* hairlines, card borders */
  --blush: #f6f5f4;        /* neutral tint for hover states and sections (no accent) */
  --paper: #ffffff;

  --font: 'Mukta', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --icons: 'IcoMoon-Free';

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --head-h: 108px;
  --radius: 6px;           /* slight rounding only: cards, images, boxes */
  --radius-sm: 4px;        /* buttons, inputs, chips */
  --shadow: 0 1px 2px rgba(43, 34, 36, .05), 0 8px 28px rgba(43, 34, 36, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 839px) {
  :root { --head-h: 68px; }
}

/* ---------- Fonts: woff2/woff only, show fallback text while loading ---------- */
@font-face {
  font-family: 'Mukta';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/mukta-v6-latin-regular.woff2') format('woff2'),
       url('../fonts/mukta-v6-latin-regular.woff') format('woff');
}
@font-face {
  font-family: 'Mukta';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/mukta-v6-latin-700.woff2') format('woff2'),
       url('../fonts/mukta-v6-latin-700.woff') format('woff');
}

/* ---------- Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}
body {
  -webkit-text-stroke: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: clip;
}
::selection { background: var(--red); color: #fff; }

/* the old window frame (orange bars + side borders) */
.btop, .bbottom { display: none; }
.msbg { border: 0; }
.msmain { display: block; }

/* the shared fluid container */
.msheadinner,
.mscontentinner,
.msfooterinner,
.msbannerinner {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Keyboard focus was removed with outline:none on every link */
a:focus-visible,
button:focus-visible,
#toggle-nav:focus-visible,
.toggle-sub-menu:focus-visible {
  outline: 2px solid var(--red-ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.msfooterinner a:focus-visible { outline-color: #fff; }

/* ======================================================================
   Header
   ====================================================================== */
.mshead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  height: auto;
  background: transparent;
  text-align: left;
}
/* translucent backdrop on a pseudo element, so the fixed mobile menu
   inside the header still positions against the viewport */
.mshead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.is-scrolled .mshead::before {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(43, 34, 36, .06);
}
/* the old jQuery "sticky" clone is switched off in modern.js; these keep
   it static if that script ever fails */
.msstickyhead,
.msstickyhead.sticky {
  position: static !important;
  top: auto !important;
  display: block !important;
  border: 0;
  background: transparent;
  text-align: left;
}

.msheadinner,
.sticky .msheadinner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  height: var(--head-h);
  background: none;
}

.mslogo,
.sticky .mslogo {
  order: 0;
  float: none;
  width: calc(var(--head-h) - 6px); /* the img is width:100%!important globally */
  height: auto;
  max-height: none;
  margin: 0 auto 0 0;
  overflow: visible;
  flex: none;
}
.mslogo a { display: block; line-height: 0; }
.mslogo img {
  display: block;
  transition: transform .3s var(--ease);
}
.mslogo a:hover img { transform: scale(1.04); }

/* --- language switch: DEU | ENG becomes a small segmented control --- */
.mslanguage,
.sticky .mslanguage {
  order: 2;
  float: none;
  display: flex;
  padding: 3px;
  gap: 2px;
  font-size: 0; /* hides the "|" text between the links */
  line-height: 1;
  border-radius: var(--radius-sm);
  background: var(--blush);
  color: var(--muted);
}
.mslanguage a:link,
.mslanguage a:visited {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 10px 5px;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.mslanguage a:hover { color: var(--red-ink); }
html[lang="de"] .mslanguage a:first-child,
html[lang="en"] .mslanguage a:last-child {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(43, 34, 36, .12);
}

/* --- donate button (the old "Spenden" link in the orange top bar) --- */
.mstopnavi,
.sticky .mstopnavi {
  order: 3;
  float: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}
.mstopnavi a:link,
.mstopnavi a:visited,
.button1:link,
.button1:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 10px;
  border-radius: var(--radius-sm);
  background: var(--red-deep);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background .2s;
}
.mstopnavi a::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-top: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C.9 8.3 3 4.5 6.7 4.5c2.1 0 3.6 1.2 4.3 2.4h2c.7-1.2 2.2-2.4 4.3-2.4 3.7 0 5.8 3.8 4.3 7.2C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C.9 8.3 3 4.5 6.7 4.5c2.1 0 3.6 1.2 4.3 2.4h2c.7-1.2 2.2-2.4 4.3-2.4 3.7 0 5.8 3.8 4.3 7.2C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mstopnavi a:hover,
.button1:hover {
  color: #fff;
  background: var(--red-ink);
}

/* the green side tab duplicated the donate link; the header button replaces it */
.msinfoicons { display: none; }

/* --- main navigation --- */
nav.msnavi {
  font-family: var(--font);
  border: 0;
}
nav.msnavi .navhome a { font-family: var(--icons); }

@media screen and (min-width: 840px) {
  nav.msnavi,
  .sticky nav.msnavi {
    order: 1;
    float: none;
    margin: 0;
    background: none;
  }
  nav.msnavi > ul {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  nav.msnavi ul li {
    float: none;
  }
  nav.msnavi ul li a,
  nav.msnavi ul li:last-child a {
    position: relative;
    padding: 10px 14px 8px;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.2;
    min-height: 0;
    transition: color .2s, background .2s;
  }
  nav.msnavi .navhome a { font-size: 15px; padding-top: 11px; }
  /* small chevron on items with a dropdown */
  nav.msnavi > ul > li.has-sub-menu > a { padding-right: 28px; }
  nav.msnavi > ul > li.has-sub-menu > a::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s var(--ease);
  }
  nav.msnavi > ul > li.has-sub-menu:hover > a::after,
  nav.msnavi > ul > li.has-sub-menu:focus-within > a::after {
    transform: translateY(3px) rotate(225deg);
  }
  nav.msnavi ul li a:hover,
  nav.msnavi ul li:hover > a,
  nav.msnavi ul li:focus-within > a {
    background: var(--blush);
    color: var(--red-ink);
  }
  nav.msnavi > ul > li > a.active {
    background: none;
    color: var(--red-ink);
  }
  nav.msnavi > ul > li > a.active::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
  }
  nav.msnavi > ul > li.has-sub-menu > a.active::before { right: 28px; }

  /* dropdown card */
  nav.msnavi ul li ul,
  nav.msnavi ul li:hover ul {
    display: block;
    position: absolute;
    top: 100%;
    left: -8px;
    min-width: 240px;
    padding: 8px;
    margin-top: 8px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  /* hover bridge across the 8px gap */
  nav.msnavi ul li ul::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
  }
  nav.msnavi ul li:hover > ul,
  nav.msnavi ul li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s, transform .25s var(--ease), visibility 0s;
  }
  nav.msnavi ul li ul li {
    display: block;
    border: 0;
    margin: 0;
  }
  nav.msnavi ul li ul li a,
  nav.msnavi ul li ul li:last-child a {
    display: block;
    min-width: 0;
    padding: 10px 14px 8px;
    border-radius: var(--radius);
    background: none;
    color: var(--ink);
    font-size: 16px;
    white-space: nowrap;
  }
  nav.msnavi ul ul li a:hover,
  nav.msnavi ul ul li a.active,
  nav.msnavi ul li ul li:last-child a:hover,
  nav.msnavi ul li ul li:last-child a.active {
    background: var(--blush);
    color: var(--red-ink);
  }
}

/* tablets in landscape: same bar, tighter */
@media screen and (min-width: 840px) and (max-width: 1099px) {
  :root { --head-h: 92px; }
  .msheadinner { gap: 10px; }
  nav.msnavi ul li a,
  nav.msnavi ul li:last-child a { padding-left: 10px; padding-right: 10px; font-size: 16px; }
  nav.msnavi > ul > li.has-sub-menu > a { padding-right: 24px; }
  nav.msnavi > ul > li.has-sub-menu > a::after { right: 9px; }
  nav.msnavi > ul > li > a.active::before { left: 10px; right: 10px; }
  nav.msnavi > ul > li.has-sub-menu > a.active::before { right: 24px; }
  .mstopnavi a::before { display: none; }
  .mstopnavi a:link, .mstopnavi a:visited { padding-left: 16px; padding-right: 16px; }
  .mslanguage a:link, .mslanguage a:visited { padding-left: 8px; padding-right: 8px; }
}

/* --- phones and small tablets: slide-in menu --- */
@media screen and (max-width: 839px) {
  .msheadinner { gap: 10px; }
  .mstopnavi a:link,
  .mstopnavi a:visited {
    padding: 10px 14px 8px;
    font-size: 15px;
    box-shadow: none;
  }
  .mslanguage a:link,
  .mslanguage a:visited { padding: 7px 8px 5px; font-size: 12px; }

  #toggle-nav {
    order: 4;
    position: relative;
    top: auto;
    right: auto;
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--blush);
    transition: background .2s;
  }
  #toggle-nav:hover { background: #ffe9e1; }
  #toggle-nav span,
  #toggle-nav.activetoggle span {
    display: block;
    position: relative;
    width: 20px;
    height: 2px;
    margin: 0;
    border: 0;
    border-radius: 2px;
    background: var(--ink);
    overflow: visible;
    transition: background .2s;
  }
  #toggle-nav span::before,
  #toggle-nav span::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    margin: 0;
    border: 0;
    border-radius: 2px;
    background: var(--ink);
    transform: translateY(-6px);
    transition: transform .3s var(--ease);
  }
  #toggle-nav span::after { transform: translateY(6px); }
  #toggle-nav.activetoggle span { background: transparent; }
  #toggle-nav.activetoggle span::before { transform: rotate(45deg); }
  #toggle-nav.activetoggle span::after { transform: rotate(-45deg); }

  html.js nav.msnavi,
  nav.msnavi {
    display: block !important;
    position: fixed;
    top: var(--head-h);
    left: auto;
    right: 0;
    bottom: 0;
    width: min(400px, 100%);
    height: auto;
    max-height: none;
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gutter);
    box-sizing: border-box;
    background: var(--paper);
    border: 0;
    border-top: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
    z-index: 100;
  }
  html.nav-open nav.msnavi {
    transform: none;
    visibility: visible;
    transition: transform .35s var(--ease), visibility 0s;
    box-shadow: -20px 0 40px rgba(43, 34, 36, .12);
  }
  nav.msnavi ul li,
  nav.msnavi ul li ul li {
    float: none;
    width: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  nav.msnavi ul li ul li:last-child { border-bottom: 0; }
  nav.msnavi ul li a {
    padding: 16px 52px 12px 4px;
    background: none;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.2;
  }
  nav.msnavi ul li a:hover,
  nav.msnavi ul li a.active {
    background: none;
    color: var(--red-ink);
  }
  nav.msnavi .navhome { padding: 0; line-height: inherit; }
  nav.msnavi .navhome a { font-size: 18px; }
  nav.msnavi .navhome a::after {
    content: "Startseite";
    margin-left: 12px;
    font-family: var(--font);
    font-size: 20px;
  }
  html[lang="en"] nav.msnavi .navhome a::after { content: "Home"; }
  nav.msnavi ul li ul {
    display: none;
    margin: 0 0 12px;
    padding: 4px 0 4px 14px;
    border-left: 2px solid var(--red);
  }
  nav.msnavi li.sub-open > ul { display: block; }
  nav.msnavi ul li ul li a {
    padding: 11px 4px 9px;
    font-size: 17px;
    color: var(--muted);
  }
  html.js .toggle-sub-menu,
  html.js .toggle-sub-menu.active,
  html.js .toggle-sub-menu:hover,
  html.js .toggle-sub-menu.active:hover {
    top: 6px;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius);
    box-sizing: border-box;
    background: var(--blush);
  }
  .toggle-sub-menu::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -6px 0 0 -4px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
    transition: transform .25s var(--ease);
  }
  .sub-open > .toggle-sub-menu::after { transform: translateY(3px) rotate(225deg); }

  .nav-backdrop {
    position: fixed;
    inset: var(--head-h) 0 0 0;
    background: rgba(43, 34, 36, .32);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility 0s .3s;
    z-index: 90;
  }
  html.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s, visibility 0s;
  }
  html.nav-open { overflow: hidden; }
}
@media screen and (max-width: 380px) {
  .mstopnavi a::before { display: none; }
  .mslogo, .sticky .mslogo { width: 52px; }
}

/* ======================================================================
   Banner: crisp image in the content column, a blurred copy of the same
   picture fills the band to both screen edges (set by modern.js)
   ====================================================================== */
.msbanner {
  position: relative;
  float: none;
  display: block;
  margin: 0;
  padding-block: clamp(12px, 2vw, 28px);
  background: var(--blush);
  overflow: hidden;
  isolation: isolate;
}
.msbanner::before {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: -1;
  background: var(--banner-img, none) center / cover no-repeat;
  filter: blur(40px) saturate(1.2);
  opacity: .55;
  transform: scale(1.1);
}
.msbanner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .7));
}
.msbanner:not(:has(img)) { display: none; }
.msbannerinner {
  border: 0;
  font-size: 15px;
}
.msbanner figure,
.msbanner .ce-gallery,
.msbanner .ce-outer,
.msbanner .ce-inner,
.msbanner .ce-row,
.msbanner .ce-column {
  margin: 0;
  float: none;
  width: 100%;
}
.msbanner img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1130 / 375;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(43, 34, 36, .16);
}
@media (max-width: 600px) {
  .msbanner { padding-block: 0; }
  .msbannerinner { padding-inline: 0; }
  .msbanner img { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 7; }
}

/* ======================================================================
   Content
   ====================================================================== */
.mscontent {
  display: block;
  padding: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  overflow-wrap: break-word;
}
.mscontentinner {
  display: block;
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(48px, 7vw, 96px);
}
.mscontentinner::after { content: ""; display: table; clear: both; }

.mscontent a { overflow-wrap: anywhere; }

/* headings */
.mscontent h1,
.mscontent h2,
.mscontent h3,
.mscontent h4 {
  font-family: var(--font);
  color: var(--ink);
  overflow: visible;
  text-overflow: clip;
  text-wrap: balance;
  letter-spacing: -.01em;
}
.mscontent h1,
.news-single .article .header h3 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  padding: 0 0 .55em;
}
.mscontent h2 {
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  padding: 0 0 .5em;
}
.mscontent h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  padding: 0 0 .4em;
}
.mscontent h4 { font-size: 17px; line-height: 1.4; font-weight: 700; padding-bottom: .3em; }

.mscontent p { margin: 0 0 .9em; }
.mscontent p:last-child { margin-bottom: 0; }
.mscontent strong { font-weight: 700; }
/* empty "&nbsp;" paragraphs used as spacers in the CMS (marked by modern.js) */
.mscontent p.spacer { height: .6em; margin: 0; overflow: hidden; }
.mscontent p.spacer + p.spacer { display: none; }
.mscontent p.spacer:first-child { display: none; }

/* text links */
.mscontent a:link,
.mscontent a:visited {
  color: var(--red-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(196, 40, 11, .35);
  transition: text-decoration-color .2s, color .2s;
}
.mscontent a:hover {
  color: var(--red-ink);
  text-decoration-color: currentColor;
}
/* CMS buttons: were full-width grey/red bars in capitals */
.mscontent a.button1:link,
.mscontent a.button1:visited,
.mscontent a.button2:link,
.mscontent a.button2:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin: 4px 0 0;
  padding: 12px 20px 10px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  overflow-wrap: normal;
}
.mscontent a.button2:link,
.mscontent a.button2:visited {
  background: var(--ink);
  box-shadow: none;
}
.mscontent a.button2:hover { background: #46393b; }
.mscontent a.button1::after {
  content: "\2192";
  position: static;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1;
  margin-top: -2px;
  transition: transform .2s var(--ease);
}
.mscontent a.button1:hover::after { transform: translateX(3px); }

/* lists: small brand hearts instead of the old dot gif */
.mscontentinner ul li { background: none; padding-left: 0; }
.mscontentinner ul { padding-left: 0; }
.ce-bodytext ul,
.news-text-wrap ul {
  margin: .2em 0 1em;
  display: grid;
  gap: .35em;
}
.ce-bodytext ul li,
.news-text-wrap ul li {
  position: relative;
  padding-left: 1.6em;
}
.ce-bodytext ul li::before,
.news-text-wrap ul li::before {
  content: "";
  position: absolute;
  left: .15em;
  top: .5em;
  width: .72em;
  height: .72em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff3d1a' d='M12 21s-7.5-4.6-9.6-9.3C.9 8.3 3 4.5 6.7 4.5c2.1 0 3.6 1.2 4.3 2.4h2c.7-1.2 2.2-2.4 4.3-2.4 3.7 0 5.8 3.8 4.3 7.2C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mscontentinner ol { padding-left: 1.3em; }

/* breadcrumb, only on sub pages */
.msbreadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: auto;
  padding: 0 0 clamp(16px, 2.5vw, 28px);
  font-size: 0; /* hides the "Sie sind hier:" label */
  line-height: 1.4;
}
.msbreadcrumb:not(:has(li + li)) { display: none; }
.msbreadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}
.msbreadcrumb li { display: inline-flex; align-items: center; }
.msbreadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 12px 0 6px;
  border-right: 1.5px solid #c9b9b5;
  border-top: 1.5px solid #c9b9b5;
  transform: rotate(45deg);
}
.msmain .msbreadcrumb img { display: none; }
.msbreadcrumb a:link,
.msbreadcrumb a:visited { color: var(--muted); text-decoration: none; }
.msbreadcrumb a:hover { color: var(--red-ink); }
.msbreadcrumb li:last-child span { color: var(--ink); }

/* column layouts (msbox001-008): grid instead of floats */
.msbox001, .msbox002, .msbox003, .msbox004,
.msbox005, .msbox006, .msbox007, .msbox008 {
  display: grid;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  width: 100%;
}
[class^="msbox00"] > div {
  width: auto;
  float: none;
  margin: 0;
  min-width: 0;
}
.msbox001 { grid-template-columns: 1fr 1fr; }
.msbox002 { grid-template-columns: 3fr 7fr; margin-bottom: clamp(24px, 3vw, 40px); }
.msbox003 { grid-template-columns: 7fr 4fr; }
.msbox004 { grid-template-columns: repeat(3, 1fr); }
.msbox005 { grid-template-columns: repeat(4, 1fr); }
.msbox006 { grid-template-columns: 2fr 3fr; }
.msbox007 { grid-template-columns: 3fr 2fr; }
.msbox008 { grid-template-columns: repeat(5, 1fr); gap: 24px; }
@media (max-width: 899px) {
  .msbox004, .msbox005, .msbox008 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .msbox001, .msbox002, .msbox003, .msbox004, .msbox005,
  .msbox006, .msbox007, .msbox008 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* the narrow side column on the home page and the donate page reads as a card */
.msbox007right,
.msbox003right {
  padding: clamp(20px, 2.5vw, 32px);
  border-radius: var(--radius);
  background: var(--blush);
}

/* CMS paragraph styles: highlight boxes were flat grey/red blocks */
.mscontent p.paragraph1 { color: var(--ink); }
.mscontent p.paragraph2 { color: var(--muted); }
.mscontent p.paragraph3 { color: var(--red-ink); }
.mscontent p.paragraph4,
.mscontent p.paragraph5,
.mscontent p.paragraph6 {
  padding: 18px 22px 16px;
  border-radius: var(--radius);
  font-size: 18px;
  line-height: 1.5;
}
.mscontent p.paragraph4 { background: var(--ink); color: #fff; }
.mscontent p.paragraph5 { background: var(--blush); color: var(--ink); border-left: 4px solid var(--red); }
.mscontent p.paragraph6 { background: var(--red-deep); color: #fff; }

/* CMS divider */
.mscontent hr,
.mscontent hr.ce-div {
  height: 1px;
  margin: clamp(24px, 3vw, 40px) 0;
  border: 0;
  background: var(--line);
}

/* images in text */
.mscontent .ce-gallery img,
.mscontent .news-img-wrap img {
  border-radius: var(--radius);
}
.mscontent .ce-gallery a img { transition: transform .4s var(--ease), filter .3s; }
.mscontent .ce-gallery a { display: block; overflow: hidden; border-radius: var(--radius); }
.mscontent .ce-gallery a:hover img { transform: scale(1.04); }
figcaption { color: var(--muted); font-size: 14px; }

/* galleries: a fluid grid that fills the column instead of fixed 200px floats */
.msboxgalleryinner { margin: 0; }
.msboxgallery .ce-gallery,
.msboxgallery .ce-outer,
.msboxgallery .ce-inner { float: none; width: 100%; margin: 0; right: auto; }
.msboxgallery .ce-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(45%, 190px), 1fr));
  gap: clamp(8px, 1.2vw, 16px);
}
.msboxgallery .ce-row,
.msboxgallery[class*="imgcols"] .ce-row {
  float: none;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  height: auto !important;
}
.msboxgallery .ce-column,
.msboxgallery figure,
.msboxgallery figure a {
  display: block;
  float: none;
  width: 100%;
  margin: 0;
}
.msboxgallery img {
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* pasted Word/Outlook fonts inside CMS text */
.ce-bodytext [style*="font-family"],
.news-text-wrap [style*="font-family"] { font-family: inherit !important; }
.ce-bodytext [style*="font-size"],
.news-text-wrap [style*="font-size"] { font-size: inherit !important; }

/* embeds never wider than their column */
.mscontent iframe,
.mscontent video,
.mscontent audio { max-width: 100%; }
.mscontent video,
.mscontent iframe { border-radius: var(--radius); }
.mscontent iframe[width="600"] {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 600 / 337;
}
.news-img-wrap .outer:has(iframe[width="600"]) {
  max-width: 600px;
  width: 100%;
  margin-right: 0;
}

/* tables (Chronik, Ehrungen): years in brand red, light row lines */
.mscontentinner table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.mscontentinner table th {
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--line);
}
.mscontentinner table td {
  padding: 14px 16px 12px 0;
  vertical-align: top;
  font-size: 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.mscontentinner .frame-layout-0 table tr td:first-child {
  color: var(--red-ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ======================================================================
   News
   ====================================================================== */
.news .news-list-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.news .news-list-view .article,
.news .news-list-view .article:last-child {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.news .news-list-view .article::after { display: none; }
.news .news-list-view .article:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow);
}
.news .news-list-view .article .news-img-wrap {
  float: none;
  order: -1;
  max-width: none;
  margin: 0 0 18px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blush);
}
.news .news-list-view .article .news-img-wrap a {
  float: none;
  display: block;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.news .news-list-view .article .news-img-wrap img {
  float: none;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform .5s var(--ease);
}
.news .news-list-view .article:hover .news-img-wrap img { transform: scale(1.04); }
.news .news-list-view .article > :not(.news-img-wrap) { padding-inline: 22px; }
.news .news-list-view .article .header h3 {
  padding: 0 0 .35em;
  font-size: 20px;
  line-height: 1.3;
}
.news .news-list-view .article .header h3 a:link,
.news .news-list-view .article .header h3 a:visited {
  color: var(--ink);
  text-decoration: none;
}
.news .news-list-view .article .header h3 a::after {
  content: "";
  position: absolute;
  inset: 0; /* whole card is the link */
}
.news .news-list-view .article:hover .header h3 a { color: var(--red-ink); }
.news .article .teaser-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.news .news-list-view .article .teaser-text > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.news .news-list-view .article .teaser-text p { margin: 0 0 .4em; }
.news .news-list-view .article .teaser-text p.spacer { display: none; }
.news .article .teaser-text a { position: relative; z-index: 1; }

.news .footer,
.news-single .footer {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: var(--muted);
}
.news .footer p { margin: 0; line-height: 1; }
.news .footer span,
.news .footer span:last-child {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.news .footer .news-list-category {
  padding: 4px 9px 2px;
  border-radius: var(--radius-sm);
  background: var(--blush);
  color: var(--red-ink);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
}

/* the single news card in the home page side column */
.msbox007right .news .news-list-view { grid-template-columns: 1fr; }
.msbox007right .frame-type-list header h2 { padding-bottom: .7em; }

/* pagination */
.news .page-navigation {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}
.news .page-navigation p,
.news .page-navigation ul { float: none; margin: 0; }
.news .page-navigation ul { display: flex; flex-wrap: wrap; gap: 6px; }
.news .page-navigation ul li {
  float: none;
  padding: 0;
  min-width: 40px;
  text-align: center;
}
.news .page-navigation ul li a:link,
.news .page-navigation ul li a:visited,
.news .page-navigation ul li.current {
  display: block;
  padding: 9px 12px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.news .page-navigation ul li a:hover { border-color: var(--ink); }
.news .page-navigation ul li.current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.news-clear { display: none; }

/* single article */
.news-single .article { max-width: 860px; }
.news-single .article .header h3 { padding-bottom: .35em; }
.news-single .footer { margin-bottom: 24px; }
.news-single .news-text-wrap { font-size: 18px; line-height: 1.7; }
.news-single .article .news-img-wrap {
  float: none;
  width: auto;
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.news-single .news-img-wrap .outer {
  float: none;
  margin: 0;
  max-width: min(100%, 420px);
}
.news-single .news-img-wrap .outer a { display: block; overflow: hidden; border-radius: var(--radius); }
.news-related-wrap { float: none; margin-top: 32px; }
.news-backlink-wrap a:link,
.news-backlink-wrap a:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.news-backlink-wrap a::before { content: "\2190"; font-weight: 400; }
.news-backlink-wrap a:hover { border-color: var(--red); color: var(--red-ink); }

/* forms (contact) */
.powermail_field,
.powermail_input,
.powermail_textarea,
.powermail_select {
  padding: 10px 12px;
  border: 1px solid #e3d6d2;
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--ink);
}
.powermail_label, .control-label { color: var(--ink); }
.powermail_submit {
  padding: 12px 22px 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--red-deep), var(--red));
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

/* ======================================================================
   Footer
   ====================================================================== */
.msfooter {
  display: block;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 120% at 92% 0%, rgba(255, 255, 255, .10) 0 49.6%, transparent 50%),
    radial-gradient(40% 90% at 70% 110%, rgba(255, 255, 255, .07) 0 49.6%, transparent 50%),
    linear-gradient(120deg, #c8270a, var(--red-deep) 45%, #ec4219);
  color: #fff;
}
.msfooterinner {
  display: grid;
  grid-template-columns: 1.35fr 1.2fr 1fr .8fr;
  gap: 32px clamp(24px, 4vw, 56px);
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: calc(clamp(40px, 5vw, 64px) + env(safe-area-inset-bottom, 0px));
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .9);
}
.msfooter1, .msfooter2, .msfooter3, .msfooter4 {
  float: none;
  width: auto;
  padding: 0;
  min-width: 0;
}
.msfooterinner p { margin: 0; }
.msfooterinner a:link,
.msfooterinner a:visited {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.msfooterinner a:hover { background-size: 100% 1px; }
/* column labels ("Projekte", "Navigation") */
.msfooterinner p > strong:only-child {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.msfooter1 strong:first-child {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 17px;
  color: #fff;
}
.msfooter2 p > strong:only-child {
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin-bottom: 10px;
}
.msfooter3 ul { display: grid; gap: 4px; }
.msfooter3 li { background: none; padding: 0; }
.msfooter4 p + p { margin-top: 4px; }

@media (max-width: 899px) {
  .msfooterinner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .msfooterinner { grid-template-columns: 1fr; }
  .msfooterinner a { display: inline-block; padding: 3px 0; }
}

/* back-to-top button */
.msgototop {
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  padding: 0;
  z-index: 40;
}
.msgototop a,
.msgototop a:link,
.msgototop a:visited {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--red-ink) !important;
  font-size: 16px;
  line-height: 1;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.msgototop a:hover {
  border: 0;
  color: #fff !important;
  background: var(--red-deep);
}

/* ======================================================================
   Lightbox: softer chrome
   ====================================================================== */
#sd-lightbox-overlay { background: rgba(27, 20, 21, .92); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ======================================================================
   Success stories (/erfolgsgeschichten/), built from content/pages by
   scripts/clean_mirror.py. Prefix: hfh-
   ====================================================================== */
.hfh-page .msbanner { display: none; }        /* the story has its own hero */
.hfh-story { max-width: 1000px; margin: 0 auto; }
.hfh-story .hfh-kicker {
  display: block;
  margin: 0 0 .6em;
  color: var(--red-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hfh-story .hfh-lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink); }

.hfh-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.hfh-hero-img { margin: 0; }
.hfh-hero-img img,
.hfh-figure img,
.hfh-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hfh-hero-img img { aspect-ratio: 1; object-fit: cover; }

.mscontentinner ul.hfh-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: 0 0 clamp(32px, 5vw, 56px);
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.mscontentinner ul.hfh-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--blush);
}
.mscontentinner ul.hfh-facts li::before { content: none; }
.hfh-facts strong { color: var(--red-ink); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; }
.hfh-facts span { color: var(--muted); font-size: 15px; line-height: 1.4; }

.hfh-body { max-width: 720px; }
.hfh-body h2 { margin-top: 1.4em; }
.hfh-body h2:first-child { margin-top: 0; }

.hfh-figure { margin: 1.6em 0; }
.hfh-figure figcaption,
.hfh-gallery figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.hfh-figure--side { float: right; width: min(42%, 300px); margin: .3em 0 1em 28px; }

.hfh-gallery {
  display: grid;
  grid-template-columns: .55fr 1fr;
  gap: 20px;
  align-items: end;
  margin: 1.6em 0;
}
.hfh-gallery figure { margin: 0; }
.hfh-gallery--three { grid-template-columns: repeat(3, 1fr); align-items: start; }
.hfh-gallery--three:has(> figure:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
.msmain .hfh-gallery--three img { aspect-ratio: 1; object-fit: cover; height: auto !important; }
.hfh-figure img { max-height: 640px; object-fit: contain; }

.hfh-explainer {
  margin: 1.6em 0;
  padding: 22px 26px;
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blush);
}
.hfh-explainer h3 { font-size: 18px; }

/* rte.css styles every blockquote with !important paddings and grey icon quotes */
.hfh-story blockquote.hfh-quote {
  margin: 1.8em 0 !important;
  padding: 4px 0 4px 26px !important;
  border-left: 4px solid var(--red) !important;
}
.hfh-story blockquote.hfh-quote::before,
.hfh-story blockquote.hfh-quote::after { content: none; }
.hfh-quote p { font-size: clamp(21px, 2vw, 26px); line-height: 1.4; font-weight: 600; color: var(--ink); }
.hfh-quote footer { margin-top: 8px; color: var(--muted); font-size: 15px; }

.hfh-docs { clear: both; max-width: 720px; margin: clamp(32px, 5vw, 56px) 0 0; }
.hfh-docs h2 { font-size: 20px; }
.mscontent a.hfh-doc:link,
.mscontent a.hfh-doc:visited {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.mscontent a.hfh-doc:hover { border-color: var(--red); box-shadow: var(--shadow); }
.hfh-doc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--red-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.hfh-doc strong { display: block; }
.hfh-doc small { display: block; color: var(--muted); font-size: 14px; }

.hfh-cta {
  clear: both;
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--blush);
  text-align: center;
}
.mscontent .hfh-cta h2 { text-align: center; }
.hfh-cta p { max-width: 600px; margin-left: auto; margin-right: auto; }
.mscontent .hfh-cta a.button2:link,
.mscontent .hfh-cta a.button2:visited { background: var(--red-deep); }
.mscontent .hfh-cta a.button2:hover { background: var(--red-ink); }

/* overview page */
.hfh-intro { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.hfh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.mscontent a.hfh-card:link,
.mscontent a.hfh-card:visited {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow .2s, transform .2s var(--ease);
}
.mscontent a.hfh-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.hfh-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 25%; }
.msmain .hfh-card img { height: auto !important; }
.hfh-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.hfh-card-body strong { font-size: 21px; line-height: 1.25; }
.hfh-card-body .hfh-kicker { margin: 0; }
/* while there is only one story, show it as a wide featured card */
@media (min-width: 761px) {
  .hfh-cards:has(> :only-child) { grid-template-columns: 1fr; }
  .mscontent .hfh-cards > a.hfh-card:only-child { flex-direction: row; }
  /* stylesheet_global.css forces .msmain img to width:100% !important */
  .msmain .hfh-card:only-child img { flex: none; width: 42% !important; aspect-ratio: 1; }
  .hfh-card:only-child .hfh-card-body { justify-content: center; padding: 32px 36px; }
}
.hfh-more { color: var(--red-ink); font-weight: 700; }
.hfh-more::after { content: " \2192"; }
.mscontentinner ul.hfh-list { max-width: 760px; }
.mscontentinner ul.hfh-list li { margin-bottom: .6em; }

/* patients without their own page */
.mscontentinner ul.hfh-patients { max-width: 820px; margin: 0 0 clamp(32px, 5vw, 56px); }
.mscontentinner ul.hfh-patients li {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.mscontentinner ul.hfh-patients li::before { content: none; }
.hfh-patients strong { color: var(--red-ink); }

/* teasers on the Ho Chi Minh project page and the original news articles */
.hfh-teaser {
  margin: 0 0 2em;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--blush);
}

/* Chronik: added years use the same table markup as the TYPO3 ones */

@media (max-width: 760px) {
  .hfh-hero { grid-template-columns: 1fr; }
  .hfh-hero-img { order: -1; }
  .mscontentinner ul.hfh-facts { grid-template-columns: 1fr 1fr; }
  .hfh-figure--side { float: none; width: 100%; max-width: 360px; margin: 1.6em 0; }
  .hfh-gallery, .hfh-gallery--three { grid-template-columns: 1fr 1fr; }
  .mscontentinner ul.hfh-patients li { grid-template-columns: 1fr; gap: 2px; }
  .hfh-gallery figure:first-child { max-width: 320px; }
}

/* ======================================================================
   Forms: contact, donation, newsletter (behaviour in modern.js)
   Plain fields, labels above, one accent colour, no icons.
   ====================================================================== */
.hfh-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.hfh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hfh-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
/* only the bank-transfer box while the Stripe form is disabled (spenden + en/donate) */
.hfh-split--single { grid-template-columns: minmax(0, 640px); }

.hfh-form { display: grid; gap: 20px; max-width: 560px; }
.hfh-field { display: grid; gap: 6px; }
.hfh-form label,
.hfh-form legend {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.hfh-form input[type=text],
.hfh-form input[type=email],
.hfh-form input[type=number],
.hfh-form textarea,
.hfh-newsletter input[type=email] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ddcfcb;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.4 var(--font);
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.hfh-form textarea { min-height: 170px; resize: vertical; }
.hfh-form input:hover,
.hfh-form textarea:hover,
.hfh-newsletter input:hover { border-color: #c9b8b3; }
.hfh-form input:focus,
.hfh-form textarea:focus,
.hfh-newsletter input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(43, 34, 36, .12);
}
.hfh-form [aria-invalid=true],
.hfh-newsletter [aria-invalid=true] { border-color: var(--red-ink); }
.hfh-error { margin: 0; color: var(--red-ink); font-size: 14px; line-height: 1.35; }

.hfh-submit,
.hfh-newsletter button {
  justify-self: start;
  margin: 0;
  padding: 14px 26px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red-deep);
  color: #fff;
  font: 700 17px/1 var(--font);
  cursor: pointer;
  transition: background .15s, transform .15s var(--ease);
}
.hfh-submit:hover,
.hfh-newsletter button:hover { background: var(--red-ink); }
.hfh-submit:active,
.hfh-newsletter button:active { transform: translateY(1px); }
.hfh-submit:disabled,
.hfh-newsletter button:disabled { opacity: .6; cursor: progress; }

.mscontent .hfh-form-note,
.hfh-form-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.hfh-form-status { margin: 0; font-size: 16px; line-height: 1.5; }
.hfh-form-status:empty { display: none; }
.hfh-form-status.is-ok { color: var(--ink); font-weight: 700; }
.hfh-form-status.is-error { color: var(--red-ink); }
.hfh-form.is-done .hfh-field,
.hfh-form.is-done .hfh-submit,
.hfh-form.is-done .hfh-form-note,
.hfh-newsletter.is-done .hfh-newsletter-row,
.hfh-newsletter.is-done .hfh-form-note { display: none; }

/* contact + donate side column */
.hfh-aside {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mscontent .hfh-aside h2 { margin-top: 0; font-size: 20px; }
.hfh-aside p { margin: 0 0 1em; }
.hfh-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  margin: 0 0 1.2em;
}
.hfh-dl dt { color: var(--muted); }
.hfh-dl dd { margin: 0; }
.hfh-dl--bank { grid-template-columns: 1fr; gap: 0; }
.hfh-dl--bank dt { margin-top: 10px; font-size: 14px; }
.hfh-dl--bank dt:first-child { margin-top: 0; }
.hfh-mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mscontent .hfh-aside-small,
.hfh-aside-small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.hfh-aside-note { padding-top: 1em; border-top: 1px solid var(--line); }

/* donation form */
.hfh-donate-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.hfh-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px !important;
  border-radius: var(--radius-sm);
  background: #f6eeeb;
}
.hfh-segment label,
.hfh-amounts label { position: relative; margin: 0; cursor: pointer; }
.hfh-segment input,
.hfh-amounts input { position: absolute; opacity: 0; pointer-events: none; }
.hfh-segment span {
  display: block;
  padding: 10px 12px 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 16px;
  text-align: center;
  transition: background .15s, color .15s;
}
.hfh-segment input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(43, 34, 36, .15); }
.hfh-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hfh-amounts legend { margin-bottom: 8px; }
.hfh-amounts span {
  display: block;
  padding: 14px 8px 12px;
  border: 1px solid #ddcfcb;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.hfh-amounts label:hover span { border-color: #c9b8b3; }
.hfh-amounts input:checked + span { border-color: var(--red-deep); background: var(--blush); color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-deep); }
.hfh-segment input:focus-visible + span,
.hfh-amounts input:focus-visible + span,
.hfh-check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hfh-field--amount label { font-weight: 400; color: var(--muted); }
.hfh-input-unit { position: relative; max-width: 220px; }
.hfh-input-unit input { padding-right: 36px !important; }
.hfh-input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hfh-input-unit input::-webkit-outer-spin-button,
.hfh-input-unit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hfh-input-unit input { -moz-appearance: textfield; }
.hfh-form .hfh-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.45;
}
.hfh-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red-deep); }
.hfh-donate-form .hfh-submit { justify-self: stretch; padding: 18px 26px 16px; font-size: 19px; }
.hfh-donate-info { margin-top: clamp(40px, 6vw, 72px); }

/* newsletter: footer, thank-you page, own page */
.hfh-newsletter { display: grid; gap: 10px; margin-top: 20px; max-width: 420px; }
.hfh-newsletter label strong { display: block; margin-bottom: 2px; }
.hfh-newsletter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hfh-newsletter-row input { flex: 1 1 200px; min-width: 0; }
.hfh-newsletter button { padding: 12px 20px 10px; font-size: 16px; }
.msfooter .hfh-newsletter label { color: inherit; font-weight: 400; }
.msfooter .hfh-newsletter input[type=email] { border-color: transparent; }
.msfooter .hfh-newsletter button { background: var(--ink); }
.msfooter .hfh-newsletter button:hover { background: #46393b; }
.msfooter .hfh-form-note,
.msfooter .hfh-form-note a { color: inherit; opacity: .85; font-size: 13px; }
.msfooter .hfh-form-status.is-ok,
.msfooter .hfh-form-status.is-error { color: inherit; }
.hfh-newsletter--inline { margin: 20px auto 0; }
.hfh-cta .hfh-newsletter-row { justify-content: center; }
.hfh-newsletter-form { margin-top: 8px; }
.hfh-notice {
  max-width: 560px;
  margin: 0 0 28px;
  padding: 16px 20px;
  border-left: 3px solid var(--red-deep);
  border-radius: 4px;
  background: var(--blush);
}
.hfh-notice p { margin: 0; }
.hfh-back { margin-top: 32px; }

@media (max-width: 860px) {
  .hfh-split { grid-template-columns: 1fr; }
  .hfh-form { max-width: none; }
}
@media (max-width: 420px) {
  .hfh-amounts { grid-template-columns: repeat(2, 1fr); }
  .hfh-newsletter-row button { flex: 1 1 100%; }
}

/* news list pages: added <h1> above the list */
.mscontent h1.hfh-list-title { margin: 0 0 .2em; }
.news-single .article .header h1 { padding-bottom: .35em; }

/* ======================================================================
   Home page (sections inserted by clean_mirror.py):
   story carousel under the welcome/news columns, then the projects
   ====================================================================== */
.hfh-home-band {
  clear: both;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.hfh-carousel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.mscontent .hfh-carousel-head h2 { padding: 0; }
.hfh-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hfh-carousel-track::-webkit-scrollbar { display: none; }
.hfh-carousel-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hfh-slide {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}
.mscontent a.hfh-slide-img { display: block; overflow: hidden; }
.msmain .hfh-slide-img img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 320px;
  max-height: 460px;
  object-fit: cover;
  object-position: 50% 25%;
}
.hfh-slide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(24px, 4vw, 56px);
}
.mscontent .hfh-slide-body p { margin: 0; }
.hfh-slide-meta { color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.mscontent .hfh-slide-body h3 { padding: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; }
.mscontent .hfh-slide-body h3 a:link,
.mscontent .hfh-slide-body h3 a:visited { color: var(--ink); text-decoration: none; }
.mscontent .hfh-slide-body h3 a:hover { text-decoration: underline; }
.hfh-slide-text { font-size: 17px; line-height: 1.6; }
.mscontent a.hfh-slide-link:link,
.mscontent a.hfh-slide-link:visited { color: var(--ink); font-weight: 700; }

.mscontent .hfh-home-projects > h2 { margin-bottom: 8px; }
.hfh-home-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.hfh-home-projects article { padding-top: 16px; border-top: 2px solid var(--ink); }
.mscontent .hfh-home-projects h3 { font-size: 20px; }
.mscontent .hfh-home-projects article p { margin: 0 0 .8em; }

@media (max-width: 760px) {
  .hfh-slide { grid-template-columns: 1fr; }
  .msmain .hfh-slide-img img { min-height: 0; max-height: none; aspect-ratio: 4 / 3; height: auto !important; }
  .hfh-slide-body { padding: 22px; justify-content: start; }
  .hfh-home-projects-grid { grid-template-columns: 1fr; }
  .hfh-carousel-head { flex-direction: column; align-items: start; gap: 8px; }
}

/* home news column: no tinted box, no category tag, plain small "Alle News" button */
.msbox007right { padding: 0; border-radius: 0; background: none; }
.news .footer span.news-list-category { display: none; }
.msbox007right .news .news-list-view .article:hover { transform: none; box-shadow: none; border-color: #d9d4d2; }

/* ======================================================================
   Calm look: no accent colour inside content sections.
   Red stays on donate buttons only (header, donate form, donate calls to action).
   ====================================================================== */
.mscontent a:link,
.mscontent a:visited,
.mscontent a:hover { color: var(--ink); text-decoration-color: rgba(43, 34, 36, .35); }
.mscontent a:hover { text-decoration-color: currentColor; }
.msbreadcrumb a:hover { color: var(--ink); }
.ce-bodytext ul li::before,
.news-text-wrap ul li::before {
  width: .38em;
  height: .38em;
  top: .62em;
  left: .3em;
  border-radius: 50%;
  background: var(--ink);
}
.mscontentinner .frame-layout-0 table tr td:first-child { color: var(--ink); }
.mscontent p.paragraph3 { color: var(--ink); font-weight: 700; }
.mscontent p.paragraph5 { border-left-color: var(--ink); }
.mscontent p.paragraph6 { background: var(--ink); }
.hfh-story .hfh-kicker { color: var(--muted); }
.hfh-more, .hfh-facts strong, .hfh-patients strong { color: var(--ink); }
.hfh-explainer { border-left-color: var(--ink); }
.hfh-story blockquote.hfh-quote { border-left-color: var(--ink) !important; }
.mscontent a.hfh-doc:hover { border-color: var(--ink); }
.hfh-doc-icon { background: var(--ink); }
.hfh-notice { border-left-color: var(--ink); }
.news .news-list-view .article:hover .header h3 a { color: var(--ink); }
.news .page-navigation ul li a:hover,
.news-backlink-wrap a:hover { border-color: var(--ink); color: var(--ink); }

/* content buttons are dark; only donate buttons keep the brand red */
.mscontent a.button1:link,
.mscontent a.button1:visited { background: var(--ink); box-shadow: none; }
.mscontent a.button1:hover { background: #46393b; box-shadow: none; }
.hfh-submit,
.hfh-newsletter button { background: var(--ink); }
.hfh-submit:hover,
.hfh-newsletter button:hover { background: #46393b; }
.hfh-donate-form .hfh-submit,
.mscontent .hfh-cta a.button2:link,
.mscontent .hfh-cta a.button2:visited { background: var(--red-deep); }
.hfh-donate-form .hfh-submit:hover,
.mscontent .hfh-cta a.button2:hover { background: var(--red-ink); }
.hfh-amounts input:checked + span { border-color: var(--ink); background: var(--blush); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hfh-check input { accent-color: var(--ink); }

/* "Alle News" / "Alle Erfolgsgeschichten": quiet text link with an arrow */
.mscontent a.hfh-all-link:link,
.mscontent a.hfh-all-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 4px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.mscontent a.hfh-all-link::after { content: "\2192"; font-weight: 400; transition: transform .2s var(--ease); }
.mscontent a.hfh-all-link:hover { border-bottom-color: var(--ink); }
.mscontent a.hfh-all-link:hover::after { transform: translateX(3px); }
.msbox007right #c188 { margin-top: 14px; }

/* carousel: arrows sit inside the frame, centred on its left and right edge */
.hfh-carousel-frame { position: relative; }
.hfh-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 1px solid rgba(43, 34, 36, .12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font: 400 22px/1 var(--font);
  box-shadow: 0 2px 10px rgba(43, 34, 36, .12);
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.hfh-carousel-btn:hover { background: #fff; }
.hfh-carousel-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hfh-carousel-btn:disabled { opacity: 0; pointer-events: none; }
.hfh-carousel-prev { left: 14px; }
.hfh-carousel-next { right: 14px; }
.hfh-carousel-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.hfh-carousel .hfh-slide-body { padding-right: clamp(64px, 6vw, 88px); }
@media (max-width: 760px) {
  .hfh-carousel-btn { top: calc((100vw - 32px) * .375); } /* middle of the 4:3 photo */
  .hfh-carousel .hfh-slide-body { padding-right: 22px; padding-bottom: 40px; }
}

/* news pagination: arrows at the far left and right, page numbers centred between */
.news .page-navigation ul.f3-widget-paginator { flex: 1 1 100%; flex-wrap: nowrap; justify-content: center; align-items: center; }
.news .page-navigation ul li.pager-prev { margin-right: auto; }
.news .page-navigation ul li.pager-next { margin-left: auto; }
.news .page-navigation ul li.pager-arrow a:link,
.news .page-navigation ul li.pager-arrow a:visited,
.news .page-navigation ul li.pager-arrow span {
  display: block;
  padding: 7px 14px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1.2;
}
.news .page-navigation ul li.pager-arrow span { color: #c9c1bf; }
.news .page-navigation > p { order: 2; flex: 1 1 100%; text-align: center; font-size: 14px; }
@media (max-width: 480px) {
  .news .page-navigation ul { gap: 4px; }
  .news .page-navigation ul li { min-width: 0; }
  .news .page-navigation ul li a:link,
  .news .page-navigation ul li a:visited,
  .news .page-navigation ul li.current { padding: 8px 9px 6px; }
  .news .page-navigation ul li.pager-arrow a:link,
  .news .page-navigation ul li.pager-arrow a:visited,
  .news .page-navigation ul li.pager-arrow span { padding: 6px 10px 4px; font-size: 18px; }
}

/* ======================================================================
   Satzung page: table of contents, documents, readable statute text
   ====================================================================== */
.hfh-statute-split { align-items: start; }
.hfh-statute-toc h2,
.hfh-statute-docs h2 { margin: 0 0 10px; font-size: 20px; }
.mscontent .hfh-statute-toc ol { margin: 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.mscontent .hfh-statute-toc li { list-style: none; margin: 0 0 6px; padding: 0; break-inside: avoid; background: none; }
.mscontent .hfh-statute-toc li::before { display: none; }
.mscontent .hfh-statute-toc a:link,
.mscontent .hfh-statute-toc a:visited { color: var(--ink); text-decoration: none; font-size: 15px; }
.mscontent .hfh-statute-toc a:hover { text-decoration: underline; }
.mscontent a.hfh-statute-doc { display: block; margin-bottom: 16px; color: var(--ink); text-decoration: none; }
.mscontent .hfh-statute-doc img { display: block; width: 140px !important; max-width: 140px !important; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hfh-statute-doc span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.mscontent a.hfh-statute-doc:hover img { border-color: var(--ink); }
.hfh-statute-text { max-width: 760px; }
.hfh-statute-text h2 { scroll-margin-top: calc(var(--head-h, 100px) + 16px); font-size: 21px; }
.hfh-statute-title { font-weight: 700; }
.mscontent .hfh-statute-text ol,
.mscontent .hfh-statute-text ul { margin: .4em 0 .8em; padding-left: 2em; }
.mscontent .hfh-statute-text ol.hfh-paras { counter-reset: para; list-style: none; padding-left: 2.4em; }
.mscontent .hfh-statute-text ol.hfh-paras > li { counter-increment: para; position: relative; list-style: none; }
.mscontent .hfh-statute-text ol:not(.hfh-paras) > li { list-style: inherit; }
.mscontent .hfh-statute-text ol.hfh-paras > li::before {
  content: "(" counter(para) ")";
  position: absolute; left: -2.4em; top: 0;
  width: auto; height: auto; margin: 0; background: none; border-radius: 0;
  color: var(--muted);
}
.mscontent .hfh-statute-text ol:not(.hfh-paras) > li,
.mscontent .hfh-statute-text ul > li { padding-left: 0; background: none; }
.mscontent .hfh-statute-text ol:not(.hfh-paras) { list-style: decimal; }
.mscontent .hfh-statute-text ol[type="a"] { list-style: lower-alpha; }
.mscontent .hfh-statute-text ul { list-style: disc; }
.mscontent .hfh-statute-text ol:not(.hfh-paras) > li::before,
.mscontent .hfh-statute-text ul > li::before { display: none; }
.hfh-statute-sign { margin-top: 2em; color: var(--muted); font-size: 15px; }
.hfh-statute-note { font-size: 15px; }

/* ======================================================================
   Report summaries (Chronik, Da Nang project)
   ====================================================================== */
.hfh-reports { clear: both; margin: 48px 0 16px; padding-top: 32px; border-top: 1px solid #e6e1df; }
.hfh-reports h2 { margin-top: 0; }
.hfh-reports-intro { max-width: 720px; color: var(--muted); }
.hfh-reports-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px 32px; margin-top: 20px; }
.hfh-report { padding-top: 14px; border-top: 2px solid var(--ink); }
.hfh-report h3 { margin: 4px 0 8px; font-size: 19px; line-height: 1.3; }
.hfh-report p { font-size: 16px; }
.hfh-report-meta { margin: 0; color: var(--muted); font-size: 14px; }

/* ======================================================================
   Document viewer overlay
   ====================================================================== */
html.hfh-viewer-open { overflow: hidden; }
dialog.hfh-viewer {
  width: min(1000px, 94vw); height: 92vh; max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: var(--radius); background: var(--paper);
  display: flex; flex-direction: column; overflow: hidden;
}
dialog.hfh-viewer:not([open]) { display: none; }
dialog.hfh-viewer::backdrop { background: rgba(43, 34, 36, .6); }
.hfh-viewer-bar { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 20px; border-bottom: 1px solid #e6e1df; }
.hfh-viewer-title { flex: 1; margin: 0; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.hfh-viewer-dl:link, a.hfh-viewer-dl:visited { color: var(--ink); font-size: 15px; text-decoration: none; }
a.hfh-viewer-dl:hover { text-decoration: underline; }
.hfh-viewer-close {
  width: 38px; height: 38px; border: 1px solid #d9d4d2; border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
}
.hfh-viewer-close:hover { background: var(--blush); }
.hfh-viewer-body { flex: 1; min-height: 0; background: #ece9e8; display: flex; align-items: center; justify-content: center; }
.hfh-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.hfh-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hfh-viewer-body [hidden] { display: none; }

/* Chronik: photos under each year */
.hfh-chronik-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 4px 0 18px; }
.mscontent .hfh-chronik-photos figure { margin: 0; }
.mscontent .hfh-chronik-photos a { display: block; overflow: hidden; border-radius: var(--radius-sm); background: #ece9e8; }
.mscontent .hfh-chronik-photos img {
  display: block; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .3s var(--ease);
}
.mscontent .hfh-chronik-photos a:hover img { transform: scale(1.03); }
.hfh-chronik-photos figcaption { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (max-width: 559px) {
  .hfh-chronik-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* ======================================================================
   Consent banner + two-click video embeds (consent.js)
   ====================================================================== */
.hfh-consent {
  position: fixed; z-index: 1000;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
  padding: 22px 24px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 2px 6px rgba(43, 34, 36, .08), 0 18px 48px rgba(43, 34, 36, .22);
  font: 400 15px/1.5 var(--font);
}
.hfh-consent h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.hfh-consent:focus { outline: none; }
.hfh-consent p { margin: 0 0 14px; }
.hfh-consent a:link, .hfh-consent a:visited { color: var(--ink); text-decoration: underline; }
.hfh-consent-opts { display: grid; gap: 10px; margin: 0 0 16px; }
.hfh-consent-opts[hidden] { display: none; }
.hfh-consent-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.hfh-consent-opt input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.hfh-consent-opt span { display: grid; gap: 2px; }
.hfh-consent-opt strong { font-size: 15px; }
.hfh-consent-opt span span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.hfh-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* accept and reject look the same: refusing is as easy as agreeing */
.hfh-consent-btn {
  flex: 1 1 auto; margin: 0; padding: 11px 16px 9px;
  border: 1px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--ink); color: #fff;
  font: 700 15px/1.1 var(--font); cursor: pointer;
}
.hfh-consent-btn:hover { background: #000; }
.hfh-consent-btn--quiet { background: var(--paper); color: var(--ink); }
.hfh-consent-btn--quiet:hover { background: var(--blush); }
@media (min-width: 700px) { .hfh-consent { left: 24px; right: auto; bottom: 24px; } }

/* "Cookie-Einstellungen" in the footer looks like the links around it */
.hfh-linkbtn {
  margin: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.msfooterinner .hfh-linkbtn { color: #fff; }
.msfooterinner .hfh-linkbtn:hover,
.hfh-linkbtn:hover { text-decoration: underline; }
html:not(.js) .hfh-linkbtn { display: none; }

.hfh-embed {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9;
  margin: 0 0 16px; border-radius: var(--radius); overflow: hidden;
  background: #2b2224; color: #fff;
}
.hfh-embed-inner {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  min-height: 100%; padding: 20px 24px; box-sizing: border-box;
  font-size: 14px; line-height: 1.45;
}
.hfh-embed:not(.is-loaded) { aspect-ratio: auto; min-height: 220px; }
@media (min-width: 560px) { .hfh-embed:not(.is-loaded) { aspect-ratio: 16 / 9; } }
.mscontent .hfh-embed p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; }
.mscontent .hfh-embed .hfh-embed-title { color: #fff; font-weight: 700; font-size: 17px; }
.mscontent .hfh-embed a:link, .mscontent .hfh-embed a:visited { color: #fff; text-decoration: underline; }
.hfh-embed-load {
  margin: 4px 0 0; padding: 11px 20px 9px; border: 0; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer;
}
.hfh-embed-load:hover { background: var(--blush); }
.hfh-embed-always { display: flex; gap: 8px; align-items: center; color: rgba(255, 255, 255, .85); cursor: pointer; }
.hfh-embed-always input { width: 16px; height: 16px; margin: 0; accent-color: #fff; }
html:not(.js) .hfh-embed-load,
html:not(.js) .hfh-embed-always { display: none; }
.hfh-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Datenschutz / Impressum: overview table and boxed notices */
.hfh-legal { max-width: 820px; }
.hfh-legal h2 { scroll-margin-top: calc(var(--head-h, 100px) + 16px); font-size: 22px; }
.hfh-legal h3 { margin: 1.3em 0 .4em; font-size: 18px; }
.hfh-legal-table-wrap { overflow-x: auto; margin: 0 0 1em; }
.mscontent .hfh-legal table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.mscontent .hfh-legal th,
.mscontent .hfh-legal td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mscontent .hfh-legal th { font-weight: 700; background: var(--blush); }
.hfh-legal-box { margin: 1em 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--blush); }
.mscontent .hfh-legal-box p:last-child { margin-bottom: 0; }
.hfh-legal dl { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 6px 20px; margin: 0 0 1em; }
.hfh-legal dt { font-weight: 700; }
.hfh-legal dd { margin: 0; }
@media (max-width: 559px) { .hfh-legal dl { grid-template-columns: 1fr; } .hfh-legal dd { margin-bottom: 8px; } }
.hfh-legal .hfh-linkbtn { color: var(--ink); text-decoration: underline; font-weight: 700; }
/* news articles: the old image column is 300px wide and boxes its links like thumbnails */
.news-img-wrap .outer:has(.hfh-embed) { max-width: 640px; width: 100%; float: none; margin-right: 0; }
.mscontent .news-img-wrap .hfh-embed a:link,
.mscontent .news-img-wrap .hfh-embed a:visited { display: inline; float: none; padding: 0; background: none; border: 0; box-shadow: none; color: #fff; }
