/* ==========================================================
   IBAC Startseite – stabiler Header ohne Shift
   - Topbar scrollt weg
   - Nav dockt beim Scrollen an (fixed) ohne Layout-Sprung
   - s-pv Farbwelt (Grautöne/Dunkelgrau)
   - IBAC Akzent: #96C11D
   - Hero Bild hinten, Gradient darüber, Content oben
   - Mobile: Hamburger-Menü
   ========================================================== */

:root{
  --header-dark: #2E3944;
  --header-darker: #24303A;
  --bg:#ffffff;
  --surface:#F4F5F7;
  --surface-2:#EEF0F3;
  --line:#D1D5DB;
  --text:#1F2933;
  --muted:#4B5563;
  --muted-2:#6B7280;
  --accent:#96C11D;
  --accent-700:#7FA419;
  --accent-050: rgba(150,193,29,.08);
  --accent-200: rgba(150,193,29,.28);
  --shadow-sm: 0 8px 22px rgba(17,24,39,.08);
  --shadow: 0 14px 34px rgba(17,24,39,.12);
  --container: 1240px;
  --radius: 18px;
  --fs-base: 16px;
  --lh: 1.6;
  --topbar-h: 50px;
  --nav-h: 72px;
  --focus:#2563eb;
}

/* Font-size toggle (CSS-only) */
#fs-md:checked ~ .page { --fs-base: 16px; }
#fs-lg:checked ~ .page { --fs-base: 17.5px; }
#fs-xl:checked ~ .page { --fs-base: 19px; }

*{ box-sizing:border-box; }

html, body{
  height:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  line-height:var(--lh);
}

.page{
  min-height:100%;
  display:flex;
  flex-direction:column;
  font-size:var(--fs-base);
}

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

.spacer-xs{ height:8px; }
.spacer-sm{ height:12px; }
.spacer-md{ height:18px; }
.spacer-lg{ height:22px; }

/* a11y */
#fs-md, #fs-lg, #fs-xl{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:12px;
  z-index:9999;
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 12px;
  box-shadow:var(--shadow-sm);
}

.skip-link:focus{
  left:12px;
  outline:3px solid var(--focus);
  outline-offset:2px;
}

:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:3px;
  border-radius:12px;
}

/* Typography */
.kicker{
  margin:0 0 10px;
  font-size:.9em;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-2);
}

h1, h2, h3{
  margin:0;
  letter-spacing:-0.02em;
}

h1{
  font-size:clamp(2rem,3.4vw,3.15rem);
  line-height:1.08;
}

h2{
  font-size:clamp(1.45rem,2.2vw,2.1rem);
  line-height:1.15;
  margin-bottom:14px;
}

h3{
  font-size:1.06rem;
  line-height:1.25;
  margin-bottom:8px;
}

p{
  margin:0;
  color:var(--muted);
}

.lead{
  font-size:1.06em;
  max-width:72ch;
}

.section{ padding:72px 0; }
.section--tight{ padding:56px 0; }
.section--surface{ background:var(--surface); }
.section--surface2{ background:var(--surface-2); }

/* ==========================================================
   HEADER
   ========================================================== */

header{
  position:relative;
  z-index:3000;
}

/* Topbar – scrollt weg */
.topbar{
  background:var(--header-dark);
  border-bottom:1px solid rgba(255,255,255,.08);
  position:relative;
  z-index:3001;
  overflow:hidden;
  max-height:var(--topbar-h);
  opacity:1;
  transition:max-height 0.25s ease, opacity 0.25s ease;
}

.topbar.is-hidden{
  max-height:0;
  opacity:0;
  border-bottom:none;
}

.topbar__inner{
  min-height:var(--topbar-h);
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:10px 0;
  color:rgba(255,255,255,.85);
}

.topbar__label{
  font-weight:650;
  font-size:.95em;
  margin-right:10px;
  color:rgba(255,255,255,.85);
  user-select:none;
}

.fs-btn{
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.10);
  color:#fff;
  font-weight:800;
  font-size:.92em;
  transition:background .12s ease, border-color .12s ease, color .12s ease;
}

.fs-btn:hover{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.45);
}

#fs-md:checked ~ .page .fs-btn[for="fs-md"],
#fs-lg:checked ~ .page .fs-btn[for="fs-lg"],
#fs-xl:checked ~ .page .fs-btn[for="fs-xl"]{
  background:rgba(255,255,255,.92);
  color:#111827;
  border-color:rgba(255,255,255,.92);
  box-shadow:none;
}

/* Platzhalter gegen Layout-Sprung */
.nav-wrap{
  position:relative;
  height:var(--nav-h);
  z-index:3002;
}

/* Nav normal */
.nav{
  position:relative;
  height:var(--nav-h);
  width:100%;
  display:flex;
  align-items:center;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  z-index:3003;
  transition:background .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* Nav sticky */
.nav.is-stuck{
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  background:rgba(36,48,58,.84);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 26px rgba(17,24,39,.22);
  z-index:9999;
}

.nav__inner{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  min-width:160px;
}

.brand__logo{
  width:200px;
  height:auto;
  object-fit:contain;
  display:block;
}

.menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;
}

.menu li{
  list-style:none;
  margin:0;
  padding:0;
}

.menu li::marker{ content:""; }

.menu a{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  color:var(--text);
  font-weight:650;
  padding:10px;
  border-radius:12px;
  transition:background .15s ease, color .15s ease;
  white-space:nowrap;
}

.menu a:hover{ background:var(--surface); }

.nav.is-stuck .brand{ color:#fff; }
.nav.is-stuck .menu a{ color:rgba(255,255,255,.92); }
.nav.is-stuck .menu a:hover{ color:#fff; background:rgba(255,255,255,.08); }

.menu-toggle{
  display:none;
  background:none;
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px;
  cursor:pointer;
  width:44px;
  height:44px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
}

.menu-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:var(--text);
  transition:all .2s ease;
}

.nav.is-stuck .menu-toggle{ border-color:rgba(255,255,255,.28); }
.nav.is-stuck .menu-toggle span{ background:#fff; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:850;
  letter-spacing:.01em;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease,
    border-color .12s ease, color .12s ease;
  white-space:nowrap;
}

.btn:active{ transform:translateY(1px); }

.btn--primary{
  background:var(--accent);
  color:#0b1a0f;
  box-shadow:var(--shadow-sm);
}

.btn--primary:hover{
  background:var(--accent-700);
  color:#fff;
  box-shadow:var(--shadow);
}

.btn--secondary{
  background:#fff;
  color:var(--text);
  border-color:var(--line);
}

.btn--secondary:hover{ background:var(--surface); }

.btn--ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--line);
}

.btn--ghost:hover{ background:var(--surface); }

.nav.is-stuck .btn--secondary{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.28);
  color:#fff;
}

.nav.is-stuck .btn--secondary:hover{ background:rgba(255,255,255,.16); }

/* ==========================================================
   HERO
   ========================================================== */

.hero{
  position:relative;
  padding:72px 0 56px;
  overflow:hidden;
  background-image:url("../images/ibac_firma.png");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    90deg,
    rgba(36,48,58,.72) 0%,
    rgba(36,48,58,.38) 55%,
    rgba(36,48,58,.14) 100%
  );
  pointer-events:none;
  z-index:0;
}

.hero > *{ position:relative; z-index:1; }

.hero__grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:26px;
  align-items:start;
}

.hero__panel{
  background:linear-gradient(180deg, rgba(244,245,247,.95) 0%, #fff 100%);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px;
  box-shadow:var(--shadow-sm);
}

.hero__title{ margin-bottom:14px; }

.hero__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:22px;
}

.hero__aside{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:30px;
  box-shadow:var(--shadow-sm);
}

.trust{ display:grid; gap:10px; margin-top:12px; }

.trust__item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:16px;
  background:var(--surface);
  border:1px solid var(--line);
}

.trust__dot{
  width:10px;
  height:10px;
  margin-top:6px;
  border-radius:999px;
  background:var(--accent);
  flex:0 0 auto;
}

.trust__item strong{ display:block; color:var(--text); margin-bottom:2px; }
.trust__item span{ color:var(--muted); font-size:.95em; }

/* ==========================================================
   Cards / Grids
   ========================================================== */

.split{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:26px;
  align-items:start;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}

.card__inner{ padding:22px; }
.card--soft{ background:linear-gradient(180deg,var(--surface) 0%, #fff 100%); }

.grid{ display:grid; gap:8px; }
.grid--8{ grid-template-columns:repeat(4, minmax(0,1fr)); }
.grid--4{ grid-template-columns:repeat(4, minmax(0,1fr)); }

.tile{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:15px;
  box-shadow:var(--shadow-sm);
  display:grid;
  gap:10px;
  min-height:150px;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.tile:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
  background:linear-gradient(180deg,var(--surface) 0%, #fff 100%);
}

.tile__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  font-size:.85em;
  font-weight:850;
  color:var(--text);
  background:#fff;
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.tile a{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--accent-700);
  text-decoration:none;
  font-weight:900;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--accent-200);
  background:#fff;
  width:fit-content;
  transition:background .12s ease, border-color .12s ease;
}

.tile a:hover{
  background:var(--accent-050);
  border-color:rgba(150,193,29,.45);
}

.tile img{
  width:100%;
  height:160px;
  object-fit:contain;
  display:block;
  background:transparent;
}

.feature{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:16px;
  align-items:stretch;
}

.feature__media{
  border-radius:var(--radius);
  border:1px solid var(--line);
  overflow:hidden;
  min-height:300px;
  box-shadow:var(--shadow-sm);
}

.feature__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hotline{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:16px;
  align-items:center;
}

.hotline__numbers{ display:flex; flex-wrap:wrap; gap:10px; }

.call{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
  text-decoration:none;
  color:var(--text);
}

.call:hover{ background:var(--surface); }
.call-icon{ font-size:1.1em; }

.cta-band{
  background:#1f2937;
  color:#fff;
  border-radius:calc(var(--radius) + 6px);
  padding:28px;
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:40px;
  flex-wrap:wrap;
}

.cta-band h2{ color:#fff; margin-bottom:10px; }
.cta-band p{ color:rgba(255,255,255,.82); max-width:70ch; }
.cta-band .btn--primary{ background:var(--accent); }
.cta-band .btn--secondary{ border-color:rgba(255,255,255,.28); background:rgba(255,255,255,.08); color:#fff; }
.cta-band .btn--secondary:hover{ background:rgba(255,255,255,.14); }
.cta-band__actions{ display:flex; gap:12px; flex-wrap:wrap; }
.cta-band__text{ max-width:520px; }

.cta-band__brand{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  background:transparent;
  border-radius:0;
}

.cta-band__brand img{ height:60px; width:auto; display:block; }

/* Footer */
.footer{ margin-top:auto; border-top:1px solid var(--line); background:#fff; }

.footer__inner{
  padding:54px 0;
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr 1fr;
  gap:18px;
}

.footer h3{ font-size:1rem; margin-bottom:10px; }
.footer a{ display:inline-flex; text-decoration:none; color:var(--muted); padding:6px 0; width:fit-content; }
.footer a:hover{ color:var(--text); }
.footer small{ display:block; color:var(--muted-2); margin-top:14px; }
.footer__bottom{ border-top:1px solid var(--line); padding:14px 0; color:var(--muted-2); font-size:.92em; }
.footer__brand{ margin-bottom:10px; color:var(--text); }

/* ==========================================================
   Astra / WP Overrides
   ========================================================== */

.ast-container,
.ast-container-fluid{ max-width:100% !important; }

.entry-header{ display:none !important; }

.ast-small-footer,
.ast-footer-overlay,
.ast-small-footer-section{ display:none !important; }

/* Hersteller Links */
.tile p a{
  color:inherit !important;
  text-decoration:none !important;
  border:none !important;
  border-bottom:none !important;
  outline:none;
  box-shadow:none !important;
  transition:color .2s ease;
}

.tile p a:hover{ color:var(--accent) !important; text-decoration:none !important; }
.tile p a:focus, .tile p a:active{ outline:none; border:none; box-shadow:none; }

/* Produktgruppen Hintergrundbilder */
#gruppen .tile,
#produktgruppen-bottom .tile{
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-position:center center !important;
  min-height:400px !important;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width:1024px){
  .grid--8{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid--4{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .hero__grid, .split, .feature, .hotline{ grid-template-columns:1fr; }
  .footer__inner{ grid-template-columns:1fr 1fr; }
}

@media (max-width:640px){
  .section{ padding:56px 0; }

  .hero{
    padding:56px 0 38px;
    background-position:62% center;
  }

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

  .brand__logo{ width:132px; height:32px; }

  .nav__inner{
    grid-template-columns:auto auto auto;
    justify-content:space-between;
  }

  .menu-toggle{ display:flex; }

  .menu{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:#fff;
    border-bottom:1px solid var(--line);
    flex-direction:column;
    padding:12px 14px;
    gap:0;
    box-shadow:var(--shadow);
    justify-content:flex-start;
  }

  .menu.is-open{ display:flex; }

  .menu a{ width:100%; padding:14px 16px; border-radius:10px; }

  .nav.is-stuck .menu{
    background:var(--header-darker);
    border-bottom-color:rgba(255,255,255,.08);
  }

  .nav__cta{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; }
}
.hero__panel {
  display: none;
}

.hero__grid {
  grid-template-columns: 1fr;
  justify-items: end;
}
.hero {
  padding: 0;
  min-height: 800px; /* Höhe nach Bedarf anpassen */
}

.hero__grid {
  height: 100%;
  align-items: start;
  padding-top: 50px; /* Abstand der Aside-Box vom oberen Rand */
}
.ast-page-builder-template .site .site-content #primary {
  margin-top: 0 !important;
}
#content.site-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.nav-wrap {
  height: 0 !important;
}
.hero__grid {
  direction: rtl;
}

.hero__aside {
  direction: ltr;
  margin-right: 0;
  margin-left: 40px;
  margin-top: 180px;
}