/* Mediainstall – Stylesheet */

/* ---------- Schrift (lokal gehostet) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }

/* ---------- Variablen ---------- */
:root {
  --primary: #003366;
  --secondary: #999999;
  --text: #222222;
  --muted: #555555;
  --bg: #ffffff;
  --bg-alt: #f4f4f4;
  --border: #e2e2e2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 51, 102, .08);
  --container: 1200px;
  --header-h: 76px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .2em; }
a:hover { color: var(--secondary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .cta :focus-visible, .site-footer :focus-visible { outline-color: #fff; }
/* Überschriften: keine automatische Silbentrennung, Zeilen gleichmäßig verteilt (balance) */
h1, h2, h3, h4 { line-height: 1.25; color: var(--primary); margin: 0 0 .6em; overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: clamp(1.65rem, 1rem + 3vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1rem + 1.6vw, 2.1rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 1rem + .4vw, 1.2rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
/* Fließtext: keine einzelnen Wörter in der letzten Zeile (pretty) */
p, li, blockquote, summary { text-wrap: pretty; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.2em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .75em 1.6em; border-radius: 999px; border: 2px solid var(--primary);
  background: var(--primary); color: #fff; font-weight: 500; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.btn--light { background: #fff; color: var(--primary); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: var(--secondary); }
.btn--ghost:hover { background: #fff; color: var(--primary); border-color: #fff; }
.btn--outline { background: transparent; color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.logo img { width: 200px; height: auto; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav-link {
  display: block; padding: .5rem .9rem; border-radius: 8px;
  color: var(--text); font-weight: 500; text-decoration: none;
}
.nav-link:hover { color: var(--secondary); }
.nav-link[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav-lang { display: inline-block; font-size: .85rem; border: 1px solid var(--border); padding: .3rem .6rem; }
.nav-cta { margin-left: .75rem; }

.has-sub { position: relative; }
.has-sub > .nav-link::after { content: ""; display: inline-block; margin-left: .45em; width: .45em; height: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2em) rotate(45deg); }
.sub {
  list-style: none; margin: 0; padding: .5rem;
  position: absolute; left: 0; top: 100%; min-width: 320px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; }
.sub a:hover, .sub a[aria-current="page"] { background: var(--bg-alt); color: var(--primary); }

/* Mobiles Menü: Checkbox-Toggle ohne JavaScript */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
@media (min-width: 1001px) { .nav-toggle { display: none; } } /* auf dem Desktop kein unsichtbarer Tab-Stopp */
.nav-toggle-label { display: none; cursor: pointer; padding: .6rem; border-radius: 8px; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  display: block; width: 24px; height: 2px; background: var(--primary); position: relative; transition: transform .25s ease, background-color .25s ease;
}
.nav-toggle-label span::before, .nav-toggle-label span::after { content: ""; position: absolute; }
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }
.nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid var(--primary); }

@media (max-width: 1000px) {
  .nav-toggle-label { display: block; }
  /* Panel füllt den Bildschirm unter dem Header und blendet weich ein und aus */
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: #fff; padding: .75rem 1.25rem 1.5rem; overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .nav-toggle:checked ~ .main-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .25s ease, transform .25s ease, visibility 0s; }
  html:has(.nav-toggle:checked) { overflow: hidden; } /* Seite dahinter scrollt nicht mit */
  .nav-toggle:checked + .nav-toggle-label span { background-color: transparent; }
  .nav-toggle:checked + .nav-toggle-label span::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span::after { transform: translateY(-7px) rotate(-45deg); }

  /* Aufbau: Hauptpunkte Services und Karriere, darunter eingerückt die Service-Seiten;
     unten Sprache + Kontakt in einer Zeile */
  .nav-list { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 .75rem; }
  .nav-list > li { grid-column: 1 / -1; }
  .nav-list > li:not(.nav-item-lang, .nav-item-cta) { border-bottom: 1px solid var(--border); }
  .nav-list > li > .nav-link:not(.nav-lang) {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1rem 0; border-radius: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: var(--text);
  }
  .nav-list > li > .nav-link:not(.nav-lang)::after {
    content: ""; flex: none; width: .45em; height: .45em; margin: 0; border: solid var(--secondary); border-width: 2px 2px 0 0; transform: rotate(45deg);
  }
  /* "inherit" statt "visible": sonst bliebe das Untermenü im geschlossenen Panel klickbar */
  .sub, .has-sub:hover > .sub, .has-sub:focus-within > .sub {
    position: static; opacity: 1; visibility: inherit; transform: none; transition: none; box-shadow: none; min-width: 0;
    margin: -.25rem 0 1rem .1rem; padding: 0; border: 0; border-left: 2px solid var(--border); border-radius: 0;
  }
  .sub a { margin-left: -2px; padding: .5rem 0 .5rem 1rem; border-left: 2px solid transparent; border-radius: 0; font-size: 1rem; line-height: 1.35; color: var(--muted); }
  .sub a:hover, .sub a[aria-current="page"] { background: none; color: var(--primary); border-left-color: var(--primary); }
  .nav-list .nav-link[aria-current="page"] { color: var(--primary); }
  .nav-list .nav-link[aria-current="page"]::after { border-color: var(--primary); }
  .nav-list > .nav-item-lang, .nav-list > .nav-item-cta { grid-column: auto; padding-top: 1.75rem; }
  .nav-list .nav-lang, .nav-cta { display: flex; align-items: center; justify-content: center; height: 3rem; margin: 0; }
  .nav-list .nav-lang { padding: 0 1.1rem; font-size: .9rem; font-weight: 600; border-radius: 999px; }
  .nav-cta { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--primary);
  color: #fff; padding: clamp(4rem, 10vw, 7.5rem) 0;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { color: #fff; max-width: 60ch; }
.hero--image { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero--image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 51, 102, .92) 0%, rgba(0, 51, 102, .55) 100%); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }

.page-hero { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); padding: clamp(3rem, 7vw, 5.5rem) 0; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: .8rem; }
.eyebrow::before { content: ""; display: inline-block; width: 2rem; height: 2px; margin-right: .6rem; vertical-align: middle; background: var(--secondary); }

/* ---------- Sektionen & Layout ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split img, .media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.media-pair img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 583 / 639; object-fit: cover; }

@media (max-width: 800px) {
  .split, .cols-2 { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
}

/* ---------- Karten ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.feature-num {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem;
  border-radius: 12px; background: var(--primary); color: #fff; font-weight: 600;
}
.feature p { color: var(--muted); font-size: .95rem; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--secondary); color: inherit; }
.service-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.service-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.service-card p { color: var(--muted); font-size: .95rem; }
.more { margin-top: auto; padding-top: 1rem; color: var(--primary); font-weight: 500; }

/* ---------- Zitat ---------- */
.quote { max-width: 850px; margin: 0 auto; text-align: center; }
.quote blockquote { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.quote figcaption { margin-top: 1.5rem; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--primary); font-size: 1.05rem; }

/* ---------- Partner-Logos ---------- */
/* Laufband, endlos und zusätzlich manuell scrollbar (Wischen, Trackpad, Pfeiltasten):
   - .marquee-track enthält Liste 1+2 im Fluss (Breite = 2 Listen) und Liste 3 absolut rechts daneben;
     die Animation verschiebt um genau eine Liste (-50 %), danach wiederholt sich das Bild nahtlos.
   - .marquee-clip schneidet auf 2 Listen zu. Dadurch bleibt die scrollbare Breite konstant,
     und rechts vom sichtbaren Bereich liegt immer Inhalt (kein Anschlag, keine Lücke).
   - Während der Interaktion pausiert die Animation. */
.marquee {
  --logo-w: 210px; --logo-gap: 1rem;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding: .25rem 0;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee-clip { width: max-content; overflow: hidden; overflow: clip; }
.marquee-track { position: relative; display: flex; width: max-content; animation: marquee 110s linear infinite; }
.logo-row--extra { position: absolute; top: 0; left: 100%; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee:active .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logo-row { list-style: none; margin: 0; padding: 0 var(--logo-gap) 0 0; display: flex; gap: var(--logo-gap); }
.logo-row li {
  flex: none; width: var(--logo-w); aspect-ratio: 3 / 2; padding: .9rem;
  display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 10px;
}
.logo-row img { max-height: 75px; width: auto; object-fit: contain; }
@media (max-width: 700px) {
  .marquee { --logo-w: 150px; --logo-gap: .5rem; }
  .logo-row li { aspect-ratio: 2 / 1; padding: .5rem; }
  .logo-row img { max-height: 46px; }
}
/* Ohne Bewegung: Logos als wischbare Leiste, Kopien ausblenden */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { mask-image: none; }
  .logo-row[aria-hidden="true"] { display: none; }
}

/* ---------- "Wir sind Teil von" ---------- */
.member { background: #fff; border-top: 1px solid var(--border); padding: 3rem 0; text-align: center; }
.member h2 { font-size: 1.3rem; }
.member img { margin: 1rem auto 0; max-width: 260px; }

/* ---------- Call to Action ---------- */
.cta { position: relative; isolation: isolate; color: #fff; padding: clamp(4rem, 9vw, 6.5rem) 0; text-align: center; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 51, 102, .9); }
.cta h2 { color: #fff; }
.cta p { max-width: 720px; margin-inline: auto; color: #fff; }
.cta .btn-row { justify-content: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 900px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3.2rem 1.1rem 1.4rem; position: relative;
  font-weight: 500; color: var(--primary);
}
.faq summary { text-wrap: balance; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--secondary); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 1.4rem 1.3rem; color: var(--muted); }

/* ---------- Karriere ---------- */
.jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; align-items: start; }
.job { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.job img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 30%; }
.job-body { padding: 1.6rem; }
.job-body h3 { font-size: 1.3rem; }
.job-body h4 { margin: 1.3em 0 .4em; }
.job-body ul { margin: 0 0 1em; color: var(--muted); }
.job-body p { color: var(--muted); }
.apply { margin-top: 2.5rem; text-align: center; }
.apply p { font-weight: 500; margin-bottom: 1rem; }

/* ---------- Kontakt ---------- */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.contact-list a { display: inline-flex; align-items: center; gap: .8rem; color: var(--text); text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--secondary); }
.contact-list .icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-alt); color: var(--primary); flex: none; }
.contact-card { background: var(--bg-alt); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Rechtstexte ---------- */
.prose { max-width: 850px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { overflow-wrap: anywhere; }
.address { margin-bottom: 1.5em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #fff; padding: 4rem 0 0; font-size: .95rem; border-top: 4px solid var(--secondary); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-grid h2 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-logo { width: 190px; margin-bottom: 1rem; }
.footer-avs { width: 150px; margin-bottom: .8rem; background: #fff; padding: .5rem .7rem; border-radius: 8px; box-sizing: content-box; } /* Logo ist für hellen Grund gemacht */
.site-footer { padding-bottom: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- 404 ---------- */
.error-en { margin-top: 2rem; color: var(--muted); }
