/* =========================================================
   Hermann Medizintechnik GmbH – statisches Provisorium
   Farben/Schriften angelehnt an das Original-Stylesheet
   (Open Sans 300, Text #3d3d3d, Akzent #ed1c24, Flächen #f7f7f7)
   ========================================================= */

:root {
  --text: #3d3d3d;
  --text-muted: #7a7a7a;
  --accent: #ed1c24;
  --accent-dark: #c00d0d;
  --link: #861e3c;
  --surface: #f7f7f7;
  --line: #e0e0e0;
  --white: #ffffff;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  --max: 1024px;
  --font: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
}

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

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--accent); text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 300;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.6em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.7rem; text-transform: uppercase; letter-spacing: 0.02em; }
h3 { font-size: 1.25rem; text-transform: uppercase; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
b, strong { font-weight: 700; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--white); padding: 0.5em 1em; z-index: 1000;
}
.skip-link:focus { left: 0; }

.inner { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand { display: flex; align-items: center; }
.brand img { width: 180px; height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 3px;
  padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer;
  text-transform: uppercase; font-size: 0.9rem;
}
.nav-toggle .bars { display: inline-block; width: 20px; height: 2px; background: var(--text); position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--text);
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0 12px; }
.site-nav li { border-top: 1px solid var(--line); }
.site-nav a {
  display: block; padding: 12px 4px; color: var(--text);
  text-transform: uppercase; font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a:focus { color: var(--accent); text-decoration: none; }
.site-nav .lang a { text-transform: none; font-size: 0.9rem; color: var(--text-muted); }
.site-nav .lang a::before { content: "\1F310\00A0"; }

@media (min-width: 900px) {
  .site-header .inner { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .site-nav li { border: 0; }
  .site-nav a { padding: 10px 10px; font-size: 0.85rem; }
  .site-nav .lang { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
}
@media (max-width: 899px) {
  .site-header .inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: #111; color: var(--white); }
.hero img { width: 100%; max-height: 72vh; object-fit: cover; opacity: 0.92; }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 16px 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
.hero-text .inner { padding: 0 16px; }
.hero h1 { color: var(--white); font-size: 1.5rem; text-transform: uppercase; margin-bottom: 0.3em; }
.hero p { color: var(--white); max-width: 44em; margin-bottom: 0; font-size: 1rem; }
@media (max-width: 699px) {
  /* Auf schmalen Displays: Text unter dem Bild statt als Overlay */
  .hero { background: #262626; }
  .hero img { opacity: 1; }
  .hero-text { position: static; background: none; padding: 20px 0 28px; }
}
@media (min-width: 700px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.15rem; }
  .hero-text { padding: 48px 16px 40px; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; scroll-margin-top: 72px; }
.section h2[id] { scroll-margin-top: 90px; }
.section.alt { background: var(--surface); }
.section h2 { text-align: center; margin-bottom: 1.2em; }
.section .lead { font-size: 1.15rem; text-align: center; max-width: 44em; margin: 0 auto 2em; }
@media (min-width: 700px) { .section { padding: 64px 0; } }

.cols { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) {
  .cols { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cols.reverse > :first-child { order: 2; }
}
.cols img { width: 100%; box-shadow: var(--shadow); }
.cols.top { align-items: start; }
.text-block { max-width: 60em; }
.text-block p:last-child { margin-bottom: 0; }

/* Produktbilder-Reihe im Unternehmensbereich */
.image-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 8px 0 28px; }
.image-row figure { margin: 0; }
.image-row img { width: 100%; aspect-ratio: 540 / 298; object-fit: cover; box-shadow: var(--shadow); }
.image-row figcaption { font-size: 0.9rem; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.02em; }

/* Standort-Panorama: volle Breite unter dem Text */
.standort { margin: 40px 0 0; }
.standort img { width: 100%; max-height: 560px; object-fit: cover; box-shadow: var(--shadow); }
.standort figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
/* Hochformat-Foto der Geschäftsführung: Höhe begrenzen, zentriert */
#geschaeftsfuehrung figure img, #management figure img { width: auto; max-width: 100%; max-height: 560px; margin: 0 auto; }

.banner img { width: 100%; max-height: 420px; object-fit: cover; }

.list-check { list-style: none; padding-left: 0; }
.list-check li { position: relative; padding-left: 1.3em; margin-bottom: 0.35em; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px; background: var(--accent);
}

/* ---------- Product grid ---------- */
.products { display: grid; gap: 24px; }
@media (min-width: 600px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .products { grid-template-columns: repeat(3, 1fr); } }

.product {
  background: var(--white); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.product img { width: 100%; aspect-ratio: 540 / 298; object-fit: cover; }
.product .body { padding: 20px 20px 24px; }
.product h3 { margin-bottom: 0.5em; }
.product p { font-size: 0.95rem; margin-bottom: 0.7em; }
.product p:last-child { margin-bottom: 0; }

/* ---------- Qualität / Zertifizierung (Aufbau nach Vorbild der Gruppe) ---------- */
.quality h2 { text-align: left; color: var(--accent-dark); }
.quality h3 { text-transform: none; font-weight: 700; font-size: 1.15rem; margin-bottom: 1em; }
.quality .text { max-width: 60em; }
.certs { display: grid; gap: 32px; justify-items: center; margin-top: 40px; }
@media (min-width: 640px) { .certs { grid-template-columns: repeat(3, 1fr); } }
.cert { text-align: center; max-width: 280px; display: flex; flex-direction: column; align-items: center; }
.cert img { margin: 0 auto 16px; box-shadow: var(--shadow); width: 170px; }
.cert h4 { margin: 0 0 0.5em; font-size: 1rem; line-height: 1.35; }
.cert p { font-size: 0.95rem; margin-bottom: 1em; }
.cert .btn { margin-top: auto; font-size: 0.9rem; padding: 8px 18px; }
.cert .btn::before { content: "\2B73\00A0"; }

/* ---------- Slider (Geschichte) ---------- */
.slider { position: relative; background: var(--accent-dark); color: var(--white); box-shadow: var(--shadow); }
.slider-track { position: relative; min-height: 300px; padding: 44px 64px 56px; }
.slide { display: none; }
.slide.is-active { display: block; animation: slide-in 0.5s ease; }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.slide h3 { color: var(--white); text-transform: none; font-weight: 700; font-size: 1.7rem; margin-bottom: 0.5em; }
.slide p { color: var(--white); font-size: 1.05rem; max-width: 52em; margin-bottom: 0.8em; }
.slide p:last-child { margin-bottom: 0; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15); color: var(--white);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.slider-btn:hover, .slider-btn:focus { background: rgba(255, 255, 255, 0.3); outline: none; }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, 0.4); cursor: pointer; }
.slider-dot.is-active { background: var(--white); }
@media (max-width: 599px) {
  .slider-track { padding: 32px 20px 56px; }
  .slider-btn { top: auto; bottom: 8px; transform: none; width: 36px; height: 36px; font-size: 1.4rem; }
  .slide h3 { font-size: 1.35rem; }
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--accent); }
.timeline li { position: relative; padding: 0 0 20px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 0.45em;
  width: 12px; height: 12px; background: var(--accent); border-radius: 50%;
}
.timeline h3 { text-transform: none; font-size: 1.1rem; margin-bottom: 0.2em; }
.timeline p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--white); box-shadow: var(--shadow); padding: 24px;
}
.section.alt .card { background: var(--white); }
.card h3 { margin-bottom: 0.8em; }
address { font-style: normal; }
.contact-lines { list-style: none; padding: 0; margin: 0 0 1em; }
.contact-lines li { display: flex; gap: 12px; margin-bottom: 2px; line-height: 1.45; }
.card h3 { margin-bottom: 1.4em; }
.card h4 { margin: 1.4em 0 1.2em; }
.contact-lines .label { flex: 0 0 5.2em; color: var(--text-muted); }

.btn {
  display: inline-block; background: var(--accent); color: var(--white);
  padding: 10px 20px; border-radius: 2px; font-weight: 400;
}
.btn:hover, .btn:focus { background: var(--accent-dark); color: var(--white); text-decoration: none; }

/* ---------- Text pages (Impressum/Datenschutz/Kontakt) ---------- */
.page { padding: 40px 0 64px; }
.page h1 { text-transform: uppercase; margin-bottom: 1em; }
.page h2 { text-align: left; font-size: 1.3rem; margin-top: 1.5em; }
.page h4 { margin-top: 1.6em; }
.page p { max-width: 48em; }
.page .legal p { max-width: none; }
.page a { word-break: break-word; }

/* ---------- Jobs ---------- */
.jobs { list-style: none; padding: 0; }
.jobs li { padding: 12px 0; border-top: 1px solid var(--line); }
.jobs li:last-child { border-bottom: 1px solid var(--line); }
.jobs a::before { content: "\2193\00A0"; color: var(--accent); }

/* ---------- Footer (Aufbau nach Vorbild der SPI-Gruppe: dunkler Footer, Kontakt, Links, Gruppen-Logos) ---------- */
/* Der Fußbereich füllt mindestens die Fensterhöhe (abzüglich Header), damit „Kontakt" exakt am Beginn des roten Bereichs landet */
.site-footer { background: var(--accent-dark); color: var(--white); font-size: 0.95rem; scroll-margin-top: 64px; display: flex; flex-direction: column; min-height: calc(100vh - 64px); }
.footer-bottom { margin-top: auto; }
.site-footer a { color: var(--white); }
.site-footer a:hover, .site-footer a:focus { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer p { margin: 0; }
.site-footer .inner { max-width: 1280px; padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); }

.footer-top { display: grid; gap: 32px; padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(24px, 4vw, 40px); }
@media (min-width: 700px) and (max-width: 999px) {
  /* mittlere Breiten: zwei Kontaktspalten, Navigation als umbrechende Zeile darunter */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px clamp(32px, 5vw, 72px); }
  .footer-nav { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 20px; }
  .footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; }
  .footer-nav li { margin-bottom: 0; }
}
@media (min-width: 1000px) { .footer-top { grid-template-columns: 1.2fr 1.2fr 0.8fr; gap: clamp(32px, 5vw, 72px); } }
/* Leerzeile nach den fetten Überschriften, Kontaktzeilen (Telefon/Fax/E-Mail) ohne Abstand */
.site-footer .footer-brand { font-weight: 700; margin: 0 0 1.4em; }
.site-footer .footer-sub { font-weight: 700; margin: 1.4em 0 1.2em; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.site-footer .footer-note { margin: 16px 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); line-height: 1.5; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 0; line-height: 1.45; }
.footer-contact li + li { margin-top: 2px; }
.footer-contact address + * { margin-top: 0; }
.footer-contact .label { flex: 0 0 5.2em; color: rgba(255, 255, 255, 0.75); }
.footer-contact address { font-style: normal; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { text-transform: uppercase; font-size: 0.85rem; font-weight: 400; letter-spacing: 0.02em; }
.footer-nav a::before { content: "\203A\00A0"; color: rgba(255, 255, 255, 0.75); font-weight: 700; }

.footer-group { border-top: 1px solid rgba(255, 255, 255, 0.25); padding: clamp(24px, 4vw, 40px) 0; }
.footer-group p { margin-bottom: 24px; }
/* Logozeile skaliert mit der Fensterbreite: ab 900 px einzeilig, darunter umbrechend */
.group-logos { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(16px, 3vw, 36px) clamp(20px, 4vw, 56px); }
.group-logos li { flex: 0 0 auto; }
/* Originalproportionen: nur die Höhe wird vorgegeben, die Breite ergibt sich aus dem Seitenverhältnis */
.group-logos img { display: block; height: clamp(18px, 2.3vw, 30px); width: auto; max-width: none; }
.group-logos li:first-child img { height: clamp(36px, 4.4vw, 56px); }
.group-logos a { display: block; opacity: 0.9; }
.group-logos a:hover { opacity: 1; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.25); padding: 18px 0; font-size: 0.85rem; }
.footer-bottom .inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom nav a { text-transform: uppercase; }

/* ---------- TODO markers (vor dem Upload ersetzen) ---------- */
.todo {
  display: inline-block; background: #fff3b0; color: #6b4e00;
  border: 1px dashed #d1a800; padding: 2px 8px; font-size: 0.9rem;
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 80px 16px; }
.error-page h1 { font-size: 3rem; color: var(--accent); margin-bottom: 0.2em; }
