/* =========================================================
   Mikromati Website — styles.css (bereinigt)
   Modern, senior, information-first (mobile-first)
   ========================================================= */

:root{
  --bg:#ffffff;
  --text:#0b0b0c;
  --muted:#52525b;
  --border:#e4e4e7;
  --soft:#fafafa;

  --shadow: 0 12px 36px rgba(0,0,0,.10);
  --radius: 22px;

  --max: 1000px;
}

/* Base reset */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img{ max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================================================
   Header / Nav
   ========================================================= */

header{
  position: sticky;
  top:0;
  z-index: 40;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(228,228,231,.75);
}

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

/* Brand: keep it simple and never distort */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}

/* Important: allow wide logo; no fixed width/height */
.brand-logo{
  display:block;
  width:auto;
  height:auto;
  max-height: 40px;           /* default (desktop + mobile) */
  object-fit: contain;        /* prevents distortion */
}

/* Desktop nav links */
.navlinks{
  display:none;
  align-items:center;
  gap: 4px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.navlinks a{
  padding: 10px 12px;
  border-radius: 14px;
  color: #3f3f46;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.navlinks a:hover{
  background: #f4f4f5;
  text-decoration:none;
  color:#18181b;
}

/* Right controls */
.navright{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Language button */
.langbtn{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 16px;
  border:1px solid var(--border);
  background:white;
}
.langbtn:hover{ background:#fafafa; cursor:pointer; }
.flag{ font-size: 18px; line-height:1; }

/* Mobile menu button */
.menubtn{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 16px;
  border:1px solid var(--border);
  background:white;
  font-size: 18px;
}
.menubtn:hover{ background:#fafafa; cursor:pointer; }

/* Show desktop links at >=900px */
@media(min-width:900px){
  .navlinks{ display:flex; }
  .menubtn{ display:none; } /* hamburger hidden on desktop */
}

/* =========================================================
   Mobile menu overlay
   ========================================================= */

.mobilemenu{ display:none; }
.mobilemenu.is-open{
  display:block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 60;
}

.mobilemenu__panel{
  position: absolute;
  right: 14px;
  top: 14px;
  width: min(92vw, 420px);
  border:1px solid var(--border);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.mobilemenu__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 4px 4px 10px;
}

.mobilemenu__title{
  font-weight: 900;
  letter-spacing: -0.02em;
}

.mobilemenu__links{
  display:grid;
  gap:6px;
  padding: 6px 4px 10px;
}

.mobilemenu__links a{
  padding: 12px 12px;
  border-radius: 16px;
  border:1px solid var(--border);
  background: white;
  text-decoration:none;
  color:#18181b;
  font-weight: 650;
}
.mobilemenu__links a:hover{ background:#fafafa; }

.mobilemenu__meta{
  padding: 6px 6px 2px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   Main typography / layout
   ========================================================= */

main{
  padding: 34px 0 64px;
}

.hero-kicker{
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h1{
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}

h2{
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

p{ margin: 0 0 12px; }

.lead{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
  max-width: none;
}

.note{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.block{
  margin: 26px 0;
  padding-top: 8px;
}

.rule{
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

/* Two-column layout (desktop only) */
.twocol{
  display:grid;
  gap:18px;
}
@media(min-width:900px){
  .twocol{
    grid-template-columns: 1.15fr .85fr;
    gap: 26px;
    align-items:start;
  }
}

/* Lists */
.list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 6px 0; }

/* Pills */
.pillrow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top: 10px;
}
.pill{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: var(--soft);
  font-size: 13px;
  color: #18181b;
}

/* Buttons – Outline-Style (schwarz/weiß) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 18px;
  font-weight: 750;
  border: 1.5px solid #0b0b0c;
  background: #ffffff;
  color: #0b0b0c;
}

.btn:hover{
  background:#fafafa;
  text-decoration:none;
}

/* ehemals "primary" – jetzt gleicher Stil, nur semantisch */
.btn.primary{
  background:#ffffff;
  color:#0b0b0c;
  border-color:#0b0b0c;
}

.btn.primary:hover{
  background:#f4f4f5;
}


/* Section images (for Leistungen) */
.section-image{
  width:100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 20px;
  margin: 0 0 18px;
  border: 1px solid rgba(228,228,231,.9);
}

/* Media wrapper (used on profile if needed) */
.media{
  border:1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  overflow:hidden;
  background: var(--soft);
}
.media img{
  width:100%;
  height:auto;
  display:block;
}

/* =========================================================
   Footer
   ========================================================= */

footer{
  border-top: 1px solid var(--border);
  padding: 24px 0 38px;
  color: var(--muted);
  font-size: 14px;
}

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

.footer-row .links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.footer-row a{
  color: #3f3f46;
}
.footer-row a:hover{
  color: #18181b;
  text-decoration: underline;
}

@media(min-width:800px){
  .footer-row{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
}

/* =========================================================
   Cookie banner (minimal, necessary only)
   ========================================================= */

.cookie-wrap{
  position: fixed;
  inset: auto 0 0 0;
  padding: 14px;
  z-index: 70;
}

.cookie{
  max-width: var(--max);
  margin: 0 auto;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.cookie .row{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.cookie p{
  color: var(--muted);
  font-size: 14px;
  margin:6px 0 0;
}

.cookie .controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.cookie .mini{
  border-radius: 18px;
  padding: 10px 12px;
  border:1px solid var(--border);
  background:white;
  font-weight:800;
}
.cookie .mini.primary{
  background:#111827;
  color:white;
  border-color:#111827;
}
.cookie .mini:hover{ background:#fafafa; text-decoration:none; }
.cookie .mini.primary:hover{ background:#0b1220; }

@media(min-width:900px){
  .cookie .row{
    flex-direction:row;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
  }
}

/* Two-column variants for asymmetric layouts */
@media (min-width: 900px){
  .twocol--textwide-left{ grid-template-columns: 3fr 1fr; }   /* ≈ 75 / 25 */
  .twocol--textwide-right{ grid-template-columns: 1fr 3fr; }  /* ≈ 25 / 75 */
}

/* Icon cell inside twocol (works left or right) */
.twocol .iconcell{
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
}

.twocol .iconcell img,
.twocol .iconcell svg{
  max-width: 120px;
  width: 100%;
  height: auto;
  display:block;
}

/* Mobile behaviour: icon first, text second */
@media (max-width: 899px){
  .twocol{ grid-template-columns: 1fr; }
  .twocol .iconcell{
    order: 0;
    justify-content: center;
    margin-bottom: 12px;
  }
  .twocol > div:not(.iconcell){ order: 1; }
}

/* Active nav link */
.navlinks a.is-active{
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  color: #18181b;
}

/* Optional: auch im Mobile-Menü */
.mobilemenu__links a.is-active{
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.btn-center{
  display: flex;
  justify-content: center;
  gap: 35px; /* Abstand zwischen den Buttons */
  flex-wrap: wrap; /* bricht auf Mobile sauber um */
}

/* Page titles: between h1 (brand) and h2 (sections) */
.page-title{
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 8px;
}

/* =========================================================
   Services accordion
   ========================================================= */

.service-toggle{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  background:none;
  border:0;
  padding: 6px 0;
  cursor:pointer;
  text-align:left;
}

.service-toggle h2{ margin:0; }

.chevron{
  font-size: 1.05em;
  line-height: 1;
  transition: transform .2s ease;
}

/* collapsed by default */
.service-content{
  display:none;
  margin-top: 14px;
}

/* open state */
.service.open .service-content{
  display:grid; /* uses .twocol on the element */
}

.service.open .chevron{ transform: rotate(90deg); }

/* subtle affordance */
.service-toggle:hover h2{
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* optional small fade-in */
.service.open .service-content{
  animation: fadeIn .18s ease;
}

@keyframes fadeIn{
  from{ opacity:0; transform: translateY(-2px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Services: beschreibender Text wie Lead */
.service .note{
  font-size: 16px;
  line-height: 1.68;
}

/* =========================================================
   Mobile: Startseite (Index) – Logo größer + mehr Header-Höhe
   Voraussetzung: <body class="page-home">
   ========================================================= */

@media (max-width: 899px){

  /* Logo bewusst größer auf der Startseite */
  .page-home .brand-logo{
    max-height: 64px;
  }

  /* Header insgesamt höher, damit Hero/Icon nicht oben "reinrutscht" */
  .page-home header .nav{
    padding-top: 20px;
    padding-bottom: 20px;
  }

  /* kleiner Abstand nach dem Header */
  .page-home main .block:first-of-type{
    margin-top: calc(12px + env(safe-area-inset-top));
  }
}

/* sehr kleine Geräte: nur minimal reduzieren (optional) */
@media (max-width: 360px){
  .page-home .brand-logo{
    max-height: 58px;
  }
}


@media (max-width: 899px){
  .page-home main::before{
    content: "";
    display: block;
    height: 56px;
  }
}

@media (max-width: 899px){
  /* Leistungs-Titel im Accordion auch mobil schwarz */
  .service-toggle,
  .service-toggle h2{
    color: #0b0b0c; /* dein Text-Schwarz */
  }

  /* iOS Safari: Button-Default entfernen */
  .service-toggle{
    -webkit-appearance: none;
    appearance: none;
  }
}
