/* Medi-Fit — movement shared by the main pages. */
/* ── Slide in on scroll. "translate" keeps clear of the hover "transform" rules. ── */
@media (prefers-reduced-motion: no-preference) {
  main > section { overflow-x: clip; }
  main .m-wait { opacity: 0; translate: 0 42px; }
  main .m-wait.m-show {
    opacity: 1;
    translate: 0 0;
    transition: opacity 1.2s ease var(--m-delay, 0ms),
      translate 1.2s ease var(--m-delay, 0ms);
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  main .m-wait.m-left { translate: -56px 0; }
  main .m-wait.m-right { translate: 56px 0; }
  main .m-wait.m-show:is(.m-left, .m-right) { translate: 0 0; }
}

/* ── Mouse: cards and course boxes lift, photos zoom ── */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  main > section :is([aria-labelledby="trainingsbereiche-heading"] .img-card, .finder-paths .img-card, .card):not(.m-wait, .booking),
  main > section :is(.course-slot, .course-card:not(.course-card-note)),
  main > section:is(.hero, .page-hero, .section) .btn {
    transition: translate .3s ease, scale .2s ease, box-shadow .3s ease,
      opacity 1.2s ease, transform 1.2s ease,
      background-color .18s ease, border-color .18s ease, color .18s ease;
  }
  main > section :is([aria-labelledby="trainingsbereiche-heading"] .img-card, .finder-paths .img-card, .card):not(.m-wait, .booking):is(:hover, :focus-within) {
    translate: 0 -8px;
    box-shadow: 0 18px 34px rgba(25, 34, 24, .28);
  }
  main :is([aria-labelledby="trainingsbereiche-heading"], .finder-paths) .img-card:hover img { transform: scale(1.09); }
  main > section :is(.course-slot, .course-card:not(.course-card-note)):hover { translate: 0 -4px; box-shadow: 0 10px 20px rgba(25, 34, 24, .16); }
  main > section:is(.hero, .page-hero, .section) .btn:hover { translate: 0 -3px; box-shadow: 0 10px 22px rgba(25, 34, 24, .22); }
  main .split img, main img.cta-photo { transition: scale .6s ease, opacity 1.2s ease, translate 1.2s ease; }
  main .split img:hover, main img.cta-photo:hover { scale: 1.04; }
}

/* ── Touch: a small press ── */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  main > section :is([aria-labelledby="trainingsbereiche-heading"] .img-card, .finder-paths .img-card, .card):not(.m-wait, .booking), main > section :is(.course-slot, .course-card:not(.course-card-note)), main > section:is(.hero, .page-hero, .section) .btn { transition: scale .15s ease, opacity 1.2s ease, transform 1.2s ease; }
  main > section :is([aria-labelledby="trainingsbereiche-heading"] .img-card, .finder-paths .img-card, .card):not(.m-wait, .booking):active, main > section :is(.course-slot, .course-card:not(.course-card-note)):active, main > section:is(.hero, .page-hero, .section) .btn:active { scale: .97; }
}
