/* =========================================================
   Farbdefinitionen – Pastell & Anthrazit
   ========================================================= */

:root {
  --bg-page: #eef1f4;
  --bg-surface: #ffffff;
  --bg-frame: #e3e7ec;

  --text-main: #262626;
  --text-muted: #4f5560;
  --text-light: #6f7782;

  --line-main: #bfc6ce;
  --line-soft: #d3d9e0;

  --link-main: #262626;
  --link-hover: #000000;
  --link-accent: #1a4fa3;
}

/* =========================================================
   Grundlayout
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-page);
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   Links
   ========================================================= */

a {
  color: var(--link-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

/* =========================================================
   Textumbruch (gezielt)
   ========================================================= */

p,
li,
td,
th {
  overflow-wrap: break-word;
}

pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* =========================================================
   Container
   ========================================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =========================================================
   Navigation – funktionskritisch
   ========================================================= */

.spacer-nav {
  height: 90px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line-main);
  z-index: 1000;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.navbar a {
  text-decoration: none;
  color: var(--text-main);
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 48px;
}

.brandtext {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* =========================================================
   Navbar – Brand Typografie (reduziert & ruhig)
   ========================================================= */

.brandtext .t1 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.brandtext .t2 {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-main);
}

.brandtext .t3 {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
}

/* Navigation */

.nav {
  display: flex;
  gap: 18px;
}

.nav a.active {
  border-bottom: 2px solid var(--text-main);
}

/* =========================================================
   Kacheln / Leistungen
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.tile {
  font-size: 0.95rem;
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  padding: 16px 18px;
  border-radius: 4px;
  text-decoration: none;
}

.tile:hover {
  border-color: var(--line-main);
}

.tile .thumb img {
  width: 100%;
  height: auto;
  margin: 0 0 10px 0;
}

.grid .tile .body {
  text-align: center;
}

.tile h3,
.tile p {
  text-decoration: none;
}

.tile:hover h3 {
  text-decoration: underline;
}


/* =========================================================
   Startseite – HERO (FINAL)
   ========================================================= */

.home .hero-head {
  text-align: center;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft); /* Trennung zum grauen Bereich */
  margin-bottom: 24px;
}

.home .hero-logo {
  display: block;          /* wichtig bei GIF */
  height: 96px;
  width: auto;
  margin: 0 auto 0 auto;   /* Logo direkt an H1 */
}

/* H1 */
.home .hero-head h1 {
  font-size: 1.6rem;
  line-height: 1.15;
  margin-block-start: 0;
  margin-block-end: 0.28em;
}

/* H2 */
.home .hero-head h2 {
  font-size: 1.05rem;
  line-height: 1.25;
  color: #4f5560;
  margin-block-start: 0;
  margin-block-end: 0;
}

/* Mobile Feinschliff */
@media (max-width: 600px) {
  .home .hero-head h1 {
    font-size: 1.7rem;
    margin-block-end: 0.25em;
  }

  .home .hero-head h2 {
    font-size: 1rem;
    line-height: 1.2;
  }
}

/* =========================================================
   Kontextbild unter Navbar (randlos)
   ========================================================= */

.context-image {
  margin: 24px 0 32px 0;
}

.context-image img {
  width: 100%;
  height: auto;
  display: block;
}



/* =========================================================
   Lokaler Mobile-Fix: Operative Temperatur – Bauteile
   ========================================================= */

@media (max-width: 800px) {

  .page-operative-temperatur table.bauteile,
  .page-operative-temperatur table.bauteile * {
    display: block;
    width: 100%;
  }

  .page-operative-temperatur table.bauteile thead {
    display: none;
  }

  .page-operative-temperatur table.bauteile tr {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--line-soft);
    background: var(--bg-surface);
  }

  .page-operative-temperatur table.bauteile td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.15rem;
  }
}

/* =========================================================
   NAVBAR – REPARATURBLOCK (NICHT ÄNDERN)
   Stellt Originalverhalten wieder her
   ========================================================= */

/* Navbar Links */
.navbar a {
  text-decoration: none;
  color: var(--text-main);
}

.navbar a:hover,
.navbar a:focus {
  color: #000000;
}

/* Navigation Layout */
.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  font-size: 14px;
  white-space: nowrap;
}

/* Active Link */
.nav a.active {
  border-bottom: 2px solid var(--text-main);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* Mobile Menü */
@media (max-width: 1100px) {

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: var(--bg-surface);
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-main);
    z-index: 999;
  }

  .nav.open {
    display: flex;
  }
}

/* =========================================================
   Leistungsbereich mit Bild – responsive
   ========================================================= */

.grid-leistungen {
  margin-top: 1.5rem;
}

.leistungs-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.leistungs-bild {
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  padding: 10px;
}

.leistungs-bild img {
  width: 100%;
  height: auto;
  display: block;
}

/* Ab Tablet / breiter Monitor: Bild links, Text rechts */
@media (min-width: 900px) {
  .leistungs-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

/* Optional: Bild-Frame auf gleiche Höhe wie Kachel strecken */
@media (min-width: 900px) {
  .leistungs-wrap {
    align-items: stretch;
  }

  .leistungs-bild {
    display: flex;
    align-items: center;
  }
}

