/* =============================================================================
   PHYSIOPARK MG · REHASPORT (/rehasport) — Seiten-CSS
   Datei:   ppw-rehasport.css   Version: 0.2.1
   System:  gebrückt auf ppw-base.css (globale --ppw-* Tokens, Hardcode-
            Fallbacks eingebaut, 0 sichtbare Änderung)
   Scope:   alles unter .reha-page gekapselt.

   CHANGELOG (neueste zuerst · historische Einträge NIE umschreiben)
   --------------------------------------------------------------------------
   0.2.1 · 2026-08-16
     - content-visibility auf .reha-card wieder entfernt (0.2.0): jede
       Karte wurde vor dem Rendern durch eine 700px-Schätzbox ersetzt —
       nach dem Wizard-Redirect landete der Browser an der Schätzposition,
       dann renderten die Karten mit echten Höhen und das Formular rutschte
       ~400px nach oben (gemessen: Landung dauerhaft 392px HINTER dem
       Formular — GF „springt, als würde er neu laden"). Die Annahme
       „Formular unberuehrt" stimmte nicht: die Formular-Box ist selbst
       eine .reha-card. Perf-Gewinn hier klein (7 Karten), Anker-Stabilität
       wichtiger.
   0.2.0 · 2026-07-19
     - Rebuild aus dem Original-Quellcode (rehasport-seite.css). Ersetzt
       die aus dem minifizierten Autoptimize-Output erzeugte 0.1.0.
       Formatierung und Kommentare des Originals vollständig erhalten.
     - Tokens wertetreu auf --ppw-* gebrückt (Fallback = bisheriger Wert).
       Gleiches System wie ppw-home, ppw-header, ppw-footer, ppw-standorte,
       ppw-leistungen.
     - font-family: Manrope-Referenz entfernt (lud real nie), jetzt
       var(--ppw-font, System-Stack).
     - content-visibility: auto auf .reha-card für kürzere initiale
       Renderzeit (Live-Tabelle, Modale und Formular unberührt, der
       Browser rendert bei scrollIntoView sofort).
     - Kurslogik, Modale, Reveal (reha-js-Muster) und WPForms-Hooks
       UNVERÄNDERT.
     - Zugehöriges HTML: pp-rehasport.html 0.2.0
   0.1.0 · 2026-07-19 (verworfen)
     - Aus minifiziertem Live-CSS erzeugt, zugehöriges HTML war fehlerhaft.
       Nicht verwenden.

   ARBEITSREGELN (wie üblich)
     - KEINE Textänderung. Nur Präsentation/CSS.
     - Farben/Radien/Schatten über Tokens statt Hardcodes.
     - Klassennamen NICHT umbenennen (JS-Hooks: Kurslogik, Modale, WPForms).
     - Jede Änderung: Version hochziehen + hier loggen.
   ============================================================================= */

.reha-page *,
.reha-page *::before,
.reha-page *::after { box-sizing: border-box; }

.reha-page {
  /* Gebrückt auf ppw-base.css, Fallback = bisheriger Wert (wertetreu) */
  --font-family: var(--ppw-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);

  --bg: var(--ppw-surface-alt, #eef4f5);
  --surface: var(--ppw-surface, #ffffff);
  --surface-soft: var(--ppw-bg-alt, #f6fafa);
  --surface-tint: #f1f7f7;                 /* lokal */

  --text: #0e2329;                         /* lokal */
  --muted: #3a5258;                        /* lokal */
  --muted-soft: #5a737a;                   /* lokal */

  --primary: var(--ppw-brand, #0f5c63);
  --primary-deep: var(--ppw-brand-deep, #0a464c);
  --primary-hover: var(--ppw-brand-hover, #0b494f);
  --primary-soft: var(--ppw-brand-soft, #e3eff0);

  /* freie Plätze: grün, einladend */
  --ok: #1d6b3c;
  --ok-dot: #27ae60;

  /* Warteliste: warmes Bernstein, weiterhin als Option lesbar (nicht "tot") */
  --wait: #93611a;
  --wait-dot: #e0962a;
  --wait-soft: #fbf2e3;

  --border: var(--ppw-border, #d4e1e3);
  --border-soft: #e5edee;                  /* lokal */

  --shadow-sm: var(--ppw-shadow-sm, 0 4px 12px rgba(7, 24, 28, 0.06));
  --shadow: var(--ppw-shadow-md, 0 14px 32px rgba(7, 24, 28, 0.10));
  --shadow-hover: 0 18px 34px rgba(7, 24, 28, 0.13);

  --radius: 16px;
  --radius-card: 14px;
  --ui-radius-pill: 12px;

  --heading-main: var(--ppw-heading, #0c2731);
  --heading-sub: #123c46;                  /* lokal */

  font-family: var(--font-family);
  color: var(--text);
  padding: 28px 14px 44px;
  background:
    radial-gradient(1100px 480px at 4% 0%, rgba(15, 92, 99, 0.10), transparent 72%),
    radial-gradient(820px 360px at 100% 8%, rgba(15, 92, 99, 0.06), transparent 72%),
    linear-gradient(180deg, #f9fcfc 0%, var(--bg) 100%);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@media (hover: hover) and (pointer: fine) {
  html { scroll-behavior: smooth; }
}

.reha-page img { max-width: 100%; }
.reha-lock-scroll { overflow: hidden; }

.reha-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 10px;
  text-align: center;
}

.reha-page #anmeldeformular { scroll-margin-top: 110px; }

.reha-card,
.reha-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  padding: 36px 24px 32px;
  overflow: hidden;
}

/* Sections unterhalb des sichtbaren Bereichs erst bei Annäherung rendern
   (0.2.1 ENTFERNT: die 700px-Schätzboxen ersetzten die Karten beim ersten
   Rendern — nach dem Wizard-Redirect landete der Browser an der
   Schätzposition und das Formular rutschte beim Nachrendern ~400px
   nach oben. Die Annahme „Formular unberuehrt" war falsch: die
   Formular-Box ist selbst eine .reha-card. Perf-Gewinn hier zu klein
   für instabile Anker-Landungen.) */

.reha-card + .reha-card,
.reha-card + .reha-reveal,
.reha-reveal + .reha-card,
.reha-reveal + .reha-reveal { margin-top: 28px; }

.reha-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reha-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 2.4vw + 1rem, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 850;
  color: var(--heading-main);
}

.reha-hero-sub {
  margin: 0 0 16px;
  font-size: clamp(1.05rem, 0.6vw + 1rem, 1.3rem);
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.005em;
}

.reha-hero-text {
  margin: 0 auto;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.1rem;
  font-weight: 500;
}

.reha-hero-text strong { color: var(--heading-sub); font-weight: 700; }

.reha-pill-list {
  list-style: none;
  padding: 18px 0 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: center;
  width: 100%;
  max-width: 900px;
}

.reha-pill-list li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading-sub);
}

.reha-hero-actions,
.reha-contact-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  width: 100%;
  max-width: 560px;
}

.reha-contact-actions { margin-top: 14px; }

.reha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 18px;
  border-radius: var(--ui-radius-pill);
  border: 1px solid transparent;
  text-decoration: none !important;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.reha-btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--primary), #2f7880);
  box-shadow: 0 10px 22px rgba(15, 91, 99, 0.22);
}

.reha-btn-primary:hover,
.reha-btn-primary:focus-visible {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--primary-hover), #256b72);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 91, 99, 0.28);
}

.reha-btn-ghost {
  background: #ffffff;
  color: #103a43 !important;
  border: 1px solid #98bcc1;
  box-shadow: var(--shadow-sm);
}

.reha-btn-ghost:hover,
.reha-btn-ghost:focus-visible {
  background: var(--primary-soft);
  color: #0b3038 !important;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 91, 99, 0.14);
}

.reha-btn:focus-visible,
.reha-team-member:focus-visible,
.reha-slot-btn:focus-visible,
.reha-close-modal:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.reha-small-hint {
  margin: 12px 0 0;
  font-size: 0.86rem;
  color: var(--muted-soft);
  font-weight: 600;
}

.reha-card h2,
.reha-card-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 1.4vw + 1rem, 2.1rem);
  line-height: 1.18;
  font-weight: 840;
  color: var(--heading-main);
  letter-spacing: -0.015em;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.reha-card h2::after,
.reha-card-head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 200px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary) 20%, var(--primary) 80%, transparent);
}

.reha-card-head p,
.reha-card > p,
.reha-form-box p {
  margin: 0 auto 16px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
  font-weight: 500;
}

/* ---------- Kurszeiten-Tabelle (Desktop) ---------- */

.reha-course-table-container {
  overflow-x: auto;
  border-radius: var(--radius-card);
  margin-top: 16px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.reha-course-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.reha-course-table th,
.reha-course-table td {
  border: 1px solid var(--border-soft);
  padding: 10px 8px;
  font-size: 0.96rem;
  text-align: center;
  vertical-align: middle;
}

.reha-course-table th {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: #ffffff;
  font-weight: 800;
}

.reha-course-table tr:nth-child(even) { background: #fbfdfd; }

.reha-course-table td:first-child {
  font-weight: 800;
  color: var(--heading-sub);
  white-space: nowrap;
}

.reha-cell--empty { color: var(--muted-soft); }
.reha-cell--empty span { opacity: 0.45; }
.reha-cell--course { padding: 6px; }

.reha-badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #cfe1e3;
  color: var(--primary-deep);
  font-size: 0.84rem;
  font-weight: 800;
  transition: background-color 0.18s ease, opacity 0.18s ease;
}

/* ---------- Anklickbarer Slot ---------- */

.reha-slot-btn {
  appearance: none;
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 7px 6px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.reha-slot-btn:hover { background: rgba(15, 92, 99, 0.06); }
.reha-slot-btn:hover .reha-badge { background: #d3e7e8; }
.reha-slot-btn:active { transform: scale(0.98); }

/* ---------- Freie Plätze / Warteliste in Zellen und Karten ---------- */

.reha-cell-free {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.reha-cell-free[hidden] { display: none; }

.reha-cell-free::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 5px;
}

.reha-slot.is-open .reha-cell-free { color: var(--ok); }
.reha-slot.is-open .reha-cell-free::before { background: var(--ok-dot); }

.reha-slot.is-wait .reha-cell-free { color: var(--wait); }
.reha-slot.is-wait .reha-cell-free::before { background: var(--wait-dot); }
.reha-slot.is-wait .reha-badge { opacity: 0.7; }

/* ---------- Kurszeiten-Karten (Mobile) ---------- */

.reha-course-cards {
  display: none;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  text-align: left;
}

.reha-day-card {
  position: relative;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.reha-day-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.7;
}

.reha-day-card h3 {
  margin: 0 0 10px;
  color: var(--heading-sub);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.reha-day-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reha-day-slot-btn {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
}

.reha-day-slot-btn:hover {
  background: var(--surface-tint);
  border-color: var(--primary);
}

.reha-day-time {
  font-weight: 800;
  color: var(--primary-deep);
  font-size: 0.95rem;
}

.reha-day-slot.is-wait .reha-day-time { color: var(--wait); }

@media (max-width: 720px) {
  .reha-course-table-container { display: none; }
  .reha-course-cards { display: grid; }
}

/* ---------- Live-Status + Nudge ---------- */

.reha-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px 16px;
  margin: 16px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.reha-live[hidden] { display: none; }

.reha-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ok-dot);
  box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.16);
  animation: rehaLivePulse 2.2s ease-in-out infinite;
}

@keyframes rehaLivePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

.reha-live-stand { color: var(--heading-sub); }

.reha-live-legend { display: inline-flex; flex-wrap: wrap; gap: 8px 14px; }

.reha-live-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-soft);
  font-weight: 700;
}

.reha-live-key::before { content: ""; width: 9px; height: 9px; border-radius: 999px; }
.reha-live-key--open::before { background: var(--ok-dot); }
.reha-live-key--wait::before { background: var(--wait-dot); }

.reha-live-nudge {
  margin: 12px auto 0;
  max-width: 640px;
  color: var(--heading-sub);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.reha-live-nudge[hidden] { display: none; }

.reha-live-hinweis {
  margin: 12px auto 0;
  max-width: 760px;
  text-align: left;
  padding: 11px 14px;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--primary-soft);
  border-top: 1px solid #c8dde0;
  border-right: 1px solid #c8dde0;
  border-bottom: 1px solid #c8dde0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
  font-weight: 500;
}

.reha-live-hinweis[hidden] { display: none; }

/* ---------- Hinweise ---------- */

.reha-note-wrap { margin-top: 14px; }

.reha-note {
  margin: 10px auto 0;
  max-width: 930px;
  text-align: left;
  padding: 12px 14px;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--primary-soft);
  border-top: 1px solid #c8dde0;
  border-right: 1px solid #c8dde0;
  border-bottom: 1px solid #c8dde0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 500;
}

.reha-note strong { color: var(--heading-sub); font-weight: 800; }

/* ---------- Ablauf-Schritte ---------- */

.reha-steps {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  text-align: left;
}

.reha-steps li {
  position: relative;
  padding: 16px 14px 16px 52px;
  min-height: 64px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.reha-steps li span {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}

/* ---------- Angebote ---------- */

.reha-offer-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.reha-offer-item {
  position: relative;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.reha-offer-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.7;
}

.reha-offer-item h3 {
  margin: 0 0 8px;
  color: var(--heading-sub);
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.reha-offer-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.98rem;
  font-weight: 500;
}

.reha-offer-item strong { color: var(--heading-sub); font-weight: 800; }

/* ---------- Team ---------- */

.reha-team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  justify-content: center;
}

.reha-team-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: center;
}

.reha-team-member {
  appearance: none;
  position: relative;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  border-radius: var(--radius-card);
  padding: 20px 16px 18px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-family: inherit;
  width: 100%;
  text-align: center;
}

.reha-team-member::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.7;
}

.reha-team-member:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}

.reha-team-member img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid var(--primary-soft);
  box-shadow: 0 8px 18px rgba(7, 24, 28, 0.12);
  margin-bottom: 12px;
  background: #ffffff;
}

.reha-team-member h3 {
  margin: 0 0 5px;
  color: var(--heading-sub);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.reha-team-member p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
}

/* ---------- Kontakt ---------- */

.reha-contact-card-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  justify-content: center;
  text-align: left;
  max-width: 820px;
  margin: 0 auto;
}

.reha-contact-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 3px solid var(--primary-soft);
  box-shadow: 0 8px 18px rgba(7, 24, 28, 0.12);
  object-fit: cover;
}

.reha-contact-text h3 {
  margin: 0 0 6px;
  color: var(--heading-main);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.reha-contact-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 500;
}

.reha-contact-text strong { color: var(--heading-sub); font-weight: 800; }

/* ---------- Formular + Auswahl-Chip ---------- */

.reha-form-box { scroll-margin-top: 110px; }

.reha-pick {
  margin: 0 auto 14px;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--ui-radius-pill);
  background: var(--primary-soft);
  border: 1px solid #c8dde0;
  color: var(--heading-sub);
  font-weight: 800;
  font-size: 0.95rem;
  text-align: left;
}

.reha-pick[hidden] { display: none; }

.reha-pick::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
}

.reha-form-inner {
  margin-top: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.reha-page .wpforms-container-full,
.reha-page div.wpforms-container-full { margin: 0 !important; }

.reha-page .wpforms-container input[type="text"],
.reha-page .wpforms-container input[type="email"],
.reha-page .wpforms-container input[type="tel"],
.reha-page .wpforms-container input[type="number"],
.reha-page .wpforms-container input[type="url"],
.reha-page .wpforms-container input[type="date"],
.reha-page .wpforms-container select,
.reha-page .wpforms-container textarea {
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  min-height: 44px;
  box-shadow: none !important;
}

.reha-page .wpforms-container input:focus,
.reha-page .wpforms-container select:focus,
.reha-page .wpforms-container textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(15, 92, 99, 0.14) !important;
  outline: none !important;
}

.reha-page .wpforms-container label,
.reha-page .wpforms-container .wpforms-field-label {
  color: var(--heading-sub) !important;
  font-weight: 800 !important;
}

.reha-page .wpforms-container button[type="submit"],
.reha-page .wpforms-container .wpforms-submit {
  min-height: 50px !important;
  padding: 11px 18px !important;
  border-radius: var(--ui-radius-pill) !important;
  border: 1px solid transparent !important;
  background: linear-gradient(135deg, var(--primary), #2f7880) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 22px rgba(15, 91, 99, 0.22) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.reha-page .wpforms-container button[type="submit"]:hover,
.reha-page .wpforms-container .wpforms-submit:hover {
  background: linear-gradient(135deg, var(--primary-hover), #256b72) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 91, 99, 0.28) !important;
}

/* ---------- Modals ---------- */

.reha-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 21, 26, 0.66);
  padding: 18px;
}

.reha-modal[hidden] { display: none !important; }

.reha-modal-content {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  position: relative;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.30);
  text-align: center;
  animation: rehaFadeIn 0.28s ease;
  border: 1px solid var(--border);
}

.reha-modal-content img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid var(--primary-soft);
  box-shadow: 0 8px 18px rgba(7, 24, 28, 0.12);
  margin-bottom: 12px;
}

.reha-modal-content h2 {
  margin: 2px 0 10px;
  font-size: clamp(1.3rem, 1vw + 1rem, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 850;
  color: var(--heading-main);
}

.reha-modal-content p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 500;
}

.reha-modal-content a { color: var(--primary); font-weight: 800; }

.reha-close-modal {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  background: transparent;
  color: #6b7f85;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  font-weight: 800;
  padding: 4px 8px;
}

.reha-close-modal:hover { color: var(--heading-main); }

@keyframes rehaFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Reveal-Animation ----------
   Versteckter Startzustand nur mit aktivem JS (.reha-js).
   Verhindert dauerhaft unsichtbaren Inhalt bei blockiertem Script. */

.reha-page.reha-js .reha-reveal { opacity: 0; transform: translateY(18px); }

.reha-page.reha-js .reha-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reha-delay, 0ms);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .reha-offer-grid,
  .reha-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .reha-contact-card-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .reha-contact-actions { margin-left: auto; margin-right: auto; }
}

@media (max-width: 760px) {
  .reha-page { padding: 22px 12px 36px; }
  .reha-container { padding: 0; }
  .reha-card,
  .reha-hero { padding: 24px 18px; }
  .reha-hero h1 { font-size: 1.85rem; }
  .reha-hero-sub { font-size: 1.08rem; }
  .reha-card h2,
  .reha-card-head h2 { font-size: 1.55rem; }
  .reha-hero-text,
  .reha-card-head p,
  .reha-card > p,
  .reha-form-box p { font-size: 1.08rem; }
  .reha-hero-actions,
  .reha-contact-actions { grid-template-columns: 1fr; max-width: none; }
  .reha-pill-list {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
  .reha-pill-list li { text-align: center; }
  .reha-offer-grid,
  .reha-team-grid { grid-template-columns: 1fr; }
  .reha-form-inner { padding: 14px; }
  .reha-live { width: 100%; }
}

@media (max-width: 520px) {
  .reha-page { padding: 18px 8px 30px; }
  .reha-card,
  .reha-hero { padding: 22px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reha-btn,
  .reha-team-member,
  .reha-slot-btn,
  .reha-page.reha-js .reha-reveal,
  .reha-page.reha-js .reha-reveal.is-visible,
  .reha-live-dot,
  .reha-page .wpforms-container button[type="submit"],
  .reha-page .wpforms-container .wpforms-submit {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
