/* ═══════════════════════════════════════════════════════════════════
   Al Hayat Kirche — Premium-Schicht (Vorschlag, nur Testserver)
   Wird NACH styles.css geladen und überschreibt gezielt. Diese Datei
   und ihr <link> in index.html entfernen = alter Stand, sonst ändert
   sich nichts.

   Richtung: warm, ruhig, fotogetragen (Airbnb-Prinzipien aus
   awesome-design-md), übertragen auf die Marke: EINE Akzentfarbe
   (Grün #006633) für Hauptaktionen, Limette nur als Akzentlinie,
   weißer Grund, feine Haarlinien, weiche Rundungen, mäßige Schriftstärken.
   Regeln aus design-taste-frontend: echtes Foto im Hero, Hero erscheint
   einmal beim Laden, keine Einblend-Animation beim Scrollen, ruhige
   Hover-Effekte (Karte hebt sich 2px, Foto zoomt 1.03), 44px Tippziele.
   Regeln aus web-design-guidelines: Skip-Link, sichtbarer Fokus,
   text-wrap: balance, tabular-nums, overscroll-behavior in Dialogen.
═══════════════════════════════════════════════════════════════════ */

:root {
  --p-ink: #17241c;          /* Überschriften / starker Text  */
  --p-body: #39443d;         /* Fließtext (10.6:1 auf Weiß)    */
  --p-muted: #5b675f;        /* Nebentext (5.9:1 auf Weiß)     */
  --p-hairline: #e2e8e3;
  --p-hairline-strong: #c9d3cb;
  --p-surface: #f7f8f6;
  --p-radius-card: 16px;
  --p-radius-btn: 10px;
  --p-shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 4px 16px rgba(16, 40, 24, .05);
  --p-shadow-hover: 0 2px 4px rgba(16, 40, 24, .06), 0 14px 32px rgba(16, 40, 24, .10);
  --p-ease: cubic-bezier(.2, .7, .2, 1);
  /* Blau aus den Abschnitts-Labels zurück in die Marke */
  --accent-blue: var(--green-primary);
  --text-primary: var(--p-ink);
  --text-secondary: var(--p-body);
  --text-muted: var(--p-muted);
  --border: var(--p-hairline);
  --radius-lg: var(--p-radius-card);
  --shadow-card: var(--p-shadow);
  --shadow-card-hover: var(--p-shadow-hover);
}

body { color: var(--p-body); -webkit-tap-highlight-color: rgba(0, 102, 51, .12); }

/* ── Skip-Link ───────────────────────────────────────────────── */
.skip-link {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 1000;
  padding: 12px 18px; border-radius: var(--p-radius-btn);
  background: var(--green-dark); color: #fff; font-weight: 700; text-decoration: none;
  transform: translateY(-160%); transition: transform .15s var(--p-ease);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 3px solid var(--green-lime); outline-offset: 2px; }

/* Sichtbarer Fokus überall (auch Felder, die bisher nur die Rahmenfarbe wechselten) */
:focus-visible { outline: 2px solid var(--green-primary); outline-offset: 3px; }
.mg-input:focus-visible, .member-modal input:focus-visible { box-shadow: 0 0 0 3px rgba(0, 102, 51, .3); }

/* ── Typografie ──────────────────────────────────────────────── */
h1, h2, h3, .section-header h2 { text-wrap: balance; color: var(--p-ink); }
p, .welcome-text { text-wrap: pretty; }
.section-header h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
html[dir="rtl"] .section-header h2 { letter-spacing: 0; }
.section-header p { color: var(--p-muted); font-size: 1.06rem; }
.section-label {
  color: var(--green-primary); font-size: .8rem; font-weight: 700; letter-spacing: .14em;
}
html[dir="rtl"] .section-label { letter-spacing: 0; font-size: .95rem; }
.service-time, .cal-day-num, .event-time, .hero-event-badge { font-variant-numeric: tabular-nums; }

/* ── Abstände: großzügig, aber ohne leere Bänder ─────────────── */
.section { padding-block: clamp(56px, 7vw, 96px); }
.page { min-height: auto; }
.page.active { min-height: calc(100vh - 320px); }

/* ── Buttons: eine Akzentfarbe, flach, 48px ──────────────────── */
/* Bewegung (Schritt beim Hover, Druck beim Klick) kommt aus der Taste-Motion-Schicht
   (/taste/motion/motion.css): hier nie transform oder transition auf .btn setzen */
.btn {
  min-height: 48px; padding: 12px 22px; border-radius: var(--p-radius-btn);
  font-weight: 700; letter-spacing: 0; box-shadow: none;
}
.btn-primary, .btn-primary:link, .btn-primary:visited { background: var(--green-primary); color: #fff; border: 1px solid var(--green-primary); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); box-shadow: none; }
.btn-outline { background: #fff; color: var(--p-ink); border: 1px solid var(--p-hairline-strong); }
.btn-outline:hover { background: #fff; color: var(--green-dark); border-color: var(--green-primary); }
.btn-whatsapp { background: #127a46; color: #fff; border: 1px solid #127a46; }   /* WhatsApp-Grün, kontraststark */
.btn-whatsapp:hover { background: #0d6038; }

/* ── Hero: echtes Foto der Gemeinde ──────────────────────────── */
.hero { min-height: min(86vh, 820px); }
.hero.has-photo { background: #0b2a19; }
.hero.has-photo::before, .hero.has-photo::after { display: none; }
.hero.has-photo .hero-bg {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 30, 15, .88) 0%, rgba(3, 30, 15, .72) 42%, rgba(3, 30, 15, .28) 100%),
    var(--hero-photo) center / cover no-repeat;
  animation: p-photo-in 1.1s cubic-bezier(.22, 1, .36, 1) both;   /* Foto setzt sich einmal (1.05 → 1), blendet nie */
}
html[dir="rtl"] .hero.has-photo .hero-bg {
  background:
    linear-gradient(270deg, rgba(3, 30, 15, .88) 0%, rgba(3, 30, 15, .72) 42%, rgba(3, 30, 15, .28) 100%),
    var(--hero-photo) center / cover no-repeat;
}
.hero.has-photo .hero-content { z-index: 2; width: 100%; }
.hero.has-photo .hero-logo-watermark { display: none; }
.hero.has-photo .hero-eyebrow { color: var(--green-lime); }
.hero.has-photo .hero-sub, .hero.has-photo .hero-title, .hero.has-photo .hero-title * { color: #fff; }
.hero.has-photo .hero-name-divider { background: linear-gradient(90deg, var(--green-lime), rgba(196, 214, 0, .2)); }
.hero.has-photo .hero-verse { color: rgba(255, 255, 255, .92); border-color: var(--green-lime); }
.hero.has-photo .hero-verse cite { color: var(--green-lime); }
.hero.has-photo .btn-primary { background: #fff; color: var(--green-dark); border-color: #fff; }
.hero.has-photo .btn-primary:hover { background: var(--green-pale); border-color: var(--green-pale); }
.hero.has-photo .btn-outline-hero { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.hero.has-photo .btn-outline-hero:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.hero.has-photo .hero-event-badge { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; backdrop-filter: blur(6px); }

/* Der Text des Heros tritt über motion.js ein (data-enter), das Foto setzt sich hier */
@keyframes p-photo-in { from { transform: scale(1.05); } to { transform: none; } }

/* ── Keine Einblendung beim Scrollen (Inhalt sofort sichtbar) ── */
.animate-on-scroll, .animate-on-scroll.is-visible { opacity: 1 !important; transform: none; transition: none; transition-delay: 0s !important; }

/* ── Vertrauensleiste ────────────────────────────────────────── */
.trust-bar { background: #fff; border-block: 1px solid var(--p-hairline); }
.trust-pillar-title { color: var(--p-ink); }
.trust-pillar-desc { color: var(--p-muted); }

/* ── Willkommen ──────────────────────────────────────────────── */
.welcome-text { max-width: 760px; margin-inline: auto; color: var(--p-ink); font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.7; }

/* ── Karten: eine Familie (Termine, Erwartungen, Kontakt) ────── */
.service-card, .expect-card, .contact-block {
  background: #fff; border: 1px solid var(--p-hairline); border-radius: var(--p-radius-card);
  box-shadow: var(--p-shadow);
}
.service-card { border-top: 1px solid var(--p-hairline); padding: 26px 24px; display: flex; flex-direction: column; gap: 4px; }
/* Karten ohne Link bewegen sich nicht (Taste: nur verlinkte Karten heben sich 2px) */
.service-day { color: var(--green-primary); }
.service-title { color: var(--p-ink); }
.service-card a, .event-desc a, .text-link-url { overflow-wrap: anywhere; color: var(--green-primary); text-underline-offset: 3px; }
.services-grid { gap: 20px; }

/* Erwartungs-Karten: auf dem Handy untereinander statt gequetscht */
@media (max-width: 640px) {
  .expect-card { flex-direction: column !important; align-items: center !important; text-align: center; gap: 10px; padding: 24px 20px; }
  .expect-card-icon { margin: 0 auto; }
}

/* ── Unterseiten-Kopf: ruhig, mit Marken-Linie ───────────────── */
.page-hero, .page-hero-section {
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-hairline);
  position: relative;
}
.page-hero::after, .page-hero-section::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--green-primary), var(--green-medium) 45%, var(--green-lime));
}
html[dir="rtl"] .page-hero::after, html[dir="rtl"] .page-hero-section::after {
  background: linear-gradient(270deg, var(--green-primary), var(--green-medium) 45%, var(--green-lime));
}
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.015em; color: var(--p-ink); }
html[dir="rtl"] .page-hero h1 { letter-spacing: 0; }
.page-hero p { color: var(--p-muted); font-size: 1.08rem; }

/* ── Medien: Fotos ruhig gerahmt, Zoom im Rahmen ─────────────── */
.gallery-item { border-radius: 14px; overflow: hidden; }
.gallery-item img { transition: transform var(--m-image-out, 400ms) cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) and (pointer: fine) {
  .gallery-item:is(:hover, :focus-visible) img { transform: scale(1.03); transition-duration: var(--m-image, 600ms); }
}

/* ── Kontakt ─────────────────────────────────────────────────── */
.contact-map iframe { border-radius: var(--p-radius-card); border-color: var(--p-hairline); min-height: 420px; }

/* ── Dialoge, Bildbetrachter, mobiles Menü: kein Durchscrollen ── */
.lightbox, .modal, .event-modal-overlay, .event-modal-card, .modal-overlay, .nav-links { overscroll-behavior: contain; }

/* ── Fußzeile ────────────────────────────────────────────────── */
.footer { margin-top: 0; }

/* ── Weniger Bewegung ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero.has-photo .hero-bg { animation: none !important; }
  .gallery-item:is(:hover, :focus-visible) img { transform: none; }
  .nav-links .nav-link::after, .footer a { transition: none !important; }
}

/* ── Tippziele mindestens 44px (Handy) ───────────────────────── */
.menu-toggle { width: 44px; height: 44px; padding: 10px 8px; justify-content: center; }
.lang-option, .footer-social, .event-modal-close { min-height: 44px; }
.event-modal-close { min-width: 44px; }
.footer a[href^="tel:"], .footer a[href^="mailto:"] { display: inline-block; padding-block: 12px; margin-block: -12px; }

/* Kalender-Kopf ist hell: Label grün statt weiß (war vorher unlesbar) */
.events-hero .section-label {
  background: var(--green-pale); color: var(--green-dark) !important;
  border: 1px solid rgba(0, 102, 51, .15);
}

/* ═══ Runde 2: Durchsicht aller Seiten ═══════════════════════════ */

/* Überschriften überall in Markengrün (vorher gemischt schwarz/grün) */
h1, h2, h3, .section-header h2, .page-hero h1 { color: var(--green-dark); }

/* FAQ-Kopf hatte keinen Innenabstand → Label klebte an der Leiste */
.page-hero-section { padding: 64px 0 52px; }

/* Kalender-Kopf: gleiche ruhige Fläche + Markenlinie wie die anderen Unterseiten */
.events-hero { background: var(--p-surface); border-bottom: 1px solid var(--p-hairline); }
.events-hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--green-primary), var(--green-medium) 45%, var(--green-lime));
}
html[dir="rtl"] .events-hero::after { background: linear-gradient(270deg, var(--green-primary), var(--green-medium) 45%, var(--green-lime)); }
.events-hero-icon { color: var(--green-primary); }
/* Zweitknöpfe im Kalender-Kopf: gleiche Familie wie .btn-outline, eckig statt Pille */
.btn-white-outline, .btn-ghost-hero { border-radius: var(--p-radius-btn); }
.btn-ghost-hero { background: #fff; border: 1px solid var(--p-hairline-strong); color: var(--p-ink); font-weight: 700; }
.btn-ghost-hero:hover { background: #fff; border-color: var(--green-primary); color: var(--green-dark); }

/* Textspalte (Selbstverständnis, Kinderdienste, Geschichte): gleich breit wie
   Video/Kasten darüber, dadurch gleiche linke und rechte Kante */
.content-narrow { max-width: 700px; }
.content-narrow .body-text, .content-narrow p,
html[dir="rtl"] .content-narrow .body-text, html[dir="rtl"] .content-narrow p { max-width: none; }

/* Dunkle Aufruf-Kästen: Hauptknopf weiß, damit er sich abhebt */
.children-cta-block .btn-primary, .kalender-visitor-block .btn-primary {
  background: #fff; color: var(--green-dark); border-color: #fff;
}
.children-cta-block .btn-primary:hover, .kalender-visitor-block .btn-primary:hover { background: var(--green-pale); border-color: var(--green-pale); }
.children-cta-block .btn-outline, .kalender-visitor-block .btn-outline {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6);
}
.children-cta-block .btn-outline:hover, .kalender-visitor-block .btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* Kontakt-Karten: Beschriftung in lesbarem Grün (hellgrün war zu blass) */
.contact-block h4 { color: var(--green-primary); }

/* ═══ Runde 3: Web-Interface-Guidelines + „teure“ Anmutung ═══════ */

/* ── Guidelines ──────────────────────────────────────────────── */
[id], h2, h3 { scroll-margin-top: calc(var(--nav-h) + 16px); }
a, button, [role="button"], input, select, textarea, label { touch-action: manipulation; }
.member-modal input[type="password"]:focus-visible { box-shadow: 0 0 0 3px rgba(0, 102, 51, .3); }
.mobile-sticky-cta { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
select { background-color: #fff; color: var(--p-ink); }
[role="button"][tabindex]:focus-visible { outline: 2px solid var(--green-primary); outline-offset: 2px; }
::selection { background: rgba(196, 214, 0, .45); color: var(--p-ink); }

/* ── Ruhigere Grundflächen: warmes Elfenbein statt Mintgrün ──── */
:root { --green-soft: #f6f5f0; --p-surface: #f6f5f0; }
body { font-size: 17px; }
p { line-height: 1.75; }

/* ── Navigation: schlank, gläsern, ohne Pillen ───────────────── */
.navbar { background: rgba(255, 255, 255, .86); border-bottom: 1px solid rgba(23, 36, 28, .07); backdrop-filter: saturate(160%) blur(18px); }
.nav-links .nav-link { color: var(--p-body); font-weight: 500; letter-spacing: .005em; }
.nav-links .nav-link:hover, .nav-links .nav-link.active { background: transparent; color: var(--green-dark); }
.nav-links .nav-link.active::before { display: none; }
.nav-links .nav-link.active::after { left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--green-lime); }
.lang-btn { border-radius: 999px; }

/* ── Typografie: groß, ruhig, redaktionell ───────────────────── */
.section-header h2, .p-life-title { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; letter-spacing: -.022em; line-height: 1.08; }
.page-hero h1, .events-hero-title, .page-hero-section h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); letter-spacing: -.028em; line-height: 1.02; }
html[dir="rtl"] .section-header h2, html[dir="rtl"] .p-life-title,
html[dir="rtl"] .page-hero h1, html[dir="rtl"] .events-hero-title, html[dir="rtl"] .page-hero-section h1 { letter-spacing: 0; line-height: 1.3; }
.section-header { margin-bottom: clamp(36px, 5vw, 64px); }
/* Abschnitts-Label als feine Zeile mit Strich davor (statt Pille) */
.section-label, .contact-intro .section-label, .expect-section .section-label, .children-features-bar .section-label {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; border-radius: 0;
  color: var(--green-primary); font-size: .78rem; letter-spacing: .18em;
}
.section-label::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
html[dir="rtl"] .section-label { letter-spacing: 0; font-size: .95rem; }
.text-center .section-label, .section-header .section-label { justify-content: center; }

/* ── Abstände: mehr Luft ────────────────────────────────────── */
.section { padding-block: clamp(64px, 7.5vw, 108px); }

/* ── Hero der Startseite: Vollbild-Wirkung ───────────────────── */
.hero.has-photo { min-height: min(92vh, 900px); }
.hero.has-photo .hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.03em; line-height: 1; }
html[dir="rtl"] .hero.has-photo .hero-title { letter-spacing: 0; line-height: 1.25; }
.hero.has-photo .hero-bg {
  background:
    linear-gradient(180deg, rgba(3, 25, 13, .35) 0%, rgba(3, 25, 13, 0) 30%),
    linear-gradient(90deg, rgba(3, 25, 13, .9) 0%, rgba(3, 25, 13, .7) 40%, rgba(3, 25, 13, .15) 100%),
    var(--hero-photo) center 40% / cover no-repeat;
}
html[dir="rtl"] .hero.has-photo .hero-bg {
  background:
    linear-gradient(180deg, rgba(3, 25, 13, .35) 0%, rgba(3, 25, 13, 0) 30%),
    linear-gradient(270deg, rgba(3, 25, 13, .9) 0%, rgba(3, 25, 13, .7) 40%, rgba(3, 25, 13, .15) 100%),
    var(--hero-photo) center 40% / cover no-repeat;
}

/* ── Unterseiten-Köpfe mit Foto ──────────────────────────────── */
.p-has-photo { position: relative; isolation: isolate; background: #0b2a19 !important; border-bottom: 0 !important; }
.p-has-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 25, 13, .86) 0%, rgba(3, 25, 13, .62) 50%, rgba(3, 25, 13, .3) 100%),
    var(--p-photo) center 35% / cover no-repeat;
}
html[dir="rtl"] .p-has-photo::before {
  background:
    linear-gradient(270deg, rgba(3, 25, 13, .86) 0%, rgba(3, 25, 13, .62) 50%, rgba(3, 25, 13, .3) 100%),
    var(--p-photo) center 35% / cover no-repeat;
}
.page-hero.p-has-photo, .page-hero-section.p-has-photo, .events-hero.p-has-photo { padding: clamp(96px, 12vw, 160px) 0 clamp(56px, 7vw, 88px); }
.p-has-photo h1, .p-has-photo .events-hero-title { color: #fff !important; }
.p-has-photo p, .p-has-photo .events-hero-sub { color: rgba(255, 255, 255, .86) !important; }
.p-has-photo .section-label, .events-hero.p-has-photo .section-label { background: none !important; border: 0 !important; color: var(--green-lime) !important; padding: 0; }
.p-has-photo .events-hero-icon { color: var(--green-lime); }
.events-hero.p-has-photo .btn-white-outline { background: #fff; color: var(--green-dark); border-color: #fff; }
.events-hero.p-has-photo .btn-white-outline:hover { background: var(--green-pale); color: var(--green-dark); }
.events-hero.p-has-photo .btn-ghost-hero { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.events-hero.p-has-photo .btn-ghost-hero:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* ── Willkommen: Text + Foto nebeneinander ───────────────────── */
.p-welcome { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: auto 1fr; column-gap: clamp(40px, 6vw, 96px); align-items: start; }
.p-welcome > .section-label { grid-column: 1; grid-row: 1; justify-self: start; align-self: end; }
.p-welcome > .welcome-text { grid-column: 1; grid-row: 2; margin: 16px 0 0; max-width: none; text-align: start; font-size: clamp(1.3rem, 2.1vw, 1.75rem); line-height: 1.55; color: var(--p-ink); letter-spacing: -.005em; }
.p-welcome-photo { grid-column: 2; grid-row: 1 / span 2; margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--p-shadow-hover); }
.p-welcome-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }   /* kein Link → kein Zoom; Moment „picture-develops“ entwickelt es einmal */
@media (max-width: 820px) {
  .p-welcome { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 20px; }
  .p-welcome > .section-label, .p-welcome > .welcome-text, .p-welcome-photo { grid-column: 1; grid-row: auto; }
  .p-welcome-photo { aspect-ratio: 4 / 3; }
}

/* ── Moment „photo-chapters“ (Taste-Kit, /taste/moments): Gemeindeleben in 4 Kapiteln ── */
.p-chapters { background: var(--p-surface); }
.p-chapters .mo-ph__head h2 { color: var(--green-dark); }
.p-chapters .mo-ph__ch h3 { color: var(--green-dark); }
.p-chapters .mo-ph__num { color: var(--green-primary); }
.p-chapters .mo-ph__more { margin-top: 32px; text-align: center; }

/* ── Karten: großzügiger, feiner ────────────────────────────── */
.service-card { padding: 30px 28px; border-radius: 18px; }
.service-card .service-title { font-size: 1.12rem; }
.expect-card { border-radius: 18px; padding: 36px 28px; }
.trust-pillar-icon, .expect-card-icon { background: var(--p-surface) !important; color: var(--green-primary); border-color: transparent !important; }

/* ── Fußzeile: ruhiger, edler ───────────────────────────────── */
.footer { background: #0a2416; border-top: 0; padding: clamp(64px, 8vw, 96px) 0 40px; }
.footer a { color: rgba(255, 255, 255, .9); text-underline-offset: 3px; }
.footer a:hover { color: var(--green-lime); }

/* Kinderdienste-Karten: auf dem Handy untereinander */
@media (max-width: 640px) {
  .children-feat-card { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center; gap: 10px; padding: 24px 20px; }
}


/* Arabisch: Knöpfe und Termin-Badge auf der Textseite (rechts) statt ganz links */
html[dir="rtl"] .hero-actions, html[dir="rtl"] .hero-event-badge { flex-direction: row; }

/* ═══ Runde 4: Taste-Skill — Motion-Schicht, Tokens, Details ═════ */

/* Tokens, die das Taste-Kit (motion.css, Momente) liest — in den Markenfarben */
:root {
  --bg: #fff; --ink: var(--p-ink); --muted: var(--p-muted); --surface: var(--p-surface);
  --line: var(--p-hairline); --line-strong: var(--p-hairline-strong); --card: #fff;
  --action: var(--green-primary); --action-ink: #fff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r-btn: var(--p-radius-btn); --r-md: 14px; --r-lg: 20px;
  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --font-display: var(--font-main); --font-text: var(--font-main);
  --display-weight: 700; --display-tracking: -.02em;
  --t-h3: 1.3rem; --t-lead: 1.1rem; --t-small: .88rem;
}
html[dir="rtl"] { --font-display: 'Latin-Digits', var(--font-arabic); --font-text: 'Latin-Digits', var(--font-arabic); --display-tracking: 0; }   /* Ziffern 0–9 auch in den Momenten */

/* Nav: Wörter ruhen ohne Linie, beim Hover zeichnet sich eine 1px-Linie 4px unter dem Wort
   (links → rechts, in RTL rechts → links); die aktuelle Seite trägt einen festen 2px-Balken */
.nav-links .nav-link::after {
  content: ""; position: absolute; inset-inline: 10px; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--m-out, 120ms) var(--ease);
}
html[dir="rtl"] .nav-links .nav-link::after { transform-origin: right center; }
.nav-links .nav-link:is(:hover, :focus-visible)::after { transform: scaleX(1); transition-duration: var(--m-in, 150ms); }
.nav-links .nav-link.active::after { inset-inline: 10px; bottom: 0; height: 2px; background: var(--green-lime); transform: scaleX(1); }

/* Fußzeile: Wörter ruhen ohne Linie, hellen auf und zeichnen ihre Linie */
.footer a:not(.footer-social) {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat left 100% / 0 1px;
  transition: background-size var(--m-out, 120ms) var(--ease), color var(--m-out, 120ms) var(--ease);
}
html[dir="rtl"] .footer a:not(.footer-social) { background-position: right 100%; }
.footer a:not(.footer-social):is(:hover, :focus-visible) { background-size: 100% 1px; transition-duration: var(--m-in, 150ms); }
.footer-social { transition: background-color var(--m-out, 120ms) var(--ease), border-color var(--m-out, 120ms) var(--ease); }
.footer-social:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }

/* Filter- und Sprach-Knöpfe: gleiche Hover-Sprache wie die Buttons (Ton + 1px Schritt) */
.filter-btn, .media-filter-btn, .lang-btn, .lang-option {
  transition: background-color var(--m-out, 120ms) var(--ease), color var(--m-out, 120ms) var(--ease), border-color var(--m-out, 120ms) var(--ease), transform var(--m-press, 90ms) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover, .media-filter-btn:hover, .lang-btn:hover { transform: translateY(-1px); border-color: var(--p-hairline-strong); }
  .filter-btn:active, .media-filter-btn:active, .lang-btn:active { transform: translateY(1px) scale(.985); }
}

/* Felder: Aktionsfarbe am Rand + weicher 3px-Ring (140ms) */
.mg-input, .member-modal input, .contact-form input, .contact-form textarea {
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.mg-input:focus, .member-modal input:focus { border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(0, 102, 51, .18); }

/* Pfeil in „Anfahrt ↗“ & Co. ruht; die Buttons machen den Schritt */
.btn-outline-hero, .btn-white-outline, .btn-ghost-hero, .btn-whatsapp, .btn-outline { border-radius: var(--p-radius-btn); }

/* Handy-Leiste: kommt erst, wenn der Hero-Knopf weggescrollt ist (premium.js setzt .p-bar-hidden) */
.mobile-sticky-cta { transition: transform 240ms var(--ease), opacity 240ms var(--ease); }
.mobile-sticky-cta.p-bar-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .mobile-sticky-cta { transition: none; }
  .filter-btn, .media-filter-btn, .lang-btn { transform: none !important; }
}

/* Höhe der Handy-Leiste, damit der Kapitel-Moment nicht darunter liegt */
@media (max-width: 640px) { :root { --bar: 76px; } }

/* ═══ Runde 4b: Befunde des Taste-Checkers (consistency.mjs) ═════ */

/* Erster Bildschirm gehört dem Hero allein */
.hero.has-photo { min-height: calc(100svh - var(--nav-h)); }
/* Termin-Badge auf unruhigem Foto: dunkler Grund für sicheren Kontrast */
.hero.has-photo .hero-event-badge { background: rgba(3, 25, 13, .62); border-color: rgba(255, 255, 255, .28); }

/* Fließtext in Karten: dunkler (7:1) und 16px */
.service-card p, .service-card .service-desc, .expect-card p, .children-feat-card p, .trust-pillar-desc { color: var(--p-body); }
.service-card p, .service-card .service-desc { font-size: 1rem; line-height: 1.65; }

/* Termine-Raster ohne verwaiste letzte Karte: 3 Spalten auf dem Desktop */
@media (min-width: 1025px) { #homeServicesGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Fußzeile: Beschriftungen und Name mit 4.5:1 auf dem dunklen Grün */
.footer .footer-info-label { color: rgba(255, 255, 255, .66); }
.footer .footer-de-name .name-bold, .footer .footer-de-name .name-regular { color: #a9d46a; }

/* Sprachmenü: geschlossen auch für die Tastatur weg (Fokus nie auf Unsichtbarem) */
.lang-dropdown:not(.open) { visibility: hidden; }
.lang-dropdown.open { visibility: visible; }
.text-link-url:focus-visible { outline: 2px solid var(--green-primary); outline-offset: 1px; border-radius: 3px; background: var(--green-pale); }
.lang-option:focus-visible { outline: 2px solid var(--green-primary); outline-offset: -2px; }

/* Teilen-Menü: jetzt echte Buttons, gleicher Look wie vorher */
button.share-option { appearance: none; background: none; border: 0; width: 100%; font: inherit; text-align: start; cursor: pointer; }

/* Ein Button-Paar überall: Primär = grün gefüllt, Sekundär = weiß mit feiner Linie und Tinte */
.mobile-cta-secondary, .btn-white-outline, .btn-ghost-hero { background: #fff; color: var(--p-ink); border: 1px solid var(--p-hairline-strong); box-shadow: none; }
.mobile-cta-secondary:is(:hover, :focus) { background: #fff; color: var(--green-dark); border-color: var(--green-primary); }
.mobile-cta-primary { box-shadow: none; border: 1px solid var(--green-primary); }
.mobile-cta-btn { border-radius: var(--p-radius-btn); }
/* Auf Foto/dunklem Grund: Primär weiß gefüllt, Sekundär weiße Linie (nur dort) */
.events-hero.p-has-photo .btn-white-outline { background: #fff; color: var(--green-dark); border-color: #fff; }

/* Willkommen auf dem Handy: Label an der Textkante, nicht mittig */
.p-welcome > .section-label { text-align: start; justify-content: flex-start; }

/* Karten: nur was klickbar ist, hebt sich – 2px, ohne Nachfedern (Taste: kein Overshoot) */
.service-card, .event-card, .service-card.animate-on-scroll, .event-card.animate-on-scroll {
  cursor: pointer;
  transition: transform var(--m-out, 120ms) var(--ease), border-color var(--m-out, 120ms) var(--ease), box-shadow var(--m-out, 120ms) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .service-card:hover, .event-card:hover, .service-card.animate-on-scroll.is-visible:hover, .event-card.animate-on-scroll.is-visible:hover {
    transform: translateY(-2px); border-color: var(--p-hairline-strong); box-shadow: var(--p-shadow-hover); transition-duration: 180ms;
  }
}
.expect-card, .children-feat-card, .contact-block { transition: none; }
.expect-card:hover, .children-feat-card:hover, .contact-block:hover { transform: none; }
.service-desc { margin-top: 8px; }
.service-card:focus-visible, .event-card:focus-visible { outline: 2px solid var(--green-primary); outline-offset: -2px; border-color: var(--green-primary); }
.footer .footer-copy { color: rgba(255, 255, 255, .66); opacity: 1; }
/* Programmatischer Fokus auf <main> nach Seitenwechsel: dezente Linie statt keiner */
#main:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .service-card:hover, .event-card:hover { transform: none; }
}

/* ═══ Runde 5: Master-Durchsicht — gemeinsame Teile ═══════════════ */

/* ── Bildbetrachter (Medien, Startseite, Termine) ───────────────────── */
.lightbox { background: rgba(8, 14, 10, .96); }
.lightbox.open { padding: clamp(56px, 8vh, 88px) clamp(16px, 6vw, 96px); }
.lightbox-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: media-lb-in .35s var(--ease) both;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  display: grid; place-items: center; line-height: 1; padding: 0;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.lightbox-close { width: 48px; height: 48px; font-size: 1.7rem; top: 20px; }
.lightbox-prev, .lightbox-next { width: 56px; height: 56px; font-size: 2.1rem; padding-bottom: 4px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); }
.lightbox-close:focus-visible, .lightbox-prev:focus-visible, .lightbox-next:focus-visible { outline: 2px solid var(--green-lime); outline-offset: 3px; }
@keyframes media-lb-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .lightbox.open { padding: 72px 0; }
  .lightbox-img { border-radius: 0; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox-img { animation: none; } }

/* ── Termin-Dialog (#eventModal): gleiche Karte wie überall ───── */
.event-modal-overlay { background: rgba(8, 20, 13, .55); }
.event-modal-card {
  border-radius: var(--p-radius-card); border: 1px solid var(--p-hairline);
  box-shadow: 0 24px 64px rgba(16, 40, 24, .22);
  transform: translateY(12px);
  transition: transform 240ms var(--ease), opacity 200ms var(--ease);   /* ohne Nachfedern */
  max-height: calc(100dvh - 40px); overflow-y: auto;
}
.event-modal-color-bar { height: 3px; }
.event-modal-poster { border-radius: 0; }
.event-modal-close { background: rgba(255, 255, 255, .92); border: 1px solid var(--p-hairline); color: var(--p-ink); top: 12px; }
.event-modal-close:hover { background: #fff; border-color: var(--green-primary); color: var(--green-dark); }
.event-modal-body { padding: 28px 28px 28px; }
.event-modal-title { font-size: 1.45rem; color: var(--green-dark); line-height: 1.2; }
.event-modal-meta-row { font-size: .95rem; color: var(--p-body); }
.event-modal-meta-row svg { color: var(--green-primary); }
.event-modal-desc { font-size: 1rem; color: var(--p-body); border-top-color: var(--p-hairline); }
/* Hauptaktion und Kalender je über die ganze Breite, Kontakt + Teilen darunter nebeneinander */
.event-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.event-modal-actions > * { min-width: 0; }
.event-modal-actions > .btn-primary { order: -2; grid-column: 1 / -1; }
.event-modal-actions > #eventModalCalPicker { order: -1; grid-column: 1 / -1; }
.event-modal-actions > .btn-outline { order: 1; }
.event-modal-actions > #eventModalShareBtn { order: 2; }
.event-modal-actions .share-picker { display: block; width: 100%; }
.event-modal-actions .btn { width: 100%; justify-content: center; padding-inline: 14px; }
.event-modal-actions > div:empty { display: none; }
@media (max-width: 480px) {
  .event-modal-card { border-radius: var(--p-radius-card) var(--p-radius-card) 0 0; border-bottom: 0; max-height: 92dvh; }
  .event-modal-body { padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .event-modal-card { transform: none; } }

/* ── Handy-Leiste: Platz unten nur, solange sie sichtbar ist ──── */
@media (max-width: 640px) {
  body { padding-bottom: 0; }
  body.p-bar-on { padding-bottom: var(--bar, 76px); }
}

/* ── Kapitel-Moment steht in .page (nicht direkt in main) ───── */
.page > [data-moment="photo-chapters"][data-moment].is-live { height: calc((var(--mo-hold) + 1) * 100vh); height: calc((var(--mo-hold) + 1) * 100svh); min-height: 0; padding: 0; display: block; }
@media print { .page > [data-moment="photo-chapters"][data-moment].is-live { height: auto; } }

/* ── Schrift: Myriad Pro gibt es nur in 400 (700 lädt Arial Bold) ──
   Überschriften deshalb überall in Myriad 400 – ruhig und einheitlich.
   Arabisch (GE Flow) behält seinen echten Fettschnitt. Knöpfe, Labels und
   die Wortmarke im Hero bleiben bewusst fett. */
html:not([dir="rtl"]) :is(h1, h2, h3, .section-header h2, .page-hero h1, .page-hero-section h1, .events-hero-title, .p-life-title, .event-modal-title) {
  font-weight: 400;
}
html:not([dir="rtl"]) :is(.page-hero h1, .page-hero-section h1, .events-hero-title) { letter-spacing: -.02em; }
/* Seiten-Überschriften, die ihre Seite fett gesetzt hatte (Arial Bold) → Myriad 400 */
html:not([dir="rtl"]) :is(#events .ev-heading, #events .special-event-title, #events .cal-month, #events .event-title,
  #children .ch-when__title, #children .ch-when__what h3, #children .children-feat-card h4,
  #media .media-block-title, #contact .contact-intro-title, #contact .contact-bank-head h4, #mitglieder .mg-auth-title,
  #mitglieder .mg-hello, #mitglieder .mg-page-title, #mitglieder .mg-h2, #mitglieder .mg-h3, #mitglieder .mg-side-title,
  #mitglieder .mg-set-title, #mitglieder .mg-panel-title) {
  font-weight: 400;
}

/* Abschnitts-Label, das auf dem Handy umbricht: an der Textkante statt mittig */
.section-label { text-align: start; }
.section-header .section-label, .text-center .section-label { text-align: center; }

/* Befunde Taste-Checker (Master): Fließtext 7:1, Hero-Label auf dem Handy lesbar,
   ein Knopf = eine Breite auf dem Handy, Skip-Link ohne Einblenden */
html #home #homeServicesGrid .service-desc, html #home .p-chapters .mo-ph__head p { color: var(--p-body); }
@media (max-width: 640px) {
  html #home .hero.has-photo .hero-bg, html[dir="rtl"] #home .hero.has-photo .hero-bg {
    background:
      linear-gradient(0deg, rgba(3, 25, 13, .94) 0%, rgba(3, 25, 13, .78) 40%, rgba(3, 25, 13, .62) 100%),
      var(--hero-photo) center 38% / cover no-repeat;
  }
  .p-chapters .mo-ph__more .btn { width: 100%; }
}
.skip-link:focus, .skip-link:focus-visible { transition: none; }

/* WhatsApp gehört zum Button-Paar: Sekundär (weiß, Haarlinie), nur das Symbol in WhatsApp-Grün –
   sonst stehen zwei fast gleiche grüne Flächen nebeneinander */
html .btn-whatsapp, html .btn-whatsapp:link, html .btn-whatsapp:visited { background: #fff; color: var(--p-ink); border: 1px solid var(--p-hairline-strong); box-shadow: none; }
html .btn-whatsapp:hover { background: #fff; color: var(--green-dark); border-color: var(--green-primary); }
html .btn-whatsapp svg { color: #1a8d4f; }

/* Sprache: Zwei-Teile-Schalter DE | عربي (wie im Admin) statt Aufklappmenü */
.lang-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--p-surface, #f6f5f0); border: 1px solid var(--p-hairline, rgba(0,0,0,.1)); border-radius: 999px; }
.lang-seg .lang-option {
  display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 44px; min-height: 36px;
  padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--p-muted, #5b6660);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-align: center; cursor: pointer;
}
.lang-seg .lang-option[lang="ar"] { font-family: 'GE Flow', Arial, sans-serif; font-size: .9rem; letter-spacing: 0; }
.lang-seg .lang-option[aria-pressed="true"] { background: #fff; color: var(--green-dark, #004d25); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
@media (hover: hover) and (pointer: fine) {
  .lang-seg .lang-option:not([aria-pressed="true"]):hover { background: transparent; color: var(--p-ink, #17241c); }
}
.lang-seg .lang-option:focus-visible { outline: 2px solid var(--green-primary); outline-offset: 1px; }
@media (max-width: 768px) { .lang-seg .lang-option { min-height: 40px; padding: 0 10px; } }
