/* ksb-ersatzteile.de – gemeinsames Layout. Keine externen Schriften oder Abhängigkeiten. */

:root {
  --brand: #005da4;   /* Blau aus dem Woltz-Logo */
  --brand-dark: #00447a;
  --brand-light: #e6f0f8;
  --accent: #f2a900;
  --text: #1d2430;
  --muted: #5b6575;
  --line: #d9dfe8;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --radius: 8px;
  --wrap: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 { line-height: 1.25; color: var(--brand-dark); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 0.4em 0 0.5em; }
h2 { font-size: 1.4rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; }

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

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Kopf */
.site-header { background: var(--brand); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 16px; }
.brand:hover { color: #fff; }
.brand-logo { display: block; width: 195px; height: 40px; }
.brand-sub { font-size: 0.9rem; opacity: 0.9; border-left: 1px solid rgba(255,255,255,0.4); padding-left: 16px; }
.header-phone { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; padding: 6px 14px; }
.header-phone:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* Menüzeile: immer sichtbar (klebt beim Scrollen oben), auf dem Handy umbrechend statt abgeschnitten */
.site-nav { background: var(--brand-dark); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; padding-top: 0; padding-bottom: 0; margin: 0 auto; }
.site-nav a { display: block; color: #fff; text-decoration: none; padding: 10px 12px; font-size: 0.95rem; }
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  .brand-logo { width: 156px; height: 32px; }
  .site-nav ul { gap: 0; padding-left: 8px; padding-right: 8px; }
  .site-nav a { white-space: nowrap; padding: 7px 8px; font-size: 0.88rem; }
}

main { padding-top: 8px; padding-bottom: 48px; }

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-top: 16px; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 52em; }

/* Startseite */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 32px 0 8px; }
.hero h1 { margin-top: 0; }
.hero-img { border-radius: var(--radius); }
.partner { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.partner img { display: block; width: 100%; max-width: 420px; height: auto; }
.partner p { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 480px) { .partner img { max-width: 260px; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 999px; font-weight: 600; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); padding: 8px 16px; }
.btn-ghost:hover { background: var(--brand-light); color: var(--brand-dark); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--brand); background: var(--brand-light); }
a.card h3 { color: var(--brand); }

/* Produktliste */
.note { background: var(--brand-light); border-left: 4px solid var(--brand); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.note p { margin: 0.3em 0; }

.downloads { list-style: none; padding: 0; margin: 0.4em 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 0.95rem; }
.downloads li { margin: 0.2em 0; }
.downloads a.pdf::before { content: "PDF"; font-size: 0.7rem; font-weight: 700; color: #fff; background: #b3261e; border-radius: 3px; padding: 1px 4px; margin-right: 6px; vertical-align: 1px; }
.specs-list { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; color: var(--muted); }

.legend { font-size: 0.9rem; color: var(--muted); }

/* Anfahrt */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
figure { margin: 0; }
figure img { border: 1px solid var(--line); border-radius: 4px; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

.contact-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.contact-box p { margin: 0.3em 0; }

/* Rechtstexte */
.legal { max-width: 46em; }
.legal h2 { font-size: 1.2rem; }

/* Fuß */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 12px; }
.site-footer h2 { font-size: 1rem; margin: 0 0 0.4em; color: var(--text); }
.site-footer p { margin: 0; }
.footer-partner img { display: block; width: 240px; height: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 24px; color: var(--muted); }

.footer-note { margin-top: 8px !important; font-size: 0.88rem; color: var(--muted); }

/* Abschnitte und Bild-Text-Blöcke */
.section-intro { color: var(--muted); max-width: 52em; }
.media { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; margin: 20px 0; }
.media img { border-radius: var(--radius); }
@media (max-width: 760px) { .media { grid-template-columns: 1fr; } }
.checklist { padding-left: 1.2em; }
.checklist li { margin: 0.25em 0; }

/* Zeitleiste Firmengeschichte */
.timeline { list-style: none; padding: 0; margin: 24px 0; border-left: 3px solid var(--brand-light); }
.timeline li { display: grid; grid-template-columns: 90px 1fr 220px; gap: 16px; align-items: start; padding: 16px 0 16px 20px; position: relative; border-bottom: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 22px; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); }
.timeline .year { font-size: 1.3rem; font-weight: 700; color: var(--brand-dark); }
.timeline p { margin: 0; }
.timeline img { max-height: 140px; width: auto; border-radius: 4px; }
@media (max-width: 760px) { .timeline li { grid-template-columns: 70px 1fr; } .timeline li img { grid-column: 2; } }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 12px 0 24px; }
table.data th, table.data td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-soft); color: var(--brand-dark); }

/* Galerie */
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.gallery-nav { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; }
.gallery-big img { border: 1px solid var(--line); border-radius: 4px; }

/* Sprungmarken unter der klebenden Menüzeile nicht verdecken */
:target { scroll-margin-top: 80px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0; }
.toc a { display: inline-block; padding: 4px 12px; border: 1px solid var(--brand); border-radius: 999px; text-decoration: none; font-size: 0.92rem; }
.toc a:hover { background: var(--brand-light); }
.bauformen { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.bauformen li { text-align: center; font-size: 0.85rem; color: var(--muted); }
.bauformen img { height: 70px; object-fit: contain; border: none; }
.bauformen span { display: block; margin-top: 4px; }
.card-img { display: block; width: 100%; height: 150px; object-fit: contain; background: #fff; border-radius: 4px; margin-bottom: 10px; }
details.archive { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
details.archive summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.archive-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 12px; }

/* ---------- Katalog-Unterseiten ---------- */

/* Kopfbereich mit Bild */
.page-hero { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  margin: 16px -16px 8px; padding: 28px 32px; border-radius: 0 0 16px 16px;
  background: linear-gradient(135deg, var(--brand-light) 0%, #f7fafd 60%, #fff 100%); overflow: hidden; }
.page-hero h1 { margin: 0 0 0.4em; }
.page-hero .lead { margin: 0; color: var(--text); }
.page-hero .hero-visual { display: flex; justify-content: center; align-items: center; height: 220px; }
.page-hero .hero-visual img { max-height: 220px; width: auto; mix-blend-mode: multiply; }
.page-hero .cta { margin-top: 18px; }
@media (min-width: 1152px) { .page-hero { margin-left: 0; margin-right: 0; border-radius: 16px; } }
@media (max-width: 760px) {
  .page-hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .page-hero .hero-visual { height: 150px; order: -1; }
  .page-hero .hero-visual img { max-height: 150px; }
}

/* Sprungmarken als Reiter */
.toc { gap: 8px; }
.toc a { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* Abschnittsüberschriften im Katalog */
.catalog h2 { display: flex; align-items: baseline; gap: 12px; margin-top: 2.2em; padding-bottom: 8px; border-bottom: 2px solid var(--brand-light); }
.catalog h2 .count { font-size: 0.8rem; font-weight: 600; color: var(--brand); background: var(--brand-light); border-radius: 999px; padding: 2px 10px; }

/* Produktkacheln */
.products { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.product { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(16,40,80,0.06); transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s; }
.product:hover { box-shadow: 0 10px 28px rgba(16,40,80,0.14); transform: translateY(-2px); border-color: #c5d6ea; }
.product-img { display: flex; align-items: center; justify-content: center; height: 200px; padding: 16px;
  background: radial-gradient(circle at 50% 60%, #ffffff 0%, #f1f5fa 75%); border-bottom: 1px solid var(--line); }
.product-img img { max-height: 168px; max-width: 100%; width: auto; mix-blend-mode: multiply; }
.product-body { padding: 16px 18px 4px; flex: 1; }
.product h3 { margin: 0 0 0.35em; font-size: 1.15rem; color: var(--brand-dark); }
.product-kurz { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }
.parts-label { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); }
.chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 0.82rem; line-height: 1.3; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); }
.product .specs-list { margin: 0 0 12px; font-size: 0.85rem; }
.product .specs-list li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: #fbfcfe; font-size: 0.9rem; }
.product-actions .btn { padding: 7px 14px; font-size: 0.88rem; }
.product-actions a:not(.btn) { text-decoration: none; font-weight: 600; }
.product-actions a:not(.btn):hover { text-decoration: underline; }
.product-actions a.pdf::before { content: "PDF"; font-size: 0.68rem; font-weight: 700; color: #fff; background: #b3261e; border-radius: 3px; padding: 1px 4px; margin-right: 5px; vertical-align: 1px; }

/* Anfrage-Block am Seitenende */
.cta-band { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin: 48px 0 8px; padding: 26px 28px;
  border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.35rem; border: 0; padding: 0; display: block; }
.cta-band p { margin: 0; opacity: 0.92; }
.cta-band .cta { margin: 0; }
.cta-band .btn { background: #fff; color: var(--brand-dark); }
.cta-band .btn:hover { background: var(--brand-light); color: var(--brand-dark); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 22px 18px; } }
