/*
Theme Name: webkonditorei
Author: webkonditorei
Author URI: https://webkonditorei.de/
Theme URI: https://webkonditorei.de/
Tags: full-site-editing, block-patterns
Text Domain: webkonditorei
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 1.0.7

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
html {
  scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    font-size: 17px;
  }
}

body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

ul {
  padding-left: 1em;
}

.nomarg p {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.wp-block-list {
  padding-left: 1.2em !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}


:root :where(.is-layout-constrained) > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.wp-block-group,
.wp-block-columns {
  scroll-margin-top: 150px;
}

/* Load Font */

@font-face {
  font-family: "Lab Grotesque";
  src: url("./assets/fonts/lab-grotesque/LabGrotesque-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Lab Grotesque";
  src: url("./assets/fonts/lab-grotesque/LabGrotesque-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Lab Grotesque";
  src: url("./assets/fonts/lab-grotesque/LabGrotesque-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Lab Grotesque";
  src: url("./assets/fonts/lab-grotesque/LabGrotesque-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}


/* Header */

/* =========================
   Header & Sticky Behavior
   ========================= */

.site-header {
  z-index: 999 !important;
  position: relative;
}

/* Footer */

footer {
  margin-top: 0;
}

.footer-nav a {
  font-weight: 400 !important;
}

.w-full {
  width: 100%;
}

/* GSAP Presets */

.fade-in-up {
  opacity: 0;
  transform: translateY(15px);
}

.fade-in {
  opacity: 0;
}

.zoom-in {
  opacity: 0;
  scale: 0.9;
}

/* Startzustand komplett verdeckt (oberer Inset 100% = nichts sichtbar);
   die eigentliche Animation (Aufdecken von unten nach oben) läuft in
   assets/js/gsapAnimationPresets.js. */
.mask-reveal {
  clip-path: inset(100% 0% 0% 0%);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }

  .zoom-in {
    opacity: 1 !important;
    scale: 1 !important;
  }

  .mask-reveal {
    clip-path: none !important;
  }
}

 

/* Layouts */


/* Hero Section */

@media(max-width:850px) {
  .hero-section > .content-wrapper {
    flex-wrap: wrap;
    padding: 0!important;
  }

     .hero-section>.content-wrapper > div {
       flex-basis: 100%;
     }

     .hero-section>.content-wrapper>.content-left {
      padding: 50px 20px;
     }

         .hero-section>.content-wrapper>.content-left .wp-block-button {
          width: 100%;
         }

         .hero-section .wp-block-button.is-style-underline {
          width: auto!important ;
         }
}


/* Services Grid */

.services-grid {
  align-items: flex-start;
}


@media(max-width:830px) {
  .services-grid > .title-wrapper, .services-grid > .services-wrapper, .icon-grid-horizontal > .title-wrapper, .icon-grid-horizontal > .services-wrapper {
    grid-column: span 12;
  }

    .services-grid>.title-wrapper {
      position: relative;
    }
}

/* Projects Slider */

.projects-slider-wrapper .wk-query-slider__controls {
  padding: 20px;
}

.projects-slider-wrapper .swiper-wrapper > li {
  padding: 0 20px;
}


/* Image + Text */

@media(max-width:780px) {
  .image-and-text {
    flex-wrap: wrap!important;
  }

    .image-and-text > div {
      flex-basis: 100%;
    }
}

/* Sqaure Item */

.sqaure-item-wrapper {
  position: relative;
}

.square-item {
  width: 70px;
  height: 80px;
  position: absolute;
  top: 0;
  right: 0;
}


/* Kachel Zahlen Section */

@media(max-width:930px) {
  .tile-numbers-section {
    flex-wrap: wrap!important;
  }

  .tile-numbers-section > div {
    flex-basis: 100%;
  }

    .tile-numbers-section .content-wrapper {
      order: 2;
      padding: 40px!important;
    }
}

/* Case Study Section */

.facts-background {
  align-items: flex-end;
}

.facts-grid {
  align-items: flex-end;
}

@media(max-width:990px) {
  .case-study-wrapper {
    flex-wrap: wrap!important;
  }

  .case-study-wrapper > div {
    flex-basis: 100%;
  }

    .case-study-wrapper .content-wrapper {
      padding: 40px!important;
      order: 2;
    }

   

 
}

/* Scroll to top */

#scrolltotop {
  background: none;
  padding: 0;
  border: none;
  cursor: pointer;
  position: fixed;
  bottom: -60px;
  right: 20px;
  z-index: 99;
  transition: all cubic-bezier(0.76, 0, 0.24, 1) 0.3s;
}

#scrolltotop.scroll-to-top-active {
  bottom: 20px !important;
}


/* Spacer */

.wp-block-spacer.is-style-xxs {
  height: 8px !important;
}

.wp-block-spacer.is-style-xs {
  height: 16px !important;
}

.wp-block-spacer.is-style-s {
  height: 50px !important;
}

.wp-block-spacer.is-style-m {
  height: 80px !important;
}

.wp-block-spacer.is-style-l {
  height: 120px !important;
}

.wp-block-spacer.is-style-xl {
  height: 180px !important;
}

.wp-block-spacer.is-style-xxl {
  height: 240px !important;
}

@media (max-width: 767px) {
  .wp-block-spacer.is-style-xxs {
    height: 6px !important;
  }

  .wp-block-spacer.is-style-xs {
    height: 12px !important;
  }

  .wp-block-spacer.is-style-s {
    height: 30px !important;
  }

  .wp-block-spacer.is-style-m {
    height: 50px !important;
  }

  .wp-block-spacer.is-style-l {
    height: 70px !important;
  }

  .wp-block-spacer.is-style-xl {
    height: 100px !important;
  }

  .wp-block-spacer.is-style-xxl {
    height: 140px !important;
  }
}

/* Columns Block extension */

@media (max-width: 769px) {
  .wp-block-columns.is-style-reverse-mobile {
    flex-direction: column-reverse;
  }
}

/* Quadrate Block Styles */

.squares-wrapper {
  position: relative;
}

.top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.bottom-left {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
}

/* CTA Section */

.cta-container {
  position: relative;
  padding-right: 90px!important;
}

.cta-container::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 40px;
  bottom: 0;
  right: 0;
  background-color: #fff;
}

.cta-container::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 25px;
  bottom: 40px;
  right: 0;
  background-color: #fff;
}


/* Border Boxes Grid */

.border-boxes-grid > div, .border-boxes-grid-bottom>div {

margin-left: -1px!important;
margin-top: -1px !important;
}


.border-boxes-grid-bottom {
  align-items: flex-end;
}

@media(max-width:980px) {
  .border-boxes-grid-bottom {
grid-template-columns: repeat(1, minmax(0, 1fr))!important;
  }

     .border-boxes-grid-bottom > div {
      min-height: 0!important;
     }
}


.image-slider img {
  max-height: 600px !important;
  width: auto !important;
}

@media(max-width:550px) {
  .image-slider img {
    height: 300px !important;
    width: auto !important;
  }
}


/* Sqaure Item */

.square-content-wrapper {
  position: relative;
  width: 100px;
  height: 125px;
}

.square-content-wrapper::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 45px;
  z-index: 10;
  top: 0;
  left: 0;
  background-color: var(--wp--preset--color--contrast);
}

/* Form */

.wpforms-field-label {
  font-weight: 500 !important;
}

.wpforms-submit-container {
  display: flex;
  justify-content: flex-end;
}

.wpforms-submit {
  border-radius: var(--wp--custom--radius--button) !important;
}

.wpforms-confirmation-scroll {
  background-color: var(--wp--preset--color--contrast) !important;
  border: none !important;
  padding: 30px !important;
}

.wpforms-confirmation-scroll p {
  color: var(--wp--preset--color--base) !important;
}

/* Image Block extension */

.wp-block-image.is-style-full-width img,
.wp-block-image.is-style-full-width {
  width: 100% !important;
  height: auto !important;
  display: flex !important;
}

/* List Block extension: "Quadrat-Liste" (register_block_style() in
   functions.php). No native bullets/numbers — each <li> gets a small
   square marker (gelb, from theme.json) via ::before instead, laid out
   as a flex column with more breathing room between items than the
   default list. */
.wp-block-list.is-style-square-list {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--12);
  list-style: none;
  padding-left: 0 !important;
}

.wp-block-list.is-style-square-list > li {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--12);
}

.wp-block-list.is-style-square-list > li::before {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-color: var(--wp--preset--color--gelb);
}

/* Animated Squares Block (webkonditorei/animated-squares).
   Desktop width comes in as --wk-squares-width (inline per-block, see
   render.php); the SVG scales to that width and its height follows
   automatically via the viewBox ratio. Below 600px, scale the whole thing
   down a bit relative to that same desktop value — 0.85 is a starting
   point, easy to tweak (try 0.8/0.9) by just changing this one factor.
   Entrance animation lives in blocks/animated-squares/view.js (GSAP). */

.wk-animated-squares {
  display: inline-block;
  width: var(--wk-squares-width);
  max-width: 100%;
}

@media (max-width: 600px) {
  .wk-animated-squares {
    width: calc(var(--wk-squares-width) * 0.7);
  }
}

.wk-animated-squares__svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Image Marquee Grid Block (webkonditorei/image-marquee-grid).
   .wk-marquee-grid is the "mask": overflow:hidden clips everything to a
   clean rectangle regardless of what happens inside. Width comes from
   --wk-marquee-width (inline per-block, see render.php), capped by
   max-width:100% so it can never cause horizontal page overflow on
   narrow screens — height is deliberately NOT a fixed px value but
   aspect-ratio driven off --wk-marquee-w-ratio/-h-ratio (the same
   width/height numbers), so when max-width shrinks the box on mobile the
   height scales down proportionally with it instead of staying at the
   desktop value (which would either overflow or look squished/cropped).
   .wk-marquee-grid__inner is deliberately oversized (inset:-20%, i.e. 20%
   bigger than the frame on every side) and rotated — the overscan is what
   stops that rotation from ever revealing empty corners inside the frame.
   Each row underneath is the same doubled-track endless-scroll technique
   as before, just nested here instead of standing alone; the loop math
   itself lives in blocks/image-marquee-grid/view.js (GSAP), keyed off
   each row's own data-direction/data-speed. The one flat image pool the
   block collects gets split across the rows server-side, see
   webkonditorei_distribute_marquee_images() in image-marquee-grid.php. */
.wk-marquee-grid {
  position: relative;
  overflow: hidden;
  width: var(--wk-marquee-width);
  max-width: 100%;
  aspect-ratio: var(--wk-marquee-w-ratio) / var(--wk-marquee-h-ratio);
}

.wk-marquee-grid__inner {
  position: absolute;
  inset: -20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-origin: center;
}

.wk-marquee-grid__row {
  overflow: hidden;
  width: 100%;
}

.wk-marquee-grid__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: var(--wk-marquee-gap, 20px);
}

.wk-marquee-grid__image {
  height: var(--wk-marquee-image-height, 150px);
  width: auto;
  flex-shrink: 0;
  max-width: none;
}

/* Optionaler Mobile-Override für die Bildhöhe (--wk-marquee-image-height-mobile,
   siehe render.php) — kommt nur an, wenn im Inspector gesetzt (>0); sonst
   fällt var() einfach auf den Desktop-Wert zurück, kein Sonderfall nötig. */
@media (max-width: 600px) {
  .wk-marquee-grid__image {
    height: var(--wk-marquee-image-height-mobile, var(--wk-marquee-image-height, 150px));
  }
}

/* Button Block extension: "Gefüllt" / "Unterstrichen" variants.
   "Gefüllt" needs no extra color/background rules since it's just the
   button element's own default look (see theme.json styles.elements.button).
   "Unterstrichen" gets its look here: no background, no border, no real
   text-decoration — instead a ::after line that hugs the text.
   Deliberately NOT positioned via left/right insets matched to a padding
   token: that only lined up as long as the button's padding actually was
   that value, and broke (line landing over the text, or elsewhere) for
   any button with different/no padding (Dimensions > Padding is a normal
   per-block override on core/button). Padding-agnostic instead: the link
   becomes a column flex container with the text as one row and the line
   as a second row sized to width:100%. Since the link is inline-flex
   (shrinks to fit its content) and align-items:center normally sizes
   flex-column children to their own content, width:100% on the line
   resolves against that shrunk-to-content box — which is exactly the
   text's own rendered width, no matter how much (or how little) padding
   the button has. */

.wp-block-button.is-style-underline .wp-block-button__link,
.project-cta {
  flex-direction: column;
  background: transparent;
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}

/* .project-cta ist kein .wp-block-button__link (kein Button-Block, z.B.
   der "Weiterlesen"-Link im Query-Grid) — braucht deshalb selbst
   display:inline-flex/align-items, statt das aus der Button-Sammelregel
   weiter unten zu erben (die auch den "Button wächst leicht"-Hover
   mitbringt, den hier niemand wollte). */
.project-cta {
  display: inline-flex;
  align-items: center;
}

.wp-block-button.is-style-underline .wp-block-button__link::after,
.project-cta::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: var(--wp--preset--spacing--4);
  background-color: currentColor;
  transform: scaleX(1);
  transition: transform 0.2s ease;
}

.wp-block-button.is-style-underline .wp-block-button__link:hover::after,
.project-cta:hover::after {
  transform: scaleX(0.5);
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-button.is-style-underline .wp-block-button__link::after,
  .project-cta::after {
    transition: none;
  }
}

.wp-block-button__link,
.wp-block-button.is-style-underline .wp-block-button__link,
.nav-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

/* Subtle hover: button grows slightly. */
.wp-block-button__link:hover,
.wp-block-button.is-style-underline .wp-block-button__link:hover,
.nav-menu-button:hover {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
   .wp-block-button__link:hover,
  .wp-block-button.is-style-underline .wp-block-button__link:hover,
  .nav-menu-button:hover {
    transform: none;
  }
}

/* Nav menu item rendered "as button" (checkbox in Design > Menüs).
   Fill button's look, but coded explicitly since a plain nav <a> doesn't
   inherit theme.json's button element styles the way core/button does. */
.nav-menu-button {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base) !important;
  border-radius: var(--wp--custom--radius--button);
  padding: var(--wp--preset--spacing--8) var(--wp--preset--spacing--12);
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap;
}


/* -----------------------------------------
   Popup
----------------------------------------- */

.webkonditorei-popup-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--wp--preset--color--primary) 60%, transparent);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  /* 30px each side → 9.5px spare beyond the button's 20.5px protrusion */
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.webkonditorei-popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Card is the positioning context for the close button.
   overflow: visible so the button isn't clipped; only .webkonditorei-popup-content scrolls. */
.webkonditorei-popup-card {
  position: relative;
  overflow: visible;
  background: var(--wp--preset--color--base);
  border-radius: var(--wp--custom--radius--card);
  padding: 50px;
  max-width: 720px;
  width: 100%;
  transform: scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.webkonditorei-popup-overlay.is-visible .webkonditorei-popup-card {
  transform: scale(1);
}

.webkonditorei-popup-content {
  max-height: 450px;
  overflow-y: auto;
  scrollbar-color: var(--wp--preset--color--primary) transparent;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.webkonditorei-popup-content::-webkit-scrollbar {
  width: 6px;
}

.webkonditorei-popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.webkonditorei-popup-content::-webkit-scrollbar-thumb {
  background: var(--wp--preset--color--primary);
  border-radius: 3px;
}

.webkonditorei-popup-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  width: 41px;
  height: 41px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.webkonditorei-popup-close circle {
  fill: var(--wp--preset--color--primary);
  transition: fill 0.15s ease;
}

.webkonditorei-popup-close path {
  fill: var(--wp--preset--color--base);
}

.webkonditorei-popup-close:hover circle {
  fill: var(--wp--preset--color--contrast);
}

.webkonditorei-popup-content>*:first-child {
  margin-top: 0;
}

.webkonditorei-popup-content>*:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .webkonditorei-popup-overlay {
    /* flex-start + margin:auto on card = centered when fits, top-aligned when overflowing */
    align-items: flex-start;
    overflow-y: auto;
    padding: 30px 16px;
  }

  .webkonditorei-popup-card {
    padding: 32px 24px;
    margin: auto 0;
  }

  .webkonditorei-popup-content {
    max-height: none;
  }

  /* button sticks above card but stays within horizontal bounds */
  .webkonditorei-popup-close {
    transform: translateY(-50%);
  }
}

/* -----------------------------------------
   Query-Loop-Block: "Als Slider darstellen"
   Markup entsteht serverseitig (siehe functions.php,
   render_block_core/post-template), initialisiert wird in
   assets/js/query-slider-frontend.js. Swipers eigene
   .swiper-button-prev/next werden bewusst NICHT benutzt: die Buttons
   sitzen unterhalb des Sliders und damit außerhalb des .swiper-
   Containers (der overflow:hidden hat) — sie werden Swiper nur als
   navigation.prevEl/nextEl übergeben.
   Klassen-/Data-Attribut-Präfix ist bewusst "wk-" statt "webkonditorei-",
   damit diese Datei themenübergreifend unverändert übernommen werden
   kann (siehe query-exclude-current-post-Feature). Nutzt "primary" statt
   "accent" als Farb-Token, weil dieses Basistheme keine eigene Akzent-
   farbe hat — Projekte mit eigener Farbpalette (z.B. eurobahn) können
   hier gern "accent" verwenden. Icon-Box 12×11 statt 14×9, weil das
   arrow-right.svg dieses Themes 17×16 statt 21×13.5 misst. */

/* Klassischer Flex-/Grid-Verschachtelungsbug: ein Flex-Item hat per Default
   min-width:auto, d.h. es weigert sich, unter die intrinsische Breite
   seines Inhalts zu schrumpfen. Steckt der Query-Loop-Block in einer Row
   oder einem Grid, würde der (breite, nowrap) Slider-Inhalt sonst die
   ganze Zeile ins Unermessliche aufblähen. Unabhängig vom Slider-Modus
   gesetzt, damit jeder Query-Loop-Block das sicher übersteht. */
.wp-block-query {
  min-width: 0;
}

.wk-query-slider {
  position: relative;
  min-width: 0;
  /* Beim Query-Loop bleibt core/querys eigener Wrapper unangetastet und
     bringt seine Breite von selbst mit; beim Group/Grid-Slider ERSETZT
     dieser Div genau dieses Element (siehe render_block_core/group in
     functions.php) — ohne explizites width kann er je nach umgebendem
     Layout (z.B. ein Flex-/Grid-Elternblock) auf reine Inhaltsbreite
     schrumpfen. Dann rechnet z.B. die Progressbar-Pagination ihr eigenes
     width:100% gegen so gut wie nichts, statt gegen die volle Slider-
     Breite (sichtbares Symptom: Balken bleibt unsichtbar/winzig, obwohl
     Swiper selbst intern schon den richtigen Fortschritt berechnet). */
  width: 100%;
}

/* Das <ul> ist gleichzeitig .wp-block-post-template und .swiper-wrapper.
   Hier wird das Core-Layout (Flow-Margins, is-flex-container, Grid)
   plattgemacht, damit daraus eine einzelne, nicht umbrechende Flex-Reihe
   wird. Kein "gap: 0" per CSS — der Wert wird vom Init-JS ausgelesen und
   erst danach am Element genullt (sonst wäre er nicht mehr messbar).
   "height: auto" überschreibt bewusst Swipers eigenes ".swiper-wrapper
   { height: 100% }" aus swiper-bundle.css — das würde sich sonst gegen
   die auto-Höhe von .swiper auflösen müssen (Prozent-Höhe gegen
   unbestimmten Elternhöhe), was in der Praxis zu abgeschnittenem
   Karteninhalt unterhalb des Bildes führte. */
.wk-query-slider .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  align-items: stretch;
  height: auto;
  min-width: 0;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.wk-query-slider .swiper {
  min-width: 0;
  height: auto;
}

.wk-query-slider .swiper-slide {
  height: auto; /* gleich hohe Karten */
  box-sizing: border-box;
}

/* Einheitliche Kartenhöhe (per height:100% auf die Karten-Gruppe) ist
   erstmal wieder raus: bei tief verschachtelten Stack-Gruppen hat das den
   Karteninhalt zerlegt (Textblock landete außerhalb seiner Position statt
   unter dem Bild) — noch nicht restlos geklärt warum, vermutlich eine
   Wechselwirkung aus verschachteltem is-layout-flex + aspect-ratio-Bild +
   height:100%-Kaskade. .swiper-wrapper's align-items:stretch (s.o.) sorgt
   weiterhin dafür, dass jede .swiper-slide auf die Höhe der höchsten Karte
   gebracht wird — nur der Karteninhalt selbst füllt diese Höhe jetzt nicht
   mehr zwangsweise aus, sondern bleibt bei seiner natürlichen Höhe
   (oben ausgerichtet statt ggf. bündig unten). */

/* Vor der Swiper-Init hätten die Slides noch keine Breite und würden
   für einen Frame gestaucht — daher grobe Fallback-Breiten passend zu
   den Breakpoints im Init-JS. */
.wk-query-slider .swiper:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 auto;
  width: 86%;
}

@media (min-width: 600px) {
  .wk-query-slider .swiper:not(.swiper-initialized) .swiper-slide {
    width: 45%;
  }
}

@media (min-width: 1024px) {
  .wk-query-slider .swiper:not(.swiper-initialized) .swiper-slide {
    width: 41%;
  }
}

/* "Endlos-Scroll (Marquee)"-Option (data-wk-slider-marquee, siehe
   functions.php/query-slider-frontend.js): Karten behalten ihre natürliche
   Breite statt der Fallback-/Breakpoint-Breiten oben — Swiper übernimmt das
   nach der Init ohnehin selbst per Inline-Style (slidesPerView: 'auto'),
   das hier deckt nur den kurzen Moment vor der Init ab. linear statt
   Swipers Default-Easing, damit die Bewegung gleichmäßig statt mit
   Beschleunigen/Abbremsen pro Schritt wirkt. */
.wk-query-slider[data-wk-slider-marquee] .swiper-slide {
  width: auto;
  flex-shrink: 0;
}

.wk-query-slider[data-wk-slider-marquee] .swiper-wrapper {
  transition-timing-function: linear !important;
}

/* Bewusst rein passiv: der Marquee läuft nur automatisch durch, keinerlei
   Drag/Klick/Touch-Interaktion (auch nicht versehentlich, z.B. Textmarkierung
   oder Bild-Ziehen) — siehe auch allowTouchMove:false in
   query-slider-frontend.js. */
.wk-query-slider[data-wk-slider-marquee] .swiper {
  pointer-events: none;
}

/* "Rechts randlos"-Option (data-wk-slider-bleed-right): das eigentliche
   Links-Ausfaden passiert NICHT hier per CSS-Maske (sah wie ein statischer
   Verlauf über allem aus, auch über der ruhenden ersten Karte), sondern in
   query-slider-frontend.js als echtes Opacity-Fade pro Slide, synchron zur
   Swiper-Transition. Siehe applyLeftFade() dort. */

/* Pagination + Pfeile laufen immer in EINER gemeinsamen Zeile statt zwei
   gestapelten Blöcken (siehe .wk-query-slider__controls-Wrapper in
   webkonditorei_build_slider_markup()): Pagination nimmt den verfügbaren
   Platz, Pfeile bleiben rechts daneben. */
.wk-query-slider__controls {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--20);
  margin-top: var(--wp--preset--spacing--20);
}

/* Navigation: gleiche Icon-Technik wie bei den Pfeil-Button-Varianten
   oben — arrow-right.svg als mask + currentColor, die Links-Variante
   per scaleX(-1) statt zweitem SVG. */
.wk-query-slider__nav {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: var(--wp--preset--spacing--8);
}

/* --wk-slider-arrow-color/--wk-slider-arrow-bg-color kommen optional als
   Inline-Custom-Properties vom Wrapper (siehe webkonditorei_build_slider_markup()
   in functions.php, gesetzt über die "Pfeile"-Farbauswahl im Inspector);
   ungesetzt greift wie bisher die Theme-Akzentfarbe bzw. transparent. */
.wk-query-slider__button {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--wk-slider-arrow-bg-color, transparent);
  color: var(--wk-slider-arrow-color, var(--wp--preset--color--primary));
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.wk-query-slider__button::after {
  content: "";
  display: block;
  width: 12px;
  height: 11px;
  background-color: currentColor;
  -webkit-mask: url("./assets/svg/arrow-right.svg") no-repeat center / contain;
  mask: url("./assets/svg/arrow-right.svg") no-repeat center / contain;
}

.wk-query-slider__button--prev::after {
  transform: scaleX(-1);
}

/* Kein Umrandungs-/Farbwechsel mehr am Hover, nur ein dezentes Skalieren. */
.wk-query-slider__button:hover {
  transform: scale(1.1);
}

/* Swiper hängt seine Zustandsklassen auch an Buttons, die es nur über
   navigation.prevEl/nextEl kennt. .swiper-button-lock (= nichts zu sliden)
   ist über swiper-bundle.css schon display:none. */
.wk-query-slider__button.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wk-query-slider__button {
    transition: none;
  }

  .wk-query-slider__button:hover {
    transform: none;
  }
}

/* Pagination, optionale Slider-Option mit wählbarem Stil (siehe
   assets/js/slider-controls.js / query-slider-frontend.js: 'bullets'
   (Punkte, Standard), 'fraction' (Bruchzahl) oder 'progressbar'
   (Fortschrittsbalken)). Swiper befüllt .wk-query-slider__pagination je
   nach Stil selbst mit den passenden Kind-Elementen, hier wird nur deren
   Optik gesetzt. --wk-slider-pagination-color kommt optional als Inline-
   Custom-Property vom Wrapper (siehe webkonditorei_build_slider_markup()),
   ungesetzt greift wie bisher die Theme-Akzentfarbe. */
.wk-query-slider__pagination {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  align-items: center;
  gap: var(--wp--preset--spacing--8);
}

/* Stil "bullets". --wk-slider-pagination-bg-color (inaktive Punkte) und
   --wk-slider-pagination-color (aktiver Punkt) kommen optional als
   Inline-Custom-Properties vom Wrapper, siehe webkonditorei_build_slider_markup(). */
.wk-query-slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0;
  opacity: 1;
  background: var(--wk-slider-pagination-bg-color, var(--wp--preset--color--contrast));
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wk-query-slider .swiper-pagination-bullet-active {
  background: var(--wk-slider-pagination-color, var(--wp--preset--color--primary));
  transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  .wk-query-slider .swiper-pagination-bullet {
    transition: none;
  }
}

/* Stil "fraction" (z.B. "2 / 5") */
.wk-query-slider .swiper-pagination-fraction {
  width: auto;
  font-family: var(--wp--preset--font-family--system);
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wk-slider-pagination-color, var(--wp--preset--color--primary));
}

/* Stil "progressbar". --wk-slider-pagination-bg-color (Lauf-Schiene) und
   --wk-slider-pagination-color (Füllung) kommen optional als
   Inline-Custom-Properties vom Wrapper, siehe webkonditorei_build_slider_markup(). */
.wk-query-slider .swiper-pagination-progressbar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--wk-slider-pagination-bg-color, var(--wp--preset--color--contrast));
  overflow: hidden;
}

.wk-query-slider .swiper-pagination-progressbar-fill {
  background: var(--wk-slider-pagination-color, var(--wp--preset--color--primary));
}


/* FAQ Item */

.faq-item {
  /* Rundum-Rand ums ganze Item — bleibt bewusst kompakt: das ist der
     Abstand, den man auch im geschlossenen Zustand sieht (nur Titel +
     etwas Luft). Der Abstand zwischen Titel und Inhalt kommt NICHT von
     hier, sondern separat unten vom Panel-Inhalt selbst — sonst müsste
     dieser eine Wert für beides gleichzeitig reichen (kompaktes
     Zu-Padding UND großzügiger Titel↔Inhalt-Abstand), was sich
     gegenseitig ausschließt. */
  padding: 25px;
}

/* Abstand Titel ↔ Inhalt. An .is-open gebunden statt generell auf dem
   Panel-Kind zu sitzen: grid-template-rows:0fr drückt die Zeile zwar
   rechnerisch auf 0, aber das padding-top des Kindes blieb trotzdem
   sichtbar (kein verlässlicher Weg, es allein übers Kollabieren zu
   verstecken) — dadurch war im geschlossenen Zustand ein zusätzlicher,
   unerwünschter 20px-Abstand da. An .is-open gebunden kann es im Zu-Zustand
   gar nicht erst gerendert werden, unabhängig vom Grid-Verhalten.
   Eigene transition + dieselbe Dauer/Easing wie das Panel selbst, sonst
   springt das Padding instant beim Klassenwechsel, während die Höhe
   sanft animiert — beides läuft jetzt synchron. */
.wp-block-accordion-panel>*:first-child {
  padding-top: 0;
  transition: padding-top 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.wp-block-accordion-item.is-open .wp-block-accordion-panel>*:first-child {
  padding-top: 20px;
}

.wp-block-accordion-heading__toggle {
  padding: 0;
}

.wp-block-accordion-heading__toggle>span {
  text-decoration: none !important;
}

.wp-block-accordion-heading__toggle-icon::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  background-image: url('/wp-content/themes/webkonditorei/assets/svg/plus-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: var(--wp--preset--color--contrast);
}


.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
  transform: rotate(45deg) !important;
}





/* WordPress Core Accordion – height + fade transition */

.wp-block-accordion-panel {
  display: grid !important;
  grid-template-rows: 0fr;
  margin-block-start: 0!important;
  /* Falls im Panel mehr als ein direktes Kind landet (z.B. zwei Absätze
     statt einem): ohne das hier bekommt nur die erste (explizite) Reihe
     die 0fr/1fr-Animation, jede weitere landet in einer impliziten Reihe
     mit grid-auto-rows: auto und poppt ohne Übergang rein/raus — meist
     genau der Grund, warum sich sowas "nicht smooth" anfühlt. */
  grid-auto-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  will-change: grid-template-rows, grid-auto-rows, opacity;
  transition: grid-template-rows 0.4s cubic-bezier(0.76, 0, 0.24, 1),
    grid-auto-rows 0.4s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.3s ease;
}

.wp-block-accordion-panel>* {
  min-height: 0;
  overflow: hidden;
}

.wp-block-accordion-item.is-open .wp-block-accordion-panel {
  grid-template-rows: 1fr;
  grid-auto-rows: 1fr;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-accordion-panel,
  .wp-block-accordion-panel>*:first-child {
    transition: none;
  }
}

/* -----------------------------------------
   Sticky Auto-Hide Header
   -----------------------------------------
   Steuerung (welche Klassen wann gesetzt werden) läuft komplett über
   main.js. Bis zur eigenen Höhe bleibt der Header im normalen
   Dokumentfluss (Layout beim ersten Laden unverändert); erst danach
   bekommt er site-header--fixed und wird zu position:fixed. Das
   body-padding gleicht in dem Moment die wegfallende Flow-Höhe aus, damit
   der Content nicht springt — die Höhe kommt live aus main.js über
   --wk-header-height. site-header--hidden schiebt ihn per transform beim
   Runterscrollen aus dem Bild, ohne die fixed-Position zu verlassen. */
#sticky-site-header {
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1), background-color 0.35s ease, box-shadow 0.35s ease;
}

#sticky-site-header.site-header--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  /* Transparenter Hintergrund funktioniert nur, solange der Header noch
     im Fluss ganz oben steht — sobald beliebiger Content darunter
     wegscrollt, braucht er einen eigenen Hintergrund, um lesbar zu
     bleiben. */
  background-color: var(--wp--preset--color--base);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

#sticky-site-header.site-header--fixed.site-header--hidden {
  transform: translateY(-100%);
}

html.has-fixed-header body {
  padding-top: var(--wk-header-height, 0px);
}

@media (prefers-reduced-motion: reduce) {
  #sticky-site-header {
    transition: none;
  }
}