




/* ===================================================================
   Farb- und Schrift-Grundwerte
   =================================================================== */
:root {
  --ink: #1B2436;
  --heading: #333F5C; /* etwas heller als --ink, fuer Ueberschriften statt reinem Schwarz */
  --navy: #273973;
  --navy-deep: #1C2A5C;
  --slate: #4B5573;
  --mist: #F3F5FB;
  --line: #E1E5F0;
  --paper: #FFFFFF;
  --tag-bg: #EAEEF9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--heading);
  margin: 0;
  text-wrap: balance;
}

a { color: var(--navy); text-decoration: underline; }
a:hover { color: var(--navy-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Nur Abstaende zuruecksetzen, Aufzaehlungspunkte bleiben (werden fuer die
   einfachen Inhaltsseiten wie impressum.php, onlineloesungen.php usw. gebraucht) */
ul { margin: 0; padding: 0 0 0 20px; }
p { max-width: 62ch; }

.eyebrow {
  display: inline-block;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
}
.contact .eyebrow { color: #A9C0F5; }

/* Sprungziele nicht unter dem sticky Header verschwinden lassen */
[id] { scroll-margin-top: 96px; }

/* Einfache Inhaltsseiten (Impressum, Datenschutz, Onlineloesungen usw.), die
   ohne eigenes Sections-Layout direkt zwischen h.php und f.php stehen */
.page { max-width: 760px; margin: 0 auto; padding: 64px 56px; }

/* -------- header -------- */
/* Kein Rand oben/links/rechts, damit Logo und Kachel-Streifen direkt an den
   Fensterkanten anliegen (wie im alten h.php-Header: marginwidth=0 marginheight=0
   und die Tabelle geht randlos bis zum Rand). Unten 10px Puffer, damit die
   um 10px nach unten verschobenen Navi-Buttons noch vollstaendig reinpassen. */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 0 10px 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
}

.logo-slot { flex: 0 0 auto; line-height: 0; }
.logo-slot img { display: block; height: 80px; width: auto; }

/* Streifen aus dem Logo werden per 1-Pixel-Kachel "head-p.jpg" nach rechts fortgesetzt.
   Hoehe ist bewusst exakt wie beim Logo (80px) und liegt ohne Abstand direkt daran an,
   damit die Striche nahtlos weiterlaufen. Navi/Menu-Button liegen als Kinder DRIN,
   vertikal zentriert und rechtsbuendig bis zum Content-Rand. */
.logo-strip {
  flex: 1 1 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background-image: url(head-p.jpg);
  background-repeat: repeat-x;
  background-size: auto 80px;
}

/* 10px nach unten und 10px nach links verschoben, siehe Wunsch */
nav.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; position: relative; top: 10px; left: -10px; }
nav.site-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}
/* Aktiver Menuepunkt (per Scroll-Erkennung) sieht genauso aus wie beim Hover */
nav.site-nav a:hover,
nav.site-nav a.active {
  background: var(--navy);
  color: #fff;
}

/* Menu-Button, nur auf schmalen Breiten sichtbar (siehe Media-Query unten).
   10px nach unten und 10px nach links verschoben, siehe Wunsch */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  top: 10px;
  left: -10px;
  color: var(--ink);
}
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1000px) {
  nav.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 22px;
    box-shadow: 0 16px 28px -18px rgba(27,36,54,0.3);
  }
  nav.site-nav.open { display: flex; }
  nav.site-nav a { width: 100%; padding: 10px 14px; }
  .menu-toggle { display: flex; }
}

/* -------- hero -------- */
section.hero { padding: 104px 56px 96px; }
.hero-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { font-size: 45px; font-weight: 800; line-height: 1.15; margin-bottom: 22px; }
.hero .lede { font-size: 18px; margin-bottom: 34px; }
.hero-actions { display: flex; align-items: center; gap: 26px; }
.btn-primary {
  display: inline-block;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--navy);
  padding: 15px 30px;
  border-radius: 4px;
}
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--line); padding-bottom: 2px; }
.btn-ghost:hover { color: var(--navy); border-color: var(--navy); }

/* device mock */
.device {
  min-width: 0; /* darf im Grid (hero-grid/about-grid) schrumpfen, sonst sprengt langer Text wie "Saarbruecken" die Spalte auf Handys */
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 60px -25px rgba(27,36,54,0.28);
  transform: rotate(1.2deg);
  overflow: hidden;
}
.device-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--mist); border-bottom: 1px solid var(--line); }
.device-bar span { width: 8px; height: 8px; border-radius: 50%; background: #C9D0E6; }
.device-body { display: grid; grid-template-columns: 76px 1fr; min-height: 260px; }
.device-side { background: var(--ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 14px; }
.device-side i { display: block; width: 22px; height: 22px; border-radius: 5px; background: rgba(255,255,255,0.14); }
.device-side i.on { background: var(--navy); }
.device-main { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.device-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.device-stat { min-width: 0; background: var(--mist); border-radius: 6px; padding: 12px 14px; }
.device-stat .num { font-family: Arial, Helvetica, sans-serif; font-weight: 800; color: var(--navy); font-size: 20px; overflow-wrap: break-word; }
.device-stat .cap { font-size: 11.5px; color: var(--slate); }
.device-chart { flex: 1; background: var(--mist); border-radius: 6px; padding: 14px; display: flex; align-items: flex-end; gap: 8px; }
.device-chart b { display: block; width: 100%; background: var(--navy); border-radius: 3px 3px 0 0; opacity: 0.85; }
/* Leichte Gegenschraege fuer Eyecatcher in anderen Bereichen, damit nicht alle Karten gleich kippen */
.device.alt { transform: rotate(-1deg); }
/* Checkliste innerhalb eines Device-Mockups, z.B. bei "warum mbsol?".
   margin:auto 0 zentriert die Liste vertikal, da sie kuerzer ist als die Stats+Chart-Kombi */
.device-list { list-style: none; margin: auto 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.device-list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.device-list svg { flex: 0 0 auto; color: var(--navy); }

/* -------- sections general -------- */
section.block { padding: 92px 56px; }
.block.tint { background: var(--mist); }
.block-head { max-width: 1180px; margin: 0 auto 52px auto; }
.block-head h2 { font-size: 30px; font-weight: 800; }

/* about */
.about-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: 68px; align-items: start; }
/* Wiederverwendung von .about-grid als Kopfbereich bei "warum mbsol?", nur vertikal mittig
   statt oben ausgerichtet, da rechts ein kurzer Eyecatcher statt eines langen Textblocks steht */
.why-intro { align-items: center; margin-bottom: 56px; }

/* services */
.service-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 24px; }
/* Die ganze Karte oeffnet das Popup, nicht nur der "Mehr erfahren"-Knopf, siehe Javascript */
.service-card { padding-top: 20px; border-top: 2px solid var(--navy); cursor: pointer; }
.service-card .icon { color: var(--navy); margin-bottom: 18px; }
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.service-card p { font-size: 14px; }
/* Hervorhebung der Ziel-Karte nach einem Sprungmarken-Klick, da alle Karten in einer Reihe liegen */
.service-card:target {
  outline: 2px solid var(--navy);
  outline-offset: 10px;
  border-radius: 4px;
  background: var(--paper);
}
/* "Mehr erfahren"-Knopf sieht aus wie ein normaler Link, oeffnet aber ein Popup statt einer eigenen Seite.
   display:block setzt ihn immer in eine eigene Zeile unter den Beschreibungstext */
.popup-trigger { display: block; margin-top: 10px; font-weight: 700; background: none; border: none; padding: 0; font: inherit; color: var(--navy); cursor: pointer; }
.popup-trigger:hover { color: var(--navy-deep); text-decoration: underline; }

/* Popup mit den Leistungs-Details. Erst per Klasse "open" sichtbar, siehe Javascript in index.php */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(27,36,54,0.6);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.popup-overlay.open { display: flex; }
.popup-box {
  position: relative;
  background: var(--paper);
  border-radius: 8px;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 44px;
  box-shadow: 0 30px 60px -25px rgba(27,36,54,0.4);
}
.popup-box h2 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.popup-box ul { margin: 8px 0 18px; }
.popup-box li { margin-bottom: 6px; }
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.popup-close:hover { background: var(--line); }

/* why us */
.why-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 32px; }
.why-item { display: flex; flex-direction: column; gap: 12px; }
.why-item .icon { color: var(--navy); }
.why-item h3 { font-size: 16px; font-weight: 700; }
.why-item p { font-size: 14px; }

/* contact */
section.contact { padding: 92px 56px; background: var(--navy); color: #DCE1F0; }
.contact-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.contact h2 { color: #fff; font-size: 30px; font-weight: 800; margin-bottom: 18px; }
.contact-card { display: flex; flex-direction: column; gap: 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; padding: 30px; }
.contact-card a, .contact-card span.who { color: #fff; text-decoration: none; font-size: 15.5px; font-weight: 600; }
.contact-card span.who { color: #A9B2D2; font-weight: 400; }
.contact-note { font-size: 15px; color: #A9B2D2; }

/* footer */
footer.site { padding: 26px 56px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--paper); flex-wrap: wrap; gap: 12px; }
footer.site .copy { font-size: 12.5px; color: #94A0BE; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer.site nav a { font-size: 13px; color: var(--slate); text-decoration: none; }
footer.site nav a:hover { color: var(--navy); }

/* CI-Streifen ganz unten, per 1-Pixel-Kachel "foot-p.jpg" ueber die volle Breite
   fortgesetzt - gleiche Technik wie beim Kopf-Logo (frueher in f.php per
   background=foot-p.jpg auf der letzten <td>). Randlos, damit der Streifen
   wirklich bis an beide Fensterkanten reicht.
   Hinweis: die Hoehe hier ist ein Platzhalter - bitte an die tatsaechliche
   Pixel-Hoehe von foot-p.jpg anpassen, sobald das Bild final ist. */
.ci-strip {
  height: 20px;
  background-image: url(foot-p.jpg);
  background-repeat: repeat-x;
  background-size: auto 100%;
}

/* -------- schwebender Anruf-Knopf -------- */
/* position:fixed haelt ihn beim Scrollen immer an der gleichen Stelle unten rechts */
.fab-call {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 12px 24px -10px rgba(27,36,54,0.5);
  transition: background 0.15s ease, opacity 0.2s ease, transform 0.2s ease;
}
/* Beim Hover soll sich nichts veraendern (sonst wird die weisse Schrift durch die allgemeine
   "a:hover"-Regel dunkel und ist auf dem Kreis kaum noch zu erkennen) */
.fab-call:hover { background: var(--navy); color: #fff; }
/* Wird per Javascript gesetzt, sobald der Kontakt-Bereich oder der Footer sichtbar ist */
.fab-call.is-hidden { opacity: 0; transform: scale(0.8); pointer-events: none; }
@media (max-width: 560px) {
  .fab-call { right: 16px; bottom: 16px; width: 50px; height: 50px; }
}

@media (max-width: 1100px) {
  .service-grid, .why-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  section.hero, section.block, section.contact, footer.site { padding-left: 24px; padding-right: 24px; }
  .page { padding: 48px 24px; }
}
@media (max-width: 560px) {
  .service-grid, .why-grid { grid-template-columns: 1fr; }
}
