/* =====================================================================
   WATERCOLOR-VEREINHEITLICHUNG für SEITENTEMPLATES (template-*.php)
   Lädt als LETZTES auf Seiten → überschreibt die gemeinsame .glass-card
   (22 Templates) + Hero-Titel einheitlich. Splatter rein per CSS-Maske.
   Revertierbar: Enqueue in functions.php entfernen.
   ===================================================================== */

body.page{
  --nx-ink:#141233; --nx-ink2:#3a3763; --nx-muted:#5c5a7a; --nx-line:#ececf4; --nx-card:#ffffff;
  --nx-accent:#e0119d; --nx-accent2:#0891b2;
  --nx-splat-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 180"><defs><filter id="f" x="-30%25" y="-30%25" width="160%25" height="160%25"><feTurbulence type="fractalNoise" baseFrequency="0.032 0.04" numOctaves="3" seed="9" result="n"/><feDisplacementMap in="SourceGraphic" in2="n" scale="17"/></filter></defs><g filter="url(%23f)" fill="black"><ellipse cx="86" cy="92" rx="58" ry="46"/><ellipse cx="128" cy="66" rx="30" ry="25"/><ellipse cx="52" cy="60" rx="22" ry="18"/><ellipse cx="120" cy="120" rx="20" ry="15"/><circle cx="168" cy="48" r="8"/><circle cx="186" cy="78" r="5"/><circle cx="160" cy="112" r="6"/><circle cx="196" cy="58" r="3"/><circle cx="140" cy="150" r="4.5"/><circle cx="30" cy="104" r="5"/><circle cx="20" cy="42" r="3.4"/><circle cx="104" cy="24" r="4"/></g></svg>');
}
/* Optionale Leitfarbe je Seite via body.page-template-<name> (Standard: magenta) */
body.page-template-template-akut-hilfe{--nx-accent:#0891b2;--nx-accent2:#2563eb;} /* ruhiges Cyan/Blau statt Alarm-Rot */
body.page-template-template-angehoerige{--nx-accent:#0891b2;--nx-accent2:#7c3aed;}
body.page-template-template-funktionen{--nx-accent:#7c3aed;--nx-accent2:#0891b2;}
body.page-template-template-fachkraefte{--nx-accent:#2563eb;--nx-accent2:#0891b2;}
body.page-template-template-foerderer{--nx-accent:#f97316;--nx-accent2:#e0119d;}

/* ===================== gemeinsame Karte (.glass-card) ===================== */
body.page .glass-card{
  position:relative !important; overflow:hidden !important;
  background:var(--nx-card) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:1px solid var(--nx-line) !important; border-radius:20px !important;
  box-shadow:0 22px 55px -34px rgba(20,18,51,.5) !important;
}
body.page .glass-card::before,
body.page .glass-card::after{content:"";position:absolute;pointer-events:none;z-index:0;
  -webkit-mask:var(--nx-splat-mask) center/contain no-repeat;mask:var(--nx-splat-mask) center/contain no-repeat;}
body.page .glass-card::before{top:-40px;right:-44px;width:190px;height:156px;background:var(--nx-accent);opacity:.42;transform:rotate(150deg);}
body.page .glass-card::after{bottom:-58px;left:-46px;width:158px;height:130px;background:var(--nx-accent2);opacity:.34;transform:rotate(40deg);}
body.page .glass-card > *{position:relative;z-index:2;}

/* Überschriften in Karten einheitlich navy (statt Template-Verlaufsfarben) */
body.page .glass-card h1,
body.page .glass-card h2,
body.page .glass-card h3{color:var(--nx-ink) !important;-webkit-text-fill-color:var(--nx-ink) !important;background:none !important;}

/* ===================== Hero-Titel einheitlich ===================== */
body.page .hero-title,
body.page .page-hero-title,
body.page .nx-fn-hero h1{
  color:var(--nx-ink) !important;-webkit-text-fill-color:var(--nx-ink) !important;background:none !important;
}

/* ============================================================
   Volle Watercolor-Umstellung: Angehörige (gradient→off-white)
   ============================================================ */
body.page-template-template-angehoerige .angehoerigen-wrapper{background:#f6f5fb !important;color:var(--nx-ink) !important;}
body.page-template-template-angehoerige .bg-element{display:none !important;}
body.page-template-template-angehoerige .hero-title{color:var(--nx-ink) !important;-webkit-text-fill-color:var(--nx-ink) !important;text-shadow:none !important;}
body.page-template-template-angehoerige .hero-desc{color:var(--nx-muted) !important;}
/* Inhaltstexte lesbar auf hellem Grund */
body.page-template-template-angehoerige .glass-card,
body.page-template-template-angehoerige .glass-card p,
body.page-template-template-angehoerige .glass-card li,
body.page-template-template-angehoerige .glass-card h4,
body.page-template-template-angehoerige .glass-card h5,
body.page-template-template-angehoerige .glass-card strong{color:var(--nx-ink) !important;}
/* Erste Privacy-Box (ohne Inline-Style) → hell lesbar; 112-Box (mit Inline-Style) bleibt rot */
body.page-template-template-angehoerige .privacy-box:not([style]){background:#fff !important;color:var(--nx-ink) !important;border:1px solid var(--nx-line) !important;}
body.page-template-template-angehoerige .privacy-box:not([style]) strong{color:var(--nx-ink) !important;}

/* ============================================================
   Akut-Hilfe (Notfall): ruhiger off-white Grund, Header navy,
   interaktives Akut-Anker-Tool bleibt farbig (Klarheit in Krise)
   ============================================================ */
body.page-template-template-akut-hilfe .akut-wrapper{background:#f6f5fb !important;}
body.page-template-template-akut-hilfe .akut-title{color:var(--nx-ink) !important;-webkit-text-fill-color:var(--nx-ink) !important;text-shadow:none !important;}
body.page-template-template-akut-hilfe .akut-subtitle{color:var(--nx-muted) !important;}
body.page-template-template-akut-hilfe .privacy-box:not([style]){background:#fff !important;color:var(--nx-ink) !important;border:1px solid var(--nx-line) !important;}
body.page-template-template-akut-hilfe .privacy-box:not([style]) strong{color:var(--nx-ink) !important;}
