/* ============================================================
   plate_experts — Experten-Karten-Grid (CType atomicplan_expertsgrid)
   Gescoped auf `.frame-type-atomicplan_expertsgrid`. Farben/Fonts NUR über
   CSS-Variablen var(--lr-<token>, <fallback aus Vorlage>). KEINE Heading-Typo
   (font-family/-size) an h*. Reveal-Zustände liefert atomic-inview.css
   ([data-reveal] / .revealed) — hier NICHT dupliziert.
   ============================================================ */
.frame-type-atomicplan_expertsgrid {
  --plx-ivory:       var(--lr-ivory, #F4F1EC);
  --plx-ivory-deep:  var(--lr-ivory-deep, #ECE6DB);
  --plx-stone:       var(--lr-stone, #D9CBB8);
  --plx-bronze:      var(--lr-bronze, #B89B6A);
  --plx-bronze-deep: var(--lr-bronze-deep, #9C8255);
  --plx-ink:         var(--lr-ink, #2D2D2D);
  --plx-ink-soft:    var(--lr-ink-soft, rgba(45, 45, 45, 0.70));
  --plx-forest:      var(--lr-forest, #4B524C);
  --plx-line:        var(--lr-line, rgba(45, 45, 45, 0.14));
  --plx-font-display: var(--lr-font-display, "Cormorant Garamond", "Times New Roman", serif);
}

.plx-experts {
  container-type: inline-size;
}

/* ---------- Section head ---------- */
.plx-experts__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4cqi, 3.2rem);
}
.plx-experts__head-text { flex: 1 1 22rem; min-width: 0; }
.plx-experts__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--plx-bronze-deep);
  margin-bottom: 0.6rem;
}
.plx-experts__heading { margin: 0; color: var(--plx-ink); }
.plx-experts__aside {
  flex: 1 1 20rem;
  max-width: 42ch;
  color: var(--plx-ink-soft);
  font-size: 0.98rem;
}

/* ---------- Grid ---------- */
.plx-experts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.4rem, 2.5cqi, 2.4rem);
}
@container (max-width: 900px) {
  .plx-experts__grid { grid-template-columns: repeat(2, 1fr); }
}
@container (max-width: 460px) {
  .plx-experts__grid { grid-template-columns: 1fr; }
}
/* Kompakt: dichteres Auto-Raster mit kleineren Karten. */
.plx-experts--compact .plx-experts__grid {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: clamp(1rem, 2cqi, 1.6rem);
}

/* ---------- Card ---------- */
.plx-expert-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.plx-expert-card--link { cursor: pointer; }

/* ---------- Avatar (Foto ODER Initialen) ---------- */
.plx-e-avatar {
  aspect-ratio: 1 / 1;
  margin-bottom: 1.2rem;
  background: var(--plx-stone);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.plx-e-avatar::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  height: 1px;
  background: var(--plx-bronze);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.plx-expert-card:hover .plx-e-avatar { background: var(--plx-forest); }
.plx-expert-card:hover .plx-e-avatar::after { transform: scaleX(1); }

.plx-e-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plx-e-avatar--photo::after { z-index: 1; }

.plx-ini {
  font-family: var(--plx-font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 12cqi, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--plx-forest);
  transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.plx-expert-card:hover .plx-e-avatar:not(.plx-e-avatar--photo) .plx-ini { color: var(--plx-ivory); }

.plx-sigil {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  z-index: 2;
  font-family: var(--plx-font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--plx-bronze-deep);
  opacity: 0.85;
}
.plx-e-avatar--photo .plx-sigil { color: var(--plx-ivory); }

/* ---------- Card body ---------- */
.plx-e-role {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plx-bronze-deep);
  margin-bottom: 0.5rem;
}
.plx-e-name {
  margin: 0 0 0.3rem;
  color: var(--plx-ink);
}
.plx-expert-card--link:hover .plx-e-name { color: var(--plx-bronze-deep); }
.plx-e-specialty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--plx-ink-soft);
}
.plx-e-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.plx-e-tag {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--plx-line);
  border-radius: 999px;
  color: var(--plx-ink-soft);
}

.plx-experts--compact .plx-e-avatar { margin-bottom: 0.9rem; }
.plx-experts--compact .plx-e-role { font-size: 0.62rem; }
.plx-experts--compact .plx-e-specialty { font-size: 0.82rem; }

/* ---------- More link ---------- */
.plx-experts__more { margin-top: clamp(2.2rem, 4cqi, 3.2rem); }

.plx-experts__empty { color: var(--plx-ink-soft); }

/* ---------- Invertierte Frame-Hintergruende (`-colorized`, z. B. bg primary) ----------
   Die --plx-Aliase drehen ueber das Theme-Token-Remap automatisch mit. Nur das
   Avatar-Farbpaar (heller Kachel-Grund + Forest-Initialen) braucht eine eigene
   Behandlung, weil sonst Grund und Initialen beide hell wuerden. */
.frame.-colorized.frame-type-atomicplan_expertsgrid .plx-e-avatar { background: rgba(0, 0, 0, 0.14); }
.frame.-colorized.frame-type-atomicplan_expertsgrid .plx-expert-card:hover .plx-e-avatar { background: rgba(0, 0, 0, 0.26); }
.frame.-colorized.frame-type-atomicplan_expertsgrid .plx-e-avatar:not(.plx-e-avatar--photo) .plx-ini { color: var(--plx-ivory); }

/* ---------- Bildformat (FlexForm `photo_ratio`, sonst Vorgabe der Variante) ----------
   Der eigentliche Zuschnitt passiert im Backend-Crop + c-Crop im Template; das
   aspect-ratio haelt nur die Kachel stabil, solange das Bild laedt. */
.plx-experts--ratio-square .plx-e-avatar { aspect-ratio: 1 / 1; }
.plx-experts--ratio-landscape .plx-e-avatar { aspect-ratio: 3 / 2; }
.plx-experts--ratio-portrait .plx-e-avatar { aspect-ratio: 3 / 4; }

/* ---------- Layout-Variante `tiles`: querformatige Kacheln mit Rahmen ----------
   Das wiederkehrende „Kaestchen"-Element: Bild oben, Infos darunter, Hover mit
   leichtem Zoom + Schatten. KEINE Sektionsbreite, kein Sektions-Padding, kein
   Sektions-Hintergrund — das bleibt beim Frame. */
.plx-experts--tiles .plx-experts__grid {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: clamp(1.2rem, 2.4cqi, 2rem);
}
.plx-experts--tiles .plx-expert-card {
  border: 1px solid var(--plx-line);
  background: var(--bs-body-bg, transparent);
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.plx-experts--tiles .plx-e-avatar {
  margin-bottom: 0;
}
.plx-experts--tiles .plx-e-body {
  padding: 1rem 1.1rem 1.2rem;
}
.plx-experts--tiles .plx-e-photo {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.plx-experts--tiles .plx-expert-card:hover {
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
}
.plx-experts--tiles .plx-expert-card:hover .plx-e-photo {
  transform: scale(1.04);
}
/* Der dekorative Strich im Avatar gehoert zur Grid-/Kompakt-Optik, nicht zur Kachel. */
.plx-experts--tiles .plx-e-avatar::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  .plx-experts--tiles .plx-expert-card,
  .plx-experts--tiles .plx-e-photo { transition: none; }
  .plx-experts--tiles .plx-expert-card:hover .plx-e-photo { transform: none; }
}

/* ---------- Kontaktdaten auf der Karte (FlexForm-Schalter) ---------- */
.plx-e-namelink {
  color: inherit;
  text-decoration: none;
}
.plx-e-namelink:hover,
.plx-e-namelink:focus-visible {
  color: var(--plx-bronze-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.plx-e-contact {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  font-size: 0.85rem;
}
.plx-e-contact__link {
  color: var(--bs-link-color, currentColor);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.plx-e-contact__link:hover,
.plx-e-contact__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.frame.-colorized.frame-type-atomicplan_expertsgrid .plx-e-contact__link { color: currentColor; }

/* ============================================================
   Besucher-Filter & Blättern (optional, pi_flexform-Schalter)
   ------------------------------------------------------------
   FRAME-SYSTEM: Hier steht KEINE Container-Breite, kein Sektions-Padding und
   kein Sektions-Hintergrund. Beides liefert ausschließlich der generische
   CE-Frame (.frame-container / frame_layout, space_*_class,
   background_color_class).

   Farben/Typografie ausschließlich über die bereits oben definierten
   --plx-*-Variablen bzw. Bootstrap-CSS-Variablen — keine harten Werte, die
   einen plate_bootstrap-Settings-Slot doppeln würden.
   ============================================================ */
.plx-filter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--plx-line);
}
.plx-filter__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}
.plx-filter__label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plx-bronze-deep);
}
.plx-filter__search {
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: inherit;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--plx-line);
  border-radius: 0;
}
.plx-filter__select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.plx-filter__select select {
  max-width: 100%;
  padding: 0.4rem 0.6rem;
  font: inherit;
  color: inherit;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--plx-line);
  border-radius: 0;
}
.plx-filter__submit,
.plx-filter__reset {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 1px solid var(--plx-line);
  cursor: pointer;
}
.plx-filter__reset { margin-inline-start: auto; }
.plx-filter__submit:hover,
.plx-filter__submit:focus-visible,
.plx-filter__reset:hover,
.plx-filter__reset:focus-visible {
  border-color: var(--plx-bronze-deep);
  color: var(--plx-bronze-deep);
}
.plx-filter__count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--plx-ink-soft);
}
.plx-experts__empty-reset { margin-inline-start: 0.4em; }
/* Zähler ohne Filterleiste (Betriebsart „nur Blättern") — er steht dann nicht im
   Formular und braucht seinen eigenen Abstand nach unten. */
.plx-filter__count--standalone {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--plx-line);
}

/* Sprungziel nach einem HTMX-Tausch (`hx-swap … show:#<listId>:top`). Ohne
   diesen Abstand verschwindet die Oberkante des Grids unter einem fixierten
   Header. Das Theme setzt --plx-scroll-offset auf seine tatsächliche
   Header-Höhe; 6rem ist nur ein tragfähiger Default. */
.plx-experts {
  scroll-margin-block-start: var(--plx-scroll-offset, 6rem);
}

/* Blättern: mittig UNTER den Ergebnissen. `justify-content: center` genügt
   nicht, wenn ein Theme den Grid als Raster mit Filter-Sidebar baut — dann muss
   es die Navigation zusätzlich in die Ergebnisspalte stellen. */
.plx-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-block-start: 2rem;
}
.plx-pagination__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.plx-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding-inline: 0.5rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.plx-pagination__page.is-current {
  border-color: currentColor;
  font-weight: 700;
}
.plx-pagination__gap { padding-inline: 0.25rem; }
.plx-pagination__step {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  color: inherit;
}
.plx-pagination__step:hover,
.plx-pagination__page:hover {
  border-color: currentColor;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
