/* =========================================================
   müller+krahmer GmbH – zentrales Stylesheet (einzige CSS-Datei)
   ========================================================= */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff8000;
  --orange-text: #ff8000;   /* Firmenfarbe RGB(255,128,0) auch für Links */
  --ink: #111111;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --soft: #f8f8f8;
  --white: #ffffff;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --wrap: 1130px;
  --schmal: 720px;
  --gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex; flex-direction: column; min-height: 100vh;
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--white);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-text); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; margin: 1.6em 0 .6em; }
p, ul, ol { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.schmal { max-width: calc(var(--schmal) + 2 * var(--gap)); }
.zentriert { text-align: center; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--white); padding: .6rem 1rem; }
.skip-link:focus { left: 0; }

main { flex: 1 0 auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; }
.logo img { width: 200px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-nav li + li { border-left: 1px solid var(--line); }
.main-nav a {
  display: block; padding: .15rem .85rem; font-size: .8125rem; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; color: var(--ink);
}
.main-nav li:last-child a { padding-right: 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--orange); text-decoration: none; }
.nav-toggle { display: none; }
.suche-icon { display: flex; align-items: center; margin-left: 1.1rem; padding: .3rem; color: var(--ink); }
.suche-icon:hover, .suche-icon[aria-current="page"] { color: var(--orange); }
.suche-icon svg { width: 17px; height: 17px; }

@media (max-width: 760px) {
  .header-inner { min-height: 68px; flex-wrap: wrap; }
  .logo { margin-right: auto; }
  .logo img { width: 160px; }
  .suche-icon { margin: 0 1rem 0 0; }
  .suche-icon svg { width: 20px; height: 20px; }
  .nav-toggle {
    display: flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .5rem 0;
    font: inherit; font-size: .8125rem; font-weight: 600; text-transform: uppercase; color: var(--ink); cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .main-nav { display: none; order: 3; width: 100%; padding-bottom: .75rem; }
  .main-nav.offen { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav li + li { border-left: 0; border-top: 1px solid var(--line); }
  .main-nav a, .main-nav li:last-child a { padding: .8rem 0; }
}

/* ---------- Hero ---------- */
.hero { display: grid; background: #1a1a1a; overflow: hidden; }
.hero > * { grid-area: 1 / 1; }
/* Bild in natürlichem Seitenverhältnis (1920x400) wie bisher; ist der Text höher, wächst der Bereich mit */
.hero-img { width: 100%; height: 100%; align-self: stretch; object-fit: cover; object-position: right center; }
.hero-text { position: relative; display: flex; align-items: center; color: var(--white); padding-block: .75rem; }
.hero-text h1 {
  font-size: min(5.6vw, 3.5rem); font-weight: 400; line-height: 1.15; margin: 0; max-width: 20em;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
@media (max-width: 560px) { .hero-text .wrap { padding-inline: 1.25rem; } }

.seitentitel { color: var(--orange); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.5rem 0 1rem; }

/* ---------- Inhaltsseiten ---------- */
.seite { padding-block: 1rem 3rem; }
.abschnitt { padding-block: 1.5rem; }
.seite h2 {
  color: var(--orange); font-weight: 400; text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}
.seite h3 { font-size: 1.1rem; font-weight: 600; }
.seite > :first-child, .abschnitt > :first-child, .spalte > :first-child { margin-top: 0; }
.seite ul { padding-left: 1.2rem; }
.seite li { margin-bottom: .35rem; }

.raster { display: grid; gap: 1.5rem clamp(1.5rem, 4vw, 3rem); margin-block: 1rem; }
.raster.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spalte > h2:first-child, .spalte > h3:first-child { margin-top: 0; }
@media (max-width: 900px) { .raster.r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .raster.r2, .raster.r3 { grid-template-columns: 1fr; } }

.bild-block { margin: 1.5rem 0; }
.bild-block img { margin-inline: auto; }

/* ---------- Kacheln (Startseite, Referenzen) ---------- */
.kachel {
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  min-height: 330px; padding: 100px 10px 75px;
  border: 5px solid var(--rand, #e2e2e2); border-top-right-radius: 100px;
  color: var(--ink); transition: opacity .2s ease;
}
a.kachel:hover { opacity: .8; color: var(--ink); text-decoration: none; }
.seite .kachel h2 {
  margin: 1rem 0 .8rem; font-weight: 600; letter-spacing: .06em; font-size: clamp(1.3rem, 2vw, 1.6rem);
}
.kachel p { margin: 0; }
.kachel img { margin-inline: auto; }
.raster:has(> .kachel) { gap: clamp(1.5rem, 5.5vw, 4rem); margin-block: 2.5rem; }
@media (prefers-reduced-motion: reduce) { .kachel { transition: none; } }

/* ---------- Beitragsübersicht (Aktuell / News) ---------- */
.beitragsliste { max-width: var(--schmal); margin: 0 auto; }
.beitragsliste article { padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.beitragsliste h2 {
  color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 700;
  font-size: 1.25rem; margin: 0 0 .2rem;
}
.beitragsliste h2 a { color: var(--ink); }
.beitragsliste h2 a:hover { color: var(--orange); text-decoration: none; }
.beitragsliste p { margin: 0; }
.datum { color: var(--muted); font-size: .85rem; margin: 0 0 .5rem; }

/* ---------- Teaser (Startseite) ---------- */
.teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1rem; }
.teaser img { width: 100%; height: auto; aspect-ratio: 260 / 185; object-fit: cover; margin-bottom: .9rem; }
.teaser h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .2rem; line-height: 1.4; }
.teaser h3 a { color: var(--ink); }
.teaser h3 a:hover { color: var(--orange); text-decoration: none; }
.teaser p { font-size: .9375rem; margin: 0; }
.alle-link { text-align: center; margin: 2rem 0 0; font-weight: 600; }
.seite h3.zentriert { color: var(--orange); font-weight: 400; font-size: 1.25rem; }
@media (max-width: 800px) { .teaser { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ---------- Beitrag ---------- */
.beitrag { padding-block: 2rem 3rem; }
.beitrag-bild { width: 100%; max-height: 420px; object-fit: cover; border-radius: 3px; }
.beitrag h1 {
  color: var(--orange); font-weight: 400; text-transform: uppercase; text-align: center;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: .02em; margin: 1.75rem 0 .4rem;
}
.beitrag .datum { text-align: center; margin-bottom: 1.5rem; }
.beitrag .inhalt h2 { color: var(--orange); font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: 1.15rem; }
.button {
  display: inline-block; background: var(--orange); color: var(--white); font-size: .8125rem; font-weight: 600;
  padding: .55rem 1.3rem; border-radius: 3px;
}
.button:hover { background: #e67300; color: var(--white); text-decoration: none; }
.zurueck { margin-top: 2rem; }

/* ---------- Video (erst nach Klick laden – Datenschutz) ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: #1a1a1a; margin: 1.5rem 0; display: grid; place-content: center; text-align: center; padding: 1rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-start { font: inherit; font-weight: 600; background: var(--orange); color: var(--white); border: 0; border-radius: 3px; padding: .7rem 1.4rem; cursor: pointer; justify-self: center; }
.video-hinweis { color: #cfcfcf; font-size: .8125rem; margin: .8rem 0 0; }
.video-hinweis a { color: #fff; text-decoration: underline; }
.video-datei { width: 100%; margin: 1.5rem 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); font-size: .75rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.25rem; }
.footer-inner p { margin: 0; color: var(--orange-text); }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.footer-inner li + li { border-left: 1px solid var(--line); }
.footer-inner a { display: block; padding: 0 .75rem; text-transform: uppercase; color: var(--orange-text); }
.footer-inner li:last-child a { padding-right: 0; }
@media (max-width: 600px) { .footer-inner li:first-child a { padding-left: 0; } }

/* ---------- Suche ---------- */
.suchform { display: flex; gap: .5rem; margin: 0 0 1.5rem; }
.suchform input {
  flex: 1; min-width: 0; font: inherit; padding: .6rem .8rem; border: 1px solid #cfcfcf; border-radius: 3px;
}
.suchform input:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.suchform button { font: inherit; font-weight: 600; background: var(--orange); color: var(--white); border: 0; border-radius: 3px; padding: .6rem 1.2rem; cursor: pointer; }
.suchinfo { color: var(--muted); font-size: .9rem; }
.treffer { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.treffer h2 { color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 1.1rem; margin: 0 0 .2rem; }
.treffer h2 a { color: var(--ink); }
.treffer h2 a:hover { color: var(--orange); text-decoration: none; }
.treffer p { margin: 0; font-size: .9375rem; }
.treffer mark { background: #ffe2c4; color: inherit; padding: 0 .1em; }

/* ---------- Imagemap (z. B. IIoT – virtuelle Fabrik) ----------
   Bild mit darübergelegten Klickflächen; Positionen in % -> skaliert mit dem Bild */
.imagemap { position: relative; max-width: 1400px; margin: 1.5rem auto; }
.imagemap img { width: 100%; height: auto; }
.imagemap-feld { position: absolute; display: block; border-radius: 10px; transition: background-color .15s ease, box-shadow .15s ease; }
.imagemap-feld.oval { border-radius: 50%; }
.imagemap-feld:hover, .imagemap-feld:focus-visible { background: rgba(255, 128, 0, .15); box-shadow: 0 0 0 3px var(--orange); outline: none; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .imagemap-feld { transition: none; } }
