
:root{--blue:#087af2;--ink:#17212d;--muted:#607082;--line:#e5eaf0;--light:#f3f6f9;--max:1160px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);line-height:1.55}a{color:inherit;text-decoration:none}img{display:block;max-width:100%}.container{width:min(var(--max),calc(100% - 48px));margin:auto}.top{background:white;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}.nav{min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:20px}.logo{width:230px;max-width:47vw}.links{display:flex;gap:29px;align-items:center}.links a{font-size:14px;font-weight:700}.links a:hover,.links a.active{color:var(--blue)}.btn{display:inline-block;background:var(--blue);color:#fff!important;padding:13px 22px;font-weight:700;border:0;border-radius:3px;cursor:pointer;font-size:15px}.btn:hover{background:#0065cb}.btn.outline{background:transparent;border:1px solid white}.menu-toggle{display:none;border:0;background:none;font-size:29px;cursor:pointer}.hero{min-height:580px;display:flex;align-items:center;background:linear-gradient(90deg,rgba(8,18,29,.90) 0%,rgba(8,18,29,.66) 45%,rgba(8,18,29,.12) 100%),url('assets/hero.webp') center/cover}.hero-content{color:white;padding:85px 0;max-width:700px}.eyebrow{font-size:12px;letter-spacing:3px;font-weight:800;text-transform:uppercase;color:var(--blue)}.hero .eyebrow{color:#a9d3ff}h1{font-size:clamp(42px,5.8vw,76px);line-height:1.08;letter-spacing:-2px;margin:15px 0 23px}h1 span{color:#1689ff}.hero p{font-size:21px;max-width:530px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.section{padding:82px 0}.section.soft{background:var(--light)}.section h2,.pagehead h1{font-size:clamp(32px,4vw,48px);line-height:1.14;letter-spacing:-1.2px;margin:8px 0 17px}.lead{color:var(--muted);max-width:700px;font-size:17px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:30px}.textlink{color:var(--blue);font-weight:800}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.card{background:white;border:1px solid var(--line);transition:transform .2s,box-shadow .2s}.card:hover{transform:translateY(-3px);box-shadow:0 12px 35px #13283d16}.card img{width:100%;height:190px;object-fit:cover}.card-body{padding:22px}.card h3{font-size:20px;margin:0 0 8px}.card p{color:var(--muted);margin:0 0 17px}.arrow{color:var(--blue);font-weight:800}.split{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}.split img{width:100%;height:400px;object-fit:cover}.feature{background:#172738;color:white;padding:75px 0}.feature h2{font-size:clamp(32px,4vw,50px);line-height:1.13;margin:12px 0 22px}.feature p{color:#d5e0e8}.pagehead{background:#f0f5fa;padding:72px 0 62px}.pagehead h1{margin:0 0 12px}.service{display:grid;grid-template-columns:360px 1fr;gap:55px;align-items:center;padding:40px 0;border-bottom:1px solid var(--line)}.service img{width:100%;height:245px;object-fit:cover}.service h2{font-size:30px;margin:0 0 10px}.service p{color:var(--muted)}.projects{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.project img{height:230px;width:100%;object-fit:cover}.project{border:1px solid var(--line);background:white}.project .card-body{padding:19px}.note{font-size:13px;color:var(--muted)}.contact-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:65px}.field{display:block;font-weight:700;font-size:14px;margin-bottom:15px}.field input,.field textarea{display:block;width:100%;margin-top:7px;border:1px solid #cbd5e0;padding:14px;font:inherit;border-radius:3px}.field textarea{min-height:155px;resize:vertical}.footer{background:#142331;color:#dce5ee;padding:48px 0 22px}.footer a:hover{color:white}.footer-grid{display:flex;justify-content:space-between;gap:35px;flex-wrap:wrap}.footer-logo{background:white;padding:8px;width:210px}.footer small{display:block;margin-top:32px;border-top:1px solid #3b4c5c;padding-top:20px;color:#b5c0cb}.footer-links{display:flex;gap:20px;flex-wrap:wrap}.highlight{color:var(--blue)}@media(max-width:900px){.cards{grid-template-columns:repeat(2,1fr)}.projects{grid-template-columns:repeat(2,1fr)}.service{grid-template-columns:290px 1fr;gap:28px}.nav{min-height:75px}.links{gap:15px}}@media(max-width:700px){.container{width:min(100% - 34px,var(--max))}.nav{min-height:68px}.logo{width:172px}.menu-toggle{display:block}.links{display:none;position:absolute;top:68px;left:0;right:0;background:white;padding:22px 18px 30px;flex-direction:column;align-items:stretch;gap:17px;border-bottom:1px solid var(--line);box-shadow:0 20px 25px #1112}.links.open{display:flex}.links a{font-size:17px}.links .btn{text-align:center}.hero{min-height:540px;background-position:60% center}.hero-content{padding:75px 0}.hero p{font-size:17px}h1{letter-spacing:-1.3px}.section{padding:56px 0}.section-heading{display:block}.cards,.projects{grid-template-columns:1fr 1fr;gap:12px}.card img{height:145px}.card-body{padding:14px}.card h3{font-size:17px}.card p{font-size:13px}.split,.service,.contact-grid{grid-template-columns:1fr;gap:23px}.split img{height:250px}.service{padding:27px 0}.service img{height:220px}.service h2{font-size:26px}.project img{height:140px}.pagehead{padding:54px 0}.feature{padding:56px 0}.footer-grid{display:block}.footer-links{margin-top:25px}.actions .btn{width:100%;text-align:center}}@media(max-width:380px){.cards,.projects{grid-template-columns:1fr}.card img,.project img{height:200px}}

.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.gallery figure{margin:0;background:#f2f5f8}.gallery img{width:100%;height:245px;object-fit:cover;cursor:zoom-in}.gallery figcaption{font-size:12px;color:#627181;padding:9px 12px}.filters{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:28px}.filter{border:1px solid #cad6e2;background:white;padding:11px 16px;font-weight:bold;cursor:pointer;border-radius:2px}.filter.active{background:#087af2;color:white;border-color:#087af2}.lightbox{position:fixed;inset:0;background:#07111cef;z-index:99;display:none;align-items:center;justify-content:center;padding:65px 18px 25px}.lightbox.open{display:flex}.lightbox img{max-width:95vw;max-height:85vh;object-fit:contain}.lightbox button{position:absolute;right:24px;top:18px;background:white;border:0;padding:8px 15px;font-size:23px;cursor:pointer}.contact-details a{color:#087af2}.site-notice{font-size:13px;color:#607082}@media(max-width:700px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gallery img{height:165px}.gallery figcaption{padding:7px;font-size:11px}.filter{padding:10px 12px}}@media(max-width:370px){.gallery{grid-template-columns:1fr}.gallery img{height:220px}}


/* KMG slider: real project photos, no upscaling, mobile optimized */
.hero{position:relative;isolation:isolate;background:#142331;min-height:590px;overflow:hidden}
.hero-slides{position:absolute;inset:0;z-index:-2}
.hero-slide{position:absolute;inset:0;background-position:center 48%;background-size:cover;opacity:0;transition:opacity 900ms ease}
.hero-slide.is-active{opacity:1}
.hero:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(10,21,34,.83),rgba(10,21,34,.53) 54%,rgba(10,21,34,.16));pointer-events:none}
.hero-content{position:relative;z-index:1}
.slider-controls{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:12px;z-index:2}
.slider-dot{width:36px;height:5px;background:#fff9;border:0;border-radius:5px;cursor:pointer;padding:0}
.slider-dot.is-active{background:#087af2}
.logo{height:auto;object-fit:contain}
@media(max-width:700px){.hero{min-height:560px}.hero-slide{background-position:center center}.hero:before{background:linear-gradient(90deg,rgba(10,21,34,.78),rgba(10,21,34,.35))}.slider-controls{bottom:16px}.hero-content{padding:70px 0 95px}}
@media(prefers-reduced-motion:reduce){.hero-slide{transition:none}}

/* Align all four service-card links */
.cards .card{display:flex;flex-direction:column}
.cards .card-body{display:flex;flex-direction:column;flex:1}
.cards .card-body .arrow{margin-top:auto;padding-top:20px}

/* KMG Bau Unternehmensbereich */
.feature-modern {
  padding: 64px 0;
  background: #182a3c;
}

.feature-modern h2 {
  max-width: 850px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  margin: 16px 0 22px;
}

.feature-modern p {
  max-width: 760px;
  color: #d5e0eb;
  line-height: 1.7;
}

.feature-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.feature-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-note strong {
  color: #fff;
  font-size: 17px;
}

.feature-note span {
  color: #b9c9d9;
  font-size: 14px;
}

@media (max-width: 700px) {
  .feature-modern {
    padding: 48px 0;
  }

  .feature-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* KMG FOOTER START */
.footer-new {
  background: #142638;
  color: #d5e0eb;
  padding: 40px 0 0;
}

.footer-new .footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 30px;
}

.footer-new .footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-new .footer-brand-logo {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  margin: 0 0 8px;
}

.footer-new .footer-slogan {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.footer-new .footer-brand span {
  color: #b9c9d9;
  font-size: 14px;
}

.footer-new .footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 210px;
}

.footer-new .footer-contact h3 {
  color: #fff;
  font-size: 17px;
  margin: 0 0 6px;
}

.footer-new .footer-contact address {
  font-style: normal;
  line-height: 1.6;
  margin: 0;
}

.footer-new .footer-contact a {
  color: #d5e0eb;
  text-decoration: none;
}

.footer-new .footer-contact a:hover {
  color: #3996ff;
}

.footer-new .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid #34485a;
  color: #aebdcc;
  font-size: 12px;
}

@media (max-width: 700px) {
  .footer-new {
    padding-top: 22px;
  }

  .footer-new .footer-main {
    flex-direction: column;
    gap: 16px;
    padding-bottom: 18px;
  }

  .footer-new .footer-brand {
    gap: 4px;
  }

  .footer-new .footer-brand-logo {
    width: 130px;
    margin-bottom: 4px;
  }

  .footer-new .footer-slogan {
    font-size: 15px;
  }

  .footer-new .footer-brand span {
    font-size: 12px;
  }

  .footer-new .footer-contact {
    gap: 5px;
    min-width: 0;
    font-size: 13px;
  }

  .footer-new .footer-contact h3 {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .footer-new .footer-contact address {
    line-height: 1.4;
  }

  .footer-new .footer-bottom {
    padding: 11px 0;
    font-size: 11px;
  }
}
/* KMG FOOTER END */
/* Back to Top */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 6px;
  background: #087af2;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #0564c8;
}

@media (max-width: 700px) {
  #back-to-top {
    width: 40px;
    height: 40px;
    right: 14px;
    bottom: 18px;
    font-size: 21px;
  }
}

/* KMG Über uns – Bildoptimierung */
body:has(.about-image) .about-image img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.06) saturate(1.06);
}

@media (max-width: 700px) {
  body:has(.about-image) .about-image img {
    height: 260px;
  }
}


/* KMG MOBILE LOGO OPTIMIERUNG */
@media (max-width: 700px) {
  .nav {
    min-height: 82px;
    gap: 10px;
  }

  .nav > a {
    flex: 0 1 auto;
    min-width: 0;
  }

  .nav .logo {
    width: 215px;
    max-width: min(215px, 65vw);
    height: auto;
  }

  .menu-toggle {
    flex-shrink: 0;
  }

  .links {
    top: 82px;
  }

  .footer-new .footer-brand-logo {
    width: 180px;
    max-width: 100%;
    height: auto;
  }
}
/* KMG MOBILE V2 START */
@media (max-width: 700px) {

  /* Grundlayout */
  body {
    overflow-x: clip;
  }

  .container {
    width: calc(100% - 36px);
  }

  .section {
    padding: 48px 0;
  }

  .pagehead {
    padding: 44px 0 38px;
  }

  .pagehead h1 {
    font-size: clamp(30px, 8vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.8px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.65;
  }

  /* Startseite: Slider */
  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 62px 0 95px;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 52px);
    line-height: 1.08;
    letter-spacing: -1.2px;
    overflow-wrap: normal;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 360px;
  }

  .hero .eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero .actions {
    gap: 10px;
    margin-top: 24px;
  }

  .hero .actions .btn {
    padding: 13px 16px;
    font-size: 14px;
  }

  .slider-controls {
    bottom: 20px;
  }

  .slider-dot {
    width: 32px;
    height: 5px;
  }

  /* Überschriften */
  .section h2,
  .feature h2 {
    font-size: clamp(28px, 7.5vw, 36px);
    line-height: 1.18;
    letter-spacing: -0.7px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading .textlink {
    display: inline-block;
    margin-top: 6px;
  }

  /* Leistungskarten */
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cards .card {
    min-width: 0;
  }

  .cards .card img {
    height: 145px;
    object-fit: cover;
  }

  .cards .card-body {
    padding: 14px;
  }

  .cards .card h3 {
    font-size: 17px;
    line-height: 1.25;
  }

  .cards .card p {
    font-size: 13px;
    line-height: 1.5;
  }

  .cards .card-body .arrow {
    padding-top: 14px;
    font-size: 13px;
  }

  /* Unternehmensbereich */
  .feature-modern {
    padding: 46px 0;
  }

  .feature-modern h2 {
    margin: 12px 0 18px;
  }

  .feature-modern p {
    font-size: 15px;
    line-height: 1.7;
  }

  .feature-bottom {
    gap: 20px;
    margin-top: 25px;
  }

  .feature-bottom .btn {
    text-align: center;
    max-width: 100%;
  }

  /* Über uns und Leistungen */
  .split {
    gap: 24px;
  }

  .split img {
    height: 250px;
    object-fit: cover;
  }

  .service {
    gap: 18px;
    padding: 28px 0;
  }

  .service img {
    height: 225px;
    object-fit: cover;
  }

  .service h2 {
    font-size: 25px;
  }

  .service p,
  .split p {
    font-size: 15px;
    line-height: 1.65;
  }

  /* Bildergalerie */
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery figure {
    min-width: 0;
  }

  .gallery img {
    height: 170px;
    object-fit: cover;
  }

  .gallery figcaption {
    font-size: 11px;
    padding: 8px;
  }

  .filters {
    gap: 8px;
    margin-bottom: 22px;
  }

  .filter {
    font-size: 13px;
    padding: 10px 12px;
    min-height: 42px;
  }

  .lightbox {
    padding: 60px 12px 20px;
  }

  .lightbox img {
    max-width: 100%;
    max-height: 78dvh;
  }

  /* Kontaktseite */
  .contact-grid {
    gap: 32px;
  }

  .contact-grid h2 {
    font-size: 27px;
  }

  .field input,
  .field textarea {
    font-size: 16px;
    padding: 14px;
    min-height: 48px;
  }

  .field textarea {
    min-height: 145px;
  }

  #contact-form .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Footer */
  .footer-new .footer-main {
    gap: 20px;
  }

  .footer-new .footer-bottom {
    flex-wrap: wrap;
    gap: 5px 12px;
  }

  /* Back to Top */
  #back-to-top {
    right: 14px;
    bottom: 18px;
  }
}

/* Sehr schmale Smartphones */
@media (max-width: 380px) {
  .hero h1 {
    font-size: 36px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cards .card img {
    height: 200px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery img {
    height: 140px;
  }

  .filter {
    font-size: 12px;
    padding: 9px 10px;
  }
}
/* KMG MOBILE V2 END */