/* =========================================================
   BS DÄMMTECHNIK – critical.css
   Ziel: Above-the-fold only (Header + Mobile Menu + Hero)
========================================================= */

/* ===== Root Vars ===== */
:root{
  --primary:#a12626;
  --black:#000;
  --white:#fff;
  --overlay:rgba(0,0,0,.30);
}

/* ===== Minimal Reset ===== */
*{margin:0;padding:0;box-sizing:border-box}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
button{font:inherit}

/* ===== Base ===== */
body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--black);
  color:var(--white);
}
.container{
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:0 30px;
}

/* =========================================================
   HEADER
========================================================= */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.10);
}
.header-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:26px;
  height:92px;
}

/* Logo */
.header-logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}
.header-logo img{
  height:75px;
  width:auto;
}

/* Desktop Nav */
.header-nav{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:30px;
}
.header-nav a{
  text-decoration:none;
  color:#000;
  font-weight:500;
  font-size:1.1rem;
  padding:10px 2px;
  transition:color .2s ease;
}
.header-nav a:hover,
.header-nav a.active{
  color:var(--primary);
}

/* Dropdown */
.nav-dd{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.nav-dd > a{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.nav-dd > a::after{
  content:"▾";
  font-size:.9em;
  transform:translateY(-1px);
  opacity:.7;
  transition:transform .18s ease,opacity .18s ease;
}
.nav-dd.is-open > a::after,
.nav-dd:hover > a::after,
.nav-dd:focus-within > a::after{
  transform:translateY(-1px) rotate(180deg);
  opacity:1;
}
.nav-dd-menu{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%) translateY(10px);
  min-width:260px;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  box-shadow:0 18px 55px rgba(0,0,0,.12);
  padding:10px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
  z-index:1200;
}
.nav-dd-menu::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-12px;
  height:12px;
}
.nav-dd-menu a{
  display:block;
  padding:12px;
  text-decoration:none;
  color:#000;
  font-weight:500;
}
.nav-dd-menu a:hover{
  background:rgba(0,0,0,.04);
  color:var(--primary);
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu,
.nav-dd.is-open .nav-dd-menu{
  opacity:1;
  pointer-events:auto;
  transform:translateX(-50%) translateY(6px);
}

/* Header Right */
.header-right{
  display:flex;
  align-items:center;
  gap:18px;
}
.header-divider{
  width:1px;
  height:44px;
  background:rgba(0,0,0,.25);
}
.header-contact{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.hc-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#000;
  font-weight:500;
  font-size:.92rem;
}
.hc-link:hover{
  color:var(--primary);
}
.hc-ic{
  color:var(--primary);
}

/* Burger */
.header-burger{
  display:none;
  width:60px;
  height:60px;
  border:0;
  background:transparent;
  cursor:pointer;
  justify-self:end;
  margin-right:-30px;
  touch-action:manipulation;
}
.header-burger span{
  width:26px;
  height:3px;
  background:#000;
  display:block;
  position:relative;
  margin:0 auto;
}
.header-burger span::before,
.header-burger span::after{
  content:"";
  position:absolute;
  left:0;
  width:26px;
  height:3px;
  background:#000;
}
.header-burger span::before{top:-8px}
.header-burger span::after{top:8px}

/* =========================================================
   MOBILE MENU
========================================================= */
.mobile-menu{
  position:fixed;
  inset:0;
  z-index:2000;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}
.mobile-menu.is-open{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
}
.mobile-menu[hidden]{display:none}

.mobile-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
  opacity:0;
  transition:opacity .32s ease;
}
@supports (backdrop-filter:blur(2px)){
  .mobile-backdrop{backdrop-filter:blur(2px)}
}
.mobile-menu.is-open .mobile-backdrop{
  opacity:1;
}

.mobile-panel{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:#fff;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:16px;
  opacity:0;
  transform:translateY(-10px);
  transition:transform .36s ease,opacity .36s ease;
}
.mobile-menu.is-open .mobile-panel{
  opacity:1;
  transform:translateY(0);
}
.mobile-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:12px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.mobile-title{
  font-weight:500;
  color:#000;
}
.mobile-close{
  border:0;
  background:transparent;
  width:52px;
  height:52px;
  font-size:34px;
  cursor:pointer;
  color:#000;
}
.mobile-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mobile-nav a{
  text-decoration:none;
  color:#000;
  font-weight:500;
  padding:14px 10px;
  font-size:1.2rem;
  line-height:1.25;
}
.mobile-nav a:hover{
  background:rgba(0,0,0,.04);
}
.mobile-nav a.active,
.mobile-nav a[aria-current="page"]{
  color:var(--primary);
  background:rgba(162,38,38,.06);
}

/* Submenu */
.m-sub-trigger{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:0;
  background:transparent;
  padding:14px 10px;
  cursor:pointer;
  color:#000;
  font-weight:500;
  font-size:1.2rem;
}
.m-sub-ic{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  transition:transform .18s ease;
}
.m-sub-menu{
  padding:6px 0 10px 10px;
  display:grid;
  gap:6px;
}
.m-sub-menu a{
  text-decoration:none;
  color:#000;
  font-weight:500;
  padding:12px 10px;
  border-left:3px solid transparent;
}
.m-sub-menu a:hover{
  background:rgba(0,0,0,.04);
  color:var(--primary);
}
.m-sub-menu a.active,
.m-sub-menu a[aria-current="page"]{
  color:var(--primary);
  background:rgba(162,38,38,.06);
  border-left-color:var(--primary);
}
.m-sub.is-open .m-sub-ic{
  transform:rotate(45deg);
}
.m-sub-menu[hidden]{
  display:none !important;
}

/* Mobile Bottom CTA */
.mobile-contact{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.08);
}
.mobile-cta{
  text-decoration:none;
  font-weight:500;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:14px 16px;
  border:2px solid #000;
  color:#000;
  font-size:1.05rem;
}
.mobile-cta:hover{
  background:#000;
  color:#fff;
}
.mobile-cta--phone{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}
.mobile-cta--phone:hover{
  background:#7f1d1d;
}

body.menu-open{
  overflow:hidden;
}

/* =========================================================
   HERO – Optimiert für beste Bildqualität
========================================================= */
.hero{
  width:100%;
  display:flex;
  align-items:center;
  position:relative;
  overflow:hidden;
  min-height:100vh;
}
@supports (height:100svh){
  .hero{min-height:100svh}
}

.hero-bg{
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
}

.hero-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  object-position:center;
  transform:none;
  animation:none;
  image-rendering:auto;
  backface-visibility:hidden;
}

.hero-image.active{
  opacity:1;
}

.overlay{
  position:absolute;
  inset:0;
  background:var(--overlay);
  z-index:1;
}

.hero-content{
  position:relative;
  z-index:2;
  max-width:1600px;
}

.hero h1{
  font-size:clamp(2.5rem,5vw,5rem);
  font-weight:600;
  line-height:1.1;
  margin-bottom:25px;
}

.hero p{
  font-size:1.2rem;
  margin-bottom:35px;
  max-width:600px;
}

.hero-buttons{
  display:flex;
  gap:20px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width:1024px){
  .container{padding:0 18px}
  .header-row{height:78px}
  .header-logo img{height:46px}
  .header-nav,
  .header-right{display:none}
  .header-burger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:auto;
  }

  .hero{
    align-items:flex-start;
  }

  .hero-content{
    padding-top:140px;
  }
}

@media (max-width:680px){
  .container{padding:0 14px}
  .mobile-panel{padding:18px}
  .hero-content{padding-top:170px}
  .mobile-nav a{font-size:1.28rem}
  .m-sub-trigger{font-size:1.28rem}
  .header-logo img{height:60px}

  .hero h1{
    font-size:clamp(2.35rem,10vw,3.4rem);
  }

  .hero p{
    font-size:1.05rem;
  }

  .hero-buttons{
    flex-direction:column;
    align-items:flex-start;
  }
}