:root {
  --wedf-ink: #172033;
  --wedf-muted: #5c667a;
  --wedf-paper: #ffffff;
  --wedf-canvas: #f5f7fb;
  --wedf-line: #dfe5ee;
  --wedf-brand: #3157d5;
  --wedf-brand-dark: #203b9c;
  --wedf-nature: #25835a;
  --wedf-world: #d66b24;
  --wedf-space: #4d45b8;
  --wedf-tech: #087d8f;
  --wedf-history: #b54848;
  --wedf-category-color: var(--wedf-brand);
  --wedf-radius-sm: 10px;
  --wedf-radius: 18px;
  --wedf-radius-lg: 28px;
  --wedf-shadow: 0 14px 40px rgba(23, 32, 51, .09);
}

.wedf-cat-nature { --wedf-category-color: var(--wedf-nature); }
.wedf-cat-world { --wedf-category-color: var(--wedf-world); }
.wedf-cat-space { --wedf-category-color: var(--wedf-space); }
.wedf-cat-tech { --wedf-category-color: var(--wedf-tech); }
.wedf-cat-history { --wedf-category-color: var(--wedf-history); }

.wedf-article {
  color: var(--wedf-ink);
  font-size: 18px;
  line-height: 1.7;
}

.wedf-article h2 {
  margin-top: 54px;
  margin-bottom: 16px;
  color: var(--wedf-ink);
  font-size: clamp(29px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.wedf-article h3 {
  margin-top: 38px;
  margin-bottom: 10px;
  color: var(--wedf-ink);
  font-size: 28px;
  line-height: 1.25;
}

.wedf-article p { margin-top: 0; margin-bottom: 22px; }
.wedf-article > :first-child { margin-top: 0; }

.wedf-short-answer {
  position: relative;
  margin: 0 0 36px;
  padding: 26px 28px 26px 32px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--wedf-category-color) 24%, white);
  border-radius: var(--wedf-radius);
  background: color-mix(in srgb, var(--wedf-category-color) 7%, white);
}

.wedf-short-answer::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--wedf-category-color);
  content: "";
}

.wedf-short-answer p:last-child { margin-bottom: 0; line-height: 1.55; }

.wedf-short-answer .has-large-font-size {
  font-size: clamp(23px, 2.15vw, 29px) !important;
  line-height: 1.48;
}

.wedf-box-label {
  margin-bottom: 8px !important;
  color: var(--wedf-category-color);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.wedf-explain-image {
  margin-top: 34px !important;
  margin-bottom: 34px !important;
  overflow: hidden;
  border-radius: var(--wedf-radius);
  background: #111936;
}

.wedf-explain-image img { width: 100%; }
.wedf-explain-image figcaption {
  margin: 0 !important;
  padding: 13px 18px;
  color: #dce1ff;
  background: #111936;
  font-size: 14px;
  text-align: left;
}

.wedf-analogy {
  margin: 34px 0;
  padding: 25px 28px;
  border-left: 5px solid #f3b843;
  border-radius: 0 var(--wedf-radius-sm) var(--wedf-radius-sm) 0;
  background: #fff8e8;
}

.wedf-analogy .wedf-box-label { color: #76520d; }
.wedf-analogy p:last-child,
.wedf-myth p:last-child { margin-bottom: 0; }

.wedf-facts {
  display: grid;
  gap: 14px;
  margin: 24px 0 34px !important;
  padding: 0 !important;
  list-style: none !important;
}

.wedf-facts li {
  position: relative;
  padding: 17px 18px 17px 50px;
  border: 1px solid var(--wedf-line);
  border-radius: var(--wedf-radius-sm);
  background: #fbfcfe;
}

.wedf-facts li::before {
  position: absolute;
  top: 17px;
  left: 18px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--wedf-category-color);
  content: "✓";
  font-size: 14px;
  font-weight: 900;
}

.wedf-myth {
  margin: 34px 0;
  padding: 25px 28px;
  border: 1px solid #f1c7c7;
  border-radius: var(--wedf-radius);
  background: #fff5f5;
}

.wedf-myth .wedf-box-label { color: #9c3131; }

.wedf-article details.wp-block-details {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--wedf-line);
}

.wedf-article details.wp-block-details:last-of-type { border-bottom: 1px solid var(--wedf-line); }
.wedf-article details summary { padding: 20px 8px 20px 0; cursor: pointer; font-weight: 700; }
.wedf-article details p { padding: 0 0 20px; color: var(--wedf-muted); }

.wedf-summary {
  margin: 38px 0;
  padding: 26px 28px;
  border-radius: var(--wedf-radius);
  color: white;
  background: var(--wedf-ink);
}

.wedf-summary h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 25px;
}

.wedf-summary ul { margin: 0; padding-left: 22px; }
.wedf-summary li + li { margin-top: 8px; }

.wedf-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.wedf-related > p { margin: 0; }
.wedf-related a {
  min-height: 145px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  border: 1px solid var(--wedf-line);
  border-radius: var(--wedf-radius);
  color: var(--wedf-ink);
  background: #fbfcfe;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.wedf-related a:hover {
  border-color: var(--wedf-category-color);
  color: var(--wedf-category-color);
  transform: translateY(-2px);
}

.wedf-sources {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--wedf-line);
  color: var(--wedf-muted);
  font-size: 14px;
}

.wedf-sources h2 { margin: 0 0 12px; color: var(--wedf-ink); font-size: 20px; }

@media (max-width: 781px) {
  .wedf-related { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  .wedf-article { font-size: 17px; line-height: 1.65; }
  .wedf-short-answer,
  .wedf-analogy,
  .wedf-myth,
  .wedf-summary { padding: 21px; }
  .wedf-short-answer .has-large-font-size { font-size: 22px !important; }
}

@media print {
  .wedf-related { display: none; }
  .wedf-summary { color: #000; background: #fff; border: 2px solid #000; }
  .wedf-summary h2 { color: #000; }
}

/* Startseite */
.wedf-home {
  --wedf-home-wide: 1180px;
  color: var(--wedf-ink);
}

.wedf-home > .wp-block-group {
  margin-top: 0;
  margin-bottom: 0;
}

.wedf-home-hero {
  position: relative;
  padding: clamp(54px, 8vw, 100px) clamp(24px, 5vw, 64px);
  overflow: hidden;
  border-radius: var(--wedf-radius-lg);
  background:
    radial-gradient(circle at 88% 18%, rgba(77, 69, 184, .18), transparent 29%),
    radial-gradient(circle at 8% 90%, rgba(8, 125, 143, .12), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f3f6ff 100%);
  box-shadow: var(--wedf-shadow);
}

.wedf-home-kicker {
  margin-bottom: 14px !important;
  color: var(--wedf-brand);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wedf-home-hero h1 {
  max-width: 900px;
  margin: 0 0 22px;
  color: var(--wedf-ink);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.wedf-home-lead {
  max-width: 760px;
  margin-bottom: 32px !important;
  color: var(--wedf-muted);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.55;
}

.wedf-home-search {
  max-width: 760px;
  margin: 0 !important;
}

.wedf-home-search .wp-block-search__inside-wrapper {
  padding: 7px;
  border: 1px solid var(--wedf-line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 28px rgba(23, 32, 51, .08);
}

.wedf-home-search .wp-block-search__input {
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  color: var(--wedf-ink);
  background: transparent;
  font-size: 17px;
}

.wedf-home-search .wp-block-search__button {
  min-height: 50px;
  margin: 0;
  padding: 0 25px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--wedf-brand);
  font-weight: 750;
}

.wedf-home-search .wp-block-search__button:hover { background: var(--wedf-brand-dark); }

.wedf-home-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.wedf-home-promises p {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--wedf-line);
  border-radius: 999px;
  color: var(--wedf-muted);
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 700;
}

.wedf-home-section {
  padding-top: clamp(60px, 8vw, 96px);
}

.wedf-home-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.wedf-home-section__head h2 {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.wedf-home-section__head p {
  max-width: 540px;
  margin: 0;
  color: var(--wedf-muted);
}

.wedf-category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.wedf-category-card {
  position: relative;
  min-height: 210px;
  grid-column: span 2;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--wedf-line);
  border-radius: var(--wedf-radius);
  background: white;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.wedf-category-card:nth-child(4),
.wedf-category-card:nth-child(5) { grid-column: span 3; }

.wedf-category-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--card-color);
  content: "";
}

.wedf-category-card:hover {
  border-color: var(--card-color);
  box-shadow: var(--wedf-shadow);
  transform: translateY(-4px);
}

.wedf-category-card h3 { margin: 13px 0 10px; font-size: 25px; line-height: 1.2; }
.wedf-category-card p { margin: 0 0 18px; color: var(--wedf-muted); font-size: 16px; line-height: 1.55; }
.wedf-category-card a { color: var(--card-color); font-weight: 800; text-decoration: none; }
.wedf-category-card--nature { --card-color: var(--wedf-nature); }
.wedf-category-card--world { --card-color: var(--wedf-world); }
.wedf-category-card--space { --card-color: var(--wedf-space); }
.wedf-category-card--tech { --card-color: var(--wedf-tech); }
.wedf-category-card--history { --card-color: var(--wedf-history); }

.wedf-post-grid .wp-block-post-template {
  gap: 22px;
}

.wedf-post-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--wedf-line);
  border-radius: var(--wedf-radius);
  background: white;
  box-shadow: 0 8px 25px rgba(23, 32, 51, .06);
}

.wedf-post-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.wedf-post-card .wp-block-post-featured-image img { width: 100%; transition: transform .3s ease; }
.wedf-post-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
.wedf-post-card__body { padding: 22px; }
.wedf-post-card .taxonomy-category { margin-bottom: 8px; color: var(--wedf-brand); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.wedf-post-card .wp-block-post-title { margin: 0 0 10px; font-size: 24px; line-height: 1.25; }
.wedf-post-card .wp-block-post-title a { color: var(--wedf-ink); text-decoration: none; }
.wedf-post-card .wp-block-post-excerpt { color: var(--wedf-muted); font-size: 15px; line-height: 1.55; }
.wedf-post-card .wp-block-post-excerpt__more-link { color: var(--wedf-brand); font-weight: 800; text-decoration: none; }

.wedf-home-why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wedf-home-why > div {
  padding: 25px;
  border: 1px solid var(--wedf-line);
  border-radius: var(--wedf-radius);
  background: #fbfcfe;
}

.wedf-home-why strong { display: block; margin-bottom: 8px; font-size: 20px; }
.wedf-home-why p { margin: 0; color: var(--wedf-muted); font-size: 15px; }

.wedf-question-cta {
  margin-block-start: 32px !important;
  padding: clamp(34px, 6vw, 62px);
  border-radius: var(--wedf-radius-lg);
  color: white;
  background: linear-gradient(135deg, var(--wedf-ink), #26365c);
}

.wedf-question-cta h2 { margin: 0 0 12px; color: white; font-size: clamp(31px, 4vw, 46px); }
.wedf-question-cta p { max-width: 700px; margin: 0 0 24px; color: #dfe5f5; }
.wedf-question-cta .wp-block-button__link { border-radius: 11px; color: var(--wedf-ink); background: white; font-weight: 800; }

/* Gutenberg zentriert Kinder von Gruppen mit eingeschränktem Layout automatisch. */
.wedf-question-cta > .wp-block-heading,
.wedf-question-cta > p,
.wedf-question-cta > .wp-block-buttons {
  margin-inline: 0 !important;
}

@media (max-width: 900px) {
  .wedf-category-grid { grid-template-columns: repeat(2, 1fr); }
  .wedf-category-card,
  .wedf-category-card:nth-child(4),
  .wedf-category-card:nth-child(5) { grid-column: span 1; }
  .wedf-category-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .wedf-home-hero { padding: 42px 22px; border-radius: 20px; }
  .wedf-home-hero h1 { font-size: 42px; }
  .wedf-home-search .wp-block-search__inside-wrapper { display: flex; }
  .wedf-home-search .wp-block-search__button { padding: 0 17px; }
  .wedf-home-section__head { display: block; }
  .wedf-home-section__head p { margin-top: 10px; }
  .wedf-category-grid,
  .wedf-home-why { grid-template-columns: 1fr; }
  .wedf-category-card:last-child { grid-column: auto; }
}

