/* INFON Kommunikationslösungen GmbH – Stylesheet */

:root {
  /* Frühere sanfte Fassung: werkzeuge\sicherung\infon_farben-sanft.css */
  --kopf-hintergrund: #2c4a68;
  --kopf-text: #ffffff;
  --seiten-hintergrund: #e9eff6;
  --kasten-hintergrund: #cfdeed;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--seiten-hintergrund);
  color: #262626;
  font-family: Arial, Helvetica, "Liberation Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
main img { border-radius: 6px; }

a { color: #000000; text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Kopfbereich */
.kopf {
  background: var(--kopf-hintergrund); color: var(--kopf-text);
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* Sprungziele nicht unter dem fixierten Kopfbereich verstecken */
[id] { scroll-margin-top: 110px; }
.kopf .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-top: 16px; padding-bottom: 16px;
}
.kopf .logo img { width: 120px; }

/* Hauptmenü mit Aufklappmenüs (ohne JavaScript) */
.menue-schalter { position: absolute; opacity: 0; pointer-events: none; }
.menue-knopf { display: none; }
.unsichtbar {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.navi ul { list-style: none; margin: 0; padding: 0; }
.navi li { margin: 0; position: relative; }
.navi > ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.navi a { display: block; text-decoration: none; color: var(--kopf-text); padding: 6px 0; border-bottom: 2px solid transparent; }
.navi > ul > li > a:hover { border-bottom-color: #a6b4c2; }
.navi a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--kopf-text); }
.hat-unter > a::after {
  content: ""; display: inline-block; margin-left: 7px; vertical-align: middle;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.navi .unter {
  display: none; position: absolute; left: -16px; top: 100%; z-index: 10;
  min-width: 240px; padding: 8px 0; background: var(--kopf-hintergrund);
  border-radius: 0 0 8px 8px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.hat-unter:hover > .unter, .hat-unter:focus-within > .unter { display: block; }
.unter a, .unter a[aria-current="page"] { padding: 9px 16px; border-bottom: 0; white-space: nowrap; }
.unter a:hover, .unter a:focus { background: rgba(255, 255, 255, 0.12); }

/* Inhalt */
main { padding: 32px 0 48px; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 20px; color: #000000; }
h2 { font-size: 23px; line-height: 1.3; margin: 0 0 12px; color: #000000; }
h3 { font-size: 19px; line-height: 1.35; margin: 24px 0 8px; color: #000000; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
.einleitung { font-size: 19px; }

/* Abschnitte mit Bild */
.abschnitt {
  display: grid; grid-template-columns: 340px 1fr; gap: 32px;
  padding: 32px 0; border-top: 1px solid #bfbfbf;
}
.abschnitt:first-of-type { border-top: 0; padding-top: 0; }
.abschnitt img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Einstieg auf der Startseite: links Kernaussage und Telefon, rechts Fließtext */
.einstieg { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 56px; align-items: start; }
.einstieg-links { border-left: 3px solid var(--kopf-hintergrund); padding-left: 20px; }
.einstieg-links .telefon { margin-bottom: 0; }
.einstieg-rechts p:last-child { margin-bottom: 0; }

/* Abschnitte als Kasten (Portfolio-Seite) */
.abschnitt.kasten,
.abschnitt.kasten:first-of-type {
  background: var(--kasten-hintergrund); border-radius: 8px; border-top: 0;
  padding: 28px; margin-bottom: 24px;
}

/* Zweispaltiger Fließtext (Über uns) */
.zweispaltig { column-count: 2; column-gap: 56px; }
.zweispaltig p { break-inside: avoid; }

/* Unsere Werte: links Text, rechts Leitsätze im Kasten */
.werte { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: start; }
.werte-kasten { background: var(--kasten-hintergrund); border-radius: 8px; padding: 24px 28px 12px; }

/* Begrüßung auf der Startseite: Rahmen in der Farbe des Menübands, ohne Füllung */
.begruessung {
  border: 2px solid var(--kopf-hintergrund); border-radius: 8px;
  padding: 24px 28px 20px; margin-bottom: 32px;
}
.begruessung h1 { font-size: 22px; margin-bottom: 12px; }
.begruessung p:last-child { margin-bottom: 0; }
.begruessung .telefon { font-size: 19px; font-weight: 400; white-space: nowrap; }
.telefon .symbol { fill: var(--kopf-hintergrund); vertical-align: -3px; margin-right: 8px; }

/* Übersicht auf der Startseite */
.uebersicht { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; margin: 8px 0 40px; }
.uebersicht.mit-kasten > div { background: var(--kasten-hintergrund); border-radius: 8px; padding: 14px 14px 18px; position: relative; }
/* ganzer Kasten anklickbar: der Link "Mehr Infos" wird über den Kasten gelegt */
.uebersicht.mit-kasten a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.uebersicht img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 12px; }
.uebersicht h3 { margin-top: 0; }
.uebersicht p { margin-bottom: 0; }

/* Ausreichend große Tippflächen für eigenständige Links */
.uebersicht a { display: inline-block; padding: 12px 0 10px; }
main a[href^="tel:"], main a[href^="mailto:"] { display: inline-block; padding: 8px 0; }

/* Bilder mit Schrift nicht beschneiden */
img.ganz { object-fit: contain; }

.trenner { border: 0; border-top: 1px solid #bfbfbf; margin: 40px 0; }

.telefon { font-size: 21px; font-weight: 700; }

/* Ansprechpartner-Block */
.ansprechpartner { border-top: 1px solid #bfbfbf; padding-top: 32px; margin-top: 8px; }

/* Standorte */
.standorte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 28px; margin-bottom: 32px; }
.standorte p { margin: 0; }

/* Fußbereich */
.fuss { border-top: 1px solid #bfbfbf; font-size: 15px; color: #404040; }
.fuss .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.fuss a { color: #404040; }

/* Textspalte und Rechtstexte */
.textspalte, .rechtstext { max-width: 760px; }
.rechtstext h2 { margin-top: 32px; }
.rechtstext .versalien { font-size: 15px; }

@media (max-width: 860px) {
  .uebersicht, .standorte { grid-template-columns: repeat(2, 1fr); }
  .abschnitt, .einstieg, .werte { grid-template-columns: 1fr; gap: 16px; }
  .zweispaltig { column-count: 1; }
  .abschnitt img { max-width: 520px; }

  /* Handy und Tablet: Menü-Knopf klappt eine Liste mit allen Unterpunkten auf */
  .menue-knopf {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 46px; height: 46px; padding: 0 11px; cursor: pointer; border-radius: 6px;
  }
  .menue-knopf .strich {
    display: block; height: 3px; border-radius: 2px; background: var(--kopf-text);
    transition: transform 0.2s, opacity 0.2s;
  }
  .menue-schalter:focus-visible + .menue-knopf { outline: 2px solid var(--kopf-text); outline-offset: 2px; }
  /* geöffnet: drei Striche werden zum X */
  .menue-schalter:checked + .menue-knopf .strich:nth-of-type(2) { transform: translateY(9px) rotate(45deg); }
  .menue-schalter:checked + .menue-knopf .strich:nth-of-type(3) { opacity: 0; }
  .menue-schalter:checked + .menue-knopf .strich:nth-of-type(4) { transform: translateY(-9px) rotate(-45deg); }
  .navi { display: none; flex-basis: 100%; }
  .menue-schalter:checked ~ .navi { display: block; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; }
  [id] { scroll-margin-top: 90px; }
  .navi > ul { flex-direction: column; gap: 0; }
  .navi > ul > li { border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .navi a { padding: 12px 0; }
  .hat-unter > a::after { display: none; }
  .navi > ul > li > a { font-weight: 700; }
  .navi .unter {
    display: block; position: static; min-width: 0; padding: 0 0 8px 16px;
    background: none; box-shadow: none; border-radius: 0;
  }
  .unter a { padding: 10px 0; font-size: 15px; font-weight: 400; white-space: normal; opacity: 0.9; }
  .unter a:hover, .unter a:focus { background: none; text-decoration: underline; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  h1 { font-size: 25px; }
  h2 { font-size: 21px; }
  .uebersicht, .standorte { grid-template-columns: 1fr; }
  .kopf .logo img { width: 100px; }  .abschnitt.kasten, .abschnitt.kasten:first-of-type { padding: 16px; }
}

@media print {
  .navi, .menue-knopf, .fuss nav { display: none; }
  .abschnitt { break-inside: avoid; }
}
