/* medix-ems Theme: baut auf Bootstrap 5.3 auf. Farben in tokens.css. */
:root {
  --bs-body-color: var(--mx-ink);
  --bs-body-bg: var(--mx-white);
  --bs-link-color: var(--mx-blue);
  --bs-link-hover-color: var(--mx-red);
  --bs-primary: var(--mx-blue);
  --bs-primary-rgb: 10, 83, 192;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mx-grad-blue: linear-gradient(135deg, var(--mx-blue) 0%, var(--mx-blue-dark) 100%);
  /* Lichteffekt: weicher Schein oben links und unten rechts über dem Farbverlauf */
  --mx-grad-red: radial-gradient(ellipse 55% 140% at 10% -25%, rgba(255, 255, 255, var(--mx-glow-alpha)), transparent 62%),
                 radial-gradient(ellipse 45% 120% at 98% 125%, rgba(255, 255, 255, calc(var(--mx-glow-alpha) * .75)), transparent 62%),
                 linear-gradient(135deg, var(--mx-red-mid) 0%, var(--mx-red-dark) 100%);
  --mx-grad-footer: radial-gradient(ellipse 55% 140% at 8% -25%, rgba(255, 255, 255, var(--mx-glow-alpha)), transparent 62%),
                    radial-gradient(ellipse 45% 120% at 100% 125%, rgba(110, 165, 255, .30), transparent 62%),
                    linear-gradient(135deg, var(--mx-blue) 0%, var(--mx-blue-dark) 72%, #051f50 100%);
  --mx-stripe: linear-gradient(90deg, var(--mx-red), var(--mx-blue));
}

body { line-height: 1.6; }
h1, h2, h3, h4 { color: var(--mx-ink); font-weight: 700; letter-spacing: .01em; }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--mx-blue);
  outline-offset: 3px;
}

.mx-skip { position: absolute; left: .5rem; top: -4rem; z-index: 2000; background: var(--mx-white); padding: .5rem 1rem; border-radius: .5rem; }
.mx-skip:focus { top: .5rem; }

/* Kopfbereich */
.mx-header { background: var(--mx-white); border-bottom: 4px solid transparent; border-image: var(--mx-stripe) 1; position: sticky; top: 0; z-index: 1030; }
.mx-header .container, .mx-footer .container, .mod_article .container { max-width: 1140px; }
.mx-header .container { display: flex; align-items: center; gap: 1.25rem; min-height: 5rem; }
.mx-logo img { height: 3.4rem; width: auto; display: block; }
.mx-nav { margin-left: auto; }
.mx-nav > a.invisible, .mx-lang > a.invisible, .mx-nav > a[id^="skipNavigation"], .mx-lang > a[id^="skipNavigation"] { display: none; }
@media (min-width: 992px) { .mx-header .mx-nav, .mx-header .mx-cta, .mx-header .mx-lang { display: flex; align-items: center; } }
.mx-header .mx-nav ul, .mx-header .mx-lang ul { margin: 0; }
.mx-header .mx-nav > ul > li > a, .mx-header .mx-nav > ul > li > strong { line-height: 1.5; padding-top: .45rem; padding-bottom: .45rem; }
.mx-header .btn-mx { padding-top: .6rem; padding-bottom: .6rem; line-height: 1.5; }
.mx-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; }
.mx-nav a, .mx-nav strong { display: block; padding: .45rem .15rem; font-weight: 600; font-size: .95rem; color: var(--mx-ink); text-decoration: none; border-bottom: 3px solid transparent; }
.mx-nav a:hover, .mx-nav a:focus-visible { color: var(--mx-red); border-bottom-color: var(--mx-red); }
.mx-nav .active, .mx-nav strong { color: var(--mx-red); border-bottom-color: var(--mx-red); }
.mx-lang { position: relative; }
.mx-lang ul { list-style: none; margin: 0; padding: 0; }
.mx-lang a, .mx-lang strong { display: block; padding: .55rem .9rem; border-radius: .5rem; font-weight: 600; text-decoration: none; color: var(--mx-ink); white-space: nowrap; }
.mx-lang a:hover, .mx-lang a:focus-visible { background: var(--mx-light); color: var(--mx-red-dark); }
.mx-lang strong { color: var(--mx-blue-dark); }
.mx-lang strong::after { content: " ✓"; }
.mx-langbtn { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; padding: 0; background: var(--mx-white); border: 2px solid var(--mx-blue); border-radius: 50%; color: var(--mx-blue); cursor: pointer; transition: background .15s, color .15s; }
.mx-langbtn:hover, .mx-langbtn[aria-expanded="true"] { background: var(--mx-blue); color: var(--mx-white); }
.mx-langbtn svg { width: 1.35rem; height: 1.35rem; }
.mx-lang.is-enhanced ul { display: none; position: absolute; right: 0; top: calc(100% + .6rem); z-index: 1040; min-width: 10rem; padding: .5rem; background: var(--mx-white); border-radius: .75rem; border-top: 3px solid var(--mx-red); box-shadow: 0 10px 28px rgba(11, 42, 91, .2); }
.mx-lang.is-enhanced.is-open ul { display: block; }
/* Burger-Schalter (nur mobil sichtbar): drei Balken werden zum Kreuz */
.mx-toggle { display: none; position: relative; width: 2.9rem; height: 2.9rem; margin-left: auto; padding: 0; background: var(--mx-white); border: 2px solid var(--mx-blue); color: var(--mx-blue); border-radius: .75rem; cursor: pointer; transition: background .2s, color .2s; }
.mx-toggle:hover, .mx-toggle[aria-expanded="true"] { background: var(--mx-blue); color: var(--mx-white); }
.mx-burger, .mx-burger::before, .mx-burger::after { position: absolute; left: 50%; width: 1.4rem; height: 3px; margin-left: -.7rem; border-radius: 2px; background: currentColor; transition: transform .28s ease, top .28s ease, background .2s; }
.mx-burger { top: 50%; margin-top: -1.5px; }
.mx-burger::before, .mx-burger::after { content: ""; }
.mx-burger::before { top: -.46rem; }
.mx-burger::after { top: .46rem; }
.mx-toggle[aria-expanded="true"] .mx-burger { background: transparent; }
.mx-toggle[aria-expanded="true"] .mx-burger::before { top: 0; transform: rotate(45deg); }
.mx-toggle[aria-expanded="true"] .mx-burger::after { top: 0; transform: rotate(-45deg); }
.mx-subtoggle { display: none; }

.mx-cta .btn-mx { white-space: nowrap; }
.btn-mx { background: var(--mx-red); color: var(--mx-white); border: 0; border-radius: 2rem; padding: .6rem 1.4rem; font-weight: 700; text-decoration: none; display: inline-block; transition: background .15s, transform .15s; }
.btn-mx:hover, .btn-mx:focus-visible { background: var(--mx-red-dark); color: var(--mx-white); transform: translateY(-1px); }
.btn-mx--light { background: var(--mx-white); color: var(--mx-red-dark); }
.btn-mx--light:hover, .btn-mx--light:focus-visible { background: var(--mx-light); color: var(--mx-red-dark); }

@media (min-width: 992px) { .mx-nav-wrap { display: contents; } }
@media (max-width: 991.98px) {
  .mx-toggle { display: block; }
  .mx-header .container { position: relative; min-height: 4.5rem; }
  .mx-logo img { height: 3rem; }
  /* Das Menü liegt als Fläche unter der Kopfzeile: Navigation, Sprache, Angebot-Button */
  .mx-nav-wrap { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); flex-direction: column; gap: 1.25rem; padding: .75rem 1.5rem 1.5rem; background: var(--mx-white); max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 18px 30px rgba(11, 42, 91, .22); border-radius: 0 0 1.25rem 1.25rem; }
  .mx-header.is-open .mx-nav-wrap { display: flex; animation: mx-menu-in .25s ease-out; }
  .mx-nav, .mx-cta, .mx-lang { width: 100%; margin-left: 0; }
  .mx-nav { order: 1; }
  .mx-lang { order: 2; }
  .mx-cta { order: 3; }
  html.mx-menu-open { overflow: hidden; }

  .mx-nav ul { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; }
  .mx-nav > ul > li { border-bottom: 1px solid #e3eaf6; }
  .mx-nav > ul > li:last-child { border-bottom: 0; }
  .mx-nav a, .mx-nav strong { padding: .9rem .25rem; font-size: 1.05rem; border-bottom: 0; }
  .mx-nav a:hover, .mx-nav a:focus-visible { border-bottom: 0; }
  .mx-nav .active, .mx-nav strong { border-bottom: 0; }
  .mx-header .mx-nav li.submenu > a::after { display: none; }
  .mx-nav li.submenu { display: flex; flex-wrap: wrap; align-items: center; }
  .mx-nav li.submenu > a, .mx-nav li.submenu > strong { flex: 1; }
  .mx-subtoggle { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; background: var(--mx-light); border: 0; border-radius: 50%; color: var(--mx-blue); cursor: pointer; }
  .mx-subtoggle::before { content: ""; width: .6rem; height: .6rem; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: translateY(-.1rem) rotate(45deg); transition: transform .25s; }
  .mx-subtoggle[aria-expanded="true"]::before { transform: translateY(.1rem) rotate(-135deg); }
  .mx-nav li.submenu > ul.level_2, .mx-nav li.submenu:hover > ul.level_2, .mx-nav li.submenu:focus-within > ul.level_2 { display: none; width: 100%; }
  .mx-nav li.submenu.is-expanded > ul.level_2, .mx-nav li.submenu.is-expanded:hover > ul.level_2 { display: flex; }
  .mx-nav ul.level_2 a, .mx-nav ul.level_2 strong { padding: .7rem .5rem; font-size: 1rem; }

  /* Sprache: beide Sprachen als Schaltflächen nebeneinander statt Auswahlfeld */
  .mx-lang::before { content: attr(aria-label); display: block; margin-bottom: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mx-ink); opacity: .75; }
  .mx-langbtn { display: none; }
  .mx-lang.is-enhanced ul, .mx-lang.is-enhanced.is-open ul { display: flex; position: static; flex-wrap: wrap; gap: .5rem; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .mx-lang a, .mx-lang strong { padding: .6rem 1.1rem; border: 2px solid var(--mx-blue); border-radius: 2rem; }
  .mx-lang strong { background: var(--mx-blue); color: var(--mx-white); }
  .mx-lang a:hover, .mx-lang a:focus-visible { background: var(--mx-light); }
  .mx-header .mx-cta { display: block; }
  .mx-cta .btn-mx { display: block; text-align: center; padding: .85rem 1.4rem; }
}
@keyframes mx-menu-in { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mx-burger, .mx-burger::before, .mx-burger::after, .mx-subtoggle::before { transition: none; }
  .mx-header.is-open .mx-nav-wrap { animation: none; }
}

/* Untermenü (Leistungen, Über uns) */
.mx-nav li { position: relative; }
.mx-nav li.submenu > a::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); }
.mx-nav ul.level_2 { display: none; position: absolute; left: -.75rem; top: 100%; z-index: 1040; min-width: 15rem; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: .5rem; background: var(--mx-white); border-radius: .75rem; border-top: 3px solid var(--mx-red); box-shadow: 0 10px 28px rgba(11, 42, 91, .2); }
.mx-nav li:hover > ul.level_2, .mx-nav li:focus-within > ul.level_2 { display: flex; }
.mx-nav ul.level_2 a, .mx-nav ul.level_2 strong { padding: .55rem .75rem; border-bottom: 0; border-radius: .5rem; font-weight: 600; white-space: nowrap; }
.mx-nav ul.level_2 a:hover, .mx-nav ul.level_2 a:focus-visible { background: var(--mx-light); color: var(--mx-red-dark); }
@media (max-width: 991.98px) {
  .mx-nav ul.level_2 { position: static; box-shadow: none; border-top: 0; padding: 0 0 .5rem 1rem; min-width: 0; border-left: 3px solid var(--mx-light); border-radius: 0; margin-left: .25rem; }
  .mx-nav ul.level_2 a { white-space: normal; }
}

/* Sektionen */
.mod_article { padding: 3.5rem 0; position: relative; }
.mod_article.section--hell { background: var(--mx-white); }
.mod_article.section--hell-grau { background: linear-gradient(180deg, var(--mx-light), var(--mx-white)); }
.mod_article.section--rot { background: var(--mx-grad-red); color: var(--mx-white); }
.mod_article.section--blau { background: var(--mx-grad-blue); color: var(--mx-white); }
.section--rot h1, .section--rot h2, .section--rot h3, .section--blau h1, .section--blau h2, .section--blau h3 { color: var(--mx-white); }
.section--rot a:not(.btn-mx), .section--blau a:not(.btn-mx) { color: var(--mx-white); text-decoration: underline; }
.section--rot :focus-visible, .section--blau :focus-visible { outline-color: var(--mx-white); }
.mod_article h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.mx-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 700; opacity: .85; }

/* Einstieg */
.mx-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.mx-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.15; color: var(--mx-ink); }
.mx-hero h1 span { color: var(--mx-red); }
.mx-hero img { width: 100%; height: auto; border-radius: 40% 1rem 1rem 40% / 50% 1rem 1rem 50%; box-shadow: 0 12px 32px rgba(11, 42, 91, .22); }
@media (max-width: 767.98px) { .mx-hero { grid-template-columns: 1fr; } .mx-hero img { border-radius: 1rem; } }

/* Karten */
.mx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.mx-card { background: var(--mx-white); border: 1px solid #dbe4f3; border-radius: 1rem; overflow: hidden; box-shadow: 0 2px 8px rgba(11, 42, 91, .07); display: flex; flex-direction: column; color: var(--mx-ink); }
.mx-card::before { content: ""; display: block; height: .5rem; background: var(--mx-grad-blue); }
.mx-card:nth-child(even)::before { background: var(--mx-stripe); }
.mx-card .mx-card-body { padding: 1.25rem; flex: 1; }
.mx-card h3 { font-size: 1.15rem; }
.mx-card .mx-card-foot { padding: 0 1.25rem 1.25rem; }
.mx-card .mx-card-foot a { display: inline-block; background: var(--mx-red); color: var(--mx-white); border-radius: 2rem; padding: .55rem 1.3rem; font-weight: 700; text-decoration: none; transition: background .15s, transform .15s; }
.mx-card .mx-card-foot a:hover, .mx-card .mx-card-foot a:focus-visible { background: var(--mx-red-dark); color: var(--mx-white); transform: translateY(-1px); }

/* Zähler */
.mx-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.mx-counters .mx-num { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; }

/* Tags (Equipment, Einsatzgebiete) */
.mx-tags { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.mx-tags li { background: var(--mx-light); color: var(--mx-ink); border: 1px solid #b9c9e6; border-radius: 2rem; padding: .35rem .9rem; font-weight: 600; }
.section--blau .mx-tags li, .section--rot .mx-tags li { background: rgba(0, 0, 0, var(--mx-tag-alpha)); color: var(--mx-white); border-color: rgba(255, 255, 255, .55); }

/* FAQ */
.mx-faq .accordion-button { font-weight: 700; color: var(--mx-ink); }
.mx-faq .accordion-button:not(.collapsed) { background: var(--mx-light); color: var(--mx-blue-dark); }

/* Überschriften nicht über die ganze Breite: höchstens 66 % (nur ab Tablet-Breite) */
@media (min-width: 768px) {
  .mx-pagehead, .mod_article .container > h1, .mod_article .container > h2 { max-width: 66%; }
}

/* Unterseiten-Kopf */
.mx-pagehead h1 { color: var(--mx-white); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }

/* Formulare */
.mod_article .widget { margin-bottom: 1rem; }
.mod_article label, .mod_article .mx-label { font-weight: 600; display: block; margin-bottom: .25rem; }
.mod_article input[type=text], .mod_article input[type=email], .mod_article input[type=tel], .mod_article input[type=date], .mod_article input[type=number], .mod_article select, .mod_article textarea {
  width: 100%; font: inherit; font-size: 1rem; line-height: 1.4; padding: .6rem .8rem; border: 1px solid #8aa0c4; border-radius: .5rem; background: var(--mx-white); color: var(--mx-ink);
}
.mod_article fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.mod_article legend { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; float: none; width: auto; }
.mod_article .radio_container, .mod_article .checkbox_container { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.mod_article .radio_container > span, .mod_article .checkbox_container > span { display: inline-flex; align-items: center; gap: .5rem; }
.mod_article .radio_container label, .mod_article .checkbox_container label { display: inline; margin: 0; font-weight: 400; }
.mod_article input[type=radio], .mod_article input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--mx-blue); margin: 0; flex: none; }
.mod_article .submit, .mod_article button[type=submit] { background: var(--mx-red); color: var(--mx-white); border: 0; border-radius: 2rem; padding: .65rem 1.6rem; font-weight: 700; }
.mod_article .submit:hover { background: var(--mx-red-dark); }
.section--rot .submit, .section--rot button[type=submit] { background: var(--mx-white); color: var(--mx-red-dark); }
.mod_article .error { color: var(--mx-red-dark); font-weight: 600; }
.section--rot .error { color: var(--mx-white); }

/* Fußbereich */
.mx-footer { background: var(--mx-grad-footer); color: var(--mx-white); padding: 3rem 0 1.5rem; border-top: 4px solid transparent; border-image: var(--mx-stripe) 1; }
.mx-footer a { color: var(--mx-white); }
.mx-footer h2 { color: var(--mx-white); font-size: 1.1rem; }
.mx-footer .mx-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.mx-footer ul { list-style: none; margin: 0; padding: 0; }
.mx-footer .mx-legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .3); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Pflichtfeld-Hinweis von Contao (span.invisible) nimmt sonst Platz in Label und Legend ein; für Screenreader bleibt er lesbar. */
.widget .invisible {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; visibility: visible;
}

/* Custom Elements (templates/rsce_mx_*): Abstände zwischen den Elementen eines Abschnitts */
.mod_article > * + * { margin-top: .5rem; }
.mod_article .mx-tags { margin: 0; }
.mod_article .rsce_mx_tags + *, .mod_article .ce_rsce_mx_tags + * { margin-top: 1.25rem; }
.mx-hero figure { margin: 0; }
.mx-pagehead .lead { margin: 1rem 0 1.5rem; }
.mx-pagehead .lead:last-child { margin-bottom: 0; }
.mx-band { border-top: 1px solid rgba(255, 255, 255, .75); margin-top: 3rem; padding-top: 3rem; }
.mx-band h2 { max-width: none; }
.mx-contact .lead { margin-bottom: 1rem; }

/* Mobil: kompaktere Abschnitte */
@media (max-width: 767.98px) {
  .mod_article { padding: 2.25rem 0; }
  .mx-hero { gap: 1.5rem; }
  .mx-band { margin-top: 2rem; padding-top: 2rem; }
  .mx-cards { gap: 1rem; }
  .mx-card .mx-card-body { padding: 1rem; }
  .mx-counters { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .mx-counters .mx-num { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .mx-footer { padding: 2rem 0 1.25rem; }
  .mx-footer li a { display: inline-block; padding: .3rem 0; }
  .btn-mx { text-align: center; }
  .mx-pagehead .btn-mx, .mx-band .btn-mx, .mx-contact .btn-mx { display: block; }
  .mx-band .col-lg-4 { text-align: left; }
}

/* Karten: Icon-Badge und optionales Bild */
.mx-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-bottom: .75rem; border-radius: 50%; background: var(--mx-grad-blue); color: var(--mx-white); }
.mx-card:nth-child(even) .mx-card-icon { background: var(--mx-stripe); }
.mx-card-icon .mx-icon { width: 1.5rem; height: 1.5rem; }
.mx-card-media { margin: 0; }
.mx-card-media figure { margin: 0; }
.mx-card-media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* Kopfbereich: fast weißer Grund, darunter der rot-blaue Streifen */
.mx-header { background: #fbfcfe; }

/* Einstieg (Startseite): dunkelblaue Fläche mit Schein, Leuchtkurven und Puls */
.mod_article.section--hero {
  color: var(--mx-white); overflow: hidden; padding: 4rem 0 7rem;
  background: radial-gradient(ellipse 55% 80% at 78% 35%, rgba(50, 130, 255, .5), transparent 68%),
              radial-gradient(ellipse 40% 50% at 0% 100%, rgba(214, 16, 26, .28), transparent 72%),
              linear-gradient(160deg, #051a47 0%, #0a3a94 62%, #082a70 100%);
}
.mod_article.section--hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7rem; pointer-events: none; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 112' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%233f8cff' stop-opacity='0'/%3E%3Cstop offset='.5' stop-color='%23b9d6ff'/%3E%3Cstop offset='1' stop-color='%233f8cff' stop-opacity='.2'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23ff3b44' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23ff3b44'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 70 C360 110 800 70 1440 18' fill='none' stroke='url(%23b)' stroke-width='3'/%3E%3Cpath d='M0 96 C420 112 900 100 1440 52' fill='none' stroke='url(%23r)' stroke-width='2.5'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.mod_article.section--hero > * { position: relative; z-index: 1; }
.section--hero h1, .section--hero .mx-hero h1 { color: var(--mx-white); text-shadow: 0 0 1.5rem rgba(120, 180, 255, .35); }
.section--hero .mx-hero h1 span { color: #ff4a53; text-shadow: 0 0 1.4rem rgba(255, 59, 68, .5); }
.section--hero .mx-eyebrow { opacity: 1; color: var(--mx-white); }
.section--hero .mx-eyebrow::after { content: ""; display: inline-block; width: 7rem; height: 2px; margin-left: 1rem; vertical-align: middle; background: linear-gradient(90deg, #ff4a53, transparent); }
.section--hero .btn-mx { background: linear-gradient(180deg, #f0323c, #b30d16); padding: .8rem 1.8rem; box-shadow: 0 0 1.2rem rgba(255, 59, 68, .5), inset 0 1px 0 rgba(255, 255, 255, .35); }
.section--hero .mx-hero img {
  border: 3px solid transparent; border-radius: 3rem 1rem 3rem 1rem;
  background: linear-gradient(#0a2a6b, #0a2a6b) padding-box, linear-gradient(135deg, #8cc0ff, #3f8cff 45%, #ff3b44) border-box;
  box-shadow: 0 0 2rem rgba(63, 140, 255, .55), 0 0 3.5rem rgba(255, 59, 68, .25);
}
@media (max-width: 767.98px) {
  .mod_article.section--hero { padding: 2.25rem 0 5rem; }
  .mod_article.section--hero::after { height: 4.5rem; }
  .section--hero .mx-hero img { border-radius: 1.75rem .75rem 1.75rem .75rem; }
}
.section--hero .mx-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }

/* Alle roten Buttons wie im Einstieg: Verlauf mit Schein (die weiße Variante auf rotem Grund bleibt weiß) */
:root { --mx-btn-grad: linear-gradient(180deg, #f0323c, #b30d16); --mx-btn-grad-hover: linear-gradient(180deg, #ff4650, #c20f18); --mx-btn-glow: 0 0 1.2rem rgba(255, 59, 68, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-mx:not(.btn-mx--light), .mx-card .mx-card-foot a, .mod_article .submit, .mod_article button[type=submit] { background: var(--mx-btn-grad); box-shadow: var(--mx-btn-glow); padding: .8rem 1.8rem; }
.btn-mx:not(.btn-mx--light):hover, .btn-mx:not(.btn-mx--light):focus-visible, .mx-card .mx-card-foot a:hover, .mx-card .mx-card-foot a:focus-visible, .mod_article .submit:hover, .mod_article button[type=submit]:hover { background: var(--mx-btn-grad-hover); }
.mx-header .btn-mx:not(.btn-mx--light) { padding-top: .6rem; padding-bottom: .6rem; padding-inline: 1.4rem; }
.mx-card .mx-card-foot a { padding: .6rem 1.4rem; }
.section--rot .submit, .section--rot button[type=submit] { background: var(--mx-white); box-shadow: none; }
@media (max-width: 991.98px) { .mx-cta .btn-mx { padding: .85rem 1.4rem; } }

/* Aktuelles (News): Karten in der Liste, schmaler Lesebereich im Beitrag */
.mx-news .invisible, .mx-events .invisible { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; visibility: visible; }
.mx-news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.25rem; }
.mx-news-item { display: flex; flex-direction: column; background: var(--mx-white); border: 1px solid #dbe4f3; border-radius: 1rem; overflow: hidden; box-shadow: 0 2px 8px rgba(11, 42, 91, .07); color: var(--mx-ink); }
.mx-news-item::before { content: ""; order: -1; display: block; height: .5rem; background: var(--mx-grad-blue); }
.mx-news-item:nth-child(even)::before { background: var(--mx-stripe); }
.mx-news-media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.mx-news-media figure, .mx-news-media picture { display: block; margin: 0; }
.mx-news-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.mx-news-body .more { margin: auto 0 0; padding-top: 1rem; }
.mx-news-meta { margin: 0 0 .35rem; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mx-blue-dark); }
.mx-news-item h2 { font-size: 1.2rem; line-height: 1.3; margin-bottom: .6rem; }
.mx-news-item h2 a, .mx-event h2 a { color: var(--mx-ink); text-decoration: none; }
.mx-news-item h2 a:hover, .mx-news-item h2 a:focus-visible, .mx-event h2 a:hover, .mx-event h2 a:focus-visible { color: var(--mx-red); text-decoration: underline; }
.mx-news-item .content-text p:last-child, .mx-event .content-text p:last-child { margin-bottom: 0; }
.mx-news .more a, .mx-events .more a, .mx-news .back a, .mx-events .back a {
  display: inline-block; padding: .6rem 1.4rem; border-radius: 2rem; font-weight: 700; text-decoration: none; color: var(--mx-white);
  background: var(--mx-btn-grad); box-shadow: var(--mx-btn-glow); transition: background .15s, transform .15s;
}
.mx-news .more a:hover, .mx-events .more a:hover, .mx-news .back a:hover, .mx-events .back a:hover,
.mx-news .more a:focus-visible, .mx-events .more a:focus-visible, .mx-news .back a:focus-visible, .mx-events .back a:focus-visible { background: var(--mx-btn-grad-hover); color: var(--mx-white); transform: translateY(-1px); }
.mx-news .back, .mx-events .back { margin-top: 2rem; }
.mx-news-full, .mx-event-full { max-width: 46rem; }
.mx-news-full h2, .mx-event-full h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.mx-news-sub { font-size: 1.15rem; font-weight: 600; }
.mx-news-full img, .mx-event-full img { max-width: 100%; height: auto; border-radius: .75rem; }
.mx-news-full .enclosure, .mx-event-full .enclosure { padding-left: 1.2rem; }
.mod_newslist .pagination, .mod_eventlist .pagination { margin-top: 2rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.pagination li > a, .pagination li > strong { display: block; min-width: 2.5rem; padding: .45rem .8rem; border: 2px solid var(--mx-blue); border-radius: 2rem; text-align: center; font-weight: 700; text-decoration: none; color: var(--mx-blue); }
.pagination li > strong { background: var(--mx-blue); color: var(--mx-white); }
.pagination li > a:hover, .pagination li > a:focus-visible { background: var(--mx-light); }
.pagination p { margin-bottom: .75rem; }

/* Termine: Datums-Kachel links, Inhalt rechts */
.mx-event-list { display: grid; gap: 1rem; }
.mx-event { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.25rem; background: var(--mx-white); border: 1px solid #dbe4f3; border-left: 6px solid var(--mx-blue); border-radius: 1rem; box-shadow: 0 2px 8px rgba(11, 42, 91, .07); }
.mx-event:nth-child(even) { border-left-color: var(--mx-red); }
.mx-date-badge { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 4.5rem; height: 4.5rem; border-radius: 1rem; background: var(--mx-grad-blue); color: var(--mx-white); line-height: 1.1; box-shadow: 0 0 .9rem rgba(63, 140, 255, .35); }
.mx-event:nth-child(even) .mx-date-badge { background: var(--mx-stripe); }
.mx-date-day { font-size: 1.7rem; font-weight: 800; }
.mx-date-month { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mx-event-body { flex: 1; min-width: 0; }
.mx-event h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.mx-event .time, .mx-event .location, .mx-event-full .location { margin: 0 0 .25rem; font-weight: 600; }
.mx-event .location::before, .mx-event-full .location::before { content: "📍 " / ""; }
.mx-event .content-text { margin-top: .5rem; }
.mx-event .more { margin: .75rem 0 0; }
.mx-event-full .info { font-size: 1.05rem; font-weight: 700; color: var(--mx-blue-dark); }
@media (max-width: 575.98px) { .mx-event { flex-direction: column; gap: .75rem; } .mx-news-list { grid-template-columns: 1fr; } }

/* Kalender (Monatsansicht): Tabelle mit hervorgehobenen Tagen */
.mx-calendar table.calendar { width: 100%; max-width: 46rem; margin: 0 auto; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.mx-calendar th.head { padding: .6rem; font-size: 1.05rem; text-align: center; background: var(--mx-grad-blue); color: var(--mx-white); border-radius: .5rem; }
.mx-calendar th.head a { color: var(--mx-white); text-decoration: underline; font-size: .9rem; }
.mx-calendar th.label { padding: .35rem 0; font-size: .8rem; text-align: center; color: var(--mx-blue-dark); overflow: hidden; text-overflow: ellipsis; }
.mx-calendar td { height: 3.6rem; vertical-align: top; padding: .3rem .4rem; background: var(--mx-white); border: 1px solid #dbe4f3; border-radius: .5rem; font-size: .9rem; overflow: hidden; }
.mx-calendar td.empty { background: transparent; border-color: transparent; }
.mx-calendar td.weekend { background: var(--mx-light); }
.mx-calendar td.today { border: 2px solid var(--mx-red); font-weight: 800; }
.mx-calendar td.active { background: #e6efff; border-color: var(--mx-blue); }
.mx-calendar td .header { font-weight: 700; }
.mx-calendar td a { display: block; color: var(--mx-blue-dark); font-size: .8rem; line-height: 1.25; word-break: break-word; }
.mx-calendar td a:hover, .mx-calendar td a:focus-visible { color: var(--mx-red); }
@media (max-width: 575.98px) { .mx-calendar th.label { font-size: 0; } .mx-calendar th.label::first-letter { font-size: .8rem; } .mx-calendar td { height: 3rem; padding: .2rem; } .mx-calendar td a { font-size: .7rem; } }

/* Unterseiten-Kopf: dieselbe blaue Fläche wie der Einstieg der Startseite, nur flacher */
.mod_article.section--kopf { padding: 3rem 0 5.25rem; }
.mod_article.section--kopf::after { height: 4.5rem; }
.section--kopf .mx-pagehead .btn-mx { margin-top: .25rem; }
@media (max-width: 767.98px) { .mod_article.section--kopf { padding: 2rem 0 4rem; } .mod_article.section--kopf::after { height: 3.5rem; } }

/* Karten mit "drei pro Reihe": die letzte, unvollständige Reihe füllt die ganze Breite (5 Karten = 3 + 2, 7 = 3 + 3 + 1) */
.mx-cards--3 { grid-template-columns: 1fr; }
@media (min-width: 576px) {
  .mx-cards--3 { grid-template-columns: repeat(2, 1fr); }
  .mx-cards--3 > .mx-card:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (min-width: 992px) {
  .mx-cards--3 { grid-template-columns: repeat(6, 1fr); }
  .mx-cards--3 > .mx-card { grid-column: span 2; }
  .mx-cards--3 > .mx-card:last-child:nth-child(3n + 2) { grid-column: span 3; }
  .mx-cards--3 > .mx-card:nth-last-child(2):nth-child(3n + 1) { grid-column: span 3; }
  .mx-cards--3 > .mx-card:last-child:nth-child(3n + 1) { grid-column: span 6; }
}
