/* www.hofert.de – Farben und Kopfbild wie bisher (Weinrot, Petrol, Rot, Oliv) */
:root {
  --wein: #4b111f; --wein-dunkel: #230309; --petrol: #089189; --rot: #bf033d; --oliv: #91a103;
  --flaeche: #efe6e3; --text: #141215; --grau: #5d5a5c; --linie: #d9cfcc; --petrol-hell: #d8f1ee;
  --rund: 10px; --rund-klein: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 Tahoma, Verdana, "Segoe UI", Arial, sans-serif; color: var(--text);
  background: var(--wein-dunkel) linear-gradient(#5a1626, var(--wein-dunkel) 900px) no-repeat; }
a { color: var(--wein); }
a:hover { color: var(--rot); }
img { max-width: 100%; height: auto; }
.sprung { position: absolute; left: -999px; top: 0; background: #fff; padding: .5em 1em; z-index: 10; }
.sprung:focus { left: 1em; }
.seite { max-width: 990px; margin: 1.2rem auto; background: var(--flaeche); border-radius: var(--rund); overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.45); }

/* Kopf: Bild mit den drei Kästen */
.kopf { position: relative; color: #fff; background: #2d2627 url(kopf.jpg) center top / cover no-repeat; aspect-ratio: 988 / 390; }
.kopf a { color: #fff; }
.metanav { position: absolute; top: 5px; left: 10px; text-transform: uppercase; font-size: .8rem; }
.metanav a { text-decoration: none; padding: 0 9px; border-right: 1px solid #fff; }
.metanav a:last-child { border-right: 0; }
.metanav a:hover, .kopf-kaesten a:hover { text-decoration: underline; }
.marke { position: absolute; left: 67.8%; top: 8%; width: 30.2%; height: 33.5%; }
.marke span, .menue-knopf { position: absolute; left: -999px; }
.kopf-kontakt { position: absolute; top: 42.5%; right: 18px; margin: 0; text-align: right; font-size: .85rem; line-height: 1.5; text-shadow: 0 1px 2px #000; }
.kk { position: absolute; top: 56.9%; width: 30.2%; height: 38.2%; padding: 0 12px; overflow: hidden; font-size: .8rem; line-height: 1.55; }
.kk-1 { left: 2.03%; } .kk-2 { left: 34.4%; } .kk-3 { left: 67.8%; }
.kk h2 { margin: 0 0 6px; font-size: .82rem; line-height: 26px; text-transform: uppercase; letter-spacing: .02em; }
.kk h2 a { text-decoration: none; }
.kk ul { list-style: none; margin: 0; padding: 0; text-transform: uppercase; font-size: .76rem; line-height: 1.5; }
.kk li a { text-decoration: none; padding-left: 18px; position: relative; }
.kk li a::before { content: "›"; position: absolute; left: 4px; }
.kk p { margin: 0; }
.kk .mehr { position: absolute; right: 12px; bottom: 8px; }
.mehr { display: inline-block; border: 1px solid currentColor; border-radius: var(--rund-klein); padding: 0 10px; text-decoration: none; font-size: .8rem; text-transform: uppercase; }

/* Spalten */
.spalten { display: grid; grid-template-columns: minmax(0, 1fr) 298px; gap: 20px; padding: 20px; align-items: start; }
.inhalt { background: #fff; border-radius: var(--rund); padding: 20px 26px 26px; min-height: 300px; }
.inhalt h1 { font-size: 1.25rem; margin: 0 0 .9em; color: var(--wein); }
.inhalt h2 { font-size: 1.05rem; margin: 1.4em 0 .5em; color: var(--wein); }
.inhalt h3 { font-size: .98rem; margin: 1.2em 0 .4em; }
.inhalt h4 { font-size: .95rem; margin: 1em 0 .3em; }
.inhalt p, .inhalt ul, .inhalt ol { margin: 0 0 .9em; }
.inhalt::after { content: ""; display: block; clear: both; }
.bilder.rechts { float: right; width: 300px; max-width: 45%; margin: 0 0 1em 1.5em; }
.bilder figure { margin: 0 0 1em; }
.bilder img, img.bild { border-radius: var(--rund-klein); display: block; }
.bilder figcaption { font-size: .8rem; color: var(--grau); margin-top: .3em; }
img.bild.rechts { float: right; margin: 0 0 1em 1.5em; max-width: 45%; }
a.pdf::before { content: "PDF "; font-size: .72rem; font-weight: bold; background: var(--rot); color: #fff; border-radius: 4px; padding: 1px 5px; margin-right: 6px; vertical-align: 1px; }
.kontaktdaten { background: var(--flaeche); border-radius: var(--rund-klein); padding: .8em 1em; }

/* rechte Spalte: Navigation in den Farben der alten Site */
.navigation { background: #fff; border-radius: var(--rund); overflow: hidden; margin-bottom: 20px; text-transform: uppercase; }
.navigation ul { list-style: none; margin: 0; padding: 0; }
.navigation > ul > li { border-bottom: 5px solid #fff; }
.navigation > ul > li:last-child { border-bottom: 0; }
.navigation > ul > li > a { display: block; padding: 7px 14px; font-weight: bold; color: #fff; text-decoration: none; background: var(--wein); font-size: .85rem; }
.navigation > ul > li.pos-1 > a { background: var(--petrol); }
.navigation > ul > li.pos-2 > a { background: var(--rot); }
.navigation > ul > li.pos-3 > a { background: var(--oliv); }
.navigation > ul > li > a:hover { filter: brightness(1.12); }
.navigation li ul { margin: 7px 0; }
.navigation li ul a { display: block; padding: 2px 10px 2px 28px; color: var(--text); text-decoration: none; font-size: .8rem; position: relative; }
.navigation li ul a::before { content: "›"; position: absolute; left: 15px; color: var(--wein); }
.navigation li ul a:hover { color: var(--rot); }
.navigation li ul a[aria-current="page"] { font-weight: bold; }
.navigation li ul a[aria-current="page"]::before { content: "»"; left: 12px; }
.pos-1 li a::before { color: var(--petrol); } .pos-2 li a::before { color: var(--rot); } .pos-3 li a::before { color: var(--oliv); }
.kasten { background: #fff; border-radius: var(--rund); padding: 0 14px 6px; margin-bottom: 20px; overflow: hidden; font-size: .9rem; }
.kasten h2 { margin: 0 -14px 10px; padding: 6px 14px; font-size: .85rem; text-transform: uppercase; color: #fff; background: var(--wein); }
.kasten .mehr { color: var(--wein); }

/* Produktkatalog */
.produktgruppe { border: 1px solid var(--linie); border-radius: var(--rund); margin: 0 0 1.4em; overflow: hidden;
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 16px; }
.produktgruppe h2 { grid-column: 1 / -1; margin: 0 0 12px; padding: 6px 12px; font-size: .9rem; background: #099288; color: #fff; }
.pg-bild { padding: 0 0 12px 12px; font-size: .8rem; }
.pg-bild img { border: 1px solid #31383e; border-radius: var(--rund-klein); display: block; }
.pg-bild p { margin: .6em 0 0; }
.ohne-bild { display: block; width: 140px; height: 100px; border-radius: var(--rund-klein); background: var(--flaeche); color: var(--grau); text-align: center; line-height: 100px; }
.pg-text { padding: 0 12px 12px 0; font-size: .9rem; }
.tabelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
table.produkte th { text-align: left; background: var(--petrol-hell); padding: 4px 6px; border-bottom: 1px solid #cacecd; }
table.produkte td { padding: 4px 6px; border-bottom: 1px solid #ece6e4; vertical-align: top; }
table.produkte td:first-child { white-space: nowrap; }
table.produkte td.menge { text-align: right; white-space: nowrap; }
table.produkte tr:nth-child(even) td { background: #faf7f6; }
.alphabet { list-style: none; padding: 0; margin: 0 0 1.2em; display: flex; flex-wrap: wrap; gap: 4px; }
.alphabet a, .alphabet span { display: block; width: 1.9em; text-align: center; border-radius: var(--rund-klein); padding: 2px 0; font-weight: bold; text-decoration: none; }
.alphabet a { background: var(--petrol); color: #fff; }
.alphabet span { background: var(--flaeche); color: #b9adaa; }
.register { columns: 2 220px; column-gap: 24px; }
.register section { break-inside: avoid; margin-bottom: 1em; }
.register h2 { margin: 0 0 .3em; background: var(--petrol-hell); border-radius: var(--rund-klein); padding: 1px 8px; font-size: .95rem; color: var(--text); }
.register ul { list-style: none; padding: 0 0 0 8px; margin: 0; font-size: .88rem; }

/* Schaumstoff-Zuschnitte */
.formen { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.formen a { display: block; text-align: center; text-decoration: none; border: 1px solid var(--linie); border-radius: var(--rund); padding: 8px; height: 100%; font-size: .85rem; }
.formen img { margin: 0 auto 4px; display: block; }
.formen a:hover { border-color: var(--rot); }
table.qualitaeten th, table.qualitaeten td { text-align: left; vertical-align: top; padding: 5px 8px; border-bottom: 1px solid #ece6e4; }
table.qualitaeten th { white-space: nowrap; background: var(--petrol-hell); }

/* Fuß */
.fuss { background: var(--wein); color: #f3e7e4; padding: 18px 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; font-size: .88rem; }
.fuss a { color: #fff; }
.fuss-adresse { display: flex; flex-wrap: wrap; gap: 0 40px; }
.fuss-adresse p { margin: 0 0 .5em; }
.fuss-links { align-self: flex-end; display: flex; flex-wrap: wrap; gap: 4px 0; }
.fuss-links a { margin-left: 14px; text-transform: uppercase; font-size: .8rem; text-decoration: none; }
.fuss-links a:hover { text-decoration: underline; }

/* schmale Bildschirme: Kopf ohne gemalte Kästen, Kästen und Navigation untereinander */
@media (max-width: 940px) {
  .seite { margin: 0; border-radius: 0; }
  .kopf { aspect-ratio: auto; background: #2d2627; padding-bottom: 12px; }
  .kopf::before { content: ""; display: block; height: 0; padding-top: 30%; min-height: 120px; background: url(kopf-schmal.jpg) right top / cover no-repeat; }
  .marke { left: auto; right: 0; top: 0; width: 60%; height: 0; padding-top: 18%; min-height: 80px; }
  .metanav { position: static; display: flex; flex-wrap: wrap; gap: 2px 0; background: var(--wein); padding: 5px 8px; font-size: .72rem; }
  .metanav a { padding: 0 8px; }
  .marke { top: 30px; }
  .kopf-kontakt { position: static; text-align: left; padding: 10px 16px 0; text-shadow: none; }
  .menue-knopf { position: static; display: inline-block; margin: 10px 16px 0; background: var(--rot); padding: 4px 14px; border-radius: var(--rund-klein); text-decoration: none; text-transform: uppercase; font-size: .8rem; }
  .menue-knopf::after { content: " ↓"; }
  body:not(.start) .kopf-kaesten { display: none; }
  .kopf-kaesten { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; padding: 10px 12px 0; }
  .kk { position: relative; top: auto; left: auto !important; width: auto; height: auto; background: #3a3334; border-radius: var(--rund); padding: 0 12px 34px; }
  .kk h2 { margin: 0 -12px 8px; padding: 0 12px; }
  .kk-1 h2 { background: var(--petrol); } .kk-2 h2 { background: var(--rot); } .kk-3 h2 { background: var(--oliv); }
  .kk-3 { padding-bottom: 10px; }
  .spalten { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .inhalt { padding: 16px; }
  .bilder.rechts { float: none; width: auto; max-width: 100%; margin: 0 0 1em; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .produktgruppe { grid-template-columns: 1fr; }
  .pg-bild { padding: 0 12px 10px; }
  .pg-text { padding: 0 12px 12px; }
  .fuss-links a { margin: 0 14px 0 0; }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .kopf-kaesten { grid-template-columns: 1fr; }
  img.bild.rechts { float: none; max-width: 100%; margin: 0 0 1em; }
}
