/* baustellenwebcam.de – ein Stylesheet für alle Seiten.
   Alles wird über normale HTML-Elemente gestaltet, keine class-Attribute.
   Farben zentral hier oben ändern. */

:root {
  --blau: #2558ab;
  --blau-dunkel: #1b4180;
  --blau-hell: #6295bd;
  --nacht: #14213d;
  --text: #1f2933;
  --text-leise: #52606d;
  --flaeche: #f3f6f9;
  --linie: #dbe2ea;
  --weiss: #ffffff;
  --gruen: #1f8a4c;
  --breite: 1120px;
  --rand: max(16px, calc((100% - var(--breite)) / 2));
  --radius: 10px;
}

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

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

body {
  margin: 0;
  background: var(--weiss);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

a { color: var(--blau); text-underline-offset: 3px; }
a:hover { color: var(--blau-dunkel); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--nacht); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Kopfbereich ---------- */

body > header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--weiss);
  border-bottom: 1px solid var(--linie);
}

body > header > p {
  margin: 0;
  padding: 6px var(--rand);
  background: var(--nacht);
  color: #c9d4e3;
  font-size: .85rem;
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
body > header > p a { color: var(--weiss); text-decoration: none; }
body > header > p a:hover { text-decoration: underline; }

body > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px var(--rand);
}
body > header > div > a img { height: 50px; width: auto; }

body > header button {
  display: none;
  font: inherit;
  font-weight: 600;
  background: var(--flaeche);
  color: var(--nacht);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

body > header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
body > header nav a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--nacht);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
body > header nav a:hover { background: var(--flaeche); color: var(--blau); }
body > header nav a[aria-current="page"] { color: var(--blau); font-weight: 650; }
body > header nav li:last-child a {
  background: var(--blau);
  color: var(--weiss);
  font-weight: 600;
  margin-left: 6px;
}
body > header nav li:last-child a:hover { background: var(--blau-dunkel); color: var(--weiss); }

@media (max-width: 1080px) {
  body > header button { display: block; }
  body > header > div { flex-wrap: wrap; }
  body > header nav { display: none; width: 100%; }
  body > header button[aria-expanded="true"] + nav { display: block; }
  body > header nav ul { flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  body > header nav li:last-child a { margin: 6px 0 0; text-align: center; }
  body > header > div > a img { height: 44px; }
}

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

main > section {
  padding: 72px var(--rand);
}
main > section:nth-of-type(even) { background: var(--flaeche); }

main > section > h2 { max-width: 760px; }
main > section > p,
main > section > ul,
main > section > h3 { max-width: 760px; }

/* Einstieg (erster Abschnitt jeder Seite) */
main > section:first-child {
  background: linear-gradient(160deg, var(--nacht) 0%, #1d3460 100%);
  color: #dbe4f0;
  padding-top: 64px;
  padding-bottom: 72px;
}
main > section:first-child h1,
main > section:first-child h2 { color: var(--weiss); }
main > section:first-child a:not(menu a) { color: var(--weiss); }
main > section:first-child > p,
main > section:first-child > div > p { font-size: 1.12rem; max-width: 720px; }

main > section:first-child:has(> figure) {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}
main > section:first-child > figure { margin: 0; }
main > section:first-child > figure img { border-radius: var(--radius); }

@media (max-width: 860px) {
  main > section:first-child:has(> figure) { display: block; }
  main > section:first-child > figure { margin-top: 32px; }
}

/* Breites Bannerbild direkt unter dem Einstieg */
main > figure {
  margin: 0;
  background: var(--nacht);
}
main > figure img { width: 100%; max-height: 420px; object-fit: cover; }

/* Häkchen-Listen */
main ul { padding-left: 0; list-style: none; }
main ul > li {
  position: relative;
  padding-left: 30px;
  margin-bottom: .55em;
}
main ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--gruen);
  border-bottom: 3px solid var(--gruen);
  transform: rotate(-45deg);
}
main > section:first-child ul > li::before { border-color: #7fd3a1; }
main > section:first-child ul { font-size: 1.05rem; margin: 1.4em 0; }

/* Knöpfe: Links in einer menu-Liste */
main menu {
  list-style: none;
  padding: 0;
  margin: 1.8em 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
main menu li { padding: 0; margin: 0; }
main menu li::before { display: none; }
main menu a {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 8px;
  background: var(--blau);
  color: var(--weiss);
  font-weight: 650;
  text-decoration: none;
  border: 2px solid var(--blau);
}
main menu a:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); color: var(--weiss); }
main menu li + li a { background: transparent; color: var(--blau); }
main menu li + li a:hover { background: var(--blau); color: var(--weiss); }
main > section:first-child menu a { background: var(--weiss); color: var(--nacht); border-color: var(--weiss); }
main > section:first-child menu a:hover { background: #dbe4f0; border-color: #dbe4f0; }
main > section:first-child menu li + li a { background: transparent; color: var(--weiss); border-color: rgba(255,255,255,.55); }
main > section:first-child menu li + li a:hover { background: rgba(255,255,255,.12); }

/* Kundenlogos */
main ul:has(> li > img:only-child) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 56px;
  margin: 8px 0 0;
  max-width: none;
}
main ul:has(> li > img:only-child) > li { padding: 0; margin: 0; }
main ul:has(> li > img:only-child) > li::before { display: none; }
main ul:has(> li > img:only-child) img {
  height: 44px;
  width: auto;
  filter: grayscale(1);
  opacity: .75;
}
main > section:has(> ul > li > img:only-child) { padding-top: 40px; padding-bottom: 40px; text-align: center; }
main > section:has(> ul > li > img:only-child) > h2 { font-size: 1rem; font-weight: 600; color: var(--text-leise); max-width: none; letter-spacing: .02em; }

/* Karten-Raster: div mit article-Elementen */
main div:has(> article) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
main div > article {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}
main div > article > figure { margin: -26px -26px 22px; }
main div > article > figure img { border-radius: var(--radius) var(--radius) 0 0; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--weiss); }
main div > article > p:has(> strong:only-child) { font-size: 1.15rem; color: var(--blau); margin-bottom: .6em; }
main div > article > p:last-child:has(> a:only-child) { margin-top: auto; padding-top: 12px; }

/* Text mit Bild nebeneinander: article direkt im Abschnitt, Text in einem div, Bild in figure */
main > section > article {
  margin-top: 56px;
  max-width: 760px;
}
main > section > article:first-child { margin-top: 0; }
main > section > article:has(> figure) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: none;
}
main > section > article > figure { margin: 0; }
main > section > article:nth-of-type(even) > figure { order: -1; }
main > section > article figure img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20,33,61,.12); }
@media (max-width: 860px) {
  main > section > article:has(> figure) { display: block; }
  main > section > article > figure { margin-top: 24px; }
}

/* Schritte: nummerierte Liste */
main ol {
  list-style: none;
  counter-reset: schritt;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
main ol > li {
  counter-increment: schritt;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 22px 22px 22px;
}
main ol > li::before {
  content: counter(schritt);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blau);
  color: var(--weiss);
  font-weight: 700;
  margin-bottom: 12px;
}
main ol > li strong { display: block; color: var(--nacht); margin-bottom: 4px; }

/* Hinweisbox */
main aside {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-left: 5px solid var(--blau-hell);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 32px 0 0;
  max-width: 820px;
}
main > section:nth-of-type(odd):not(:first-child) aside { background: var(--flaeche); }

/* Tabellen */
main div:has(> table) { overflow-x: auto; margin-top: 28px; -webkit-overflow-scrolling: touch; }
main table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  font-size: .97rem;
}
main th, main td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); }
main thead th { background: var(--nacht); color: var(--weiss); font-weight: 600; }
main tbody th { font-weight: 600; color: var(--nacht); width: 28%; }
main tbody tr:last-child > * { border-bottom: 0; }
main tfoot td { background: var(--flaeche); font-weight: 600; }

/* Häufige Fragen */
main details {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  margin: 0 0 10px;
  max-width: 860px;
}
main details > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  color: var(--nacht);
  position: relative;
}
main details > summary::-webkit-details-marker { display: none; }
main details > summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blau);
}
main details[open] > summary::after { content: "–"; }
main details > *:not(summary) { padding: 0 20px; }
main details > *:last-child { padding-bottom: 18px; }
main section > details:first-of-type { margin-top: 28px; }

/* Abschluss-Aufruf: letzter Abschnitt jeder Seite */
main > section:last-child:not(:has(> form)) {
  background: var(--blau);
  color: #e3ebf7;
  text-align: center;
}
main > section:last-child:not(:has(> form)) h2 { color: var(--weiss); margin-left: auto; margin-right: auto; }
main > section:last-child:not(:has(> form)) > p { margin-left: auto; margin-right: auto; }
main > section:last-child:not(:has(> form)) a:not(menu a) { color: var(--weiss); }
main > section:last-child:not(:has(> form)) menu { justify-content: center; }
main > section:last-child:not(:has(> form)) menu a { background: var(--weiss); color: var(--blau); border-color: var(--weiss); }
main > section:last-child:not(:has(> form)) menu a:hover { background: var(--nacht); color: var(--weiss); border-color: var(--nacht); }
main > section:last-child:not(:has(> form)) menu li + li a { background: transparent; color: var(--weiss); border-color: rgba(255,255,255,.6); }

/* Adresse */
main address { font-style: normal; }

/* Formular */
main form { max-width: 760px; margin-top: 8px; }
main fieldset {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 20px 22px 14px;
  margin: 0 0 20px;
  background: var(--weiss);
}
main legend { font-weight: 650; color: var(--nacht); padding: 0 6px; }
main form label { display: block; margin-bottom: 14px; font-weight: 500; }
main fieldset label:has(input[type="radio"]),
main form label:has(input[type="checkbox"]) {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  margin-bottom: 10px;
}
main input[type="radio"], main input[type="checkbox"] { margin-top: .35em; accent-color: var(--blau); width: 18px; height: 18px; flex: none; }
main input[type="text"], main input[type="email"], main input[type="tel"], main textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  border: 1px solid #b9c4d1;
  border-radius: 8px;
  background: var(--weiss);
}
main input:focus, main textarea:focus { outline: 3px solid rgba(37,88,171,.25); border-color: var(--blau); }
main textarea { min-height: 120px; resize: vertical; }
main form button {
  font: inherit;
  font-weight: 650;
  padding: 14px 28px;
  border: 0;
  border-radius: 8px;
  background: var(--blau);
  color: var(--weiss);
  cursor: pointer;
}
main form button:hover { background: var(--blau-dunkel); }
main form small { display: block; color: var(--text-leise); margin: 4px 0 18px; }
/* Feld gegen Spam-Programme, für Menschen unsichtbar */
main form label:has(input[name="webseite"]) { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Kontakt-Spalten */
main > section:has(> form) {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}
main > section:has(> form) > form { grid-column: 1; }
main > section:has(> form) > aside { grid-column: 2; margin-top: 8px; }
main > section:has(> form) > h2 { grid-column: 1 / -1; }
@media (max-width: 860px) {
  main > section:has(> form) { display: block; }
}

/* ---------- Fußbereich ---------- */

body > footer {
  background: var(--nacht);
  color: #b8c4d6;
  padding: 56px var(--rand) 28px;
  font-size: .93rem;
}
body > footer > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 32px;
}
body > footer h2 { color: var(--weiss); font-size: 1rem; margin-bottom: .8em; }
body > footer ul { list-style: none; padding: 0; margin: 0; }
body > footer li { margin-bottom: .35em; }
body > footer a { color: #dbe4f0; text-decoration: none; }
body > footer a:hover { color: var(--weiss); text-decoration: underline; }
body > footer address { font-style: normal; }
body > footer img { width: 150px; background: var(--weiss); border-radius: 8px; padding: 8px; margin-top: 14px; }
body > footer > p {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  main > section { padding-top: 52px; padding-bottom: 52px; }
  main > section:first-child { padding-top: 44px; padding-bottom: 52px; }
  main menu a { display: block; text-align: center; }
  main menu, main menu li { width: 100%; }
}

main section > div + p,
main section > aside + p { margin-top: 28px; }

h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
a[href^="tel:"] { white-space: nowrap; }

@media (max-width: 600px) {
  main table { min-width: 0; font-size: .9rem; }
  main th, main td { padding: 10px 10px; }
  main tbody th { width: auto; }
  main > section:first-child > figure img { max-height: 340px; width: 100%; object-fit: cover; }
}

/* Rechtstexte und lange Fließtexte: article direkt in main */
main > article { padding: 56px var(--rand) 72px; }
main > article > * { max-width: 820px; }
main > article h2 { font-size: 1.35rem; margin-top: 1.8em; }
main > article h3 { font-size: 1.1rem; margin-top: 1.4em; }
main > article ul > li { padding-left: 22px; }
main > article ul > li::before {
  width: 6px; height: 6px; border: 0; transform: none;
  background: var(--blau-hell); border-radius: 50%; top: .65em; left: 4px;
}
main > article ol { display: block; list-style: decimal; padding-left: 26px; margin: 0 0 1em; }
main > article ol > li { background: none; border: 0; padding: 0; margin-bottom: .4em; }
main > article ol > li::before { display: none; }
main > article a { overflow-wrap: anywhere; }
[id] { scroll-margin-top: 120px; }
main > section > h3 { margin-top: 1.6em; }
main nav[aria-label="Brotkrumen"] { font-size: .88rem; color: #9fb0c8; margin-bottom: 18px; }
main nav[aria-label="Brotkrumen"] a { color: #c9d6e8; }
