/* Modern redesign layer – loaded last, overrides legacy inline styles */
:root {
  --brand: #005596;
  --brand-dark: #003a68;
  --brand-light: #1f6aa3;
  --accent: #ff8a1f;
  --accent-dark: #e6730a;
  --bg-soft: #f3f7fb;
  --text: #25384a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 61, 110, .12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  color: var(--text) !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
body > * { flex-shrink: 0; width: 100%; }
body > script { display: none; }

/* ---------- Header: logo bar on top, sticky menu below ---------- */
#VAILLANT {
  order: -2;
  position: static !important;
  background: #fff !important;
  padding: .6rem 1.5rem !important;
  border-bottom: 1px solid #e6edf4;
}
#VAILLANT .container-fluid { max-width: 1240px; align-items: center; }
#VAILLANT .navbar-collapse { display: flex !important; align-items: center; width: 100%; }
#VAILLANT ul { display: flex !important; align-items: center; }
#VAILLANT img { margin-left: 0 !important; max-height: 56px; width: auto; }
#VAILLANT a[href^="tel:"] {
  margin: 0 0 0 auto !important;
  font-size: 1.05rem !important;
  min-width: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: .6rem 1.4rem;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(255, 138, 31, .35);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
#VAILLANT a[href^="tel:"] span { text-decoration: none !important; }
#VAILLANT a[href^="tel:"]:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 138, 31, .45); }
#VAILLANT a[href^="tel:"]::before { content: "\260E\00a0"; }

#nav {
  order: -1;
  position: sticky !important;
  top: 0;
  z-index: 1030;
  background: var(--brand) !important;
  display: block !important;
  padding: 0 1rem !important;
  box-shadow: 0 4px 18px rgba(0, 40, 80, .2);
}
#nav .container-fluid { max-width: 1240px; justify-content: center; }
#nav .navbar-nav { flex-wrap: wrap; justify-content: center; width: 100%; }
#nav .nav-link {
  color: rgba(255, 255, 255, .88) !important;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
  padding: 1rem 1rem !important;
  position: relative;
  transition: color .2s, background .2s;
}
#nav .nav-link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .55rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
#nav .nav-link:hover, #nav .nav-link.active { color: #fff !important; }
#nav .nav-link:hover::after, #nav .nav-link.active::after { transform: scaleX(1); }
#nav .navbar-toggler { border-color: rgba(255,255,255,.5); margin: .5rem 0; }
#nav .navbar-toggler-icon { filter: invert(1); }
@media (max-width: 767px) {
  #VAILLANT { padding: .5rem 1rem !important; }
  #VAILLANT .navbar-toggler { display: none; }
  #VAILLANT img { max-height: 40px; }
  #VAILLANT a[href^="tel:"] { padding: .45rem .9rem; font-size: .9rem !important; }
  #nav .nav-link { padding: .75rem 1rem !important; }
  #nav .nav-link::after { display: none; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Poppins', sans-serif !important;
  color: var(--brand) !important;
  font-weight: 800 !important;
  letter-spacing: -.01em;
  line-height: 1.2 !important;
  text-transform: none;
}
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem) !important; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2.1rem) !important; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem) !important; }
h1.display-4, h2.display-4, h3.display-4, h6.display-4 { font-weight: 800 !important; }
h6.display-4 { font-size: 1.1rem !important; font-weight: 600 !important; line-height: 1.6 !important; color: var(--brand-light) !important; }
section h1, section h2 { margin-top: 1rem; margin-bottom: 1.2rem; position: relative; padding-bottom: 1rem; }
section h1::after, section h2::after {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark)); margin: 1rem auto 0;
}
p, li { color: var(--text); }
p.lead, .lead {
  color: var(--text) !important;
  font-size: 1.08rem !important;
  font-weight: 400 !important;
  max-width: 920px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 1.25rem !important;
}
p.lead strong, .lead strong, .lead b { font-weight: 600; color: var(--brand-dark); }
ul.lead { list-style: none; padding: 0 !important; display: grid; gap: .6rem; max-width: 720px; }
ul.lead li {
  background: var(--bg-soft); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: .7rem 1.1rem; text-align: left;
}
a { transition: color .2s; }
hr { border-top: 1px solid #dde7f0; width: 80px; margin: 1.2rem auto; }

/* ---------- Hero / intro blocks ---------- */
#willkommen-1 {
  background: linear-gradient(180deg, var(--bg-soft), #fff) !important;
  padding: 1.5rem 1rem 2rem;
}
#willkommen-1 img {
  width: 100% !important; max-width: 1240px; margin: 0 auto !important; padding: 0 !important;
  border-radius: 24px; box-shadow: var(--shadow); object-fit: cover; max-height: 520px;
}
#willkommen-1 h1 { margin: 1.5rem auto 0 !important; padding: 0 !important; width: auto !important; max-width: 1000px; }

.row-image-txt {
  max-width: 1240px; margin: 2.5rem auto !important; background: #fff !important;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); align-items: stretch;
}
.row-image-txt > div { min-height: 320px; }
.row-image-txt > div:first-child { order: 2; }
.row-image-txt > div[style*="padding"] {
  display: flex; flex-direction: column; justify-content: center; padding: 2.5rem !important;
  background: #fff !important;
}
.row-image-txt h1, .row-image-txt h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem) !important; }
.row-image-txt h6, .row-image-txt h2.display-4:nth-of-type(2) { font-size: 1.05rem !important; }
@media (max-width: 767px) {
  .row-image-txt { margin: 1.5rem 1rem !important; }
  .row-image-txt > div:first-child { order: 0; min-height: 220px; height: 220px !important; }
  .row-image-txt > div[style*="padding"] { padding: 1.5rem !important; }
}

section[id] { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1rem !important; }
body > img { width: 100% !important; max-height: 460px; object-fit: cover; margin-top: 2rem; }
body img.img-fluid, body > img { image-rendering: auto; }

/* ---------- Buttons & CTA links ---------- */
.btn, .btn-dark, .btn-lg {
  background: linear-gradient(135deg, var(--brand-light), var(--brand)) !important;
  border: none !important; color: #fff !important; border-radius: 999px !important;
  padding: .85rem 2.2rem !important; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 22px rgba(0, 85, 150, .3);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 85, 150, .4); color: #fff !important; }
a.btn-dark { background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important; box-shadow: 0 8px 22px rgba(255, 138, 31, .4); }
section.text-center > a[href^="tel:"] {
  display: inline-block; font-size: clamp(1.1rem, 2.4vw, 1.6rem) !important; font-weight: 800;
  color: #fff !important; background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 1rem 2.6rem; border-radius: 999px; text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(255, 138, 31, .4); transition: transform .2s;
}
section.text-center > a[href^="tel:"]:hover { transform: translateY(-3px); }

/* ---------- Contact page ---------- */
.map-clean { background: var(--bg-soft) !important; padding-top: 3rem; }
.map-clean .intro p, .map-clean .intro p strong { color: var(--brand) !important; }
.map-clean .lead a { font-size: clamp(1.6rem, 4vw, 2.4rem) !important; font-weight: 800; color: var(--accent-dark) !important; text-decoration: none; }
.map-clean iframe { display: block; margin-top: 2rem; border: 0; filter: saturate(1.05); }
#contact {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)) !important;
  padding: 4rem 1rem !important; max-width: none !important;
}
#contact .container { max-width: 860px; }
#contact h2, #contact p, #contact label { color: #fff !important; }
#contact h2::after { display: none; }
#contact .form-control {
  border: 2px solid transparent; border-radius: 12px; padding: .85rem 1rem; height: auto;
  background: rgba(255, 255, 255, .96); transition: border-color .2s, box-shadow .2s;
}
#contact .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 138, 31, .25); }
#contact .btn-send { background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important; color: #fff !important; margin-top: 1rem; }

/* ---------- Footer ---------- */
.footer-dark { background: #0b2540 !important; margin-top: 3rem; padding: 3.5rem 0 1.5rem !important; }
.footer-dark footer { background: transparent !important; }
.footer-dark h3 { color: #fff !important; font-size: 1rem !important; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-dark ul { list-style: none; padding: 0; }
.footer-dark p, .footer-dark li, .footer-dark strong { color: rgba(255, 255, 255, .78) !important; }
.footer-dark a { color: rgba(255, 255, 255, .85) !important; text-decoration: none !important; }
.footer-dark a:hover { color: var(--accent) !important; }
.footer-dark a span { text-decoration: none !important; }
.footer-dark .item { width: auto !important; flex: 1 1 260px; max-width: none !important; margin-bottom: 1.5rem; }
.footer-dark .item img { background: #fff; padding: .6rem 1rem; border-radius: 12px; }
.footer-dark .social a { font-size: 1.6rem; margin: 0 .6rem; }
.footer-dark .social i { color: rgba(255,255,255,.8) !important; }
.footer-dark .social i:hover { color: var(--accent) !important; }
.footer-dark .row { justify-content: center; }
.footer-dark p.text-center a { font-size: .9rem; }
.footer-dark .copyright { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.2rem; margin-top: 1rem; font-size: .85rem; color: rgba(255,255,255,.6) !important; }
.footer-dark .copyright strong { color: #fff !important; }

/* ---------- Legal pages ---------- */
.container h4 { font-size: 1.15rem !important; margin-top: 2rem; color: var(--brand) !important; }
.container > h1 { margin-bottom: 1.5rem; }
.container > p { font-size: 1rem; }
.container a { color: var(--brand-light); }

/* ---------- Text refinements ---------- */
body { font-size: 1.0625rem; font-feature-settings: "kern", "liga"; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, td { text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
html { -webkit-text-size-adjust: 100%; }
p { line-height: 1.8; }
p.lead, .lead { line-height: 1.85 !important; letter-spacing: .005em; margin-bottom: 1.1rem; }
p.lead em { color: var(--brand); font-style: normal; font-weight: 600; }
p.lead a, .row-image-txt a:not(.btn) { color: var(--brand-light) !important; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,138,31,.7); text-underline-offset: 3px; text-decoration-thickness: 2px; }
p.lead a:hover { color: var(--accent-dark) !important; }
.row-image-txt h1 { line-height: 1.15 !important; }
.row-image-txt hr { margin: 1rem 0; }
.row-image-txt h6 { text-transform: none; }
.container p, .container li { max-width: 72ch; }
.container h4 + p { margin-top: .4rem; }

/* Price on request */
.price-on-request { font-size: 1.2rem !important; }
.price-on-request a {
  display: inline-block; margin-top: .4rem; padding: .6rem 1.8rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff !important;
  text-decoration: none !important; font-size: 1.3rem; box-shadow: 0 8px 20px rgba(255,138,31,.35); transition: transform .2s;
}
.price-on-request a:hover { transform: translateY(-2px); }

/* Tables & product blocks */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
td, th { padding: .7rem 1rem !important; border-bottom: 1px solid #e3ebf3 !important; border-top: 0 !important; }
tr:nth-child(even) td { background: var(--bg-soft); }
.table-responsive { border-radius: 14px; box-shadow: var(--shadow); }
.row > [class*="col-md-4"] p.text-left { line-height: 1.9; background: var(--bg-soft); border-radius: 14px; padding: 1.2rem 1.4rem !important; margin: .5rem 1rem 1.5rem !important; }

/* ---------- Responsiveness ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
img, iframe, video, table { max-width: 100%; }
img { height: auto; }
.row-image-txt > div:first-child { height: auto !important; }
p[style*="width"], div[style*="width: 380"], div[style*="width:380"], .footer-dark .item { width: auto !important; max-width: 100% !important; }
iframe { width: 100% !important; }
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 991px) {
  section[id] { padding: 1.5rem .75rem !important; }
  .row-image-txt > div[style*="padding"] { padding: 2rem !important; }
  #nav .nav-link { padding: .9rem .7rem !important; font-size: .78rem; }
}
@media (max-width: 767px) {
  body { font-size: 1rem; }
  #nav .navbar-nav { align-items: flex-start; padding-bottom: .5rem; }
  #nav .nav-link { width: 100%; border-bottom: 1px solid rgba(255,255,255,.1); }
  p.lead, .lead { font-size: 1rem !important; padding: 0 .75rem !important; }
  h1.display-4, h2.display-4, h3.display-4 { font-size: 1.5rem !important; }
  #willkommen-1 { padding: 1rem .75rem 1.5rem; }
  #willkommen-1 img { border-radius: 16px; max-height: 260px; }
  .row-image-txt { border-radius: 16px; }
  .row-image-txt > div[style*="padding"] { padding: 1.4rem !important; }
  section.text-center > a[href^="tel:"] { padding: .85rem 1.6rem; display: block; margin: 0 1rem; }
  .row > [class*="col-md-4"] p.text-left { margin: .5rem .5rem 1.2rem !important; }
  .footer-dark { padding-top: 2.5rem !important; }
  .footer-dark .item { flex: 1 1 100%; }
  #contact { padding: 2.5rem .75rem !important; }
  .map-clean iframe { height: 320px; }
  body > img { max-height: 240px; }
  .btn, .btn-lg { width: 100%; max-width: 360px; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 480px) {
  #VAILLANT { flex-wrap: wrap; }
  #VAILLANT img { max-height: 34px; }
  #VAILLANT a[href^="tel:"] { font-size: .8rem !important; padding: .4rem .75rem; }
  h1 { font-size: 1.45rem !important; }
  h2 { font-size: 1.25rem !important; }
}

/* ---------- Feature checklists (e.g. Thermenwartung) ---------- */
.features-clean { background: var(--bg-soft) !important; padding: 1rem 0 3rem !important; }
.features-clean .container { max-width: 1140px; }
.features-clean .row.features { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin: 0 !important; }
.features-clean .item {
  width: auto !important; max-width: none !important; flex: none !important; padding: 1.2rem 1.4rem !important; margin: 0 !important;
  display: flex; align-items: center; gap: 1rem; text-align: left !important;
  background: #fff; border-radius: 14px; border-left: 5px solid var(--accent);
  box-shadow: 0 6px 18px rgba(0, 61, 110, .08); transition: transform .2s, box-shadow .2s;
}
.features-clean .item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.features-clean .item .icon {
  flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center;
  margin: 0 !important; font-size: 1.3rem !important; color: #fff !important; background: var(--brand); border-radius: 50%;
}
.features-clean .item .name {
  margin: 0 !important; font-size: 1.02rem !important; font-weight: 600 !important; line-height: 1.4 !important;
  color: var(--text) !important; text-align: left; hyphens: manual;
}
.features-clean .item .name br { content: " "; }
.features-clean .item .name br:last-child { display: none; }

/* white-on-blue banners keep white text */
.text-white, h1.text-white, h2.text-white, h3.text-white, h4.text-white { color: #fff !important; }

/* ---------- Blue call-to-action banners ---------- */
.highlight-blue {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)) !important;
  padding: 3.5rem 1rem !important; margin-top: 2rem; text-align: center;
}
.highlight-blue h1, .highlight-blue h2, .highlight-blue h3 { color: #fff !important; font-size: clamp(1.6rem, 4vw, 2.4rem) !important; }
.highlight-blue h3::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--accent); margin: 1rem auto 0; }
.highlight-blue p, .highlight-blue p strong { color: rgba(255,255,255,.92) !important; font-size: 1.1rem; margin: 1rem auto; }
.highlight-blue .buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.highlight-blue .buttons .btn, .highlight-blue .btn-light {
  margin: 0 !important; background: #fff !important; color: var(--brand) !important; box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.highlight-blue .buttons .btn:first-child { background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important; color: #fff !important; }
.highlight-blue .btn strong, .highlight-blue .btn { color: inherit !important; }
@media (max-width: 767px) { .highlight-blue .buttons .btn { width: 100%; max-width: 360px; } .features-clean .item { padding: 1rem 1.1rem !important; } }

/* Text on blue backgrounds must always be light */
.highlight-blue, .highlight-blue *:not(.btn):not(.btn *),
[style*="background-color: rgb(0,85,150)"] p, [style*="background-color: rgb(0,85,150)"] p *,
[style*="background-color: rgb(0,85,150)"] .lead, [style*="background-color: rgb(0,85,150)"] li,
[style*="background-color: rgb(0,85,150)"] h1, [style*="background-color: rgb(0,85,150)"] h2,
[style*="background-color: rgb(0,85,150)"] h3, [style*="background-color: rgb(0,85,150)"] h4,
[style*="background-color: #005596"] p, [style*="background-color: #005596"] p *,
[style*="background-color: #005596"] h1, [style*="background-color: #005596"] h2, [style*="background-color: #005596"] h3 {
  color: #fff !important;
}
.highlight-blue p.lead, .highlight-blue .lead { color: #fff !important; max-width: 820px; }
.highlight-blue p strong, .highlight-blue p b { color: #fff !important; }
.highlight-blue .btn-light, .highlight-blue .buttons .btn:not(:first-child), .highlight-blue .buttons .btn:not(:first-child) * { color: var(--brand) !important; }
.highlight-blue .buttons .btn:first-child, .highlight-blue .buttons .btn:first-child * { color: #fff !important; }

section[style*="background-color: #005596"], section[style*="background-color: rgb(0,85,150)"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)) !important; padding: 3rem 1rem !important; margin-top: 2rem;
}
div[style*="background-color: #005596"] { background: linear-gradient(135deg, var(--brand), var(--brand-dark)) !important; }

/* Notdienst dark panel (#222c81) and any .text-white paragraph */
[style*="background-color: #222c81"] { background: linear-gradient(135deg, var(--brand-dark), #1b2566) !important; padding: 2.5rem 1rem 3rem; }
[style*="background-color: #222c81"] p, [style*="background-color: #222c81"] p *,
[style*="background-color: #222c81"] h1, [style*="background-color: #222c81"] h2, [style*="background-color: #222c81"] h3,
p.text-white, p.text-white *, .lead.text-white, .lead.text-white strong, .lead.text-white b { color: #fff !important; }
[style*="background-color: #222c81"] img { width: auto !important; max-width: min(100%, 420px); border-radius: 14px; margin: 0 auto 1rem !important; display: block; }

#VAILLANT li > a { display: inline-flex; line-height: 0; }
#VAILLANT li > a img { display: block; }

.h1-note { display: block; margin-top: .9rem; font-size: clamp(.9rem, 1.6vw, 1.05rem); font-weight: 500; color: var(--brand-light); letter-spacing: 0; line-height: 1.5; }
