/* =========================================================================
   atb Redesign — Phase 1: Marken-Fundament (Roboto + Palette + Hexagon-Button)
   Quelle der Vorgaben: concept/ATB_Logovorgaben.pdf
   Wird über das Child-Theme (functions.php) nach dem Parent-Style geladen.
   ========================================================================= */

/* ---- Roboto (lokal gehostet, DSGVO-konform) ---- */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-700.woff2') format('woff2');
}

/* ---- Markenfarben ---- */
:root {
  --atb-navy:   #1e3358;
  --atb-blue:   #466eaf;
  --atb-yellow: #fcc00c;
  --atb-navy-90: rgba(30, 51, 88, 0.90);
  --atb-light:  #f4f6f9;

  /* Blocksy-Palette auf Markenfarben mappen (Primär/Hover/Akzent) */
  --theme-palette-color-1: #466eaf; /* Primär: Links, Buttons */
  --theme-palette-color-2: #1e3358; /* Hover/Sekundär (dunkler) */
  --theme-palette-color-3: #fcc00c; /* Akzent: Gelb */
}

/* ---- Basis-Typografie: Roboto überall ---- */
body,
button,
input,
select,
textarea,
.ct-container,
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
body { font-weight: 400; }
h1, h2, h3, h4, h5, h6, .wp-block-heading { font-weight: 700; }

/* Headlines markenkonform dunkelblau (sofern nicht explizit gefärbt) */
h1, h2, h3, h4, h5, h6 { color: var(--atb-navy); }

/* =========================================================================
   Hexagon-Button
   Nutzung: Block-Style "Hexagon (atb)" am Core-Button ODER Klasse .atb-hexagon-btn
   Horizontale Hexagon-Form (spitze Enden links/rechts) für gute Textbreite.
   ========================================================================= */
.atb-hexagon-btn,
.wp-block-button.is-style-atb-hexagon > .wp-block-button__link {
  --hex-bg: var(--atb-blue);
  display: inline-block;
  background: var(--hex-bg);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.7em 2.8em;
  border: 0;
  border-radius: 0;
  line-height: 1.2;
  cursor: pointer;
  /* Pointy-Top-Hexagon: Spitzen oben/unten (wie Mockup) */
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
          clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: filter .15s ease, transform .15s ease;
}
.atb-hexagon-btn:hover,
.wp-block-button.is-style-atb-hexagon > .wp-block-button__link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #ffffff;
}
/* Gelbe Variante */
.atb-hexagon-btn.is-yellow,
.wp-block-button.is-style-atb-hexagon.is-yellow > .wp-block-button__link {
  --hex-bg: var(--atb-yellow);
  color: var(--atb-navy);
}

/* =========================================================================
   Eigener ATB-Header (Blocksy-Header ausgeblendet) — volle Kontrolle, Flexbox
   ========================================================================= */
.ct-header { display: none !important; }   /* Blocksy-Header raus */

.atb-hdr { background: #fff; position: relative; z-index: 100; }
.atb-hdr__in {
  display: flex;
  align-items: center;                 /* <- vertikal mittig, der ganze Kampf in 1 Zeile */
  gap: 40px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 18px;                  /* weniger linker Abstand -> Logo weiter links */
}
.atb-hdr__logo { flex: 0 0 auto; line-height: 0; }
.atb-hdr__logo-img { height: 96px; width: auto; display: block; }  /* etwas größer */

/* Menü füllt den Raum rechts vom Logo und zentriert darin */
.atb-hdr__nav { flex: 1 1 auto; display: flex; justify-content: center; }
.atb-menu {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 34px; list-style: none; margin: 0; padding: 0;
}
.atb-menu > li { position: relative; }
.atb-menu a {
  color: var(--atb-navy); font-weight: 500; text-decoration: none;
  text-transform: none; letter-spacing: normal; font-size: 1.05rem; white-space: nowrap;
}
.atb-menu a:hover,
.atb-menu .current-menu-item > a,
.atb-menu .current-menu-ancestor > a { color: var(--atb-blue); }
.atb-menu .menu-item-has-children > a::after { content: " ▾"; font-size: .8em; }

/* Dropdowns */
.atb-menu .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--atb-navy); list-style: none; margin: 0; padding: 8px 0;
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}
.atb-menu li:hover > .sub-menu,
.atb-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.atb-menu .sub-menu a {
  display: block; padding: 9px 22px; color: #fff;
  text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .92rem;
}
.atb-menu .sub-menu a:hover { color: var(--atb-yellow); }
.atb-menu .sub-menu .menu-item-has-children > a::after { content: ""; }

/* Burger (mobil) */
.atb-hdr__burger {
  display: none; flex: 0 0 auto; margin-left: auto;
  width: 44px; height: 40px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.atb-hdr__burger span { display: block; height: 3px; background: var(--atb-navy); margin: 4px 0; border-radius: 2px; }

@media (max-width: 1024px) {
  .atb-hdr__burger { display: block; }
  .atb-hdr__nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.15);
    display: none; padding: 12px 28px;
  }
  .atb-hdr.is-open .atb-hdr__nav { display: block; }
  .atb-menu { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .atb-menu .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: transparent; padding: 2px 0 6px 16px;
  }
  .atb-menu .sub-menu a { color: var(--atb-navy); padding: 6px 0; }
}

/* =========================================================================
   Startseite-Redesign — Sektionen
   ========================================================================= */
/* Einheitlicher seitlicher Innenabstand für ALLE Sektionen -> Überschriften fluchten,
   navy-Sektion bekommt damit auch den blauen Randbereich links/rechts. */
.atb-section { padding-block: clamp(48px, 7vw, 92px); padding-inline: clamp(28px, 8vw, 120px); }
.atb-section--light { background: var(--atb-light); }
.atb-section--navy  { background: var(--atb-navy); color: #fff; }
.atb-section--navy :where(h1,h2,h3,h4,p) { color: #fff; }

/* Abschnitts-Headline (gelb, Mockup) */
.atb-h2 {
  color: var(--atb-yellow) !important;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.atb-lead { max-width: 760px; margin-inline: auto; font-size: 1.05rem; }

/* Leistungen-Überschrift + Intro: linksbündig (Einrückung kommt aus der Sektions-padding) */
.atb-leist-head { text-align: left !important; }
.atb-lead.atb-leist-head { max-width: 640px; margin: 0 0 .4rem 0 !important; }

/* Hero */
.atb-hero { color: #fff; }
.atb-hero .wp-block-cover__inner-container { max-width: 900px; margin-inline: auto; }
.atb-hero h1 {
  color: var(--atb-yellow) !important;   /* Mockup: gelbe Hero-Headline */
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}
/* Hero: Abstand Headline -> Button verkleinern */
.atb-hero .wp-block-cover__inner-container > * { margin-block: 0; }
.atb-hero .wp-block-buttons { margin-top: 1.4rem; }

/* Hero-Hexagon-Button: REGELMÄSSIGER Hexagon (gleich lange Seiten).
   Pointy-Top regulär = Seitenverhältnis Breite:Höhe = √3:2 = 0.866. */
.atb-hero .wp-block-button.is-style-atb-hexagon > .wp-block-button__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 270px;
  aspect-ratio: 0.8660;
  min-height: 0;
  padding: 0 .2em;
  font-size: 2.2rem;         /* füllt den Hexagon */
  letter-spacing: 0;
  line-height: 1.1;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
          clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* =========================================================================
   Leistungs-Karussell — Mitte-Fokus (zentrierte Kachel groß, seitliche kleiner)
   ========================================================================= */
.atb-carousel { position: relative; margin-top: 2.4rem; }
.atb-carousel__track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 34px 0;                         /* Einrückung kommt aus der Sektion -> erste Kachel fluchtet mit der Überschrift */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.atb-carousel__track::-webkit-scrollbar { display: none; }

.atb-carousel__slide {
  flex: 0 0 360px;
  scroll-snap-align: center;
  transform: scale(0.82);            /* seitliche Kacheln kleiner */
  opacity: .8;
  transition: transform .3s ease, opacity .3s ease;
}
.atb-carousel__slide.is-center {
  transform: scale(1);               /* zentrierte Kachel groß */
  opacity: 1;
}

/* Kachel: Foto + navy Textbox (endet unter dem Text) */
.atb-tile2 { display: block; text-decoration: none; background: var(--atb-navy); }
.atb-tile2 .atb-tile2__img { display: block; }
.atb-tile2 .atb-tile2__img img { width: 100%; height: 220px; object-fit: cover; display: block; }
.atb-tile2 .atb-tile2__body { display: block; padding: 1.3rem 1.6rem 1.5rem; }
.atb-carousel__slide.is-center .atb-tile2 { box-shadow: 0 18px 42px rgba(0,0,0,.25); }
.atb-tile2 .atb-tile2__title { display: block; color: var(--atb-yellow); font-weight: 700; font-size: 1.2rem; margin-bottom: .4rem; }
.atb-tile2 .atb-tile2__text  { display: block; color: rgba(255,255,255,.88); margin-bottom: .7rem; }
.atb-tile2 .atb-more         { display: block; color: var(--atb-yellow); font-weight: 700; }
.atb-tile2:hover .atb-more   { text-decoration: underline; }

/* Pfeile */
.atb-carousel__arrow {
  position: absolute; top: 46%; transform: translateY(-50%); z-index: 6;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--atb-blue); color: #fff; font-size: 1.7rem; line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: background .15s ease;
}
.atb-carousel__arrow:hover { background: var(--atb-navy); }
.atb-carousel__arrow--prev { left: 6px; }
.atb-carousel__arrow--next { right: 6px; }

/* Intro der Kennzahlen-Sektion: schmaler (mehrzeilig wie Mockup), linksbündig, Abstand zu den Zahlen */
.atb-section--navy .atb-intro { max-width: 760px; margin: 0 auto 3rem 0 !important; }

/* Kennzahlen — horizontal zentriert, kleines Präfix (ISO/UL) über der Zahl */
.atb-stat { text-align: center; }
.atb-stat__pre {
  display: block; color: var(--atb-yellow); font-weight: 700;
  font-size: 1.15rem; line-height: 1.2; height: 1.45rem;   /* reserviert Platz, damit alle Zahlen auf gleicher Höhe stehen */
}
.atb-stat__num {
  display: block; color: var(--atb-yellow); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1;
}
.atb-stat__lbl { display: block; color: #fff; font-weight: 700; margin-top: .5rem; }
/* Mengen (34/45): einblenden + hochzählen (nur bei aktivem JS) */
.atb-stat.is-anim { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.atb-stat.is-anim.is-in { opacity: 1; transform: none; }
/* Zertifizierungen (ISO 9001 / UL 508A): horizontale Drehbewegung statt Hochzählen */
.atb-stat.is-prehide { opacity: 0; }
.atb-stat.is-flip { animation: atb-flip-in .9s cubic-bezier(.2,.7,.3,1) both; transform-origin: center; }
@keyframes atb-flip-in {
  0%   { opacity: 0; transform: perspective(900px) rotateY(-360deg); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: perspective(900px) rotateY(0deg); }
}

/* =========================================================================
   Geschäftsführer-Zitat — weiße Box, Foto links davor (überlappend), mit Rand
   ========================================================================= */
.atb-section--gf {
  background: #ededed;
  padding: 0;                        /* kein Außenrand -> Foto schließt bündig ab */
  overflow: hidden;
}
.atb-gf { position: relative; }
/* Foto: bündig links & unten, größer (Anzug reicht bis zur Kante) */
.atb-gf__photo {
  position: absolute; left: 0; bottom: 0;
  width: clamp(300px, 34vw, 470px);
  height: 100%;
  z-index: 2;
}
.atb-gf__photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom; display: block;
  transform: scaleX(-1);            /* spiegeln: Blickrichtung zum Text */
}
/* Text rechts vom Foto, vertikal zentriert */
.atb-gf__card {
  margin-left: clamp(300px, 34vw, 470px);
  min-height: clamp(470px, 46vw, 600px);
  display: flex; flex-direction: column; justify-content: center;
  /* Text etwas weiter links -> kleineres links-, größeres rechts-Padding */
  padding: clamp(2.5rem,5vw,4rem) clamp(4rem,11vw,10rem) clamp(2.5rem,5vw,4rem) clamp(2rem,4vw,3.5rem);
  text-align: center;
  position: relative; z-index: 1;
}
.atb-gf__title {
  color: var(--atb-yellow); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.2; margin: 0 0 1.5rem;
}
.atb-gf__quote {
  color: var(--atb-navy);
  font-size: clamp(1.1rem, 1.55vw, 1.35rem); line-height: 1.65; margin: 0 0 1.4rem;
}
.atb-gf__sign {                       /* echte Unterschrift (PNG aus PDF) */
  display: block; width: clamp(180px, 24vw, 260px); height: auto;
  margin: .3rem auto .2rem;
}
.atb-gf__name { color: var(--atb-navy); font-weight: 700; font-size: 1.1rem; margin: 0; }

@media (max-width: 860px) {
  .atb-gf__photo { position: static; width: 100%; height: 320px; }
  .atb-gf__card { margin-left: 0; padding-left: clamp(1.5rem,5vw,2.5rem); padding-right: clamp(1.5rem,5vw,2.5rem); min-height: 0; }
}

/* Blocksy-Footer raus -> eigener Footer (functions.php, wp_footer) */
.ct-footer { display: none !important; }

/* =========================================================================
   Eigener ATB-Footer — 3 Spalten + untere Leiste (Copyright + Rechtstexte)
   ========================================================================= */
.atb-foot { background: var(--atb-navy); color: #fff; }
.atb-foot__in {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(44px, 6vw, 72px) clamp(28px, 8vw, 120px) clamp(20px, 3vw, 34px);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(30px, 5vw, 72px);
}
.atb-foot__h {
  color: var(--atb-yellow); font-size: 1.02rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin: 0 0 1.1rem;
}
.atb-foot p, .atb-foot__addr {
  color: #d7dde7; font-style: normal; line-height: 1.7; font-size: .98rem; margin: 0; max-width: 42ch;
}
.atb-foot__addr a { color: #d7dde7; text-decoration: none; }
.atb-foot__addr a:hover { color: var(--atb-yellow); }
.atb-foot__social { display: flex; gap: 14px; }
.atb-foot__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: var(--atb-navy);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.atb-foot__social a:hover { background: var(--atb-yellow); transform: translateY(-2px); }
.atb-foot__bar {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(16px, 2.4vw, 22px) clamp(28px, 8vw, 120px) clamp(28px, 4vw, 46px);
  border-top: 1px solid rgba(255,255,255,.13);
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
}
.atb-foot__copy { color: #aeb8c7; font-size: .92rem; }
.atb-foot__legal { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.atb-foot__legal a { color: #d7dde7; text-decoration: none; font-size: .92rem; }
.atb-foot__legal a:hover { color: var(--atb-yellow); }

@media (max-width: 820px) {
  .atb-foot__in { grid-template-columns: 1fr; gap: 32px; }
  .atb-foot__bar { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   CTA-Abschluss — animierte Welle (navy/blau/gelb) + Hexagon „Projekt anfragen"
   ========================================================================= */
.atb-section--cta { padding: 0 !important; background: #ffffff; }
.atb-cta {
  position: relative;
  min-height: clamp(300px, 32vw, 420px);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* Wellenband mittig -> weiße Ränder oben & unten; nur die Farbbänder weben */
.atb-cta__waves {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: clamp(150px, 17vw, 220px);
  z-index: 0; pointer-events: none;
}
.atb-wave {
  position: absolute; inset: 0;
  width: 200%;                       /* 2 Wellenlängen -> nahtloser Loop bei -50% */
  will-change: transform;
}
.atb-wave path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.atb-wave--back  { animation: atb-wave-move 21s linear infinite; }
.atb-wave--mid   { animation: atb-wave-move 15s linear infinite reverse; animation-delay: -4s; }
.atb-wave--front { animation: atb-wave-move 11s linear infinite; animation-delay: -2s; }
@keyframes atb-wave-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.atb-cta__btn {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 270px; aspect-ratio: 0.8660;
  background: var(--atb-blue); color: #fff;
  font-weight: 700; font-size: 2.2rem; line-height: 1.1; text-transform: uppercase;
  text-decoration: none;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
          clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: filter .15s ease, transform .15s ease;
}
.atb-cta__btn:hover { filter: brightness(1.08); transform: translateY(-2px); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .atb-wave { animation: none !important; }
}

/* Startseite full-width: #main-container ist auf die Site-Breite gedeckelt UND hat
   overflow:clip -> es beschneidet die alignfull-Sektionen auf breiten Screens.
   Deckelung aufheben, dann reichen die Sektionen bis zum Viewport-Rand. */
.home #main-container,
.home .site-main,
.home .ct-container-full,
.home article.page,
.home article.page > .entry-content {
  max-width: 100% !important;
  width: 100% !important;
}
/* alignfull-Sektionen füllen die nun volle Breite (Blocksys -20px-Ausbruch zurücksetzen) */
.home .entry-content > .alignfull { margin-left: 0 !important; margin-right: 0 !important; }
