html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 110px;
}
/* Mail Management GmbH – Stylesheet „Modern“ (ergänzt Bootstrap 5)
   Nur Systemschriften, keine externen Schriften (DSGVO).
   Icons: Bootstrap Icons, MIT-Lizenz, (c) The Bootstrap Authors – direkt als SVG eingebunden. */

:root {
  --mm-navy: #0b2a4a;
  --mm-navy-2: #123d68;
  --mm-navy-dark: #071c33;
  --mm-red: #c8102e;
  --mm-red-dark: #a30d25;
  --mm-grey: #e9eef4;
  --mm-bg: #edf2f7;
  --mm-line: #cbd5e1;
  --mm-text: #1f2a37;
  --mm-muted: #5b6675;
  --mm-radius: 12px;
  --mm-shadow: 0 2px 8px rgba(11, 42, 74, .06), 0 1px 3px rgba(11, 42, 74, .04);
  --mm-shadow-hover: 0 12px 30px rgba(11, 42, 74, .12);
  --bs-body-font-family: system-ui, -apple-system, Arial, sans-serif;
  --bs-body-color: #1f2a37;
  --bs-link-color-rgb: 18, 61, 104;
  --bs-link-hover-color-rgb: 200, 16, 46;
}

body {
  font-family: system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
  color: var(--mm-text);
  background-color: var(--mm-bg);
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
}

h1, h2, h3, h4, h5 {
  letter-spacing: -.01em;
}

:focus-visible {
  outline: 3px solid #f2a900;
  outline-offset: 2px;
}

.mm-skip:focus {
  position: absolute;
  z-index: 1100;
  background: #fff;
  padding: .5rem 1rem;
}

.mm-icon {
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
  flex-shrink: 0;
}

/* ---------- Kopfzeile (Sticky) ---------- */

.mm-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid var(--mm-line);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mm-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mm-navy) 0%, var(--mm-red) 50%, var(--mm-navy) 100%);
  opacity: 0.9;
}

/* Graues Element im Header: Elegante B2B Servicesteg-Leiste */
.mm-topbar {
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--mm-line);
  font-size: .8125rem;
  color: var(--mm-muted);
  padding: .35rem 0;
}

.mm-topbar-info {
  font-weight: 500;
  color: #475569;
}

.mm-topbar-link {
  color: var(--mm-navy);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.mm-topbar-link:hover,
.mm-topbar-link:focus {
  color: var(--mm-red);
  text-decoration: underline;
}

.mm-header .navbar {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.mm-brand {
  display: inline-flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  margin-right: 1.5rem;
}

.mm-brand img {
  height: 64px;
  width: auto;
  aspect-ratio: 4550 / 1411;
  max-width: 100%;
  object-fit: contain;
  transition: transform .2s ease;
}

@media (min-width: 576px) {
  .mm-brand img { height: 72px; }
}

@media (min-width: 768px) {
  .mm-brand img { height: 82px; }
}

@media (min-width: 992px) {
  .mm-brand img { height: 90px; }
}

@media (min-width: 1200px) {
  .mm-brand img { height: 104px; }
}

@media (min-width: 1400px) {
  .mm-brand img { height: 112px; }
}

.mm-header .nav-link {
  color: var(--mm-navy);
  font-weight: 500;
  position: relative;
}

.mm-header .nav-link:hover,
.mm-header .nav-link:focus {
  color: var(--mm-red);
}

.mm-header .nav-link.active {
  color: var(--mm-red);
  font-weight: 600;
}

/* Language-Switcher mit Flagge und grauem Element */
.mm-lang {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .5rem 0;
  padding: .25rem .7rem;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--mm-navy);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.mm-lang:hover,
.mm-lang:focus {
  background-color: #e2e8f0;
  border-color: var(--mm-navy);
  color: var(--mm-navy);
}

/* Mobiler Language-Switcher (immer direkt neben dem Menü-Button sichtbar) */
.mm-lang-mobile {
  margin: 0;
  padding: .32rem .75rem;
  font-size: .8125rem;
  font-weight: 700;
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mm-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0, 0, 0, .35);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .mm-header .nav-link { padding-left: .6rem; padding-right: .6rem; }
  .mm-header .nav-link.active::after {
    content: "";
    position: absolute;
    left: .6rem;
    right: .6rem;
    bottom: -.15rem;
    height: 2px;
    background: var(--mm-red);
    border-radius: 2px;
  }
  .mm-lang-item { margin-left: .75rem; }
}

/* ---------- Seitenkopf ---------- */

.mm-hero {
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 85% 20%, rgba(200, 16, 46, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(18, 61, 104, 0.6) 0%, transparent 50%),
    linear-gradient(135deg, var(--mm-navy) 0%, var(--mm-navy-2) 100%);
  color: #fff;
  padding: 2.75rem 0 3rem;
}

.mm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

.mm-hero > .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .mm-hero { padding: 4rem 0 4.25rem; }
}

.mm-hero h1 {
  font-weight: 700;
  line-height: 1.2;
  max-width: 52rem;
  overflow-wrap: break-word;
}

.mm-hero .lead {
  color: #c9d6e6;
  max-width: 46rem;
}

.mm-hero p:not(.lead) {
  color: #c9d6e6;
}

.mm-hero strong {
  color: #fff;
}

.mm-breadcrumb {
  --bs-breadcrumb-divider-color: #8fa6c1;
  --bs-breadcrumb-item-active-color: #c9d6e6;
  margin-bottom: 1rem;
  font-size: .875rem;
}

.mm-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.mm-breadcrumb a:hover {
  text-decoration: underline;
}

/* Stärken unter dem Seitenkopf der Startseite */
.mm-facts {
  background: #fff;
  border-bottom: 1px solid var(--mm-line);
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(11, 42, 74, 0.03);
  position: relative;
  z-index: 2;
}

.mm-fact {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9375rem;
  color: var(--mm-muted);
}

.mm-fact strong {
  color: var(--mm-navy);
}

.mm-fact .mm-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--mm-red);
  margin-top: .15rem;
}

/* ---------- Abschnitte ---------- */

.mm-section-grey {
  background: linear-gradient(180deg, #e2e8f0 0%, #d8e2ec 100%);
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

.mm-title {
  color: var(--mm-navy);
  font-weight: 700;
  font-size: calc(1.3rem + .6vw);
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (min-width: 1200px) {
  .mm-title { font-size: 1.75rem; }
}

.mm-title::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-bottom: .75rem;
  background: var(--mm-red);
  border-radius: 2px;
}

h1.mm-title::before {
  display: none;
}

.blockquote {
  border-left: 3px solid var(--mm-red);
  padding-left: 1rem;
  color: var(--mm-navy);
  font-style: italic;
}

address {
  line-height: 1.6;
}

/* ---------- Karten (Leistungen und Inserate) ---------- */

.mm-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--mm-radius);
  box-shadow: 0 2px 6px rgba(11, 42, 74, .04), 0 1px 3px rgba(11, 42, 74, .02);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.mm-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mm-navy) 0%, var(--mm-red) 100%);
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: center;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 3;
}

.mm-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.mm-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 14px 30px -4px rgba(11, 42, 74, .12), 0 6px 12px -2px rgba(11, 42, 74, .05);
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .mm-card { transition: none; }
  .mm-card:hover { transform: none; }
}

.mm-card .card-body {
  padding: 1.5rem;
}

.mm-card .card-footer {
  padding: 0 1.5rem 1.5rem !important;
  border-radius: 0 0 var(--mm-radius) var(--mm-radius) !important;
}

.mm-card .card-title {
  color: var(--mm-navy);
  font-weight: 600;
}

.mm-card .card-body {
  display: flex;
  flex-direction: column;
}

.mm-card .card-text {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.mm-card .card-footer .btn-mm {
  width: 100%;
}

/* Automatisches Bild-Resizing für Inserate (oben oder unten) */
.mm-card .card-img-top,
.mm-card .card-img-bottom,
.mm-card .mm-card-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem;
  display: block;
  margin-top: auto; /* Sitzt immer bündig unten auf gleicher Höhe, unabhängig von der Textlänge! */
}
}

.mm-card > .card-img-top:first-child {
  border-radius: var(--mm-radius) var(--mm-radius) 0 0;
  border: none;
  border-bottom: 1px solid var(--mm-line);
  margin-top: 0;
  height: 220px;
}

/* Hersteller-Hervorhebung in Anzeigen (Marken-Badge mit rotem Akzent) */
.mm-card .text-uppercase {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #f1f5f9;
  color: var(--mm-navy);
  border: 1px solid #cbd5e1;
  border-left: 3.5px solid var(--mm-red);
  padding: .22rem .65rem;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .4rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mm-card .text-uppercase::before {
  content: "Hersteller: ";
  font-size: .68rem;
  font-weight: 600;
  color: var(--mm-muted);
  letter-spacing: .02em;
}

html[lang="en"] .mm-card .text-uppercase::before {
  content: "Manufacturer: ";
}

.mm-card .stretched-link {
  font-weight: 600;
  text-decoration: none;
}

.mm-card .stretched-link::before {
  content: "\2192\00a0";
}

.mm-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: #fdecef;
  color: var(--mm-red);
  font-size: 1.35rem;
}

/* Schilder: Nummer und Zustand */
.mm-card .badge {
  border-radius: 999px;
  padding: .35em .75em;
  font-weight: 600;
  font-size: .8rem;
}

/* 1. Inventarnummer (dunkelblau) */
.mm-nr {
  background: var(--mm-navy) !important;
  color: #fff !important;
}

/* 2. Einheitliches Status-Badge (egal ob Gebraucht, Used, Neu, etc.) */
.mm-status,
.mm-card .badge:not(.mm-nr) {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1;
}

/* 3. Verfügbarkeits-Badges: Reserviert / Verkauft */
.mm-card .badge.mm-badge-reserved {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
}

.mm-card .badge.mm-badge-sold {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.mm-card.mm-card-sold {
  opacity: 0.85;
  background-color: #f8fafc;
}

.mm-card.mm-card-sold .card-img-bottom,
.mm-card.mm-card-sold .card-img-top {
  filter: grayscale(70%);
  opacity: 0.85;
}

.mm-card.mm-card-sold:hover .card-img-bottom,
.mm-card.mm-card-sold:hover .card-img-top {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.btn-mm {
  --bs-btn-color: #fff;
  --bs-btn-bg: #c8102e;
  --bs-btn-border-color: #c8102e;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #a30d25;
  --bs-btn-hover-border-color: #a30d25;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8c0b20;
  --bs-btn-active-border-color: #8c0b20;
}

.btn-outline-mm {
  --bs-btn-color: #0b2a4a;
  --bs-btn-border-color: #0b2a4a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b2a4a;
  --bs-btn-hover-border-color: #0b2a4a;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #071c33;
  --bs-btn-active-border-color: #071c33;
}

/* ---------- Kontakt-Band ---------- */

.mm-cta-band {
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border-top: 1px solid var(--mm-line);
  padding: 3rem 0;
}

.mm-cta-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid var(--mm-line);
  border-left: 5px solid var(--mm-red);
  border-radius: var(--mm-radius);
  box-shadow: 0 4px 16px rgba(11, 42, 74, .06);
  padding: 1.5rem;
}

.mm-cta-box h2 {
  color: var(--mm-navy);
  font-weight: 700;
}

.mm-cta-box p {
  color: var(--mm-muted);
}

.mm-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.mm-cta-actions .btn {
  white-space: nowrap;
}

.mm-cta-box > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 992px) {
  .mm-cta-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem;
  }
  .mm-cta-actions { flex-wrap: nowrap; }
}

/* ---------- Fußzeile ---------- */

.mm-footer {
  background: var(--mm-navy-dark);
  color: #b9c7d8;
  font-size: .9375rem;
  padding: 3rem 0 1.5rem;
}

.mm-footer a {
  color: #fff;
  text-decoration: none;
}

.mm-footer a:hover,
.mm-footer a:focus {
  text-decoration: underline;
}

.mm-footer li {
  margin-bottom: .35rem;
}

.mm-footer-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: .5rem;
}

.mm-footer-title {
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.mm-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  font-size: .8125rem;
}

/* ---------- v2: Hero Wave Divider ---------- */
.mm-hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}

.mm-hero-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mm-hero-divider svg path {
  fill: var(--mm-bg) !important;
}

/* ---------- v2: Schnell-Filterleiste ---------- */
.mm-quicknav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--mm-line);
  padding: .75rem 0;
  position: relative;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.mm-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--mm-navy);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.mm-filter-pill:hover,
.mm-filter-pill:focus {
  background-color: var(--mm-navy);
  color: #fff;
  border-color: var(--mm-navy);
}

.mm-filter-pill .badge {
  background-color: #e2e8f0;
  color: #1e293b;
  font-size: .75rem;
  padding: .15em .5em;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}

.mm-filter-pill:hover .badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ---------- v2: Schwebender Back-to-Top Button ---------- */
.mm-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background-color: var(--mm-navy);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(11, 42, 74, 0.25);
  text-decoration: none;
  opacity: 0.85;
  transition: all .2s ease;
  z-index: 1000;
}

.mm-back-to-top:hover,
.mm-back-to-top:focus {
  background-color: var(--mm-red);
  color: #fff;
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.35);
}

/* ---------- Lightbox Bildvergrößerung ---------- */

.mm-zoomable,
.mm-card img {
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.mm-card img:hover {
  border-color: var(--mm-navy) !important;
  box-shadow: 0 4px 12px rgba(11, 42, 74, 0.12);
  transform: scale(1.01);
}

.mm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2050;
  background: rgba(7, 28, 51, 0.90);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.mm-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.mm-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 95vw;
  max-height: 90vh;
}

.mm-lightbox-img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transform: scale(0.94);
  transition: transform .25s ease;
}

.mm-lightbox.active .mm-lightbox-img {
  transform: scale(1);
}

.mm-lightbox-caption {
  color: #f1f5f9;
  font-size: 1rem;
  font-weight: 600;
  margin-top: .85rem;
  text-align: center;
  max-width: 800px;
}

.mm-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  z-index: 2060;
}

.mm-lightbox-close:hover {
  background: var(--mm-red);
  transform: scale(1.1);
}

/* ---------- Mobile Optimierungen ---------- */
@media (max-width: 991.98px) {
  .mm-header .navbar-collapse {
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: .75rem 0 1rem;
    border-top: 1px solid var(--mm-line);
    margin-top: .5rem;
  }
}

@media (max-width: 575.98px) {
  .mm-brand img {
    height: 48px;
    max-width: calc(100vw - 165px);
  }
  .mm-topbar {
    font-size: .75rem;
    padding: .25rem 0;
  }
  .mm-back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .mm-quicknav-bar {
    padding: .5rem 0;
  }
  .mm-filter-pill {
    font-size: .75rem;
    padding: .25rem .65rem;
  }
  .mm-lightbox {
    padding: .75rem;
  }
  .mm-lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
}
