/* ============================================================
   Rynex Design System - built from farbsystem.md + bausteine
   ============================================================ */

/* --- Selbst-gehostete Fonts (DSGVO) ----------------------------
   Variable WOFF2-Dateien decken den gesamten Gewichtsbereich ab,
   daher genügt eine Datei pro Familie und Subset für alle Schnitte.
   Inter: 400 / 600 / 700  |  Montserrat: 700 / 800
   Vorgabe: Vorgaben/Styleguides/technische-vorgaben.md
---------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- :root - 10 Farben aus farbsystem.md --- */
:root {
  --lead: #2c3f84;
  --accent: #872a8f;
  --accent-dark: #5f1d64;
  --highlight: #00e8ff;
  --dark-bg: #2d343b;
  --ink: #2d343b;
  --light-bg: #dde3e8;
  --grey: #dde3e8;
  --soft-line: #dde3e8;
  --line: #2d343b;
  --paper: #ffffff;
  --gold: #e2b64f;
  --error: #b71c1c;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", sans-serif;
  font-size: clamp(15px, 14px + 0.25vw, 17px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3 {
  font-family: "Montserrat", sans-serif;
  line-height: 1.2;
  color: var(--lead);
}

h1 { font-size: clamp(1.7rem, 1.05rem + 2.7vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 0.95rem + 1.6vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.5rem); font-weight: 700; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 0.6rem + 1.5vw, 2rem);
}

.section {
  padding: clamp(3rem, 2rem + 4vw, 5rem) 0;
}

.section.grey {
  background: var(--grey);
}

/* --- O1 - Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 260px;
  padding: 0.64rem 1.15rem;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: var(--paper);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: transparent;
  border-color: var(--lead);
  color: var(--lead);
}

.button.secondary:hover {
  background: var(--lead);
  color: var(--paper);
}

.button.secondary-dark {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}

.button.secondary-dark:hover {
  background: rgba(255,255,255,0.1);
}

/* --- G1 - Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--dark-bg);
  height: 80px;
}

.site-nav .container {
  display: flex;
  height: 100%;
  gap: 2rem;
  align-items: flex-end;
  padding-bottom: 0;
}

/* Shared bottom alignment for all nav elements */
.site-nav .container > * {
  margin-bottom: 16px;
}

/* Logo and CTA-Button: vertically centered instead of bottom-aligned */
.nav-logo,
.nav-cta {
  margin-bottom: auto;
  margin-top: auto;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.primary-nav {
  display: flex;
  align-items: flex-end;
  gap: 1.8rem;
  flex: 1;
  list-style: none;
}

.primary-nav > li {
  position: relative;
}

.primary-nav > li > a,
.primary-nav > li > span {
  color: var(--light-bg);
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease;
}

.primary-nav > li > a:hover,
.primary-nav > li > span:hover,
.primary-nav > li.active > a,
.primary-nav > li.active > span {
  border-bottom-color: var(--light-bg);
}

/* Submenu toggle button — mobile only; hidden on desktop (hover opens) */
.submenu-toggle {
  display: none;
}

/* Dropdown panel */
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  background: var(--dark-bg);
  padding: 1.5rem 2rem;
  padding-top: calc(20px + 1.5rem);
  min-width: 280px;
  z-index: 100;
}

.primary-nav > li:hover > .dropdown-panel,
.primary-nav > li.dropdown-open > .dropdown-panel {
  display: block;
}

.dropdown-panel .dropdown-item {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
}

.dropdown-panel .dropdown-item strong {
  display: block;
  color: var(--highlight);
  font-weight: 700;
  font-size: 0.95rem;
}

.dropdown-panel .dropdown-item span {
  display: block;
  color: var(--light-bg);
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 0.15rem;
}

.dropdown-panel .dropdown-item:hover strong {
  text-decoration: underline;
}

/* --- Expertise mega-panel: two-column asymmetric layout (desktop) --- */
.mega-cols {
  display: flex;
  align-items: flex-start;
}
.mega-col-primary {
  padding-right: 2.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
/* Zwei gleichwertige Primaries in Spalte 1 (CRM + KI): Abstand dazwischen */
.mega-primary + .mega-primary {
  margin-top: 1.8rem;
}
.mega-col-leaves {
  padding-left: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 2.3rem; /* generous space between IT Foundation and IRM */
}
.mega-cat {
  display: inline-block;
  color: var(--highlight);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
}
.mega-cat:hover {
  text-decoration: underline;
}
.mega-col-primary .mega-cat {
  display: block;
  padding-bottom: 0.6rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.mega-child {
  display: block;
  color: var(--light-bg);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.36rem 0;
  white-space: nowrap; /* keeps "Manufacturing Commercial Operations (MCO)" on one line */
}
.mega-child:hover {
  color: var(--paper);
  text-decoration: underline;
}
.mega-desc {
  color: #9aa6b0;
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
  max-width: 30ch;
}
/* Desktop: CRM already lists its 4 modules, so its descriptor is redundant here. */
.mega-desc-primary {
  display: none;
}
.mega-sub-toggle {
  display: none; /* desktop: the 4 modules are always visible */
}

/* O4 - Language Toggle */
.lang-toggle {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  margin-left: auto;
}

.lang-toggle a,
.lang-toggle span {
  font-family: "Inter", sans-serif;
  font-size: 10px !important;
  line-height: 1;
  letter-spacing: 0.03em;
  padding-bottom: 4px;
}

.lang-toggle .active-lang {
  color: var(--highlight);
  font-weight: 700;
}

.lang-toggle .inactive-lang {
  color: var(--light-bg);
  font-weight: 400;
  text-decoration: none;
}

.lang-toggle .inactive-lang:hover {
  text-decoration: underline;
}

.lang-toggle .separator {
  color: var(--light-bg);
  font-weight: 400;
}

/* Nav CTA */
.nav-cta {
  flex-shrink: 0;
}

.nav-cta .button {
  min-width: auto;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  min-height: 38px;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--light-bg);
  transition: transform 200ms ease, opacity 200ms ease;
}

/* --- G2 - Hero --- */
.hero {
  background: var(--dark-bg);
  overflow: hidden;
}

.hero .container {
  position: relative;
  height: 320px;
}

.hero.hero-home .container {
  height: 540px;
}

.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 3.5rem 0;
}

.hero-eyebrow {
  color: var(--light-bg);
  font-size: 0.78rem;
  margin-bottom: 1rem;
  max-width: 65%;
}

.hero-divider {
  width: 150px;
  height: 3px;
  min-height: 3px;
  flex-shrink: 0;
  background: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--highlight);
  margin-bottom: 1rem;
  max-width: 20ch;
  text-wrap: balance;
}

.hero-body {
  color: var(--light-bg);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 60ch;
}

/* Image as background layer, right-aligned, shifted 70px right with soft edge fades */
.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  transform: translateX(70px);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

/* Hero without image - text full width, band grows with content instead of fixed 320px */
.hero.no-image .hero-image {
  display: none;
}

.hero.no-image .container {
  height: auto;
  min-height: 320px;
}

/* Ohne Bild ist der ganze Container frei - Ueberschrift und Begleittext duerfen
   breiter laufen (die 20ch/60ch-Caps existieren nur, damit Text nicht ins Bild ragt) */
.hero.no-image h1,
.hero.no-image .hero-body {
  max-width: 1000px;
}

/* --- G3 - Contact Section --- */
.contact-section {
  background: var(--dark-bg);
  padding: 5rem 0;
}

.contact-section .container {
  display: flex;
  gap: 4rem;
}

.contact-info {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info h2 {
  color: var(--highlight);
  font-size: 3.1rem;
}

.contact-info .contact-body {
  color: var(--light-bg);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-badge {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.contact-badge img {
  max-width: 160px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.contact-details a {
  color: var(--light-bg);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-icon {
  height: 1em;
  width: auto;
  flex-shrink: 0;
}

/* Contact form */
.contact-form-wrap {
  width: 55%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: var(--light-bg);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: 1px solid var(--light-bg);
  border-radius: 6px;
  color: var(--paper);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  transition: border-color 160ms ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.form-checkbox label {
  color: var(--light-bg);
  font-size: 0.82rem;
  font-weight: 400;
}

.form-checkbox a {
  color: var(--light-bg);
  text-decoration: underline;
}

.form-checkbox a:hover {
  color: var(--accent);
}

.form-submit {
  display: flex;
  justify-content: flex-end;
}

.form-status {
  color: var(--highlight);
  font-size: 0.9rem;
  text-align: right;
  min-height: 1.4rem;
}

.form-status.error {
  color: var(--error);
}

/* --- G4 - Footer --- */
.site-footer {
  background: var(--dark-bg);
  height: 80px;
}

.site-footer .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  padding-bottom: 0;
}

.site-footer .container > * {
  margin-bottom: 16px;
}

.footer-logo img {
  height: 44px;
  width: auto;
}

.footer-legal {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  font-size: 0.82rem;
}

.footer-legal a {
  color: var(--light-bg);
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-legal span {
  color: var(--light-bg);
}

/* --- C1 - Text-Block --- */

/* C1a: Text left 65%, Image right 35% */
.text-block-c1a .container {
  display: flex;
  align-items: stretch;
  gap: 3rem;
}

.text-block-c1a .text-side {
  width: 65%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-block-c1a .image-side {
  width: 35%;
  align-self: center;
}

.text-block-c1a .image-side img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

/* C1a badge pair (homepage trust section: SN partner + ISO 27001, equal size) */
.text-block-c1a .image-side .partner-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  height: 100%;
}

.text-block-c1a .image-side .partner-badges img {
  width: auto;
  height: auto;
  max-width: 45%;
  max-height: 180px;
  border-radius: 0;
  cursor: default;
}

/* C1b: Image left 35%, Text right 65% */
.text-block-c1b .container {
  display: flex;
  align-items: stretch;
  gap: 3rem;
}

.text-block-c1b .image-side {
  width: 35%;
  align-self: center;
}

.text-block-c1b .image-side img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

/* C1d: Centered image (90% width) */
.text-block-c1d .container {
  display: flex;
  justify-content: center;
}

.text-block-c1d img {
  width: 90%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  margin: 1.5rem 0 2.5rem;
}

/* Lightbox overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.is-visible {
  display: flex;
}

.lightbox-overlay img {
  max-width: 1200px;
  width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.text-block-c1b .text-side {
  width: 65%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* C1c: Single column text */

/* Shared text-block styles */
.text-side h2 {
  margin-bottom: 1.2rem;
}

.text-side p {
  text-align: justify;
  margin-bottom: 1rem;
}

.text-side p:last-of-type {
  margin-bottom: 1.5rem;
}

.text-side .button {
  align-self: flex-start;
}

.text-block-c1b .text-side .button {
  align-self: flex-end;
}

.text-block-c1c h2 {
  margin-bottom: 1.2rem;
}

.text-block-c1c p {
  text-align: justify;
  margin-bottom: 1rem;
}

/* --- Section-Header (global): Ueberschrift + optionaler Begleittext,
   einheitliches Markup fuer C2/C3/C4/C6/C8/C9/C11 (M3) --- */
.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--ink);
  max-width: 720px;
  text-align: justify;
}

.section-header.center {
  text-align: center;
}

/* C8 (.card-grid.plain) und C11 behalten die breitere Begleittext-Spalte (1000px);
   C2/C6/C9 = 720px (Vorgabe). */
.card-grid.plain .section-header p,
.tile-stack-section .section-header p {
  max-width: 1000px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card-grid.cols-4 .cards {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid.cols-2 .cards {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease;
}

.card:hover {
  border-color: var(--accent);
}

/* On grey background, card border = white */
.grey .card {
  border-color: var(--paper);
}

.grey .card:hover {
  border-color: var(--accent);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Diagramm-Thumbnails (SVG): vollstaendig einpassen statt beschneiden */
.card-image img[src$=".svg"] {
  object-fit: contain;
  padding: 1.25rem;
  background: #fff;
}

.card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* O3 - Badge */
.badge {
  display: inline-block;
  font-size: 0.585rem;
  font-weight: 700;
  padding: 0.11rem 0.45rem;
  border-radius: 6px;
  margin-bottom: 0.45rem;
  align-self: flex-start;
}

/* O3a - on cards: magenta text, transparent bg */
.badge-card {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* O3b - everywhere else (C5): dark blue text, transparent bg, dark blue border */
.badge-info {
  background: transparent;
  color: var(--lead);
  border: 1px solid var(--lead);
}

.card-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--lead);
}

/* Titel auf 2 Zeilen fixieren, damit die Begleittexte in allen
   Kacheln einer Reihe auf gleicher Hoehe starten (C2a/C2b) */
.card-grid:not(.plain) .card-content h3 {
  min-height: 2.76rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content p {
  font-size: 0.92rem;
  color: var(--ink);
  text-align: justify;
}

/* --- C8 - Info-Grid (plain, no border, no link) --- */
.card-grid.plain .cards {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.plain.cols-2 .cards {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.plain .card {
  border: none;
  background: transparent;
}

.card-grid.plain .card-content h3 {
  text-align: center;
  font-size: 1.5rem;
}

.card-grid.plain .card:hover {
  border-color: transparent;
}

.card-grid.plain .card-image img {
  cursor: pointer;
}

/* --- C9 - Tab-Content --- */
.tab-content-section {
  padding: 4rem 0;
}

/* Section-Header: siehe globalen .section-header-Block (M3) */

.tab-content-layout {
  display: flex;
  gap: 2rem;
  max-height: 65vh;
}

.tab-content-layout.tabs-right {
  flex-direction: row-reverse;
}

.tab-content-tabs {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.tab-content-tab {
  padding: 1rem 1.25rem;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lead);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: border-color 160ms ease;
}

.tab-content-tab:hover {
  border-color: var(--accent);
}

.tab-content-tab.active {
  border-color: var(--accent);
}

.grey .tab-content-tab {
  border-color: var(--paper);
}

.grey .tab-content-tab:hover,
.grey .tab-content-tab.active {
  border-color: var(--accent);
}

.tab-content-panels {
  flex: 0 0 75%;
  overflow: hidden;
}

.tab-content-panel {
  display: none;
  height: 100%;
  flex-direction: column;
}

.tab-content-panel.active {
  display: flex;
}

.tab-content-panel.active {
  display: block;
}

.tab-content-panel img {
  width: 100%;
  height: 60%;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.tab-content-panel .tab-content-text {
  height: 40%;
  overflow: hidden;
  padding-top: 1.5rem;
}

.tab-content-panel .tab-content-text:only-child {
  height: 100%;
  padding-top: 0;
}

.tab-content-text .badge-group {
  margin-bottom: 0.5rem;
}

.tab-content-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--lead);
}

.tab-content-panel p {
  color: var(--ink);
  text-align: justify;
}

.tab-content-panel-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.tab-content-panel-link:hover .tab-content-link {
  text-decoration: underline;
}

.tab-content-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
}

/* C9 - Tab ohne fertigen Artikel: fester Hinweis + Absprung auf Kontaktformular */
.tab-content-status {
  display: block;
  margin-top: 1rem;
  color: var(--ink);
}

.tab-content-status .tab-content-link {
  margin-top: 0;
  margin-left: 0.35rem;
}

/* --- C11 - Kachel-Stapel (volle Breite, vertikal gestapelt) --- */
/* Verschmelzen mit Nachbar-Sektion: minimaler Abstand auf der Verschmelzungs-Seite */
/* Verschmelzungs-Naht (C11b/C11c): reduzierter Abstand auf BEIDEN Seiten der
   Naht - der verschmelzende Baustein UND sein Nachbar (via _mergeCls) - damit
   die zwei Sektionen zu einem Band zusammenwachsen. 0.5rem je Seite -> Naht
   1rem, wie der Abstand zwischen den Kacheln (.tile-stack gap). */
.section.merge-top {
  padding-top: 0.5rem;
}

.section.merge-bottom {
  padding-bottom: 0.5rem;
}

/* Section-Header: siehe globalen .section-header-Block (M3);
   1000px-Begleittext ist dort gebuendelt (C8/C11) */

.tile-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tile-stack-item {
  display: block;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 1.75rem;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.grey .tile-stack-item {
  border-color: var(--paper);
}

a.tile-stack-item:hover {
  border-color: var(--accent);
}

.tile-stack-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--lead);
}

.tile-stack-item p {
  font-size: 0.92rem;
  color: var(--ink);
  text-align: justify;
}

/* C11 mit Bild (optional, einheitlich pro Stapel): Bild links, Text rechts.
   Das Bild fuellt die vom Text bestimmte Kachelhoehe (align-items: stretch +
   height: 100%, kein aspect-ratio) - so aendert ein Bild die Kachelhoehe NICHT. */
.tile-stack-item.has-image {
  display: flex;
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.tile-stack-item.has-image .tile-stack-text {
  padding: 1.75rem;
}

.tile-stack-image {
  flex: 0 0 clamp(140px, 22vw, 240px);
}

.tile-stack-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- C3 - Testimonials + Kennzahlen --- */
.testimonials-section .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-layout {
  display: flex;
  gap: 3rem;
  align-items: stretch;
}

.testimonials-quotes {
  width: 65%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.active {
  display: block;
}

.testimonial-stars {
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.15rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: var(--ink);
}

.testimonial-author {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

.testimonial-role {
  font-weight: 400;
  color: var(--ink);
  font-size: 0.9rem;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--soft-line);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 160ms ease;
}

.carousel-dot.active {
  background: var(--accent);
}

.grey .carousel-dot {
  background: var(--paper);
}

.grey .carousel-dot.active {
  background: var(--accent);
}

.testimonials-stats {
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--gold);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-number {
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--lead);
  border-left: 3px solid var(--lead);
  padding-left: 1rem;
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
  padding-top: 0.3rem;
}

.testimonials-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* --- C5 - Intro-Block --- */
.intro-block .container {
  display: flex;
  gap: 3rem;
  flex-direction: row;
}

.intro-sidebar {
  width: 33.333%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intro-sidebar .badge {
  align-self: flex-start;
}

.contributor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contributor img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.contributor-info {
  font-size: 0.85rem;
}

.contributor-name {
  font-weight: 700;
  color: var(--ink);
}

.contributor-role {
  color: var(--ink);
  font-weight: 400;
}

.intro-date {
  font-size: 0.72rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.intro-divider {
  border: none;
  border-top: 1px solid var(--soft-line);
  margin: 0.25rem 0;
}

.intro-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lead);
}

.intro-main {
  width: 66.666%;
}

.intro-main h2 {
  margin-bottom: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intro-teaser {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  text-align: justify;
}

/* --- C4 - Team-Grid --- */
.team-grid {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1 1 240px;
  min-width: 0;
}

.team-card > img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-card h3 {
  font-size: 1.2rem;
  color: var(--lead);
  margin-bottom: 0.15rem;
}

.team-card .team-role {
  color: var(--ink);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.team-card a {
  color: var(--lead);
  font-weight: 800;
  text-decoration: none;
}

.team-card a .contact-icon {
  height: 0.8rem;
  width: auto;
}

.team-card a:hover {
  text-decoration: underline;
}

/* --- C6 - Fakten-Reihe --- */
/* Section-Header: siehe globalen .section-header-Block (M3);
   C6-Begleittext nur mit kleinerer Schrift als Eigenheit */
.facts-section .section-header p {
  font-size: 0.95rem;
}

.facts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 2rem;
  row-gap: 0;
}

.fact-item {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
}

.fact-item + .fact-item {
  border-top: none;
}

/* C6b: with heading */
.fact-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--lead);
}

.fact-item p {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
  text-align: justify;
}

/* Stars variant */
.fact-item .fact-stars {
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.1rem;
  margin-bottom: 0.4rem;
}

/* C6 carousel (>3 facts): sliding window */
.facts-carousel {
  position: relative;
  overflow: hidden;
}

.facts-track {
  display: flex;
  gap: 2rem;
  transition: transform 500ms ease;
}

.facts-track > .fact-item {
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: break-word;
}

/* Horizontal dividers between facts on mobile - on desktop, just columns */

/* --- C7 - Announcement-Streifen (site-weit, direkt unter G1) --- */
/* Magenta Balken, etwas niedriger als die Nav (80px). Text schwarz, linksbuendig,
   vertikal zentriert, buendig unter dem Nav-Inhalt (gleicher .container-Innenrand).
   Default hidden -> script.js blendet im Zeitfenster ein. */
.announcement-bar {
  width: 100%;
  background: var(--accent);
}

.announcement-bar[hidden] { display: none; }

.announcement-bar .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 52px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.announcement-text {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: break-word;
}

.announcement-text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-text a:hover { opacity: 0.75; }

/* O13 Announcement-Button: dunkel gefuellt auf Magenta (kein Magenta-auf-Magenta, kein Cyan).
   order:1 = links buendig (unter dem Logo), Text (order:2) dahinter, ×-Kreuz (order:3) ganz rechts. */
.announcement-button {
  order: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.3rem 0.9rem;
  border-radius: 6px;
  background: var(--dark-bg);
  color: var(--paper);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
  max-width: 15rem; /* Sicherheitskappe ~25 Zeichen; Content-Regel: Label max. 25 Zeichen */
  transition: background-color 160ms ease, transform 160ms ease;
}

/* Label einzeilig; laeuft es doch ueber 25 Zeichen, sauber mit Ellipsis kappen statt Leiste sprengen */
.announcement-button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-button:hover {
  background: #1c2126;
  transform: translateY(-1px);
}

.announcement-close {
  order: 3;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

.announcement-close:hover { opacity: 0.65; }

/* --- Links --- */

/* Inline links (in content) */
.article-body a,
.legal-content a,
.text-side a {
  color: var(--ink);
  text-decoration: underline;
}

.article-body a:hover,
.legal-content a:hover,
.text-side a:not(.button):hover {
  color: var(--accent);
}

/* --- Legal --- */
.legal-content {
  margin: 0 auto;
}

.legal-content h2 {
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  text-align: left;
  margin-bottom: 1rem;
}

/* --- Article flow (T4 compact section spacing) --- */
.article-flow .section {
  padding: 0;
}

.article-flow .section:first-child {
  padding-top: 5rem;
}

.article-flow .section:last-child {
  padding-bottom: 5rem;
}

/* --- Article body --- */
.article-body {
}

.article-body h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lead);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body h5 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lead);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  text-align: justify;
  margin-bottom: 1rem;
}

.article-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-body ul li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.4rem;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--highlight);
}

/* O8 - Pull-Quote */
.article-body .pull-quote {
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  border-left: none;
  border-right: none;
  padding: 1rem 120px;
  margin: 2rem 0;
  font-size: 115%;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.article-body .pull-quote p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* --- Responsive - 3 Breakpoints --- */

/* Breakpoint 1: 1100px */
@media (max-width: 1100px) {
  .hero .container { height: 320px; }
  .hero.hero-home .container { height: 440px; }

  .contact-section .container {
    flex-direction: column;
    gap: 2.5rem;
  }

  .contact-info,
  .contact-form-wrap {
    width: 100%;
  }

  .contact-info h2 {
    font-size: 2.5rem;
  }
}

/* Breakpoint 2: 900px */
@media (max-width: 900px) {
  /* G1: modern hamburger drawer (slides in from right) */
  .menu-toggle {
    display: flex;
    margin-left: auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 8px;
    transition: background-color 160ms ease;
    position: relative;
    z-index: 1001;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }

  .menu-toggle span {
    position: absolute;
    left: 50%;
    width: 26px;
    height: 2px;
    background: var(--paper);
    transform: translateX(-50%);
    transition: transform 240ms ease, opacity 200ms ease, top 240ms ease;
  }

  .menu-toggle span:nth-child(1) { top: 14px; }
  .menu-toggle span:nth-child(2) { top: 21px; }
  .menu-toggle span:nth-child(3) { top: 28px; }

  body.nav-open .menu-toggle span:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
  }

  body.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .menu-toggle span:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
  }

  /* Backdrop behind the open drawer */
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(45, 52, 59, 0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  body.nav-open {
    overflow: hidden;
  }

  .primary-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 360px);
    background: var(--dark-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 6rem 1.75rem 2rem;
    gap: 0.25rem;
    overflow-y: auto;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .primary-nav > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .primary-nav > li:last-child {
    border-bottom: none;
  }

  .primary-nav > li > a,
  .primary-nav > li > span {
    display: block;
    width: 100%;
    padding: 0.95rem 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-bottom: none;
    color: var(--paper);
  }

  /* Parent link + separate toggle button sit in one row; panel wraps below */
  .primary-nav > li.has-dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .primary-nav > li.has-dropdown > a {
    flex: 1 1 auto;
    width: auto;
  }

  .primary-nav > li.has-dropdown > .dropdown-panel {
    flex-basis: 100%;
  }

  .submenu-toggle {
    display: block;
    flex: 0 0 auto;
    align-self: stretch;
    width: 52px;
    min-height: 48px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--highlight);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
  }

  .submenu-toggle::after {
    content: "+";
  }

  .primary-nav > li.has-dropdown.dropdown-open > .submenu-toggle::after {
    content: "−";
  }

  /* Language toggle stays visible inside the drawer */
  .lang-toggle {
    display: flex;
    width: 100%;
    margin-left: 0;
    padding: 1.25rem 0.25rem 0.5rem;
    gap: 0.5rem;
    align-items: center;
    border-bottom: none;
  }

  .lang-toggle a,
  .lang-toggle span {
    font-size: 0.95rem !important;
    padding-bottom: 0;
  }

  /* Hide the nav bar CTA on mobile - JS moves a copy inside the drawer */
  .site-nav > .container > .nav-cta {
    display: none;
  }

  /* CTA wrapper <li> (added by JS in the drawer) — no divider, pinned to bottom */
  .primary-nav .nav-cta-li {
    width: 100%;
    margin-top: auto;
    border-bottom: none;
    padding: 0;
  }

  /* The CTA inside the drawer (moved by JS) */
  .primary-nav .nav-cta {
    display: block;
    width: 100%;
    padding-top: 1.5rem;
    margin-bottom: 0;
    margin-top: auto;
  }

  .primary-nav .nav-cta .button {
    width: 100%;
    padding: 0.75rem 1.1rem;
    font-size: 0.95rem;
    min-height: 48px;
    min-width: auto;
  }

  /* G2: hero - image right, text left, horizontal scrim (matches desktop pattern) */
  .hero:not(.no-image) .container {
    height: auto;
    min-height: 360px;
  }

  .hero:not(.no-image).hero-home .container {
    min-height: 440px;
  }

  .hero.no-image .container {
    height: auto;
  }

  .hero-text {
    padding: 2.5rem 0;
    max-width: 100%;
  }

  .hero:not(.no-image) .hero-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 70%;
    height: 100%;
    transform: none;
    z-index: 0;
  }

  .hero:not(.no-image) .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%, #000 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 30%, #000 100%);
  }

  /* Horizontal scrim - dark on the left fading to transparent on the right */
  .hero:not(.no-image) .hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to right,
      var(--dark-bg) 0%,
      rgba(45, 52, 59, 0.85) 30%,
      rgba(45, 52, 59, 0.35) 65%,
      rgba(45, 52, 59, 0) 100%
    );
    pointer-events: none;
  }

  /* Hero text stays readable on the dark left side */
  .hero-eyebrow,
  .hero-body {
    max-width: 75%;
  }

  /* Force the title to wrap earlier — character-relative width */
  .hero h1 {
    max-width: 16ch;
  }

  /* Contact form: stack first/last name on tablets too */
  .form-row {
    flex-direction: column;
  }

  /* C9: tabs become an accordion (header + collapsible panel) */
  .tab-content-section .tab-content-layout,
  .tab-content-section .tab-content-layout.tabs-right {
    display: block;
    flex-direction: column;
    max-height: none;
  }

  .tab-content-section .tab-content-tabs,
  .tab-content-section .tab-content-panels {
    display: block;
    overflow: visible;
    flex: none;
    width: 100%;
  }

  .tab-content-section .tab-content-tab {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .tab-content-section .tab-content-tab::after {
    content: "+";
    margin-left: 1rem;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--accent);
    transition: transform 200ms ease;
    flex-shrink: 0;
  }

  .tab-content-section .tab-content-tab.active::after {
    content: "−";
  }

  .tab-content-section .tab-content-panel {
    display: none;
    margin-bottom: 1rem;
    padding: 0.5rem 0 1rem;
  }

  .tab-content-section .tab-content-panel.active {
    display: block;
  }

  .tab-content-section .tab-content-panel img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    margin-bottom: 1rem;
  }

  .tab-content-section .tab-content-panel .tab-content-text {
    height: auto;
    overflow: visible;
    padding-top: 0;
  }

  /* C1: stack */
  .text-block-c1a .container,
  .text-block-c1b .container {
    flex-direction: column;
  }

  .text-block-c1a .text-side,
  .text-block-c1a .image-side,
  .text-block-c1b .text-side,
  .text-block-c1b .image-side {
    width: 100%;
  }

  .text-block-c1b .container {
    flex-direction: column-reverse;
  }

  /* C1d: full width on mobile (90% too narrow on small screens) */
  .text-block-c1d img {
    width: 100%;
  }

  .text-block-c1b .text-side .button {
    align-self: flex-start;
  }

  /* C3: stack */
  .testimonials-layout {
    flex-direction: column;
  }

  .testimonials-quotes,
  .testimonials-stats {
    width: 100%;
  }

  /* C5: stack */
  .intro-block .container {
    flex-direction: column;
  }

  .intro-sidebar,
  .intro-main {
    width: 100%;
  }

  /* Dropdown: block on mobile */
  .dropdown-panel {
    position: static;
    padding: 0.5rem 0 0.5rem 1rem;
  }

  .primary-nav > li:hover > .dropdown-panel,
  .primary-nav > li:focus-within > .dropdown-panel {
    display: none;
  }

  .primary-nav > li.dropdown-open > .dropdown-panel {
    display: block;
  }

  /* Mega-panel on mobile: single column + collapsible CRM modules */
  .dropdown-panel.mega { padding: 0.25rem 0 0.5rem 0.5rem; }
  .mega-cols { flex-direction: column; }
  .mega-col-primary { padding-right: 0; border-right: none; }
  .mega-col-leaves { padding-left: 0; gap: 0; }
  .mega-cat-row { display: flex; align-items: center; justify-content: space-between; }
  .mega-cat,
  .mega-col-primary .mega-cat {
    display: inline-block;
    white-space: normal;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .mega-sub-toggle {
    display: block;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--highlight);
    font-size: 1.3rem;
    line-height: 1;
    padding: 0.4rem 0.7rem;
    min-height: 44px;
  }
  .mega-sub-toggle::after { content: "+"; }
  .mega-col-primary.sub-open .mega-sub-toggle::after { content: "\2212"; }
  .mega-children { display: none; padding-left: 0.9rem; }
  .mega-col-primary.sub-open .mega-children { display: block; }
  .mega-child { white-space: normal; padding: 0.5rem 0; }
  .mega-leaf .mega-cat { display: block; padding: 0.55rem 0 0.1rem; }
  /* Mobile: descriptions stay visible (modules are collapsed) — incl. CRM's. */
  .mega-desc { display: block; margin: 0.1rem 0 0.55rem; max-width: none; }
  .mega-desc-primary { display: block; }

  /* O8 Pull-Quote: 120px Seiten-Padding ist auf Tablets/Handys zu breit */
  .article-body .pull-quote {
    padding: 1rem 2rem;
  }

  /* C2 / C8 card grids: 3- und 4-spaltig werden hier schon zu 2 Spalten -
     3-up wird auf Tablets (768-900px) zu eng. cols-2 bleibt 2-spaltig.
     Selektoren mit passender Spezifitaet, sonst schlagen .card-grid.cols-4/.plain sie nicht. */
  .cards,
  .card-grid.cols-4 .cards,
  .card-grid.plain .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Breakpoint 3: 768px (tablet) */
@media (max-width: 768px) {
  /* C2 / C8 cards werden bereits im 900px-Breakpoint 2-spaltig (siehe oben) */

  /* C6 facts row (static, non-carousel): 2 columns */
  .facts-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* C4 team grid: 2 columns */
  .team-card {
    flex: 1 1 calc(50% - 1.25rem);
    max-width: calc(50% - 1.25rem);
  }

  /* Homepage C3 stats: allow wrap so 3-up becomes 2+1 */
  .testimonials-stats {
    flex-wrap: wrap;
  }

  /* Buttons stretch on tablet - relax desktop min-width */
  .button {
    min-width: auto;
    width: 100%;
  }

  /* C10 Stellen-Header: Eckdaten + CTA stapeln statt zwei enge Spalten.
     Senkrechte Trennlinie entfaellt, die horizontale <hr> darunter bleibt. */
  .job-header-compact .job-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  /* Senkrechte Trennlinie weg + Padding zurueck = mehr Platz fuer die Eckdaten.
     Hoehere Spezifitaet (.job-header-row davor), weil die Basis-Regel
     .job-header-compact .job-meta im File NACH diesem @media steht und sonst
     border-right/padding-right wieder setzt. */
  .job-header-compact .job-header-row .job-meta {
    padding-right: 0;
    border-right: none;
  }
  /* Label linksbuendig, Wert (hinter dem Doppelpunkt) rechtsbuendig.
     space-between schiebt beide auseinander (justify-content fehlt in der Basis,
     greift also trotz spaeterer Basis-Regel). */
  .job-header-compact .job-meta-item {
    justify-content: space-between;
  }
  /* Frage + Button zentriert. Hoehere Spezifitaet (.job-header-compact davor),
     weil die Basis-Regel .job-header-cta im File NACH diesem @media steht und
     sonst align-items/text-align/padding-left zurueck auf Desktop zieht. */
  .job-header-compact .job-header-cta {
    align-items: center;
    text-align: center;
    padding-left: 0;
  }
}

/* Breakpoint 4: 560px (phone) */
@media (max-width: 560px) {
  /* C11 mit Bild: Bild ueber den Text stellen */
  .tile-stack-item.has-image {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .tile-stack-image {
    flex-basis: auto;
  }

  .tile-stack-image img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  /* C4 team grid: single column */
  .team-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .team-grid {
    gap: 2rem;
  }

  .hero:not(.no-image) .container { min-height: 320px; }
  .hero:not(.no-image).hero-home .container { min-height: 380px; }

  .hero-text { padding: 2rem 0; }

  /* Tighter text width since the photo on the right is narrower */
  .hero-eyebrow,
  .hero-body {
    max-width: 88%;
  }

  /* Title: even tighter on phones */
  .hero h1 {
    max-width: 14ch;
  }

  /* Lengthen the dark side so titles stay legible */
  .hero:not(.no-image) .hero-image {
    width: 75%;
  }

  .hero:not(.no-image) .hero-image::after {
    background: linear-gradient(
      to right,
      var(--dark-bg) 0%,
      rgba(45, 52, 59, 0.92) 35%,
      rgba(45, 52, 59, 0.5) 70%,
      rgba(45, 52, 59, 0.1) 100%
    );
  }

  /* Cards: single column. Alle Grid-Varianten explizit, damit die spezifischeren
     Selektoren (.card-grid.cols-2/.cols-4/.plain.cols-2) sicher ueberschrieben werden. */
  .cards,
  .card-grid.cols-2 .cards,
  .card-grid.cols-4 .cards,
  .card-grid.plain .cards,
  .card-grid.plain.cols-2 .cards {
    grid-template-columns: 1fr;
  }

  /* Kontakt-Section: kompakteres Padding + kleinere Ueberschrift auf Handys */
  .contact-section {
    padding: 3.5rem 0;
  }
  .contact-info h2 {
    font-size: 2rem;
  }

  /* Facts: single column */
  .facts-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .fact-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--accent);
  }

  .fact-item:last-child {
    border-bottom: none;
  }

  .footer-legal {
    gap: 0.8rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  /* O8 Pull-Quote: minimales Seiten-Padding auf kleinen Screens */
  .article-body .pull-quote {
    padding: 0.75rem 1rem;
  }

  /* C7 Announcement-Streifen: Button + ×-Kreuz oben, Text darunter auf voller Breite.
     Verhindert Overflow, weil Button/Text/× nicht mehr in einer engen Zeile konkurrieren. */
  .announcement-bar .container {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  .announcement-button {
    order: 1;
    max-width: none;
  }
  .announcement-close {
    order: 2;
    margin-left: auto;
    font-size: 1.6rem;
  }
  .announcement-text {
    order: 3;
    flex-basis: 100%;
  }
}

/* Breakpoint 5: 360px (sehr kleine / aeltere Phones).
   Der Grossteil skaliert bereits fluid via clamp(); hier nur die wenigen
   fixen Ausreisser (Kontakt-Ueberschrift 3.1rem, grosse Section-Abstaende). */
@media (max-width: 360px) {
  .contact-info h2 {
    font-size: 1.75rem;
  }
  .contact-section {
    padding: 3rem 0;
  }
  .contact-badge img {
    max-width: 140px;
  }
  /* CTA-Buttons: kein 260px-Zwang, damit sie nicht ueber den Rand laufen */
  .button {
    min-width: 0;
  }
}

/* --- C10 - Stellen-Header Job-Eckdaten (nur T6, eigenständig) --- */
.job-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.job-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.job-meta-label {
  font-weight: 700;
  color: var(--ink);
}

/* Kompakte C10-Variante: Eckdaten links, CTA rechts, vertikale Trennlinie */
.job-header-compact {
  padding-bottom: 2.5rem;
  background: var(--grey); /* Hellgrau (#dde3e8) */
}

/* höhere Spezifität als .article-flow .section:first-child (sonst 5rem) */
.article-flow .section:first-child.job-header-compact {
  padding-top: 0.75rem;  /* dicht an den Hero */
}

.job-header-compact .container {
  display: block;
}

.job-header-compact .job-header-row {
  display: flex;
  align-items: stretch;
}

.job-header-compact .job-meta {
  flex: 1 1 0;
  gap: 0.5rem;
  padding-right: 2rem;
  border-right: 1px solid var(--line); /* Dunkelgrau (#2d343b) */
}

.job-header-compact .job-meta-item {
  flex-direction: row;
  gap: 0.4rem;
  font-size: 1.0625rem; /* an Fließtext (17px) angepasst */
}

.job-header-compact .job-meta-label::after {
  content: ":";
}

.job-header-cta {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding-left: 2rem;
  text-align: right;
}

.job-header-cta .job-header-question {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lead);
}

.job-header-divider {
  border: none;
  border-top: 1px solid var(--line); /* Dunkelgrau (#2d343b) */
  margin: 1.25rem 0 0;
}

/* --- O9 - Bewerbungsformular (Formular auf Hell) --- */
.application-section {
  background: var(--paper);
}

.application-header {
  margin-bottom: 2rem;
}

.application-intro {
  margin-top: 0.75rem;
  max-width: 760px;
  color: var(--ink);
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 760px;
}

.application-section .form-group label {
  color: var(--ink);
}

.application-section .form-group input {
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
}

.application-section .form-group input:focus {
  border-color: var(--accent);
}

.application-section .form-checkbox label {
  color: var(--ink);
}

.application-section .form-checkbox a {
  color: var(--ink);
  text-decoration: underline;
}

.application-section .form-checkbox a:hover {
  color: var(--accent);
}

.file-field .file-hint {
  font-weight: 400;
  color: var(--ink);
  opacity: 0.7;
  font-size: 0.8rem;
}

.file-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.file-button {
  min-width: 0;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

.file-name {
  font-size: 0.9rem;
  color: var(--ink);
}

.application-section .form-status {
  color: var(--lead);
  font-weight: 600;
  min-height: 1.2em;
}

.application-section .form-status.error {
  color: var(--error);
}

.hp-field {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- O11/O12 Cookie consent banner --- */
.cookie-root[hidden] { display: none; }
.cookie-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cookie-backdrop { position: fixed; inset: 0; background: rgba(18, 22, 26, 0.55); }
.cookie-modal {
  position: relative;
  margin: auto;
  background: var(--dark-bg);
  color: #fff;
  width: min(560px, 100%);
  border-radius: 14px;
  padding: 1.75rem 1.9rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.cookie-modal[hidden] { display: none; }
.cookie-title { margin: 0 0 0.6rem; font-size: 1.25rem; color: #fff; }
.cookie-text { margin: 0 0 1.1rem; font-size: 0.95rem; line-height: 1.55; color: #d4dade; }
.cookie-text a { color: var(--highlight); text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cookie-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.cookie-btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.cookie-btn-outline { background: transparent; color: #fff; border-color: #7a838b; }
.cookie-btn-outline:hover { border-color: #fff; }
.cookie-link {
  font: inherit;
  font-size: 0.85rem;
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.55rem 0.6rem;
  white-space: nowrap;
}
.cookie-link:hover { color: var(--highlight); }
.cookie-cat {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cookie-cat:first-of-type { border-top: none; }
.cookie-cat-text { flex: 1; }
.cookie-cat-text h3 { margin: 0 0 0.25rem; font-size: 1rem; color: #fff; }
.cookie-cat-text p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: #c2cad1; }
.cookie-always {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9aa3ab;
  align-self: center;
  flex: none;
}
.cookie-switch { position: relative; width: 46px; height: 26px; flex: none; }
.cookie-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cookie-slider { position: absolute; inset: 0; border-radius: 20px; background: #c3ccd4; transition: background 0.15s; pointer-events: none; }
.cookie-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.cookie-switch input:checked + .cookie-slider { background: var(--accent); }
.cookie-switch input:checked + .cookie-slider::after { left: 23px; }
.cookie-switch input:focus-visible + .cookie-slider { outline: 2px solid var(--highlight); outline-offset: 2px; }
.cookie-btn:focus-visible, .cookie-link:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.footer-cookie-link {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.footer-cookie-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .cookie-actions { flex-direction: column; align-items: stretch; }
  .cookie-btn, .cookie-link { width: 100%; text-align: center; }
}
