/* NetzwerkDemenz – Veranstaltungssystem (Farben & Schrift aus dem bestehenden Design) */
:root {
  --nd-navy: #003366;
  --nd-blue: #23418f;
  --nd-blue-dark: #1a3170;
  --nd-sky: #f1f9ff;
  --nd-steel: #b5c7d5;
  --nd-lav: #96a2c6;
  --nd-lav-light: #e3e7f3;
  --nd-grey: #f2f2f2;
  --nd-line: #d6dfe8;
  --nd-text: #003366;
  --nd-muted: #4a6685;
  --nd-radius: 10px;
  --nd-shadow: 0 2px 10px rgba(0, 51, 102, .10);
  --nd-shadow-hover: 0 8px 24px rgba(0, 51, 102, .16);
}

.nd, .nd * { box-sizing: border-box; }
.nd { font-family: Arial, sans-serif; color: var(--nd-text); font-size: 16px; line-height: 1.5; }
.nd a { color: inherit; }
.nd-ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.nd-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.nd-wrap-narrow { max-width: 900px; }

/* Kopfband mit Brotkrumen (wie Unterseiten der Website) */
.nd-band { background: var(--nd-steel); padding: 26px 0 30px; }
.nd-crumbs { font-size: 16px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.nd-crumbs a { text-decoration: none; color: var(--nd-navy); }
.nd-crumbs a:hover { text-decoration: underline; }
.nd-crumbs span { color: var(--nd-navy); opacity: .85; }
.nd-band h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; margin: 0; line-height: 1.2; color: var(--nd-navy); }
.nd-intro { font-size: 18px; margin: 10px 0 0; max-width: 760px; }

.nd-section { padding: 40px 0 56px; background: #fff; }
.nd-section-grey { background: var(--nd-grey); }
.nd-section-tint { background: var(--nd-sky); }
.nd-h2 { font-size: 26px; font-weight: 700; margin: 0 0 20px; }

/* Buttons wie auf der Seite */
.nd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--nd-blue); color: #fff !important;
  font-weight: 700; font-size: 17px; padding: 11px 22px; border-radius: var(--nd-radius); text-decoration: none; border: 2px solid var(--nd-blue);
  transition: background .2s, border-color .2s; cursor: pointer; line-height: 1.2; }
.nd-btn:hover { background: var(--nd-navy); border-color: var(--nd-navy); }
.nd-btn-ghost { background: #fff; color: var(--nd-blue) !important; }
.nd-btn-ghost:hover { background: var(--nd-sky); color: var(--nd-navy) !important; }
.nd-btn-block { display: flex; width: 100%; margin-top: 12px; }

/* Monatschips / Jahresbuttons */
.nd-chips, .nd-years { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.nd-chip { background: #fff; color: var(--nd-navy); text-decoration: none; padding: 7px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.nd-chip:hover { background: var(--nd-blue); color: #fff; }
.nd-year { background: var(--nd-blue); color: #fff !important; text-decoration: none; min-width: 90px; text-align: center; padding: 9px 18px;
  border-radius: var(--nd-radius); font-weight: 700; font-size: 18px; border: 2px solid var(--nd-blue); }
.nd-year:hover { background: var(--nd-navy); border-color: var(--nd-navy); }
.nd-year.is-active { background: #fff; color: var(--nd-blue) !important; }

/* Monats-/Jahres-Trenner */
.nd-month { display: flex; align-items: center; gap: 16px; font-size: 22px; font-weight: 700; margin: 34px 0 16px; scroll-margin-top: 20px; }
.nd-month:first-child { margin-top: 0; }
.nd-month::after { content: ""; flex: 1; height: 2px; background: var(--nd-line); }

/* Veranstaltungskarte */
.nd-ev-list { display: grid; gap: 16px; }
.nd-ev { position: relative; display: flex; gap: 22px; background: #fff; border: 1px solid var(--nd-line); border-radius: 14px; padding: 20px;
  box-shadow: var(--nd-shadow); transition: box-shadow .2s, transform .2s; }
.nd-ev:hover { box-shadow: var(--nd-shadow-hover); transform: translateY(-2px); }
.nd-ev-body { flex: 1; min-width: 0; }
.nd-ev h3 { font-size: 21px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.nd-ev h3 a { text-decoration: none; }
.nd-ev h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; } /* ganze Karte klickbar */
.nd-ev p { margin: 10px 0 0; color: var(--nd-muted); font-size: 16px; }
.nd-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--nd-muted); }
.nd-meta li { display: inline-flex; align-items: center; gap: 6px; }
.nd-meta .nd-ico { color: var(--nd-blue); }
.nd-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; color: var(--nd-blue); font-size: 15px; }
.nd-ev:hover .nd-more .nd-ico, .nd-info:hover .nd-more .nd-ico { transform: translateX(3px); }
.nd-more .nd-ico { transition: transform .2s; }
.nd-ev-img { flex: 0 0 200px; }
.nd-ev-img img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--nd-radius); display: block; }

.nd-badge { flex: 0 0 78px; height: 88px; background: var(--nd-navy); color: #fff; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.05; text-transform: uppercase; }
.nd-badge-wd { font-size: 12px; letter-spacing: .06em; opacity: .85; }
.nd-badge-day { font-size: 32px; font-weight: 700; margin: 2px 0; }
.nd-badge-mon { font-size: 13px; font-weight: 700; letter-spacing: .04em; }

.nd-ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.nd-ev-compact { padding: 16px; gap: 16px; }
.nd-ev-compact .nd-badge { flex-basis: 64px; height: 74px; }
.nd-ev-compact .nd-badge-day { font-size: 26px; }
.nd-ev-compact h3 { font-size: 18px; }
.nd-ev-compact .nd-meta { flex-direction: column; gap: 4px; font-size: 14px; }

.nd-archive-link { margin: 36px 0 0; }
.nd-archive-link a, .nd-backlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--nd-blue); text-decoration: none; }
.nd-archive-link a:hover, .nd-backlink:hover { text-decoration: underline; }
.nd-backlink { margin-top: 18px; }

.nd-empty { text-align: center; padding: 40px 20px; background: var(--nd-sky); border-radius: 14px; font-size: 18px; }
.nd-empty > .nd-ico { width: 42px; height: 42px; color: var(--nd-blue); }

/* Detailansicht */
.nd-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.nd-detail-single { grid-template-columns: minmax(0, 800px); justify-content: center; }
.nd-hero-img { margin: 0 0 26px; }
.nd-hero-img img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; display: block; }
.nd-notice-box { display: flex; align-items: center; gap: 10px; background: var(--nd-lav-light); border-left: 4px solid var(--nd-blue);
  padding: 12px 16px; border-radius: 8px; margin: 0 0 22px; font-weight: 700; }
.nd-dateline { display: inline-flex; align-items: center; gap: 8px; color: var(--nd-muted); font-weight: 700; margin: 0 0 18px; }

.nd-prose { font-size: 18px; line-height: 1.7; color: var(--nd-text); overflow-wrap: anywhere; }
.nd-prose > :first-child { margin-top: 0; }
.nd-prose p { margin: 0 0 1em; text-align: left !important; }
.nd-prose h2 { font-size: 24px; margin: 1.6em 0 .5em; line-height: 1.3; }
.nd-prose h3 { font-size: 20px; margin: 1.4em 0 .4em; line-height: 1.3; }
.nd-prose h4 { font-size: 18px; margin: 1.2em 0 .4em; }
.nd-prose ul, .nd-prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.nd-prose li { margin: .3em 0; padding-left: .2em; }
.nd-prose li::marker { color: var(--nd-blue); font-weight: 700; }
.nd-prose a { color: var(--nd-blue); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.nd-prose a:hover { color: var(--nd-navy); }
.nd-prose img { max-width: 100%; height: auto; border-radius: var(--nd-radius); }
.nd-prose blockquote { margin: 1.2em 0; padding: 14px 20px; background: var(--nd-sky); border-left: 4px solid var(--nd-lav); border-radius: 0 8px 8px 0; }
.nd-prose hr { border: 0; height: 2px; background: var(--nd-line); margin: 2em 0; }
.nd-prose table { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
.nd-prose td, .nd-prose th { border: 1px solid var(--nd-line); padding: 8px 10px; }
.nd-prose .ql-align-center { text-align: center !important; }
.nd-prose .ql-align-right { text-align: right !important; }
.nd-prose .ql-align-justify { text-align: justify !important; }

.nd-side { position: sticky; top: 20px; }
.nd-card { background: var(--nd-sky); border: 1px solid var(--nd-line); border-radius: 14px; padding: 22px; }
.nd-card h2 { font-size: 19px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.nd-card dl { margin: 0 0 6px; }
.nd-card dt { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 12px; }
.nd-card dt:first-child { margin-top: 0; }
.nd-card dt .nd-ico { color: var(--nd-blue); }
.nd-card dd { margin: 3px 0 0 26px; }
.nd-card dd a { color: var(--nd-blue); font-weight: 700; font-size: 15px; }

/* Archiv */
.nd-arch { background: #fff; padding: 20px 22px 22px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.nd-arch header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--nd-line); padding-bottom: 4px; margin-bottom: 12px; }
.nd-arch h3 { font-size: 23px; font-weight: 400; margin: 0; }
.nd-tag { background: var(--nd-lav-light); color: var(--nd-navy); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.nd-arch-title { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.nd-arch p { font-size: 18px; margin: 0 0 16px; }

/* Startseite: nächste Veranstaltungen + Informationen */
.nd-home-events { margin: 24px auto 26px; width: 100%; }
.nd-home-events .nd-ev { text-align: left; }
.nd-home-empty { text-align: center; font-size: 18px; margin: 18px 0; }
.nd-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; width: 100%; }
.nd-info { display: flex; flex-direction: column; background: var(--nd-lav-light); border-radius: 4px; text-decoration: none; color: var(--nd-navy) !important;
  min-height: 250px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.nd-info:hover { box-shadow: var(--nd-shadow-hover); transform: translateY(-3px); }
.nd-info-img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.nd-info-body { display: flex; flex-direction: column; padding: 28px 20px 20px; flex: 1; }
.nd-info.has-img .nd-info-body { padding-top: 18px; }
.nd-info-title { font-size: 19px; font-weight: 700; line-height: 1.35; }
.nd-info-date { font-size: 14px; margin-top: 8px; color: #000; }
.nd-info-text { font-size: 15px; margin-top: 10px; color: var(--nd-muted); }
.nd-info .nd-more { margin-top: auto; padding-top: 16px; }
.nd-notice-link { color: inherit !important; text-decoration: none; }

@media (max-width: 991px) {
  .nd-detail { grid-template-columns: 1fr; gap: 30px; }
  .nd-side { position: static; }
  .nd-infos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nd-wrap { padding: 0 16px; }
  .nd-ev { gap: 14px; padding: 16px; }
  .nd-badge { flex-basis: 60px; height: 70px; }
  .nd-badge-day { font-size: 24px; }
  .nd-ev h3 { font-size: 18px; }
  .nd-ev-img { display: none; }
  .nd-meta { flex-direction: column; gap: 4px; }
  .nd-infos { grid-template-columns: 1fr; }
  .nd-info { min-height: 0; }
  .nd-prose { font-size: 17px; }
  .nd-arch h3 { font-size: 20px; }
  .nd-year { min-width: 70px; font-size: 16px; padding: 8px 12px; }
  .nd-ev-grid { grid-template-columns: 1fr; }
}

/* Startseite: Nicepage-Sektionen mit fester Höhe dürfen mit den Inhalten wachsen */
.u-section-6 .u-sheet-1, .u-section-8 .u-sheet-1 { height: auto !important; min-height: 0 !important; }
.u-section-6 .u-sheet-1 { padding-bottom: 40px; }
.u-section-8 .u-sheet-1 { padding-bottom: 50px; }
