/* wprbn Theme – design.css
   Bausteine des Redesigns: Formen-Tokens, Deko-Farben, Infoleiste, Footer
   „zentriert", Hero-Slider und die Pattern-Varianten.

   Steht bewusst AUSSERHALB aller @layer und wird nach main.css geladen: Die
   Regeln müssen gegen die Blockstile von WordPress gewinnen (siehe CLAUDE.md,
   „@layer und WordPress").

   Alle Standards entsprechen dem Aussehen vor dem Redesign – Radius 0,
   flache Karten. Was sich ändert, steuern die Variablen aus dem Dashboard
   (inc/design/design-shapes.php) oder ein Design-Preset. */

/* ── Deko-Farben ─────────────────────────────────────────────────────────────
   Für Feature-Kreise und Muster. Bewusst gedämpft – ein Child-Theme setzt
   kräftigere Töne (kg-emspünte: Pastell aus der Figma-Vorlage). */
:root {
  --wprbn-deko-1: #b9a99a;
  --wprbn-deko-2: #9aab9c;
  --wprbn-deko-3: #93a4b8;
  --wprbn-deko-4: #c2b48e;
  --wprbn-deko-fg: #ffffff;
}
[data-theme="dark"] {
  --wprbn-deko-1: #6e6157;
  --wprbn-deko-2: #56685a;
  --wprbn-deko-3: #4f6178;
  --wprbn-deko-4: #786c48;
}

/* ── Formen ──────────────────────────────────────────────────────────────── */

/* Buttons im Inhalt (theme.json setzt radius 0 über :where – das hier gewinnt) */
.wp-element-button,
.wp-block-button__link,
.wp-block-search__button,
.wp-block-file__button {
  border-radius: var(--wprbn-radius-button, 0);
}

/* Formularfelder – Schalter und Optionsfelder behalten ihre Form */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  border-radius: var(--wprbn-radius-field, 0);
}
/* Einzeilige Felder: bei Pill-Radius genug Luft links/rechts */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),
select {
  padding-inline: max(0.75em, calc(var(--wprbn-radius-field, 0px) * 0.4));
}

/* Bilder im Inhalt, Galerien, Immich-Kacheln, Beitragsbilder in Karten */
.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img,
.wp-block-gallery .wp-block-image img,
.wprbn-immich__item,
.wprbn-immich__item img,
.post-card__thumb,
.wp-block-post-featured-image img {
  border-radius: var(--wprbn-radius-image, 0);
}
.wprbn-immich__item,
.post-card__thumb {
  overflow: hidden;
}

/* Karten-Stil „Karte": Rahmen, Fläche, Innenabstand – Beitragskarten und
   alles, was den Gruppenstil „Karte" trägt. */
body.wprbn-cards--karte .post-card,
.wp-block-group.is-style-wprbn-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--wprbn-radius-card, 0);
  overflow: hidden;
}
body.wprbn-cards--karte .post-card .post-card__thumb {
  border-radius: 0;
}
body.wprbn-cards--karte .post-card__body {
  padding: var(--space-sm, 1rem) var(--space-sm, 1rem) var(--space-md, 1.5rem);
}
.wp-block-group.is-style-wprbn-card {
  padding: var(--space-md, 1.5rem);
}

/* Bildstil „Oval": Pill-Form mit getöntem Rand */
.wp-block-image.is-style-wprbn-oval img {
  border-radius: 999px;
  border: clamp(8px, 1.4vw, 14px) solid color-mix(in srgb, var(--wprbn-deko-3) 35%, var(--bg-primary));
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* ── Infoleiste (inc/design/infobar.php) ─────────────────────────────────── */

.wprbn-infobar {
  background: var(--wprbn-infobar-bg, var(--cta-bg));
  color: var(--wprbn-infobar-fg, var(--cta-text));
  font-size: 0.8125rem;
  line-height: 1.3;
  position: relative;
  z-index: 101;
}
.wprbn-infobar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding: 0.4rem var(--header-pad-right, 5vw) 0.4rem var(--header-pad-left, 5vw);
  box-sizing: border-box;
}
.wprbn-infobar ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wprbn-infobar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 0;
}
.wprbn-infobar a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.wprbn-infobar a:hover,
.wprbn-infobar a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.wprbn-infobar__icon {
  flex: none;
  display: inline-block;
}
.wprbn-infobar__links {
  gap: 0.75rem;
}
.wprbn-infobar__social {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--wprbn-social-icon) center / contain no-repeat;
  mask: var(--wprbn-social-icon) center / contain no-repeat;
}
.wprbn-infobar__social:hover,
.wprbn-infobar__social:focus-visible {
  opacity: 0.8;
}
.wprbn-infobar__social--instagram {
  --wprbn-social-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2c3.2 0 3.6 0 4.8.1 3.3.1 4.8 1.7 4.9 4.9.1 1.3.1 1.6.1 4.8s0 3.6-.1 4.8c-.1 3.2-1.7 4.8-4.9 4.9-1.3.1-1.6.1-4.8.1s-3.6 0-4.8-.1c-3.3-.1-4.8-1.7-4.9-4.9C2.2 15.6 2.2 15.2 2.2 12s0-3.6.1-4.8C2.4 3.9 3.9 2.4 7.2 2.3 8.4 2.2 8.8 2.2 12 2.2zM12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 8.2a3.2 3.2 0 1 1 0-6.4 3.2 3.2 0 0 1 0 6.4zm5.2-9.6a1.2 1.2 0 1 0 0 2.4 1.2 1.2 0 0 0 0-2.4z'/%3E%3C/svg%3E");
}
.wprbn-infobar__social--facebook {
  --wprbn-social-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 8.5V6.7c0-.9.2-1.4 1.6-1.4H18V2h-3.3C11.4 2 10.5 3.8 10.5 6.7v1.8H8V12h2.5v10H14V12h3.3l.5-3.5z'/%3E%3C/svg%3E");
}
.wprbn-infobar__social--youtube {
  --wprbn-social-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23 7.2a3 3 0 0 0-2.1-2.1C19 4.6 12 4.6 12 4.6s-7 0-8.9.5A3 3 0 0 0 1 7.2C.5 9.1.5 12 .5 12s0 2.9.5 4.8a3 3 0 0 0 2.1 2.1c1.9.5 8.9.5 8.9.5s7 0 8.9-.5a3 3 0 0 0 2.1-2.1c.5-1.9.5-4.8.5-4.8s0-2.9-.5-4.8zM9.7 15.1V8.9l5.8 3.1z'/%3E%3C/svg%3E");
}
@media (max-width: 767px) {
  /* Wie Header und Footer (main.css, „Mobile Layout"): aus dem Body-Rand ausbrechen */
  .wprbn-infobar {
    margin-inline: -1rem;
    width: calc(100% + 2rem);
  }
  .wprbn-infobar--hide-mobile { display: none; }
  .wprbn-infobar__inner { justify-content: center; padding-inline: 1rem; }
}

/* Transparente Header beginnen unter der Leiste (Wrapper absolut, top:auto =
   statische Lage hinter der Leiste). Fixiert beim Scrollen gehört er aber
   wieder an die Oberkante – ohne top:0 bliebe dort die Lücke der Leiste. */
body.has-infobar header.wp-block-template-part:has(.site-header--transparent_sticky.is-sticky),
body.has-infobar header.wp-block-template-part:has(.site-header--transparent.is-scrolled) {
  top: 0 !important;
}

/* ── Footer-Layout „zentriert" ───────────────────────────────────────────── */

.site-footer--zentriert .footer-main {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md, 1.5rem);
}
.site-footer--zentriert .footer-brand,
.site-footer--zentriert .footer-follow,
.site-footer--zentriert .footer-nav,
.site-footer--zentriert .footer-col {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}
.site-footer--zentriert .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md, 1.5rem) var(--space-lg, 2rem);
}
.site-footer--zentriert .footer-links {
  align-items: center;
}
.site-footer--zentriert .footer-links a {
  justify-content: center;
}
/* Die Flex-Basen aus main.css (z. B. Marke 1 1 16rem) gelten in der Spalte
   als Höhe – hier würden sie riesige Lücken reißen. */
.site-footer--zentriert .footer-main > * {
  margin-block: 0;
  flex: none !important;
}
.site-footer--zentriert .footer-social {
  justify-content: center;
  gap: 0.6rem !important;
}
.site-footer--zentriert .footer-social .wp-social-link {
  border: 0.5px solid currentColor;
  border-radius: 50%;
  padding: 0.35rem;
}
.site-footer--zentriert .footer-social .wp-social-link:hover,
.site-footer--zentriert .footer-social .wp-social-link:focus-within {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-color: var(--cta-bg);
}
.site-footer--zentriert .footer-bottom {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  align-items: center;
}
.site-footer--zentriert .footer-legal__list {
  justify-content: center;
}

/* ── Hero-Slider (inc/design/hero-slider.php) ────────────────────────────── */

.wprbn-hero--slider {
  overflow: hidden;
}
.wprbn-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wprbn-hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.wprbn-hero__slide.is-active {
  opacity: 1;
}
.wprbn-hero--slider.wprbn-hero--page {
  background-image: none !important;
}
.wprbn-hero__controls {
  position: absolute;
  inset-inline: 0;
  bottom: clamp(1rem, 4vh, 2.5rem);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
}
.wprbn-hero__arrow,
.wprbn-hero__pause {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, #000 35%, transparent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.wprbn-hero__arrow:hover,
.wprbn-hero__pause:hover,
.wprbn-hero__arrow:focus-visible,
.wprbn-hero__pause:focus-visible {
  background: color-mix(in srgb, #000 60%, transparent);
}
.wprbn-hero__arrow:focus-visible,
.wprbn-hero__pause:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.wprbn-hero__play-icon { display: none; }
.wprbn-hero--slider.is-paused .wprbn-hero__pause-icon { display: none; }
.wprbn-hero--slider.is-paused .wprbn-hero__play-icon { display: block; }

/* Ab Tablet: Pfeile an die Seiten, Pause unten mittig */
@media (min-width: 768px) {
  .wprbn-hero__arrow {
    position: absolute;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 3.25rem;
    height: 3.25rem;
    background: transparent;
  }
  .wprbn-hero__controls {
    top: 0;
    bottom: 0;
  }
  .wprbn-hero__arrow--prev { left: clamp(0.5rem, 4vw, 3rem); }
  .wprbn-hero__arrow--next { right: clamp(0.5rem, 4vw, 3rem); }
  /* Platz für die Pfeile – sonst läge der linke unter einem linksbündigen Titel */
  .wprbn-hero--slider .wprbn-hero__inner {
    /* Pfeil-Abstand zum Rand + Pfeil + Luft, abzüglich des Rands, den der
       zentrierte Container ohnehin schon lässt */
    padding-inline: max(
      var(--space-lg, 2rem),
      calc(clamp(0.5rem, 4vw, 3rem) + 4.25rem - max(0px, (100vw - var(--container-max, 1200px)) / 2))
    );
  }
  .wprbn-hero__pause {
    position: absolute;
    bottom: clamp(1rem, 4vh, 2.5rem);
    left: 50%;
    transform: translateX(-50%);
  }
}
/* Welle über den Bildern */
.wprbn-hero--slider .wprbn-hero__wave { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .wprbn-hero__slide { transition: none; }
}

/* ── Pattern: Feature-Kreise (patterns/content-features-circles.php) ──────── */

/* WordPress gibt Kindern einer Gruppe einen Blockabstand oben – außer dem
   ersten. In den Rastern der Patterns verschöbe das die Elemente gegeneinander. */
.wprbn-features-circles__grid > *,
.wprbn-feature-circle > *,
.wprbn-split-oval > *,
.wprbn-testimonial-photo > *,
.wprbn-testimonial-photo__card > * {
  margin-block-start: 0;
}

.wprbn-features-circles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-lg, 2rem) var(--space-md, 1.5rem);
}
.wprbn-feature-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs, 0.5rem);
}
.wprbn-feature-circle .wprbn-feature-circle__icon {
  margin: 0;
  width: clamp(7rem, 14vw, 11rem);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wprbn-feature-bg, var(--wprbn-deko-1));
  transition: transform 0.3s ease;
}
.wprbn-feature-circle .wprbn-feature-circle__icon img {
  width: 52%;
  height: auto;
  border-radius: 0 !important;
}
.wprbn-feature-circle:hover .wprbn-feature-circle__icon { transform: translateY(-4px); }
.wprbn-feature-circle.wprbn-deko-1 { --wprbn-feature-bg: var(--wprbn-deko-1); }
.wprbn-feature-circle.wprbn-deko-2 { --wprbn-feature-bg: var(--wprbn-deko-2); }
.wprbn-feature-circle.wprbn-deko-3 { --wprbn-feature-bg: var(--wprbn-deko-3); }
.wprbn-feature-circle.wprbn-deko-4 { --wprbn-feature-bg: var(--wprbn-deko-4); }
.wprbn-feature-circle h3 { margin: var(--space-xs, 0.5rem) 0 0; }
.wprbn-feature-circle p { margin: 0; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .wprbn-feature-circle .wprbn-feature-circle__icon { transition: none; }
}

/* ── Pattern: Text + Bild im Ovalrahmen (patterns/content-split-oval.php) ─── */

.wprbn-split-oval {
  display: grid;
  gap: var(--space-lg, 2rem);
  align-items: center;
}
@media (min-width: 768px) {
  .wprbn-split-oval { grid-template-columns: 1fr 1fr; gap: var(--space-xl, 4rem); }
  .wprbn-split-oval.is-reversed > :first-child { order: 2; }
}
.wprbn-split-oval .wp-block-image { margin: 0; }
.wprbn-split-oval__text > * + * { margin-top: var(--space-sm, 1rem); }

/* ── Pattern: CTA mit Icon-Muster (patterns/cta-icon-pattern.php) ─────────── */

.wprbn-cta-doodles {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-secondary);
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--space-md, 1.5rem);
}
.wprbn-cta-doodles::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text-primary);
  opacity: 0.07;
  -webkit-mask: url("../images/deko/doodles.svg") 0 0 / 480px 240px repeat;
  mask: url("../images/deko/doodles.svg") 0 0 / 480px 240px repeat;
}
.wprbn-cta-doodles > * {
  max-width: 40rem;
  margin-inline: auto;
}
.wprbn-cta-doodles .wp-block-buttons { justify-content: center; }

/* ── Pattern: Testimonial über Foto (patterns/content-testimonial-photo.php) ─ */

.wprbn-testimonial-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) var(--space-md, 1.5rem);
}
.wprbn-testimonial-photo .wprbn-testimonial-photo__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 0;
}
.wprbn-testimonial-photo .wprbn-testimonial-photo__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}
.wprbn-testimonial-photo__card {
  max-width: 54rem;
  margin-inline: auto;
  background: var(--bg-primary);
  border-radius: var(--wprbn-radius-card, 0);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: var(--space-md, 1.5rem);
  align-items: center;
}
@media (min-width: 640px) {
  .wprbn-testimonial-photo__card { grid-template-columns: auto 1fr; }
}
.wprbn-testimonial-photo__card .wprbn-testimonial-photo__portrait {
  margin: 0;
  justify-self: center;
}
.wprbn-testimonial-photo__card .wprbn-testimonial-photo__portrait img {
  width: clamp(6rem, 14vw, 10rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50% !important;
}
.wprbn-testimonial-photo__quote { margin: 0; font-style: italic; color: var(--text-muted); }
.wprbn-testimonial-photo__name { margin: var(--space-xs, 0.5rem) 0 0; font-size: 1.25rem; }
.wprbn-testimonial-photo__role { margin: 0; color: var(--text-subtle); font-size: 0.875rem; }
