:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #1b2334;
  --muted: #566079;
  --brand: #2b4d9c;
  --brand-2: #3f65bf;
  --line: #dfe4ef;
  --scroll-track: #e8edf7;
  --scroll-thumb: #7e95c8;
  --scroll-thumb-hover: #5f79b4;
  --header-bg: rgba(255, 255, 255, 0.94);
}

:root[data-theme="dark"] {
  --bg: #0f1625;
  --bg-soft: #172133;
  --card: #172133;
  --text: #e7ecf8;
  --muted: #9fb0d2;
  --brand: #8fb2ff;
  --brand-2: #6e99f5;
  --line: #2a3957;
  --scroll-track: #111a2a;
  --scroll-thumb: #415a8d;
  --scroll-thumb-hover: #5273b0;
  --header-bg: rgba(15, 22, 37, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* Global scrollbar styling (Chromium/WebKit) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 38px;
  width: auto;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 46%, var(--line));
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.main-nav a:hover {
  color: var(--brand);
}

.main-nav.main-nav-cms {
  align-items: flex-start;
  gap: 0.65rem 1rem;
}

.main-nav-cms-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 10.5rem;
}

.main-nav-cms-item > a {
  font-weight: 600;
  color: var(--text);
}

.main-nav-cms-href-row {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  word-break: break-word;
}

.main-nav-cms-href-row .cms-mirror-meta {
  display: inline;
  margin: 0;
  font-size: inherit;
}

body.cms-edit-mode .main-nav-cms-item.cms-nav-order-host {
  position: relative;
  padding-top: 1.85rem;
}

body.cms-edit-mode #mainNav .cms-nav-order-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.2rem;
  z-index: 5;
  pointer-events: auto;
}

body.cms-edit-mode #mainNav .cms-nav-order-btn {
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.25rem;
  border-radius: 5px;
  border: 1px solid rgba(43, 77, 156, 0.35);
  background: rgba(255, 255, 255, 0.96);
  color: #1e3a6e;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

body.cms-edit-mode #mainNav .cms-nav-order-btn:hover {
  border-color: rgba(43, 77, 156, 0.55);
  background: #fff;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-menu-toggle:hover {
  border-color: rgba(43, 77, 156, 0.45);
  background: rgba(43, 77, 156, 0.06);
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid rgba(43, 77, 156, 0.55);
  outline-offset: 2px;
}

.nav-menu-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.25rem;
}

.nav-menu-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

body.nav-drawer-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .site-header > .container {
    position: relative;
    z-index: 40;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .theme-toggle-btn {
    margin-left: 0;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(15, 23, 42, 0.45);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-backdrop[hidden] {
    display: none !important;
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-basis: 100%;
    z-index: 30;
    margin-top: 0;
    padding: 0.85rem 1.1rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
    max-height: min(75vh, calc(100dvh - 4.5rem));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 0.55rem 0.35rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  .main-nav a:hover {
    background: rgba(43, 77, 156, 0.06);
  }

  .main-nav.main-nav-cms {
    gap: 0.75rem;
    align-items: stretch;
  }

  .main-nav-cms-item {
    max-width: none;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .main-nav-cms-item:last-child {
    border-bottom: 0;
  }
}

.section {
  padding: 4rem 0;
  scroll-margin-top: 90px;
}

.section-alt {
  background: #eef2f8;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.1rem;
}

p {
  line-height: 1.6;
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Wenn im CMS Rich-Text Medien enthält, rendert der Editor statt `<p>` einen
   Wrapper `<div class="rich-content">...` – damit sollen Typo-Werte wie bei
   normalen Absätzen bleiben. */
.rich-content {
  line-height: 1.6;
  margin: 0 0 1rem;
  color: var(--muted);
  /* Enthält floated Inline-Bilder zuverlässig, damit nachfolgende Sektionen
     nicht darüberrutschen und das Bild im CMS bearbeitbar bleibt. */
  display: flow-root;
}

.cms-rich {
  /* Gleiches Verhalten in contenteditable Rich-Feldern. */
  display: flow-root;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.3rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.lead {
  color: #37425f;
  font-size: 1.03rem;
  margin: 0.4rem 0 0.6rem;
}

.quote-author {
  font-weight: 600;
  margin: 0.3rem 0 0.7rem;
}

.hero-card,
.card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(23, 38, 73, 0.08);
}

.hero-image-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 280px;
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 18, 40, 0.72) 70%);
}

.hero-image-overlay p {
  color: #e8edff;
  margin: 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, #3f67c1, var(--brand));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary {
  background: #202a3c;
  border: 1px solid #34405b;
}

.service-grid,
.about-grid,
.project-grid,
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.jobs-highlight-card {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #3f67c1, var(--brand));
  color: #fff;
  box-shadow: 0 10px 28px rgba(23, 38, 73, 0.16);
}

.jobs-highlight-card p,
.jobs-highlight-card li {
  color: #fff;
}

.jobs-highlight-card .rich-content,
.jobs-highlight-card .rich-content p,
.jobs-highlight-card .rich-content li,
.jobs-highlight-card .rich-content span,
.jobs-highlight-card .rich-content strong,
.jobs-highlight-card .rich-content b,
.jobs-highlight-card .rich-content em,
.jobs-highlight-card .rich-content i,
.jobs-highlight-card .rich-content u {
  color: #fff;
}

.jobs-apply-btn,
.jobs-highlight-card a:not(.cms-rich-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 1rem;
  background: #f0a910;
  color: #fff;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.jobs-apply-btn:hover,
.jobs-highlight-card a:not(.cms-rich-btn):hover {
  background: #e09b05;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.jobs-highlight-card a:not(.cms-rich-btn),
.jobs-highlight-card a:not(.cms-rich-btn) * {
  color: #fff !important;
  text-decoration: none !important;
}

ul {
  margin: 0;
  padding-left: 1rem;
  color: #33405f;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.pill-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  color: #31497e;
  background: rgba(43, 77, 156, 0.1);
}

.lead-small {
  margin-bottom: 1.1rem;
}

.portal-form-note {
  margin: 0 0 1.1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(86, 96, 121, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(86, 96, 121, 0.2);
}

.portal-form-note a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
}

.text-link {
  color: var(--brand);
}

.contact-card {
  max-width: none;
}

.contact-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
  align-items: start;
}

.contact-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(23, 38, 73, 0.08);
}

.project-grid.project-grid-images {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-slideshow {
  position: relative;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dbe2ef;
}

.project-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 280ms ease;
  cursor: zoom-in;
  pointer-events: none;
}

.project-slideshow .slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 25, 46, 0.72);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.slide-btn.prev {
  left: 8px;
}

.slide-btn.next {
  right: 8px;
}

.rich-slideshow {
  position: relative;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dbe2ef;
  margin: 0.85rem 0;
  max-width: 100%;
}

.rich-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 280ms ease;
  cursor: zoom-in;
  pointer-events: none;
}

.rich-slideshow .slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.rich-content .rich-inline-img,
.cms-rich .rich-inline-img {
  max-width: 100%;
  height: auto;
  /* Auch wenn das CMS HTML intern in Absätze/Zeilenumbrüche umwandelt,
     soll der Text weiterhin „neben“ dem Bild umfließen. */
  float: left;
  display: block;
  margin: 0 1rem 0.65rem 0;
  border-radius: 8px;
  box-sizing: border-box;
}

/* Fallback: Wenn das CMS beim Rendern keine Breite via style setzt,
   dann verhindern wir, dass das Bild (durch native Bildbreite) die ganze
   Zeile einnimmt und der Text dadurch immer „unter“ statt „neben“ dem Bild landet. */
.rich-content .rich-inline-img:not([style*="width:"]),
.cms-rich .rich-inline-img:not([style*="width:"]) {
  width: 55%;
  max-width: 55%;
}

.rich-content .rich-inline-img.rich-img-w-sm,
.cms-rich .rich-inline-img.rich-img-w-sm {
  max-width: 32%;
}

.rich-content .rich-inline-img.rich-img-w-md,
.cms-rich .rich-inline-img.rich-img-w-md {
  max-width: 55%;
}

.rich-content .rich-inline-img.rich-img-w-lg,
.cms-rich .rich-inline-img.rich-img-w-lg {
  max-width: 78%;
}

.rich-content .rich-inline-img.rich-img-w-full,
.cms-rich .rich-inline-img.rich-img-w-full {
  max-width: 100%;
  width: 100%;
  float: none;
  display: block;
  margin: 0.65rem 0;
}

.rich-content .rich-inline-img.rich-img-align-left,
.cms-rich .rich-inline-img.rich-img-align-left {
  float: left;
  display: block;
  margin: 0 1rem 0.65rem 0;
}

.rich-content .rich-inline-img.rich-img-align-right,
.cms-rich .rich-inline-img.rich-img-align-right {
  float: right;
  display: block;
  margin: 0 0 0.65rem 1rem;
}

.rich-content .rich-inline-img.rich-img-align-center,
.cms-rich .rich-inline-img.rich-img-align-center {
  float: none;
  display: block;
  margin: 0.65rem auto;
}

body.cms-edit-mode .cms-rich {
  /* Damit die Lösch-Icons bei Inline-Bildern absolut positioniert werden können. */
  position: relative;
}

body.cms-edit-mode .cms-rich-inline-img-delete {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 99998;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  user-select: none;
}

body.cms-edit-mode .cms-rich-inline-img-delete:hover {
  background: rgba(0, 0, 0, 0.68);
}

.project-slideshow img.slide[data-rich-show="0"],
.rich-slideshow img.slide[data-rich-show="0"] {
  display: none;
}

body.cms-edit-mode .project-slideshow img.slide[data-rich-show="0"],
body.cms-edit-mode .rich-slideshow img.slide[data-rich-show="0"] {
  display: block !important;
  opacity: 0.38;
  outline: 2px dashed rgba(43, 77, 156, 0.45);
  outline-offset: -2px;
}

body.cms-edit-mode .rich-slideshow img.slide[src=""] {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.45);
}

/* Floating grip: nur CMS-Vorschau, nicht im gespeicherten HTML */
body.cms-edit-mode .cms-rich-img-resize-hint {
  position: fixed;
  z-index: 99997;
  pointer-events: none;
  transform: translate(-100%, -100%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 1px 5px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(43, 77, 156, 0.22);
  color: #2b4d9c;
}

body.cms-edit-mode .cms-rich-img-resize-hint-icon {
  display: block;
  opacity: 0.95;
}

.cms-custom-section-add-bar {
  margin: 1.25rem auto 0.5rem;
  padding: 0 1rem;
}

.cms-custom-add-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.cms-custom-add-columns-select {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font: inherit;
}

.cms-custom-section-columns-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.cms-custom-section-column-count {
  min-width: 3.5rem;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font: inherit;
}

.cms-custom-columns-wrap {
  margin-top: 0.25rem;
}

.cms-custom-columns {
  display: grid;
  grid-template-columns: repeat(var(--custom-cols, 1), minmax(0, 1fr));
  gap: 1rem 1.1rem;
  align-items: start;
}

@media (max-width: 768px) {
  .cms-custom-columns {
    grid-template-columns: 1fr;
  }
}

.cms-custom-cell-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}

.cms-custom-cell-kind-select {
  min-width: 10rem;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font: inherit;
  font-size: 0.82rem;
}

.cms-custom-cell-slideshow-wrap .project-slideshow {
  position: relative;
  min-height: 120px;
}

.cms-custom-cell-slideshow-wrap .project-slideshow img.slide[src=""] {
  opacity: 0.35;
  min-height: 80px;
}

.cms-custom-slideshow .cms-custom-slide-unit {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

.cms-custom-slideshow .cms-custom-slide-unit.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Zusatz-Slideshow: Sichtbarkeit/Klicks an .cms-custom-slide-unit.is-active — nicht an img.is-active */
.cms-custom-slideshow.project-slideshow .cms-custom-slide-unit > img.slide {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.cms-custom-slideshow.project-slideshow .cms-custom-slide-unit.is-active > img.slide {
  opacity: 1;
  pointer-events: auto;
  cursor: zoom-in;
}

.cms-custom-cell-slideshow-wrap .cms-custom-slideshow.project-slideshow .cms-custom-slide-unit.is-active > img.slide[src=""] {
  opacity: 0.35;
}

.cms-custom-slide-caption {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--muted, #5c6578);
  white-space: pre-wrap;
  word-break: break-word;
}

body.cms-edit-mode .cms-custom-slide-caption[data-cms-path] {
  min-height: 1.35em;
  outline: 1px dashed rgba(43, 77, 156, 0.28);
  outline-offset: 2px;
  border-radius: 6px;
}

.cms-custom-caption-placement-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cms-custom-slide-caption-placement {
  min-width: 11rem;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font: inherit;
  font-size: 0.82rem;
}

.cms-custom-section-inner .cms-mirror-remove {
  top: 0.35rem;
  right: 0.35rem;
}

.cms-custom-section-anchor-edit {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
}

.cms-custom-section-anchor-edit .cms-section-anchor-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.cms-custom-section-card .rich-content {
  min-height: 2.5rem;
}

body.cms-edit-mode .cms-section-order-host {
  position: relative;
}

body.cms-edit-mode .cms-section-order-bar {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  z-index: 25;
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

body.cms-edit-mode .cms-section-order-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(43, 77, 156, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: #1e3a6e;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

body.cms-edit-mode .cms-section-order-btn:hover {
  border-color: rgba(43, 77, 156, 0.55);
  background: #fff;
}

.cms-mirror-rich-ss-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(16, 25, 46, 0.55);
  z-index: 4;
}

.project-text {
  margin-top: 1rem;
}

.project-text p {
  margin-bottom: 0.7rem;
}

.rich-content ul,
.rich-content ol {
  margin: 0.3rem 0 0.5rem 1rem;
}

.rich-content li {
  margin: 0.2rem 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(8, 12, 22, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(10, 16, 30, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.legal-modal[hidden] {
  display: none !important;
}

.legal-modal-card {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(10, 16, 30, 0.35);
}

.legal-modal-header {
  position: relative;
  background: #fff;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.legal-modal-header h3 {
  margin: 0;
}

.legal-modal-body {
  padding: 1rem;
  color: #26324c;
  line-height: 1.52;
  overflow: auto;
  max-height: calc(90vh - 60px);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* Explicit modal scrollbar integration */
.legal-modal-body::-webkit-scrollbar {
  width: 10px;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: #e3e9f5;
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8aa1d0, #6f88bf);
  border-radius: 999px;
  border: 2px solid #e3e9f5;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6f88bf, #5875b0);
}

.legal-modal-body p {
  margin: 0 0 0.85rem;
}

.cookie-modal-card .legal-modal-body,
.cookie-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-intro {
  margin: 0 0 0.2rem;
  color: #4b5878;
}

.cookie-choices-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.cookie-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  color: #2a3551;
  border: 1px solid #dbe3f2;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #f8fbff;
}

.cookie-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cookie-choice-text small {
  color: #5f6c8b;
  font-size: 0.82rem;
}

.cookie-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8d3ea;
  transition: background 160ms ease;
}

.cookie-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}

.cookie-switch input:checked + .cookie-slider {
  background: var(--brand);
}

.cookie-switch input:checked + .cookie-slider::before {
  transform: translateX(20px);
}

.cookie-switch input:disabled + .cookie-slider {
  background: #a7b6d8;
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.35rem;
  border-top: 1px solid #e2e8f4;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1300;
}

.cookie-banner-inner {
  width: min(960px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(10, 16, 30, 0.24);
  padding: 0.95rem 1rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner-inner p {
  margin: 0;
  color: #2f3a55;
  font-size: 0.92rem;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid .full-width,
.form-grid h2,
.form-grid h3,
.form-grid .status,
.form-grid .btn {
  grid-column: 1 / -1;
}

.project-time-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: end;
  column-gap: 1.2rem;
  row-gap: 0.6rem;
}

.date-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 260px));
  gap: 0.8rem;
  justify-content: end;
}

.narrow-field {
  max-width: 260px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.dryhire-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  background: #f8faff;
}

.dryhire-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  align-items: start;
}

.article-toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.article-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.article-hint {
  margin: 0 0 0.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  color: #244573;
  font-size: 0.88rem;
}

.article-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: #fff;
}

.article-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.article-line {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* Dry-Hire-Menge: schmal (überschreibt globales input { width: 100% }) */
input.article-qty-input {
  width: 3rem;
  max-width: 3rem;
  flex: 0 0 3rem;
  min-width: 0;
  padding: 0.35rem 0.3rem;
  text-align: center;
  box-sizing: border-box;
  -moz-appearance: textfield;
  appearance: textfield;
}

input.article-qty-input::-webkit-outer-spin-button,
input.article-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.selected-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.8rem;
}

.selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.selected-item:last-child {
  border-bottom: 0;
}

.status {
  margin: 0;
  min-height: 1.2rem;
}

.is-hidden {
  display: none !important;
}

.invalid-highlight {
  outline: 2px solid #c13030;
  outline-offset: 2px;
  border-radius: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  color: #2f3a55;
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9d3e8;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  font: inherit;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 0.8rem;
  background: var(--card);
}

:root[data-theme="dark"] .site-footer,
body.theme-dark .site-footer {
  background: #172133 !important;
  border-top-color: #2a3957 !important;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
  color: var(--muted);
  font-size: 0.8rem;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.footer-columns {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.7rem;
  align-items: center;
}

.footer-brand-row img {
  width: 120px;
  max-width: 100%;
  height: auto;
}

.footer-middle-col,
.footer-right-col {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.footer-brand-row {
  justify-self: center;
}

.footer-middle-col {
  justify-self: center;
  align-items: center;
  text-align: center;
}

.footer-right-col {
  justify-self: end;
}

.footer-locations,
.footer-social-tools,
.footer-company,
.footer-contact,
.footer-links {
  margin: 0;
}

.footer-company {
  font-weight: 700;
  color: #2b3654;
}

.footer-contact {
  margin-top: 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.footer-links a {
  color: #2f3a55;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-social-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.footer-social-tools li {
  margin: 0;
  padding: 0;
}

.footer-social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #2f3a55;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(27, 35, 52, 0.12);
}

.footer-social-icon-link:hover {
  background: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 77, 156, 0.25);
}

.footer-social-svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.footer-social-cms-tools {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-social-cms-heading {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: left;
  flex: 1;
  min-width: 0;
}

.footer-social-cms-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-social-cms-add-wrap {
  position: relative;
  flex-shrink: 0;
}

.footer-social-cms-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px dashed rgba(43, 77, 156, 0.45);
  background: rgba(43, 77, 156, 0.08);
  color: var(--brand);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.footer-social-cms-add:hover:not(:disabled) {
  background: rgba(43, 77, 156, 0.14);
  border-color: var(--brand);
}

.footer-social-cms-add:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.footer-social-cms-add-svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.footer-social-cms-add-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 11rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 28px rgba(27, 35, 52, 0.15);
}

.footer-social-cms-add-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.footer-social-cms-add-option:hover {
  background: rgba(43, 77, 156, 0.08);
  color: var(--brand);
}

.footer-social-cms-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.footer-social-cms-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a33;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.footer-social-cms-remove:hover {
  opacity: 1;
  background: rgba(170, 51, 51, 0.08);
}

.footer-social-cms-remove-svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}

.footer-social-cms-row {
  border: 1px dashed rgba(43, 77, 156, 0.25);
  border-radius: 10px;
  padding: 0.5rem 0.65rem 0.65rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
}

.footer-social-cms-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  min-width: 0;
}

.footer-social-cms-href-row {
  margin: 0;
  font-size: 0.8rem;
  word-break: break-all;
}

/* Leere contenteditable-URL-Zeilen im CMS fokussierbar machen */
.footer-social-cms-href-editable {
  display: inline-block;
  min-width: 100%;
  min-height: 1.55em;
  padding: 0.35rem 0.45rem;
  box-sizing: border-box;
  vertical-align: top;
  border-radius: 8px;
  outline: none;
  border: 1px dashed rgba(43, 77, 156, 0.5);
  background: rgba(43, 77, 156, 0.06);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.footer-social-cms-href-editable:hover {
  border-color: rgba(43, 77, 156, 0.65);
  background: rgba(43, 77, 156, 0.09);
}

.footer-social-cms-href-editable:focus {
  border: 1px dashed var(--brand);
  background: rgba(43, 77, 156, 0.08);
  box-shadow: 0 0 0 2px rgba(43, 77, 156, 0.18);
}

.footer-copyright {
  margin: 0;
  width: 100%;
  text-align: center;
  color: #6b7488;
  font-size: 0.76rem;
}

.cms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.cms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.cms-grid .full-width {
  grid-column: 1 / -1;
}

.cms-grid textarea {
  min-height: 110px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.84rem;
}

.cms-assets {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.cms-asset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cms-asset-item {
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .service-grid,
  .about-grid,
  .project-grid,
  .jobs-grid,
  .field-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-grid.project-grid-images {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: center;
    justify-items: stretch;
  }

  .footer-inner {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-items: center;
    text-align: center;
  }

  .footer-brand-row,
  .footer-middle-col,
  .footer-right-col {
    justify-self: stretch;
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-locations .rich-content,
  .footer-company .rich-content,
  .footer-copyright .rich-content {
    text-align: center;
  }

  .cms-login-href-row {
    text-align: center;
  }

  .footer-social-cms-heading {
    text-align: center;
  }

  .footer-social-cms-heading-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .footer-social-cms-row-head {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .cms-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .date-range-row,
  .project-time-row,
  .article-toolbar,
  .dryhire-layout {
    grid-template-columns: 1fr;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-choices-row {
    grid-template-columns: 1fr;
  }
}

/* CMS: Bearbeitung im Admin-Spiegel (index.html?preview=1&cms_edit=1) */
.cms-site-title-bar {
  background: rgba(43, 77, 156, 0.07);
  border-bottom: 1px dashed rgba(43, 77, 156, 0.35);
  padding: 0.5rem 0 0.6rem;
}

.cms-site-title-inner .cms-mirror-meta {
  margin: 0 0 0.25rem;
}

.cms-site-title-row {
  margin: 0;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.cms-site-title-editable {
  display: inline-block;
  min-width: min(100%, 18rem);
  min-height: 1.45em;
  padding: 0.3rem 0.45rem;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px dashed rgba(43, 77, 156, 0.5);
  background: rgba(43, 77, 156, 0.06);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cms-site-title-editable:hover {
  border-color: rgba(43, 77, 156, 0.65);
  background: rgba(43, 77, 156, 0.09);
}

.cms-site-title-editable:focus {
  border: 1px dashed var(--brand);
  background: rgba(43, 77, 156, 0.08);
  box-shadow: 0 0 0 2px rgba(43, 77, 156, 0.18);
}

.cms-site-title-assets-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  background: #fff;
  color: #2b4d9c;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.cms-site-title-assets-btn:hover {
  background: #f3f6ff;
  border-color: rgba(43, 77, 156, 0.35);
}

/* Sektions-Anker im CMS: je Sektion unter der Überschrift */
.cms-request-anchor-host:empty {
  display: none;
}

.cms-section-anchor-inline {
  margin: 0.2rem 0 1rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: rgba(43, 77, 156, 0.06);
  border: 1px dashed rgba(43, 77, 156, 0.35);
  max-width: 32rem;
}

.cms-anchor-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.cms-anchor-inline-label {
  margin: 0;
  flex-shrink: 0;
}

.cms-anchor-slug-row-inline {
  flex: 1 1 10rem;
  min-width: 7rem;
  max-width: 18rem;
}

.cms-section-anchor-hint {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.cms-section-anchor-hint code {
  font-size: 0.88em;
}

.cms-anchor-slug-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
  border: 1px dashed rgba(43, 77, 156, 0.5);
  background: rgba(43, 77, 156, 0.06);
  overflow: hidden;
}

.cms-anchor-hash {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0.25rem 0.15rem 0.25rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.cms-anchor-slug-editable {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cms-anchor-slug-editable:focus {
  box-shadow: inset 0 0 0 1px rgba(43, 77, 156, 0.35) !important;
}

body.cms-edit-mode .cms-mirror-image-hit {
  cursor: pointer;
  outline: 2px dashed rgba(43, 77, 156, 0.4);
  outline-offset: 3px;
}

body.cms-edit-mode .slide {
  cursor: pointer;
}

body.cms-edit-mode [data-cms-path]:focus {
  outline: 2px solid rgba(43, 77, 156, 0.55);
  outline-offset: 2px;
}

.cms-mirror-toolbar {
  position: fixed;
  z-index: 9998;
  display: none;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(27, 35, 52, 0.12);
  max-width: min(520px, 94vw);
}

.cms-mirror-toolbar.is-visible {
  display: flex;
}

.cms-mirror-toolbar button {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
  color: var(--text);
}

.cms-mirror-toolbar button:hover {
  background: var(--bg);
}

.cms-forecolor-picker,
.cms-container-bg-picker,
.cms-container-heading-picker,
.cms-rich-btn-txt-picker,
.cms-rich-btn-bg-picker {
  -webkit-appearance: none;
  appearance: none;
  width: 2.2rem;
  height: 1.6rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
}

.cms-forecolor-picker::-webkit-color-swatch-wrapper,
.cms-container-bg-picker::-webkit-color-swatch-wrapper,
.cms-container-heading-picker::-webkit-color-swatch-wrapper,
.cms-rich-btn-txt-picker::-webkit-color-swatch-wrapper,
.cms-rich-btn-bg-picker::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 6px;
}

.cms-forecolor-picker::-webkit-color-swatch,
.cms-container-bg-picker::-webkit-color-swatch,
.cms-container-heading-picker::-webkit-color-swatch,
.cms-rich-btn-txt-picker::-webkit-color-swatch,
.cms-rich-btn-bg-picker::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.cms-forecolor-picker:focus,
.cms-container-bg-picker:focus,
.cms-container-heading-picker:focus,
.cms-rich-btn-txt-picker:focus,
.cms-rich-btn-bg-picker:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(43, 77, 156, 0.22);
}

.cms-fontsize-select {
  box-sizing: border-box;
  width: 3.25rem;
  min-width: 0;
  max-width: 3.25rem;
  flex: 0 0 3.25rem;
  height: 1.6rem;
  padding: 0 0.15rem 0 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.cms-fontsize-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(43, 77, 156, 0.22);
}

.rich-content .cms-rich-btn,
.cms-rich .cms-rich-btn,
.jobs-highlight-card .cms-rich-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0.15rem 0.35rem 0.35rem 0;
  padding: 0.42rem 0.72rem !important;
  border-radius: 10px;
  border: 1px solid rgba(32, 46, 78, 0.18) !important;
  background: #2b4d9c;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.rich-content .cms-rich-btn:hover,
.cms-rich .cms-rich-btn:hover,
.jobs-highlight-card .cms-rich-btn:hover {
  filter: brightness(0.95);
}

.rich-content .cms-rich-btn *,
.cms-rich .cms-rich-btn *,
.jobs-highlight-card .cms-rich-btn * {
  color: inherit !important;
  text-decoration: none !important;
}

body.cms-edit-mode .cms-container-color-controls {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.28rem;
  border-radius: 8px;
  border: 1px solid rgba(43, 77, 156, 0.25);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

/* Platz für die Container-Farbsteuerung, damit Titel/Edit-Feld nicht überdeckt wird */
body.cms-edit-mode [data-cms-container-bg-path] {
  padding-top: 2.6rem;
}

body.cms-edit-mode .cms-container-color-clear {
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.22rem 0.38rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}

body.cms-edit-mode .cms-container-color-clear:hover {
  background: var(--bg);
}

.cms-forecolor-recent {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  padding-left: 0.35rem;
}

.cms-forecolor-recent-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.cms-forecolor-recent-swatch:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(43, 77, 156, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.cms-mirror-toolbar-sep {
  display: inline-block;
  width: 1px;
  align-self: stretch;
  min-height: 1.35rem;
  margin: 0 0.1rem;
  background: var(--line);
}

.cms-mirror-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: #a22;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cms-mirror-remove:hover {
  background: #fff5f5;
}

.cms-mirror-project-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.cms-mirror-mini-btn {
  font: inherit;
  font-size: 0.72rem;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
  color: var(--text);
}

.cms-mirror-mini-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.cms-mirror-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.cms-login-href-row {
  display: block;
  flex-basis: 100%;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.cms-mirror-add-row {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.25rem;
}

.cms-mirror-struct-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px dashed rgba(43, 77, 156, 0.45);
  background: rgba(43, 77, 156, 0.06);
  color: var(--brand);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cms-mirror-struct-btn:hover {
  background: rgba(43, 77, 156, 0.12);
  border-color: var(--brand);
}

/* Schwebende WhatsApp-Schaltfläche (wa.me) */
.whatsapp-float-anchor {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
}

.whatsapp-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 18px rgba(10, 16, 30, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.whatsapp-float-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(10, 16, 30, 0.28);
  color: #fff;
}

.whatsapp-float-svg {
  width: 30px;
  height: 30px;
  display: block;
}

body:has(#cookieBanner:not([hidden])) .whatsapp-float-anchor {
  bottom: 5.75rem;
}

@media (max-width: 768px) {
  .whatsapp-float-anchor {
    right: 1rem;
    bottom: 1rem;
  }

  body:has(#cookieBanner:not([hidden])) .whatsapp-float-anchor {
    bottom: 5.25rem;
  }
}

.footer-whatsapp-float-cms {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.45;
}

.footer-whatsapp-float-cms-title {
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.footer-whatsapp-float-cms-row {
  margin: 0.35rem 0 0;
  color: var(--muted, #5c6578);
}

.footer-whatsapp-float-cms-editable {
  display: inline-block;
  min-width: 2ch;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  background: rgba(43, 77, 156, 0.06);
  color: var(--text, #1a2233);
}

.whatsapp-compose-card {
  width: min(440px, 96vw);
  max-height: min(560px, 90vh);
}

.whatsapp-compose-body {
  max-height: calc(90vh - 56px);
}

.whatsapp-compose-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #4b5878;
  line-height: 1.45;
}

.whatsapp-compose-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.whatsapp-compose-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #26324c;
}

.whatsapp-compose-label input,
.whatsapp-compose-label textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
}

.whatsapp-compose-label textarea {
  resize: vertical;
  min-height: 6rem;
}

.whatsapp-compose-err {
  margin: 0;
  font-size: 0.85rem;
  color: #b42318;
}

.whatsapp-compose-actions {
  margin-top: 0.25rem;
}

.whatsapp-compose-submit {
  width: 100%;
  background: #25d366;
  border-color: #1da851;
  color: #fff;
}

.whatsapp-compose-submit:hover {
  filter: brightness(1.05);
  color: #fff;
}

.layout-sketch-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border, #dfe3ea);
  border-radius: 10px;
  background: #fff;
  cursor: crosshair;
}

.layout-sketch-preview {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--border, #dfe3ea);
  border-radius: 10px;
  background: #fff;
}

#layoutSketchPreviewWrap {
  margin-top: 0.7rem;
  position: relative;
  display: inline-block;
}

.layout-sketch-delete-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(31, 41, 55, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layout-sketch-delete-btn:hover {
  background: #fee2e2;
}

.sketch-tool-btn {
  width: 56px;
  min-width: 56px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2b4d9c;
  opacity: 0.66;
}

.sketch-tool-btn.is-active {
  opacity: 1;
}

.sketch-tool-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sketch-action-btn {
  min-width: 86px;
  font-size: 0.78rem;
  padding: 0.32rem 0.55rem;
}

.sketch-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.sketch-toolbar .sketch-action-btn {
  min-width: 72px;
  padding: 0.28rem 0.5rem;
}

/* Darkmode fixes for components that still used fixed light backgrounds. */
:root[data-theme="dark"] .section-alt {
  background: var(--bg-soft);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .legal-modal-card,
:root[data-theme="dark"] .legal-modal-header,
:root[data-theme="dark"] .cookie-banner-inner,
:root[data-theme="dark"] .dryhire-panel,
:root[data-theme="dark"] .article-item,
:root[data-theme="dark"] .selected-panel {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--text);
}

:root[data-theme="dark"] .legal-modal-body,
:root[data-theme="dark"] label {
  color: var(--text);
}

:root[data-theme="dark"] .article-hint {
  background: color-mix(in srgb, var(--brand) 14%, var(--card));
  color: var(--text);
}

/* Keep list text/markers aligned with normal dark text. */
:root[data-theme="dark"] .rich-content li,
:root[data-theme="dark"] .footer-locations li,
:root[data-theme="dark"] .footer-company li,
:root[data-theme="dark"] .footer-contact li,
:root[data-theme="dark"] .footer-links li {
  color: var(--text);
}

:root[data-theme="dark"] .rich-content li::marker,
:root[data-theme="dark"] .footer-locations li::marker,
:root[data-theme="dark"] .footer-company li::marker,
:root[data-theme="dark"] .footer-contact li::marker,
:root[data-theme="dark"] .footer-links li::marker {
  color: currentColor;
}

/* Keep highlight card intentionally white-on-blue. */
:root[data-theme="dark"] .jobs-highlight-card .rich-content li,
:root[data-theme="dark"] .jobs-highlight-card li {
  color: #fff;
}
