/* ==========================================================================
   Behandlungen: Hautfinder (Content Block template-htm/treatment-finder)
   Baut auf treatment.css auf (Variablen --tb-*, .tb__*, Kreis .tb-hero__seal).
   ========================================================================== */

.tb-finder [hidden] { display: none !important; }
.tb-finder :is(.tb-finder__tiles, .tb-finder__match-list, .tb-finder__grid, .tb-finder__others) { list-style: none; margin: 0; padding: 0; }
.tb-finder :is(.tb-finder__tiles, .tb-finder__match-list, .tb-finder__grid, .tb-finder__others) > li { padding: 0 !important; }
.tb-finder :is(.tb-finder__tiles, .tb-finder__match-list, .tb-finder__grid, .tb-finder__others) > li::before { display: none !important; }
.tb-finder a { text-decoration: none; }
.tb-finder button { font: inherit; }
.tb-finder :is(a, button):focus-visible { outline: 2px solid var(--tb-gold); outline-offset: 3px; }
.tb-finder h2[tabindex]:focus { outline: none; }
.tb-finder__head { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; margin-bottom: 2.75rem; }
.tb-finder__head .tb__text { max-width: 62ch; }

/* Platzhalter, solange kein Foto gepflegt ist */
.tb-finder__ph {
  position: absolute; inset: 0; display: block;
  background:
    url('/fileadmin/images/icon/logo-leaf-wt-t.svg') center / 3.5rem no-repeat,
    radial-gradient(120% 90% at 28% 18%, rgba(237, 212, 144, .16), rgba(237, 212, 144, 0) 60%),
    linear-gradient(160deg, #5d4a3b, #2b221b);
  opacity: .9;
}

/* ---------------------------------------------------------------- Einstieg */
.tb-finder__intro .tb__inner { padding-top: 2.25rem; padding-bottom: 4.5rem; }
.tb-finder__hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4.5rem; align-items: center; }
.tb-finder__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; }
.tb .tb-finder__h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem) !important; }
.tb-finder__copy .tb__lead { max-width: 32ch; }
.tb-finder__copy .tb__text { max-width: 60ch; }
.tb-finder__media { position: relative; }
.tb-finder__hero-photo { aspect-ratio: 4 / 5; }

/* Kreis wie im Einstieg der Behandlungsseiten (Schrift passt treatment-hero.js an) */
.tb-hero__seal.tb-finder__seal { position: absolute; left: -4.75rem; bottom: 2.75rem; z-index: 2; width: 15rem; }
.tb .tb-finder__seal .tb-hero__name {
  margin: 0; font-family: var(--tb-serif); font-weight: 500; line-height: 1.05; color: var(--sc-l);
  font-size: clamp(1.4rem, 13cqi, 3.2rem) !important; text-align: center;
  overflow-wrap: break-word; hyphens: auto; text-wrap: balance;
}

/* Drei Schritte (Aufzählung aus dem RTE) */
.tb-finder__steps { margin-top: 4.5rem; padding-top: 2.25rem; border-top: 1px solid var(--tb-line); }
.tb .tb-finder__steps ul, .tb .tb-finder__steps ol {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem;
  list-style: none; margin: 0; padding: 0; counter-reset: tbfinderstep;
}
.tb .tb-finder__steps li {
  counter-increment: tbfinderstep; position: relative; padding: 0 0 0 3.4rem !important;
  font-size: .95rem; line-height: 1.55; color: var(--tb-muted);
}
.tb .tb-finder__steps li::before {
  content: counter(tbfinderstep) !important; display: flex !important; position: absolute !important; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--tb-gold);
  align-items: center; justify-content: center; background: none !important; filter: none !important;
  font-family: var(--tb-serif); font-size: 1.35rem; font-weight: 600; line-height: 1; color: var(--tb-gold);
}
.tb .tb-finder__steps li strong { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.4; color: var(--sc-l); }
.tb .tb-finder__steps p { margin: 0; }

/* ---------------------------------------------------------------- Auswahl */
.tb-finder__tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem;
  max-width: 720px; margin: 0 auto 2.25rem; padding: .35rem;
  border: 1px solid var(--tb-line); border-radius: 999px; background: rgba(0, 0, 0, .2);
}
.tb .tb-finder__tab {
  display: flex; flex-direction: column; align-items: center; gap: .1rem; min-height: 3.5rem; margin: 0;
  padding: .7rem 1.25rem; border: 0; border-radius: 999px; background: transparent; color: var(--sc-l);
  line-height: 1.3; cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.tb .tb-finder__tab:hover { background: rgba(241, 232, 229, .07); }
.tb .tb-finder__tab[aria-pressed="true"] { background: var(--sc-l); color: var(--mc-d); }
.tb-finder__tab-title { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--tb-serif); font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
.tb-finder__tab-hint { font-size: .8rem; font-weight: 400; opacity: .8; }
.tb-finder__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem;
  border-radius: 999px; background: var(--tb-gold); color: var(--mc-d);
  font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: .75rem; font-weight: 700; line-height: 1;
}
.tb-finder__tab[aria-pressed="true"] .tb-finder__badge { background: var(--mc-d); color: var(--tb-gold); }

.tb-finder__tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 1060px; margin: 0 auto !important; }
.tb-finder__tiles--type { max-width: 720px; }
.tb-finder__tiles > li { display: flex; }
.tb .tb-finder__tile {
  position: relative; width: 160px; display: flex; flex-direction: column; align-items: center; gap: .75rem; margin: 0;
  padding: 1.15rem .7rem 1rem; border: 1px solid rgba(241, 232, 229, .14); border-radius: var(--tb-radius);
  background: rgba(241, 232, 229, .05); color: var(--sc-l); font-size: .9rem; font-weight: 400; line-height: 1.3; text-align: center;
  cursor: pointer; transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.tb .tb-finder__tile:hover { transform: translateY(-2px); border-color: rgba(237, 212, 144, .6); background: rgba(241, 232, 229, .09); }
.tb-finder__tile-icon {
  flex: none; display: block; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #fff;
  border: 2px solid rgba(237, 212, 144, .55); box-shadow: 0 4px 6px rgba(0, 0, 0, .35);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tb-finder__tile-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tb-finder__tile-check {
  position: absolute; top: .6rem; right: .6rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--tb-gold); color: var(--mc-d);
  opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease;
}
.tb-finder__tile-check svg { width: .95rem; height: .95rem; }
.tb .tb-finder__tile[aria-pressed="true"] { border-color: var(--tb-gold); background: rgba(237, 212, 144, .14); }
.tb-finder__tile[aria-pressed="true"] .tb-finder__tile-icon { border: 3px solid var(--tb-gold); box-shadow: 0 0 0 4px rgba(237, 212, 144, .2), 0 6px 10px rgba(0, 0, 0, .35); }
.tb-finder__tile[aria-pressed="true"] .tb-finder__tile-check { opacity: 1; transform: scale(1); }

.tb-finder__selbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  max-width: 1060px; margin: 2.25rem auto 0; padding: 1rem 1.25rem;
  border: 1px solid var(--tb-line); border-radius: var(--tb-radius); background: rgba(0, 0, 0, .35);
}
.tb-finder__chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tb-finder__sel-label { margin-right: .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(241, 232, 229, .68); }
.tb .tb-finder__chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.4rem; margin: 0; padding: .2rem .45rem .2rem .2rem;
  border: 1px solid rgba(237, 212, 144, .5); border-radius: 999px; background: rgba(237, 212, 144, .12);
  color: var(--sc-l); font-size: .85rem; font-weight: 400; line-height: 1.2; cursor: pointer;
}
.tb .tb-finder__chip:hover { border-color: var(--tb-gold); }
.tb-finder__chip img { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #fff; }
.tb-finder__chip svg { width: .85rem; height: .85rem; margin: 0 .15rem; opacity: .75; }
.tb .tb-finder__reset { margin: 0; padding: .4rem .2rem; border: 0; background: none; color: rgba(241, 232, 229, .68); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tb-finder__rec { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tb-finder__rec p { font-size: .95rem; color: var(--tb-muted); }
.tb-finder__rec strong { font-family: var(--tb-serif); font-size: 1.35rem; font-weight: 600; color: var(--tb-gold); }
.tb a.btn.tb-btn-cta.tb-finder__btn-sm { min-height: 2.6rem; padding: .5rem 1.6rem !important; font-size: .85rem; }
.tb-finder__hint { margin-top: 2rem !important; text-align: center; font-size: .95rem; color: rgba(241, 232, 229, .68); }
.tb-finder__sticky { display: none; }

/* ---------------------------------------------------------------- Empfehlung */
.tb-finder__featured {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden;
  border: 1px solid rgba(237, 212, 144, .35); border-radius: var(--tb-radius); background: var(--mc-l);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.tb-finder__featured-media { position: relative; min-height: 560px; }
.tb-finder__featured-media > .tb__photo { position: absolute; inset: 0; border-radius: 0; }
/* Vorher/Nachher nebeneinander (Fotos aus „Behandlung: Einstieg“), Bildunterschrift unten auf dem Foto */
.tb-finder__compare { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin: 0; background: var(--mc-d); }
.tb-finder__compare .tb__photo { border-radius: 0; }
.tb-finder__compare figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.25rem .9rem;
  background: linear-gradient(rgba(40, 32, 26, 0), rgba(40, 32, 26, .85));
  font-size: .8rem; line-height: 1.45; color: rgba(241, 232, 229, .85);
}
.tb-finder__compare:has(figcaption) .tb__tag { bottom: auto; top: .9rem; }
.tb-finder__featured-body { display: flex; flex-direction: column; gap: 1.35rem; padding: 3rem 3rem 2.75rem; }
.tb .tb-finder__featured-name { font-size: clamp(2.2rem, 3.6vw, 3rem) !important; margin-top: -.35rem !important; }
.tb-finder__pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .6rem;
  border: 1px solid var(--tb-gold); border-radius: 999px; background: rgba(237, 212, 144, .16);
  color: var(--tb-gold); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; line-height: 1.3;
}
.tb-finder__pill::before { content: ""; width: 16px; height: 16px; background: url('/fileadmin/images/icon/logo-leaf-wt-t.svg') center / contain no-repeat; }
.tb-finder__featured-body .tb__lead { max-width: 34ch; }
.tb-finder__match { display: flex; flex-direction: column; gap: .65rem; padding: 1rem 1.15rem; border: 1px solid var(--tb-line); border-radius: var(--tb-radius); background: rgba(241, 232, 229, .06); }
.tb-finder__match-label { font-size: .85rem; font-weight: 600; color: var(--tb-gold); }
.tb-finder__match-list { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; }
.tb-finder__match-list li { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 400; line-height: 1.3; }
.tb-finder__match-list img { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--tb-gold); background: #fff; }
.tb-booking__facts.tb-finder__facts { gap: 1rem 2.75rem; }
.tb-booking__facts.tb-finder__facts dd { font-size: 2.75rem; }
.tb-finder__featured-body .tb__actions { margin-top: .25rem; }
.tb-finder__mixed { margin-top: 1.5rem; }

/* ---------------------------------------------------------------- Karten */
.tb-finder__subhead { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin: 3.5rem 0 1.4rem; }
.tb-finder__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.tb-finder__item { display: flex; }
.tb .tb-finder__card {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  border: 1px solid rgba(241, 232, 229, .12); border-radius: var(--tb-radius); background: var(--mc-l);
  box-shadow: 0 10px 10px rgba(0, 0, 0, .25); color: var(--sc-l) !important;
  transition: transform .25s ease, border-color .25s ease;
}
.tb .tb-finder__card:hover, .tb .tb-finder__card:focus-visible { transform: translateY(-3px); border-color: rgba(237, 212, 144, .55); }
.tb .tb-finder__item.is-match .tb-finder__card { border-color: rgba(237, 212, 144, .75); }
.tb .tb-finder__card--analyse { background: var(--sc-t); }
.tb-finder__card-photo { display: block; flex: none; aspect-ratio: 4 / 3; border-radius: 0; }
.tb-finder__card-photo--compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--mc-d); }
.tb-finder__card-photo--compare .tb__photo { display: block; border-radius: 0; }
.tb-finder__card-photo--compare .tb__tag { left: .45rem; bottom: .45rem; padding: .2rem .45rem; font-size: .68rem; }
/* Ohne Auswahl Vorher/Nachher, im Ergebnis das Behandlungsfoto (Klasse .has-selection setzt treatment-finder.js) */
.tb .tb-finder__card-photo--result { display: none; }
.tb-finder.has-selection .tb-finder__card-photo--swap { display: none; }
.tb-finder.has-selection .tb-finder__card-photo--result { display: block; }
.tb-finder__card-body { display: flex; flex-direction: column; gap: .55rem; flex: 1; padding: 1.1rem 1.3rem 1.3rem; }

/* Icon-Zeile unter dem Foto: alle Hautbilder des Reiters, zugeordnete im Original, die übrigen verblasst */
.tb-finder__icons { display: flex; flex-wrap: wrap; gap: .3rem; }
.tb-finder__ic {
  width: calc((100% - 1.5rem) / 6); max-width: 2.6rem; height: auto; aspect-ratio: 1 / 1;
  border-radius: 50%; border: 1.5px solid rgba(237, 212, 144, .6); background: #fff;
  box-shadow: 0 3px 5px rgba(0, 0, 0, .35); object-fit: cover;
  transition: opacity .2s ease, box-shadow .2s ease;
}
.tb-finder__ic.is-off { opacity: .35; filter: saturate(.3); border-color: rgba(241, 232, 229, .35); box-shadow: none; }
.tb-finder__ic.is-on.is-hit { border: 2.5px solid var(--tb-gold); box-shadow: 0 0 0 3px rgba(237, 212, 144, .32), 0 3px 5px rgba(0, 0, 0, .35); }

.tb-finder__card-eyebrow { display: block; margin-top: .4rem; font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5; color: var(--tb-gold); }
.tb-finder__card-name { display: block; font-family: var(--tb-serif); font-size: 1.75rem; font-weight: 500; line-height: 1.1; }
.tb-finder__card-match { align-self: flex-start; padding: .15rem .6rem; border-radius: 999px; background: var(--tb-gold); color: var(--mc-d); font-size: .75rem; font-weight: 700; line-height: 1.5; }
.tb-finder__card-text { display: block; font-size: .92rem; line-height: 1.6; color: var(--tb-muted); }
.tb-finder__card-meta {
  display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--tb-line);
  font-size: .85rem; font-weight: 600; color: var(--tb-gold);
}
.tb-finder__card-more { margin-left: auto; color: var(--sc-l); }
.tb-finder__card-more::after { content: " \2192"; }

.tb-finder__others { display: flex; flex-wrap: wrap; gap: .6rem; }
.tb .tb-finder__others a {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .5rem 1.1rem;
  border: 1px solid rgba(241, 232, 229, .22); border-radius: 999px; background: rgba(241, 232, 229, .05);
  font-size: .9rem; font-weight: 400; line-height: 1.3;
}
.tb .tb-finder__others a:hover { border-color: var(--tb-gold); }
.tb-finder__others span { font-size: .8rem; color: rgba(241, 232, 229, .68); }

/* ---------------------------------------------------------------- Hautanalyse */
.tb-finder__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
.tb-finder__analyse-photo { min-height: 440px; }
.tb-finder__split .tb__box { display: flex; flex-direction: column; justify-content: center; }

/* ---------------------------------------------------------------- Mobil */
@media (max-width: 991.98px) {
  .tb-finder__hero, .tb-finder__featured, .tb-finder__split { grid-template-columns: minmax(0, 1fr); }
  .tb-finder__hero { gap: 2.5rem; }
  .tb-hero__seal.tb-finder__seal { left: auto; right: 1rem; bottom: -2rem; width: 12rem; }
  .tb-finder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-finder__featured-media { min-height: 420px; }
  .tb-finder__featured-body { padding: 2rem 1.5rem; }
  .tb .tb-finder__steps ul, .tb .tb-finder__steps ol { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .tb-finder__steps { margin-top: 3.5rem; }
  .tb-finder__analyse-photo { min-height: 300px; }
}
@media (max-width: 767.98px) {
  /* Handy: auf den Karten nur die zugeordneten Hautbilder */
  .tb-finder__ic.is-off { display: none; }
  .tb-finder__ic { width: 2.35rem; }
  .tb-finder__sticky {
    display: block; position: sticky; bottom: 0; z-index: 5; margin: 0 -1.25rem; padding: 1.5rem 1.25rem .9rem;
    background: linear-gradient(rgba(75, 59, 50, 0), rgba(75, 59, 50, .96) 40%);
  }
  .tb-finder__sticky .btn.tb-btn-cta { width: 100%; justify-content: space-between !important; padding: .7rem 1.2rem !important; }
  .tb-finder__sticky svg { width: 1.1em; height: 1.1em; flex: none; }
}
@media (max-width: 575.98px) {
  .tb .tb-finder__h1 { font-size: 2.5rem !important; }
  .tb-finder__hero-photo { aspect-ratio: 4 / 3; }
  .tb-hero__seal.tb-finder__seal { width: 9.5rem; bottom: -1.75rem; }
  .tb-finder__tabs { border-radius: 14px; }
  .tb .tb-finder__tab { border-radius: 10px; padding: .55rem .5rem; }
  .tb-finder__tab-title { font-size: 1.1rem; gap: .35rem; }
  .tb-finder__tab-hint { display: none; }
  .tb-finder__tiles { gap: 10px; }
  .tb-finder__tiles > li { width: calc((100% - 20px) / 3); }
  .tb .tb-finder__tile { width: 100%; gap: .5rem; padding: .85rem .35rem .75rem; font-size: .78rem; hyphens: auto; }
  .tb-finder__tile-icon { width: 62px; height: 62px; }
  .tb-finder__tile-check { top: .35rem; right: .35rem; width: 1.3rem; height: 1.3rem; }
  .tb-finder__selbar { flex-direction: column; align-items: flex-start; }
  .tb-finder__grid { grid-template-columns: minmax(0, 1fr); }
  .tb-finder__featured-media { min-height: 330px; }
  .tb-booking__facts.tb-finder__facts dd { font-size: 2.2rem; }
  .tb-finder__analyse-photo { min-height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .tb-finder *, .tb .tb-finder__tile, .tb .tb-finder__card { transition: none !important; }
}
