/* Leistungsseiten (/leistungen/...): Handy-Beispiele mit kleinen Animationen.
   Positionen im Handy in em, die Schrift skaliert mit der Breite des Handys (siehe demo-phones.css). */

.branch-demo .ph { width: min(19rem, 82vw); }
.feature-list--3[data-astro-cid-lcdefpme] { grid-template-columns: 1fr; }
@media (width >= 56rem) {
  .feature-list--3[data-astro-cid-lcdefpme] { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
  .feature-list--3[data-astro-cid-lcdefpme] li[data-astro-cid-lcdefpme]:nth-child(n+2) { border-top: 0; }
}
.more-features .branch-cards { margin-top: .5rem; }

/* Tipp mit dem Finger: Ring über dem Element */
.fx-handy .ph-cta, .fx-handy .ph-quick span, .fx-sticky-btn, .fx-call, .fx-route-btn, .fx-booking .fx-page .ph-cta { position: relative; }
.fx-handy .ph-cta::after, .fx-handy .ph-quick span::after, .fx-sticky-btn::after, .fx-call::after,
.fx-route-btn::after, .fx-booking .fx-page .ph-cta::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.8em;
  height: 2.8em;
  margin: -1.4em 0 0 -1.4em;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #9cc2ff66;
  box-shadow: 0 0 0 .3em #9cc2ff33, 0 0 1.2em #9cc2ffcc;
  opacity: 0;
  pointer-events: none;
}
@keyframes fx-tap-a { 0% { opacity: 0; transform: scale(.4); } 4% { opacity: 1; transform: scale(.75); } 15%, 100% { opacity: 0; transform: scale(1.6); } }

/* 1 Fürs Handy gebaut: der Daumen tippt nacheinander auf die grossen Flächen */
.fx-handy .ph-quick span:first-child::after { animation: fx-tap-a 4.8s 0s infinite; }
.fx-handy .ph-quick span:last-child::after { animation: fx-tap-a 4.8s 1.6s infinite; }
.fx-handy .ph-cta::after { animation: fx-tap-a 4.8s 3.2s infinite; }
.fx-handy .ph-cta { animation: fx-press 4.8s 3.2s infinite; }
@keyframes fx-press { 0%, 100% { transform: none; } 4% { transform: scale(.96); } 10% { transform: none; } }

/* 2 Schnell geladen: kurzer Ladebalken, dann steht die Seite */
.fx-ld {
  position: absolute;
  inset: 2.9em 0 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: .85em;
  padding: 0 1.25em;
  background: var(--ph-bg);
  animation: fx-ld 5s infinite;
}
.fx-ld-bar { position: absolute; inset: 0 0 auto; height: .3em; overflow: hidden; background: var(--ph-line); }
.fx-ld-bar i { position: absolute; inset: 0; background: var(--ph-accent); transform: scaleX(0); transform-origin: left; animation: fx-ld-bar 5s infinite; }
.fx-sk { display: block; height: 2.4em; border-radius: .5em; background: var(--ph-card); animation: fx-shimmer .7s ease-in-out infinite alternate; }
.fx-sk-hero { height: 13.5em; margin: 2.6em -1.25em 0; border-radius: 0; }
.fx-sk-s { width: 60%; }
@keyframes fx-ld { 0%, 15% { opacity: 1; } 21%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fx-ld-bar { 0% { transform: scaleX(0); } 14%, 100% { transform: scaleX(1); } }
@keyframes fx-shimmer { from { opacity: .55; } to { opacity: 1; } }

/* 3 Klarer Button: Seite scrollt, der Termin-Button bleibt unten erreichbar */
.fx-sticky .ph-nav { position: relative; z-index: 2; }
.fx-sticky .ph-hero, .fx-sticky .ph-body { animation: fx-scroll 6s infinite; }
.fx-sticky .ph-body .ph-cta { animation: fx-glow 6s infinite; }
.fx-sticky-btn {
  position: absolute;
  right: 1.25em;
  bottom: 2em;
  left: 1.25em;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 2.9em;
  border-radius: .55em;
  background: var(--ph-accent);
  color: var(--ph-accent-ink);
  font-weight: 600;
  box-shadow: 0 .6em 1.4em -.4em #00000080;
  opacity: 0;
  transform: translateY(5em);
  animation: fx-sticky 6s infinite;
}
.fx-sticky-btn::after { animation: fx-tap-a 6s 3.6s infinite; }
@keyframes fx-scroll {
  0%, 22% { transform: none; }
  40%, 82% { transform: translateY(-17em); }
  96%, 100% { transform: none; }
}
@keyframes fx-glow {
  0%, 3% { filter: none; }
  9% { filter: brightness(1.25) drop-shadow(0 0 .6em #9cc2ffcc); }
  16%, 100% { filter: none; }
}
@keyframes fx-sticky {
  0%, 28% { opacity: 0; transform: translateY(5em); }
  38%, 84% { opacity: 1; transform: none; }
  62% { filter: none; }
  64% { filter: brightness(1.2) drop-shadow(0 0 .7em #9cc2ffcc); }
  70% { filter: none; }
  94%, 100% { opacity: 0; transform: translateY(5em); }
}

/* 4 Öffnungszeiten: «Heute offen» mit pulsierendem Punkt, die heutige Zeile leuchtet */
.fx-now { display: flex; align-items: center; gap: .9em; padding: 1em 1.1em; border-radius: .7em; background: var(--ph-card); }
.fx-now b { display: block; font-size: 1.3em; font-weight: 600; letter-spacing: -.02em; }
.fx-now i { display: block; font-style: normal; color: var(--ph-soft); }
.fx-dot { position: relative; flex: none; width: .9em; height: .9em; border-radius: 50%; background: var(--ph-open); }
.fx-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ph-open); animation: fx-ping 1.6s ease-out infinite; }
@keyframes fx-ping { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(2.8); } }
.fx-today { position: relative; isolation: isolate; }
.fx-today b, .fx-today i { font-weight: 600; color: var(--ph-ink); }
.fx-today::before {
  content: "";
  position: absolute;
  inset: 0 -.6em;
  z-index: -1;
  border-radius: .45em;
  background: #2f6b4f24;
  animation: fx-breathe 1.8s ease-in-out infinite alternate;
}
@keyframes fx-breathe { from { opacity: .35; } to { opacity: 1; } }
.fx-call::after { animation: fx-tap-a 4s 1s infinite; }

/* 5 Google Maps: Tipp auf «Route», die Karte schiebt sich herein */
.ph-cta.fx-route-btn { display: flex; align-items: center; justify-content: center; gap: .45em; }
.fx-addr { display: grid; gap: .15em; padding: .9em 1em; border-radius: .6em; background: var(--ph-card); }
.fx-addr b { font-weight: 600; }
.fx-addr i { margin-top: .35em; font-size: .85em; font-style: normal; color: var(--ph-soft); }
.fx-route-btn::after { animation: fx-tap-b 7s infinite; }
@keyframes fx-tap-b { 0%, 26% { opacity: 0; transform: scale(.4); } 29% { opacity: 1; transform: scale(.75); } 37%, 100% { opacity: 0; transform: scale(1.6); } }
.fx-map {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #eceee6;
  transform: translateX(100%);
  animation: fx-slide 7s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes fx-slide { 0%, 36% { transform: translateX(100%); } 44%, 90% { transform: none; } 97%, 100% { transform: translateX(100%); } }
.fx-map-area { position: absolute; inset: 2.9em 0 9.6em; }
.fx-map-area > * { position: absolute; }
.fx-street { background: #fff; box-shadow: 0 0 0 1px #d9dccf; }
.fx-s1 { top: 0; bottom: 0; left: 22%; width: 1.1em; margin-left: -.55em; }
.fx-s2 { top: 65%; right: 0; left: 0; height: 1.1em; margin-top: -.55em; }
.fx-s3 { top: 0; bottom: 0; left: 60%; width: 1.1em; margin-left: -.55em; }
.fx-s4 { top: 38.75%; right: 0; left: 0; height: 1.1em; margin-top: -.55em; }
.fx-s5 { top: 0; left: 74%; height: 38.75%; width: .8em; margin-left: -.4em; }
.fx-park { top: 6%; left: 30%; width: 22%; height: 22%; border-radius: .6em; background: #cfe3c0; }
.fx-map-area .fx-route { inset: 0; width: 100%; height: 100%; }
.fx-route polyline { stroke-width: 3; vector-effect: non-scaling-stroke; }
.fx-me { top: 87.5%; left: 22%; width: 1em; height: 1em; margin: -.5em 0 0 -.5em; border: .2em solid #fff; border-radius: 50%; background: #2f6fd6; box-shadow: 0 0 0 .2em #2f6fd633; }
.fx-me::after { content: ""; position: absolute; inset: -.2em; border-radius: 50%; background: #2f6fd6; animation: fx-ping 1.6s ease-out infinite; }
.fx-pin { top: 25%; left: 74%; width: 2.4em; height: 2.4em; color: #c8402f; translate: -50% -100%; animation: fx-pin 7s infinite; }
.fx-pin svg { width: 100%; height: 100%; fill: #e4553f; stroke: #8f2a1d; }
@keyframes fx-pin {
  0%, 44% { opacity: 0; transform: translateY(-2.5em); }
  50% { opacity: 1; transform: none; }
  53% { transform: translateY(-.6em); }
  56%, 100% { opacity: 1; transform: none; }
}
.fx-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: .2em;
  padding: 1.1em 1.25em 2.4em;
  border-radius: 1.2em 1.2em 0 0;
  background: #fff;
  color: #1f2933;
  box-shadow: 0 -.4em 1.2em -.4em #0000002e;
}
.fx-sheet b { font-weight: 600; font-size: 1.05em; }
.fx-sheet i { font-style: normal; color: #5d6670; font-size: .85em; }
.fx-go { display: flex; align-items: center; justify-content: center; gap: .45em; min-height: 2.6em; margin-top: .7em; border-radius: 1.3em; background: #2f6fd6; color: #fff; font-weight: 600; }
.fx-go svg { width: 1em; height: 1em; fill: currentColor; }

/* 6 Lokal gefunden: Suchbegriff wird getippt, der Eintrag des Betriebs leuchtet */
.fx-serp-theme {
  --ph-bg: #fff; --ph-ink: #1f2328; --ph-soft: #5f6368; --ph-accent: #1a4fb5;
  --ph-accent-ink: #fff; --ph-line: #e3e5e8; --ph-card: #f1f3f4;
}
.fx-serp-body { padding-top: 3.6em; gap: .9em; }
.fx-q { display: flex; align-items: center; gap: .6em; padding: .75em 1em; border: 1px solid #dadce0; border-radius: 2em; box-shadow: 0 .2em .6em #0000001a; }
.fx-q svg { color: var(--ph-soft); }
.fx-q-text { position: relative; overflow: hidden; white-space: nowrap; }
.fx-q-cover { position: absolute; inset: 0 -.2em 0 0; background: #fff; transform: translateX(100%); animation: fx-type 6s steps(28) infinite; }
.fx-q-cover::before { content: ""; position: absolute; top: 10%; bottom: 10%; left: 0; width: 1px; background: var(--ph-ink); }
@keyframes fx-type { 0% { transform: none; } 30%, 100% { transform: translateX(100%); } }
.fx-res { display: grid; gap: .35em; padding: .85em .9em; border-radius: .8em; animation: fx-res 6s infinite; }
.fx-res-sk span { display: block; width: 90%; height: .7em; border-radius: .3em; background: #eceff1; }
.fx-res-sk span:first-child { width: 40%; }
.fx-res-sk span.s { width: 70%; }
.fx-res-own { border: 1px solid #dfe3ea; background: #fff; animation: fx-res 6s infinite, fx-own 6s infinite; }
.fx-site { font-size: .8em; color: var(--ph-soft); }
.fx-res-own b { color: var(--ph-accent); font-size: 1.05em; font-weight: 600; line-height: 1.25; }
.fx-res-own p { color: #4d5156; font-size: .85em; }
.fx-links { display: flex; flex-wrap: wrap; gap: .35em; margin-top: .2em; }
.fx-links i { padding: .25em .65em; border: 1px solid #dadce0; border-radius: 1em; color: var(--ph-accent); font-size: .78em; font-style: normal; }
@keyframes fx-res { 0%, 32% { opacity: 0; transform: translateY(.6em); } 40%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes fx-own {
  0%, 46% { filter: none; }
  56%, 86% { filter: drop-shadow(0 0 .7em #9cc2ffd9); }
  94%, 100% { filter: none; }
}

/* 7 Buchungstool: «Termin buchen» öffnet das Buchungstool */
.fx-booking .fx-page .ph-cta::after { animation: fx-tap-b 7s infinite; }
.fx-book {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: .7em;
  padding: 3.2em 1.25em 2em;
  background: #fff;
  color: #222;
  transform: translateX(100%);
  animation: fx-slide 7s cubic-bezier(.65, 0, .35, 1) infinite;
}
.fx-book-bar { display: flex; align-items: center; gap: .5em; padding-bottom: .7em; border-bottom: 1px solid #eee; font-size: 1.05em; font-weight: 600; }
.fx-book-tool { color: #777; font-size: .75em; letter-spacing: .06em; text-transform: uppercase; }
.fx-book-svc { display: flex; justify-content: space-between; padding: .8em; border: 1px solid #e6e6e6; border-radius: .6em; }
.fx-book-svc b { font-weight: 500; }
.fx-book-svc i { font-style: normal; color: #666; }
.fx-days { display: flex; gap: .4em; }
.fx-days i, .fx-slots i { flex: 1; padding: .55em 0; border: 1px solid #e3e3e3; border-radius: .5em; font-size: .85em; font-style: normal; text-align: center; }
.fx-days .on { border-color: var(--ph-accent); background: var(--ph-accent); color: #fff; }
.fx-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; }
.fx-slot-pick { position: relative; isolation: isolate; }
.fx-slot-pick::before, .fx-slot-pick::after { position: absolute; inset: -1px; border-radius: inherit; opacity: 0; animation: fx-pick 7s infinite; }
.fx-slot-pick::before { content: ""; z-index: -1; background: var(--ph-accent); }
.fx-slot-pick::after { content: "10.30"; display: grid; place-items: center; color: #fff; font-weight: 600; }
@keyframes fx-pick { 0%, 60% { opacity: 0; } 64%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
.fx-book-next { margin-top: .4em; }

/* 8 Impressum und Datenschutz */
.fx-legal-body { gap: .7em; }
.fx-legal-h { font-size: 1.35em; font-weight: 600; letter-spacing: -.03em; }
.fx-legal-card { display: grid; gap: .3em; padding: .9em 1em; border-radius: .6em; background: var(--ph-card); }
.fx-legal-card b { font-weight: 600; }
.fx-legal-card span { display: flex; align-items: center; gap: .4em; }
.fx-legal-rows span { align-items: center; }
.fx-legal-rows svg { color: var(--ph-soft); }
.fx-foot { display: flex; justify-content: center; gap: 1.4em; margin-top: .8em; padding: 1em; border-radius: .6em; background: var(--ph-ink); color: var(--ph-bg); font-size: .85em; }
.fx-foot i { font-style: normal; text-decoration: underline; text-underline-offset: .2em; animation: fx-link 4s infinite; }
.fx-foot .fx-foot-b { animation-delay: 2s; }
@keyframes fx-link {
  0%, 100% { filter: none; transform: none; }
  10% { filter: brightness(1.4) drop-shadow(0 0 .5em #9cc2ffe6); transform: scale(1.08); }
  25% { filter: none; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-screen[class*="fx-"] *, .ph-screen[class*="fx-"] *::before, .ph-screen[class*="fx-"] *::after { animation: none !important; }
  .fx-ld, .fx-sticky-btn { display: none; }
}
