/* ================================
   IMPLEMENT Facility Management – Global Styles (clean)
   ================================ */
:root{
  --brand:#08009a;
  --brand-600:#06007a;
  --accent:#e11d48;

  --text:#0f172a;
  --muted:#64748b;
  --bg:#ffffff;

  --radius:14px;
  --border:#e5e7eb;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth; max-width:100%; overflow-x:hidden;}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Inter,Arial,sans-serif;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
  max-width:100%;
  overflow-x:hidden; /* FIX: iOS “ins Weiße schieben” */
}

img, svg{max-width:100%; height:auto;}
.text-red{color:var(--accent)}

/* Container */
.wrap{
  max-width:1680px;
  margin:0 auto;
  padding:0 clamp(16px, 3vw, 56px);
}

/* ================================
   Header / Navigation
   ================================ */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--brand);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.08);
  overflow-x:clip;
}
.site-header .wrap{min-width:0}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 0;
}

.brand,
.brand--text{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:#fff;
  white-space:nowrap;
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:.2px;
  margin-left:6px;
}
.brand:hover,
.brand--text:hover{opacity:.9}

#main-nav{position:relative}
#main-nav ul{
  display:flex;
  gap:16px;
  list-style:none;
  margin:0;
  padding:0;
  flex-wrap:nowrap;
}
#main-nav a{
  color:#fff;
  text-decoration:none;
  font-weight:550;
}
#main-nav a:hover{opacity:.9}

.menu-toggle{
  display:none;
  background:transparent;
  border:0;
  color:#fff;
  font-size:1.2rem;
  cursor:pointer;
}

.badge{display:none !important}

/* ================================
   Hero
   ================================ */
.hero{
  background:linear-gradient(180deg,#e6f0f6,#dfe7ee);
  padding:60px 0;
}
.hero .content{display:block}

/* Harmonischer Desktop-Aufbau: Text links, Logo rechts */
.hero-header-flex{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items:center;
  gap:40px;
  margin-bottom:30px;
}

.hero-text{min-width:0}

.hero h1{
  margin:0;
  font-size:3.5rem;
  line-height:1.08;
  color:#000 !important;
  max-width:18ch;
}

.hero .hero-body{
  text-align:left;
  max-width:980px;
}

.hero p{
  margin:0 0 24px;
  color:#334155;
  font-size:1.25rem;
  line-height:1.45;
}

/* Logo rechts */
.hero-logo-small{
  margin:0;
  justify-self:end;
  align-self:center;
}
.hero .hero-logo-small img{
  width:100%;
  height:auto;
  display:block;
  max-width:520px;
}

/* großes Titelbild */
.hero-full-width{
  margin:20px auto 50px;
  overflow:hidden;
  max-width:1680px;
}
.hero-full-width img{
  width:100%;
  display:block;
  border-radius:var(--radius);
  border:1px solid var(--border);
}

/* Titelbild als Banner */
.hero-full-width img[src*="Titelbild_hero"]{
  max-width:1600px;
  height:620px;
  object-fit:cover;
  object-position:center 8%;
  margin:0 auto;
}

/* ================================
   Sections
   ================================ */
.section{padding:48px 0}
.section h2{font-size:1.6rem;margin:0 0 8px}
.section p.lead{color:var(--muted);margin:0 0 24px}

/* ================================
   Cards / Utilities
   ================================ */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
}
.card h3{margin:12px 0 6px;font-size:1.1rem}
.card p{margin:0;color:#475569}

figure{margin:0}

/* Einheitliche Medienfläche in Karten */
.card .media{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:#f1f5f9;
  margin:0 0 10px 0;
}
.card .media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ================================
   Grids (Leistungen / Referenzen)
   ================================ */
.services{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:18px;
}
.services .card{grid-column:span 6}

@media (min-width:1200px){
  .services .card{grid-column:span 4}
}
@media (min-width:1700px){
  .services .card{grid-column:span 6}
}

/* ================================
   Buttons
   ================================ */
.btn{
  appearance:none;
  border:0;
  border-radius:10px;
  padding:12px 16px;
  font-weight:600;
  cursor:pointer;
  display:inline-block;
  text-decoration:none;
}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-600)}
.btn-ghost{background:#fff;color:var(--brand);border:1px solid #e2e8f0}
.btn-ghost:hover{background:#f1f5f9}

/* ================================
   Kontakt
   ================================ */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.contact-grid > *{min-width:0}

/* CTA-Reihe in der Kontaktkarte */
.contact-card .cta-buttons{
  margin-top:6px;display:flex;flex-wrap:wrap;gap:12px;
}
.contact-card .cta-buttons .btn{
  flex:1 1 160px;min-width:140px;text-align:center;
}

/* ================================
   Footer (einmalig, final)
   ================================ */
.site-footer{
  background: var(--brand);
  color:#fff;
  margin-top:36px;
  padding:26px 0 18px;
  overflow-x:clip; /* verhindert “Überstand” */
}

.site-footer a{
  color:#fff;
  text-decoration:none;
  opacity:.92;
}
.site-footer a:hover{
  opacity:1;
  text-decoration:underline;
}

/* obere Reihe */
.footer-top{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center; /* Logo+Claim mittig */
  padding-bottom:14px;
}

.footer-center{
  text-align:center;
  max-width:900px;
  padding:0 64px; /* Luft, damit Social rechts nicht drückt */
}

.footer-center img{
  display:block;
  margin:0 auto 6px;
  height:44px;       /* FIX: nie riesig */
  width:auto;
  max-width:240px;
}

.footer-claim{
  margin:0;
  font-size:13px;
  opacity:.85;
}

/* Social rechts (Desktop) */
.footer-social{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  gap:12px;
}

.social-link{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.25);
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#fff;              /* wichtig für SVG */
}

.social-link svg{
  width:20px;
  height:20px;
  display:block;
  fill:currentColor;       /* wichtig: Icons sichtbar */
}

.social-link:hover{
  background:rgba(255,255,255,.12);
}

/* untere Reihe */
.footer-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  border-top:1px solid rgba(255,255,255,.15);
  padding-top:12px;
  font-size:13px;
}

.footer-right{
  text-align:right;
  line-height:1.4;
}

.sep{opacity:.7}

/* ================================
   Hover Effekte (optional)
   ================================ */
.card{
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* ================================
   Responsive
   ================================ */
@media (max-width:960px){
  .hero-header-flex{
    grid-template-columns: 1fr;
    align-items:flex-start;
    gap:20px;
  }
  .hero h1{font-size:2.2rem;max-width:none}
  .hero-logo-small{justify-self:start}
  .hero .hero-logo-small img{max-width:340px}

  .services .card{grid-column:span 12}

  .hero-full-width img[src*="Titelbild_hero"]{
    height:420px;
    object-position:center 10%;
  }
}

@media (max-width:720px){
  .hero h1{font-size:1.8rem}
  .hero p{font-size:1.1rem}

  #main-nav ul{display:none}
  .menu-toggle{display:block}
  #main-nav.open ul{
    display:flex;
    flex-direction:column;
    gap:12px;
    background:var(--brand);
    position:absolute;
    left:0;right:0;top:56px;
    padding:14px 20px;
    border-top:1px solid rgba(255,255,255,.15);
    text-align:center;
  }
  #main-nav.open ul li{width:100%}
  #main-nav.open ul a{display:block;padding:8px 0}
}

@media (max-width:768px){
  .footer-center{padding:0 12px;}

  /* Social: nicht mehr absolut -> sonst “Überstand” */
  .footer-social{
    position:static;
    transform:none;
    margin-top:12px;
    justify-content:center;
  }

  .footer-top{
    flex-direction:column;
    gap:10px;
  }

  .footer-bottom{
    flex-direction:column;
    text-align:center;
  }
  .footer-right{ text-align:center; }
}

@media (max-width:600px){
  .contact-card .cta-buttons .btn{flex:1 1 100%;min-width:0}
}
/* ================================
   Cookie Consent (dezenter Banner)
   ================================ */
.cookie-consent{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:9999;

  max-width:980px;
  margin:0 auto;

  background:rgba(15,23,42,.92); /* dunkel, dezent */
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.25);
  backdrop-filter:blur(8px);

  padding:14px 14px;
}

.cookie-consent__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.cookie-consent__text{
  font-size:13px;
  line-height:1.35;
  color:rgba(255,255,255,.92);
  min-width:0;
}

.cookie-consent__text a{
  color:#cfe8ff;
  text-decoration:underline;
  text-underline-offset:2px;
}

.cookie-consent__actions{
  display:flex;
  gap:10px;
  flex-shrink:0;
}

.cookie-consent__btn{
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  color:#fff;
  border-radius:10px;
  padding:10px 12px;
  font-weight:600;
  cursor:pointer;
  font:inherit;
  white-space:nowrap;
}

.cookie-consent__btn:hover{ background:rgba(255,255,255,.12); }

.cookie-consent__btn--primary{
  background:#fff;
  color:#0f172a;
  border-color:#fff;
}
.cookie-consent__btn--primary:hover{ opacity:.92; }

@media (max-width:560px){
  .cookie-consent{
    left:12px;
    right:12px;
    bottom:12px;
    padding:12px;
  }
  .cookie-consent__inner{
    flex-direction:column;
    align-items:stretch;
  }
  .cookie-consent__actions{
    width:100%;
  }
  .cookie-consent__btn{
    width:100%;
    text-align:center;
  }
}