/* WEBSITEWEITE GESTALTUNG: Grundlagen, Menü, Footer und gemeinsame Elemente. */
/* 1. Grundlagen und Farben */
:root {
    color-scheme: dark;
    --ci-red: #b40104;
    --red: var(--ci-red);
    --font-body: 17px;
    --font-ui: 15px;
    --surface: #fff;
    --field: #fff;
    --line: #d2cdd5;
    --field-line: #bcb5c0;
    --ink: #f5f4f6;
    --dark: #171719;
    --paper: #171719;
    /* Einheitliche Rubrik-Hintergründe auf Startseite und Mediathek. */
    --bereich-dunkel: #111113;
    --bereich-anthrazit: #242427;
    --rubrik-hinweis-farbe: #dedbe1;
    --rubrik-hinweis-groesse: 16px;
    --muted: #ccc9d0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 110px) + 20px); }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--paper); color: var(--ink); font-size: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.wrap { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 15px; background: white; z-index: 100; }
.skip-link:focus { top: 10px; }
.preview-bar { padding: 8px 20px; color: #ececee; background: #29292c; text-align: center; font-size: 10px; letter-spacing: 1.8px; }
.preview-bar span { color: #b6b6bb; letter-spacing: .3px; margin-left: 20px; }
.eyebrow { font-size: 14px; font-weight: 700; line-height: 1.7; letter-spacing: 2px; margin: 0 0 22px; }
.red { color: var(--red); }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: clamp(32px,3.6vw,48px); font-weight: 500; line-height: 1.12; letter-spacing: -1.7px; margin-bottom: 25px; }
h3 { font-size: 28px; font-weight: 500; letter-spacing: -.8px; margin-bottom: 0; }
p { line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 56px; border: 1px solid var(--red); padding: 17px 23px; background: var(--red); color: white; font-size: var(--font-ui); font-weight: 600; transition: background .2s, transform .2s; }
.button span { font-size: 23px; line-height: 1; }
.text-link { display: inline-block; border-bottom: 1px solid var(--red); padding-bottom: 6px; font-size: 14px; }
.programm-link-inline { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; }
.subpage .orts-abschnittstitel { font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 12px; letter-spacing: -.03em; }
.section { padding-block: 94px; }


/* Gemeinsame Formularbasis. Komponenten ergänzen nur ihre Anordnung. */
input, textarea { font-family: inherit; font-size: var(--font-body); }
button { font-family: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Gemeinsame Lesefarben für dunkle Inhaltsbereiche. */

.martin-page .eyebrow.red { color: #dedbe1; border-left: 2px solid var(--ci-red); padding-left: 12px; }

/* Ruhiges Passepartout statt roter Ecken. Die Bilder bleiben unverändert. */
.editorial-photo { position: relative; margin: 0; padding: 16px; background: #111113; border: 1px solid #b4010499; box-shadow: 10px 10px 40px #b4010466; }
.editorial-photo img { display: block; width: 100%; height: auto; }
@media (max-width:760px) { .editorial-photo { padding: 9px; } }

/* Nicht sichtbares Zusatzfeld für automatisierte Formularanfragen. */
.formular-koeder { display: none !important; }

/* 2. Kopfbereich und Navigation */
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 9px 3.3%; background: var(--dark); color: white; position: sticky; top: 0; z-index: 30; box-shadow: 0 3px 18px #0003; }
.brand { display: block; flex-shrink: 0; width: 200px; }
.brand img { display: block; width: 100%; height: auto; }
.header nav { display: flex; align-items: center; gap: clamp(14px,1.7vw,26px); font-size: 15px; }
.header nav a { padding-block: 12px; }
.header nav a:hover { color: white; }

.menu-button { display: none; }
.hamburger { display: grid; gap: 5px; width: 24px; }
.hamburger i { height: 2px; background: white; display: block; }

/* 6. Footer mit Kontaktformular */
.footer { background: #171719; color: white; padding-top: 15px; }
.footer summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: 26px 0; gap: 20px; border-bottom: 1px solid #444348; font-size: 21px; }
.footer summary::-webkit-details-marker { display: none; }
.footer-plus { margin-left: auto; font-size: 29px; }
details[open] .footer-plus { transform: rotate(45deg); }
.footer-hint { margin-left: auto; color: #a3a0a8; font-size: 12px; }
details[open] .footer-hint { display: none; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; padding: 45px 0; }
.contact-copy h2 { font-size: 43px; }
.contact-copy p { font-size: 17px; color: #b2afb8; }
.contact-copy .phone { display: block; font-size: 27px; margin: 28px 0 13px; }
.contact-copy>a[href^="mailto"] { color: #ccc9d0; }
.contact-copy .address { margin-top: 24px; font-size: 15px; }
.form-note { color: #c9c4ce; font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.footer form label { display: block; margin-bottom: 22px; font-size: 15px; }
.footer input, .footer textarea { display: block; width: 100%; margin-top: 9px; padding: 13px 12px; background: #242427; color: white; border: 1px solid #555159; border-radius: 2px; min-width: 0; }
.footer input:focus, .footer textarea:focus { outline: none; border-color: var(--red); }
.footer input::placeholder, .footer textarea::placeholder { color: #a8a3ad; }
/* Gleiche Außenhöhe für Text und Datum; WebKit zentriert Datumswerte sonst. */
.footer input { height: 48px; line-height: 20px; text-align: left; }
.footer input[type="date"] { color-scheme: dark; appearance: none; -webkit-appearance: none; text-align: left; }
.footer input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 20px; }
.footer input[type="date"]::-webkit-datetime-edit { display: inline-flex; padding: 0; text-align: left; }
.footer input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.footer textarea { resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer form .button { width: auto; justify-self: start; }
#form-status:not(:empty) { background: #303034; border-left: 2px solid var(--red); padding: 16px; font-size: 15px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 30px; border-top: 1px solid #444348; }
.footer-bottom .brand { width: 220px; }
.footer-bottom p { margin-bottom: 0; color: #c8c2cd; font-size: 14px; }
.footer-bottom>div { display: flex; gap: 25px; font-size: 14px; color: #d6cfdc; }
.preview-note { font-size: 10px; color: #a7a0ad; border-top: 1px solid #333138; padding-block: 18px; margin: 0; }


/* Gemeinsame Layoutregeln für kleinere Ansichten. */
@media (max-width: 1150px) {
.header { padding: 9px 25px; }
.header .brand { width: 200px; }
.header nav { gap: 15px; font-size: 15px; }
}
@media (max-width: 1190px) {
.header { flex-wrap: wrap; }
.menu-button { display: flex; align-items: center; gap: 14px; background: none; border: 1px solid #6c6870; padding: 12px; color: white; font-size: 14px; }
.header nav { width: 100%; flex-wrap: wrap; font-size: 15px; }
/* Mit JavaScript liegt das schmale Menü über der Seite. Ohne JavaScript
   bleiben die Links im Seitenfluss erreichbar. */
.js .header { flex-wrap: nowrap; }
.js .header nav { display: none; position: absolute; top: 100%; right: 0; width: max-content; min-width: min(200px, calc(100vw - 20px)); max-width: calc(100vw - 20px); padding: 6px 0; background: #222225; border: 1px solid #4b474e; border-top: 2px solid var(--red); border-radius: 0 0 0 5px; box-shadow: -8px 14px 28px #0006; max-height: calc(100vh - var(--header-height,80px) - 12px); max-height: calc(100dvh - var(--header-height,80px) - 12px); overflow-y: auto; overscroll-behavior: contain; }
.js .header nav.open { display: grid; grid-template-columns: 1fr; gap: 0; }
.js .header nav a { display: block; min-height: 44px; padding: 12px 22px; font-size: 16px; line-height: 1.4; }
.js .header nav a:hover { background: #333236; text-decoration: none; }
.js .header nav a:last-child { border-bottom: 0; }
.header nav a { border-bottom: 1px solid #3e3a42; padding: 15px 0; }
.contact-grid { gap: 40px; }
}
@media (max-width: 760px) {
.wrap { width: calc(100% - 40px); }
.preview-bar { font-size: 9px; letter-spacing: 1px; }
.preview-bar span { display: none; }
.header { padding: 9px 20px; gap: 10px; }
.header .brand { width: min(180px, 56%); }
.menu-button { padding: 10px; gap: 9px; font-size: 14px; }
.contact-grid { grid-template-columns: 1fr; gap: 30px; padding-block: 30px; }
.contact-copy h2 { font-size: 36px; }
.footer summary { font-size: 19px; gap: 12px; }
.footer-hint { font-size: 13px; }
.field-pair { grid-template-columns: 1fr; gap: 0; }
.footer-bottom { flex-wrap: wrap; align-items: flex-start; gap: 23px; }
.footer-bottom .brand { width: 210px; }
.footer-bottom p { width: 100%; order: 2; }
.footer-bottom>div { flex-wrap: wrap; gap: 20px; }
}

/* Footer: Kontakt und rechtliche Links bleiben ohne Aufklappen erreichbar.
   Die Kontakte sind Geschwister des details-Elements, keine Links im summary.
   Nur die Formular-Schaltfläche liegt rechts über dem roten Abschlussbalken. */
.footer { position: relative; padding: 0; background: var(--footer-hintergrund, var(--bereich-dunkel)); border-top: 1px solid #3f3d43; --footer-toggle-width: 180px; }
.footer details { position: static; padding: 0; }
.footer summary { position: absolute; bottom: 0; left: auto; right: max(20px, calc((100% - 1180px) / 2)); width: var(--footer-toggle-width); height: 55px; min-height: 44px; padding: 0 0 0 16px; justify-content: flex-end; background: transparent; border: 0; font-size: 16px; font-weight: 400; gap: 12px; z-index: 2; }
.footer summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-plus { margin: 0; font-size: 26px; line-height: 1; }
.footer-panel { position: relative; padding-top: 30px; }
.footer-close { position: absolute; top: 12px; right: max(20px, calc((100% - 1180px) / 2)); width: 48px; height: 48px; border: 1px solid #77717d; background: #242427; color: white; font-size: 34px; line-height: 1; z-index: 1; }
.footer-close:hover { border-color: var(--ci-red); }
.footer .contact-grid { padding-block: 35px 20px; }
.footer .contact-copy h2 { font-size: 36px; }
.footer .contact-copy .address { margin-top: 24px; }
.footer textarea { min-height: 130px; }
.footer form h3 { font-size: 26px; margin-bottom: 25px; }
#form-status:empty { display: none; }
.footer-legal { display: flex; justify-content: flex-end; align-items: center; gap: 22px; padding: 9px 0; border: 0; font-size: 13px; line-height: 20px; color: #bcb8c2; }
.footer-legal a { padding: 3px 0; }
.footer-legal a:hover { color: white; text-decoration: underline; text-underline-offset: 4px; }
.footer-bar { background: var(--ci-red); color: white; }
.footer-bar-inner { min-height: 55px; display: flex; align-items: center; padding-right: calc(var(--footer-toggle-width) + 24px); }
.footer-contacts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding-block: 10px; }
.footer-contacts .contact-method { display: inline-block; color: white; font-size: 15px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.footer-contacts .contact-method:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-contacts .contact-method span { font-weight: 400; }
@media (max-width:760px) {
    .header nav, .js .header nav.open { grid-template-columns: 1fr; }
    .header nav a { padding-block: 12px; }
    .footer { --footer-toggle-width: 145px; }
    .footer summary { right: 20px; height: 44px; padding: 0 0 0 10px; gap: 8px; font-size: 14px; }
    .footer-plus { font-size: 23px; }
    .footer .contact-grid { padding-block: 25px 15px; }
    .footer-legal { padding-block: 7px; gap: 20px; }
    .footer-bar-inner { display: block; padding-right: 0; }
    .footer-contacts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; padding-block: 0; }
    .footer-contacts .contact-method { display: flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; white-space: normal; }
    .footer-contacts .contact-method span { flex-shrink: 0; }
    .footer-contacts .contact-method[href^="mailto:"] { display: block; grid-column: 1/-1; padding: 10px calc(var(--footer-toggle-width) + 10px) 10px 0; overflow-wrap: anywhere; }
    .footer-contacts .contact-method[href^="mailto:"] span { display: none; }
}

/* Eine gemeinsame Linie für aktuelle Seite, Hover und Tastaturfokus. */
.header nav a { position: relative; border-bottom: 0; text-decoration: none; }
.header nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ci-red); opacity: 0; }
.header nav a[aria-current="page"]::after,
.header nav a:hover::after,
.header nav a:focus-visible::after { opacity: 1; }
@media (max-width:1190px) { .header nav a::after { left: 22px; right: 22px; } }
.js .footer-bar { cursor: pointer; }
.footer-vcard { display: inline-block; margin: 0 0 22px; }

/* Roter Trenner über dem Kontaktformular. */
.footer-panel { border-top: 1px solid var(--ci-red); }
.footer-vcard { display: inline-grid; place-items: center; width: 46px; height: 42px; border: 1px solid #66616c; border-radius: 4px; color: #dedbe3; }
.footer-vcard svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.footer-vcard:hover { color: white; border-color: var(--ci-red); background: #ffffff08; }

.footer-legal .wand-solution { margin-right: auto; font-size: 12px; }
.footer-legal { flex-wrap: wrap; }
@media(max-width:600px) { .footer-legal .wand-solution { flex-basis: 100%; } }

/* Gemeinsames grünes Erfolgssymbol für Assistent, Footer und Gästebuch. */
.completion-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 54px; width: 54px; height: 54px; background: #27864b; color: #fff; border-radius: 50%; }
.completion-icon svg { display: block; width: 34px; height: 34px; }
#form-status.form-success, .guest-success { display: flex; align-items: flex-start; gap: 20px; }
.form-success-copy { min-width: 0; }
.form-success-copy strong { display: block; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; margin-bottom: 10px; }
.form-success-copy p { margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
    .completion-icon { flex-basis: 42px; width: 42px; height: 42px; }
    .completion-icon svg { width: 28px; height: 28px; }
    #form-status.form-success, .guest-success { gap: 14px; }
}

/****************************************************
 * RUHIGE TEXTMARKIERUNG
 * Text bleibt lesbar, nur die Hintergrundfläche fährt von links ein.
 * Ohne JavaScript fertige Markierung. Breite/Abstände bleiben unverändert.
 * Weitere Stellen bei Bedarf: <span class="text-markierung">Wort</span>
 ****************************************************/
.text-markierung {
    --markierung-verzoegerung: 1.2s; /* Hier Wartezeit ändern, z.B. 2s. */
    color: #fff;
    padding: .06em .14em;
    background-image: linear-gradient(var(--ci-red), var(--ci-red));
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size .8s ease-out var(--markierung-verzoegerung);
}
.text-markierung.markierung-wartet { transition: none; background-size: 0% 100%; }
@media (prefers-reduced-motion: reduce) {
    .text-markierung { transition: none; background-size: 100% 100% !important; }
}

/****************************************************
 * LINKPFEILE: WEICH & KRÄFTIG, ALLE RICHTUNGEN
 * Echte SVG-Grafiken, deshalb keine Emoji-/Schriftabhängigkeit.
 * Inline dieselbe Farbe wie der Text; freistehende Programmpfeile CI-Rot.
 ****************************************************/
.link-pfeil {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -.18em;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    pointer-events: none;
}
.button > .link-pfeil { font-size: 22px; }
.programme-arrow,
.programme-offer > span[aria-hidden="true"] { color: var(--ci-red); }

/****************************************************
 * FISM IM FOOTER / SICHERHEITSABFRAGE
 * Abstände und Feldbreite können hier angepasst werden.
 ****************************************************/
.footer-award { padding-top: 22px; }
.footer-award a { display: flex; justify-content: flex-start; align-items: center; gap: 18px; width: fit-content; margin: 0; color: #e6e3e8; text-decoration: none; line-height: 1.5; }
.footer-award img { display: block; width: 64px; height: auto; border-radius: 4px; }
.footer-award small { color: #bdb8c2; }
.formular-abschluss { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.footer .form-footnote {
    align-self: flex-start;
    margin: 0 auto 0 0;
    color: #c4bdc9;
    font-size: 13px;
    line-height: 21px;
}
.formular-jahreszahl { display: grid; gap: 5px; margin: 0; font-size: 15px; line-height: 1.4; }
.formular-jahreszahl input { width: 20ch; max-width: 100%; min-height: 46px; padding: 8px 10px; font: inherit; }
.formular-jahreszahl small { color: #c9c5ce; font-size: 13px; }
input[aria-invalid="true"] { outline: 2px solid #e47a7a; outline-offset: 2px; }
@media (max-width: 600px) {
    .formular-abschluss { flex-direction: column; align-items: stretch; }
    .footer-award a { font-size: 14px; }
}
/* Die allgemeineren Footer-Feldregeln hier gezielt übersteuern. */
.footer form .formular-jahreszahl { display: grid; margin-bottom: 0; }
.footer .formular-jahreszahl input { width: 20ch; max-width: 100%; margin-top: 0; }
.footer .formular-jahreszahl input[aria-invalid="true"] { border-color: #e47a7a; outline: 2px solid #e47a7a; outline-offset: 2px; }

/****************************************************
 * KURZANFRAGE: ERFOLG GRÜN, E-MAIL-FEHLER ROT
 ****************************************************/
#form-status.form-success { background: #205b38; border: 1px solid #4fbf76; border-left-width: 4px; color: #effbf2; }
#form-status.form-email-error { display: flex; align-items: flex-start; gap: 20px; background: #3b1d20; border: 1px solid #d84b53; border-left-width: 4px; color: #fff0f1; }
#form-status.form-email-error .completion-icon { background: #b40104; }
@media (max-width: 760px) { #form-status.form-email-error { gap: 14px; } }

/* Auch Pflichtfeld-/Serverfehler vollständig rot, nicht nur die linke Linie. */
#form-status.form-error { background: #3b1d20; color: #ffe0e3; border: 1px solid #d84b53; border-left-width: 4px; }
#form-status.form-success .completion-icon { background: #2e9f59; }
