/* =========================================================
   undnu.com – Edles, schnelles Agentur-Stylesheet (Cassiopeia)
   Bereinigte, optimierte Komplettversion
   ========================================================= */

:root {
  --undnu-bg: #f8fafc;
  --undnu-surface: #ffffff;
  --undnu-dark: #0f172a;
  --undnu-dark-soft: #1e293b;
  --undnu-text: #334155;
  --undnu-muted: #64748b;
  --undnu-accent: #c88a2e;
  --undnu-accent-hover: #a9711e;
  --undnu-accent-soft: #fdf8f0;
  --undnu-border: #e2e8f0;
  --undnu-radius: 16px;
  --undnu-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  --undnu-shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.11);
}

/* Verhindert horizontales Überstehen auf mobilen Geräten */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Edler animierter Studio-Hintergrund für undnu.com */
body {
  background-color: #0b1120;
  background-image: url('/media/templates/site/cassiopeia_undnu_core/images/undnu_bg.svg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: var(--undnu-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.72;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* JCE-Editor im Backend immer mit sauberer heller Schreibfläche anzeigen */
body.mce-content-body {
  background: #ffffff !important;
  background-image: none !important;
  color: #1e293b !important;
  padding: 1rem !important;
}

/* Edler Header & Navigation */
.container-header {
  background: rgba(15, 23, 42, 0.96);
  background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.container-header .navbar-brand {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: #ffffff !important;
}

.container-header .navbar-brand img,
.container-header .navbar-brand svg {
  max-width: 100%;
  height: auto;
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > button {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li.active > a {
  color: #ffffff !important;
  background: rgba(200, 138, 46, 0.22);
}

/* Hauptbereich & Content-Container (augenfreundliches Perlgrau) */
.site-grid {
  row-gap: 2rem;
}

.container-component {
  background: rgba(241, 245, 249, 0.93) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: var(--undnu-radius);
  padding: clamp(1.5rem, 3.5vw, 3rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

/* Überschriften */
h1, .h1, h2, .h2, h3, .h3 {
  color: var(--undnu-dark);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1, .h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  margin-bottom: 1.15rem;
}

h2, .h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--undnu-accent-soft);
}

/* Links & Buttons */
a {
  color: var(--undnu-accent-hover);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--undnu-dark);
}

.btn-primary,
.undnu-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--undnu-accent), var(--undnu-accent-hover));
  border: none;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.75rem 1.45rem;
  border-radius: 11px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(200, 138, 46, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover,
.undnu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(200, 138, 46, 0.36);
}

/* Agentur-Karten & Hero-Boxen */
.undnu-hero {
  background: linear-gradient(135deg, var(--undnu-dark) 0%, var(--undnu-dark-soft) 100%);
  color: #f8fafc;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--undnu-radius);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.undnu-hero h1, .undnu-hero h2 {
  color: #ffffff;
  border: none;
  margin-top: 0;
}

.undnu-hero p {
  color: rgba(248, 250, 252, 0.88);
  font-size: 1.12rem;
  max-width: 100% !important;
}

.undnu-badge {
  display: inline-block;
  background: rgba(200, 138, 46, 0.2);
  color: #f6c97a;
  border: 1px solid rgba(200, 138, 46, 0.45);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.undnu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.undnu-card {
  background: #ffffff !important;
  border: 1px solid var(--undnu-border);
  border-top: 4px solid var(--undnu-accent);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.undnu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--undnu-shadow-hover);
}

.undnu-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.undnu-note {
  background: var(--undnu-accent-soft);
  border-left: 4px solid var(--undnu-accent);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin-top: 1.75rem;
  color: var(--undnu-dark);
}

/* Artikel-Metadaten dezent halten */
.article-info {
  font-size: 0.85rem;
  color: var(--undnu-muted);
  margin-bottom: 1rem;
}

/* =========================================================
   Geschützter Mitglieder-Teaser: Nahtloser Blur-Auslauf
   (entfernt alle hellen Overlays auf Beitrags- & Blogansicht)
   ========================================================= */
.item-page,
.com-content-article,
.com-content-article__body,
.com-content-category-blog__item,
.blog-item,
.item-content,
p.readmore,
.readmore {
  background: transparent !important;
  box-shadow: none !important;
}

/* Kein weißes Rechteck mehr: Der letzte Absatz vor dem Button selbst verschwimmt! */
/* Nur den letzten Textabsatz unscharf machen – NICHT den Button selbst */
/* Nur die letzten zwei echten Textabsätze direkt im Artikel unscharf machen */
/* Trifft immer exakt den Absatz direkt vor dem Weiterlesen-Button (nirgendwo sonst!) */
/* Stufenweiser Blur-Verlauf über die letzten drei Absätze vor dem Button */
p:has(+ p + p + p.readmore) {
  filter: blur(0.7px);
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
}

p:has(+ p + p.readmore) {
  filter: blur(1.5px);
  opacity: 0.62;
  user-select: none;
  pointer-events: none;
}

p:has(+ p.readmore) {
  filter: blur(2.6px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
  margin-bottom: 0.5rem;
}
  filter: blur(2.4px);
  opacity: 0.42;
  user-select: none;
  pointer-events: none;
  margin-bottom: 0.5rem;
}

.item-page > p:not(.readmore):nth-last-of-type(3) {
  filter: blur(1.1px);
  opacity: 0.72;
  user-select: none;
  pointer-events: none;
}

.com-content-article__body > p:not(.readmore):nth-last-of-type(2),
.item-page > p:not(.readmore):nth-last-of-type(2) {
  filter: blur(2.6px);
  opacity: 0.38;
  user-select: none;
  pointer-events: none;
  margin-bottom: 0.5rem;
}



p.readmore,
.readmore {
  position: relative;
  z-index: 3;
  margin-top: -0.5rem !important;
  padding: 1rem 0 1.25rem !important;
  text-align: center;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}


.readmore .btn {
  position: relative;
  z-index: 4;
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal !important;
  line-height: 1.35;
  background: linear-gradient(135deg, #c88a2e, #a9711e);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  padding: 0.8rem 1.35rem;
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(200, 138, 46, 0.3);
  font-size: 0;
}

.readmore .btn::after {
  content: "🔒 Bitte registrieren oder anmelden, um den gesamten Inhalt zu sehen";
  font-size: 0.96rem;
  white-space: normal;
}

/* Edler Footer */
.container-footer {
  background: var(--undnu-dark);
  color: rgba(255, 255, 255, 0.78);
  border-top: 3px solid var(--undnu-accent);
  padding: 2rem 0;
  margin-top: 3rem;
}

.container-footer a {
  color: #f6c97a;
}

/* Smartphone- & Tablet-Feinschliff */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  .container-component {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }
  .readmore .btn {
    width: 100%;
  }
}
