/*
Theme Name: Welt der Legenden
Theme URI: https://welt-der-legenden.de
Author: Maik Möhring Media
Author URI: https://maik-moehring.ch
Description: Gold/Anthrazit-Theme für welt-der-legenden.de. Dunkler Marken-Rahmen, warmer Papier-Body, Newsreader-Serifen, Stern-Logo, "Story of the Moment"-Hero, Zeitleiste "Heute vor … Jahren" und Legenden-Plaketten (CPT wdl_legende). Mobile-first, barrierearm, schnell.
Version: 2.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wdl
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --wdl-night: #141413;
  --wdl-night-2: #1f1d1a;
  --wdl-night-line: #34322e;
  --wdl-ink: #1f1d1a;
  --wdl-ink-soft: #4a463f;
  --wdl-muted: #6c675d;
  --wdl-paper: #FAF7F0;
  --wdl-card: #ffffff;
  --wdl-line: #ddd6c8;
  --wdl-gold: #C9A24B;
  --wdl-gold-dark: #8a6a25;
  --wdl-cream: #F4EFE6;
  --wdl-cream-soft: #b8b3a8;

  --wdl-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wdl-font-display: "Newsreader", Georgia, "Times New Roman", serif;

  --wdl-radius: 10px;
  --wdl-radius-lg: 14px;
  --wdl-max: 1180px;
  --wdl-max-text: 740px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--wdl-font-body);
  font-size: 17px;
  line-height: 1.68;
  color: var(--wdl-ink);
  background: var(--wdl-paper);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--wdl-gold-dark); text-decoration: none; }
a:hover { color: var(--wdl-ink); }

h1, h2, h3, h4 {
  font-family: var(--wdl-font-display);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.005em;
  color: var(--wdl-ink);
  margin: 0 0 0.5em;
}

.wdl-container { max-width: var(--wdl-max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--wdl-night); color: #fff; padding: 10px 18px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

:focus-visible { outline: 2px solid var(--wdl-gold); outline-offset: 2px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Stern (Inline-SVG bekommt die Klasse) */
.wdl-star { fill: var(--wdl-gold); flex: 0 0 auto; }

/* Gold-Duotone für Bilder – per body.wdl-duotone aktiv */
.wdl-duotone .duotone img {
  filter: grayscale(1) sepia(0.5) saturate(1.5) hue-rotate(-12deg) brightness(0.92) contrast(1.05);
}

/* ==========================================================================
   3. Header (dunkel)
   ========================================================================== */
.site-header {
  background: var(--wdl-night);
  position: sticky; top: 0; z-index: 60;
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 70px;
}

.site-logo { display: flex; align-items: center; gap: 12px; color: var(--wdl-cream); }
.site-logo:hover { color: var(--wdl-cream); }
.site-logo__mark { width: 38px; height: 38px; flex: 0 0 auto; }
.site-logo__name {
  font-family: var(--wdl-font-display);
  font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: 0.01em;
}
.site-logo__claim {
  display: block; font-family: var(--wdl-font-body);
  font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--wdl-gold); margin-top: 2px;
}
.site-logo img { max-height: 44px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 12px; font-size: 14.5px; font-weight: 500;
  color: var(--wdl-cream-soft); border-radius: 8px;
}
.main-nav a:hover { color: var(--wdl-cream); background: var(--wdl-night-2); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--wdl-cream); }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 0; background: transparent;
  border-radius: 8px; cursor: pointer; color: var(--wdl-gold);
}
.icon-btn:hover { background: var(--wdl-night-2); }
.icon-btn svg { width: 21px; height: 21px; }

.nav-toggle { display: none; color: var(--wdl-cream); }

.header-search { display: none; border-top: 1px solid var(--wdl-night-line); padding: 14px 0; background: var(--wdl-night); }
.header-search.is-open { display: block; }

.search-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.search-form input[type="search"] {
  flex: 1; padding: 11px 14px; font-size: 16px;
  background: var(--wdl-night-2); color: var(--wdl-cream);
  border: 1px solid var(--wdl-night-line); border-radius: 8px;
  font-family: var(--wdl-font-body);
}
.search-form input[type="search"]::placeholder { color: var(--wdl-cream-soft); }
.search-form input[type="search"]:focus { border-color: var(--wdl-gold); outline: none; }
.search-form button {
  padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--wdl-gold); color: var(--wdl-night); border: 0; border-radius: 8px;
}
.search-form button:hover { background: #d9b563; }

/* Suchformular im hellen Kontext (404, leere Suche) */
main .search-form input[type="search"] { background: var(--wdl-card); color: var(--wdl-ink); border-color: var(--wdl-line); }

@media (max-width: 920px) {
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--wdl-night); border-bottom: 1px solid var(--wdl-night-line);
    padding: 8px 20px 16px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 13px 8px; font-size: 17px; border-bottom: 1px solid var(--wdl-night-line); border-radius: 0; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   4. Ticker (dunkles Band unterm Header)
   ========================================================================== */
.wdl-ticker {
  background: var(--wdl-night-2); border-top: 1px solid var(--wdl-night-line);
  font-size: 13.5px; overflow: hidden;
}
.wdl-ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 36px; }
.wdl-ticker__label {
  flex: 0 0 auto; color: var(--wdl-gold);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.wdl-ticker__track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.wdl-ticker__items { display: inline-block; animation: wdl-marquee 45s linear infinite; }
.wdl-ticker__items > span.wdl-ticker__group { display: inline-block; padding-right: 28px; }
.wdl-ticker__track:hover .wdl-ticker__items { animation-play-state: paused; }
.wdl-ticker__items a { color: var(--wdl-cream-soft); font-weight: 500; }
.wdl-ticker__items a:hover { color: var(--wdl-cream); }
.wdl-ticker__sep { color: var(--wdl-gold); margin: 0 14px; }

@keyframes wdl-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wdl-ticker__items { animation: none; }
  .wdl-ticker__items > span.wdl-ticker__group + span.wdl-ticker__group { display: none; }
  .wdl-ticker__track { mask-image: none; -webkit-mask-image: none; text-overflow: ellipsis; }
}

/* ==========================================================================
   5. Kicker + Meta
   ========================================================================== */
.kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--wdl-gold-dark);
}
.kicker .wdl-star { width: 12px; height: 12px; }
a.kicker:hover { color: var(--wdl-ink); }

.post-meta { font-size: 13px; color: var(--wdl-muted); }
.post-meta a { color: var(--wdl-muted); font-weight: 500; }
.post-meta a:hover { color: var(--wdl-gold-dark); }

/* ==========================================================================
   6. Hero "Story of the Moment"
   ========================================================================== */
.wdl-hero { padding: 26px 0 8px; }
.wdl-hero__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 26px; }

.hero-main__media {
  display: block; border-radius: var(--wdl-radius-lg); overflow: hidden;
  background: var(--wdl-night-2); margin-bottom: 16px; aspect-ratio: 16 / 9;
}
.hero-main__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-main__title { font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 8px; }
.hero-main__title a { color: var(--wdl-ink); }
.hero-main__title a:hover { color: var(--wdl-gold-dark); }

.hero-side { border-left: 1px solid var(--wdl-line); padding-left: 22px; display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
.hero-side__item { display: flex; gap: 13px; align-items: center; }
.hero-side__thumb {
  flex: 0 0 92px; width: 92px; aspect-ratio: 4 / 3; border-radius: 8px;
  overflow: hidden; background: var(--wdl-night-2);
}
.hero-side__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side__cat {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--wdl-muted); margin-bottom: 3px;
}
.hero-side__title { font-family: var(--wdl-font-display); font-size: 16.5px; font-weight: 500; margin: 0; line-height: 1.32; }
.hero-side__title a { color: var(--wdl-ink); }
.hero-side__title a:hover { color: var(--wdl-gold-dark); }

@media (max-width: 880px) {
  .wdl-hero__grid { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--wdl-line); padding-top: 18px; }
}

/* ==========================================================================
   7. Sektionen
   ========================================================================== */
.wdl-section { padding: 26px 0 6px; }
.wdl-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
  border-bottom: 2px solid var(--wdl-night); padding-bottom: 8px;
}
.wdl-section__title { font-size: 21px; margin: 0; }
.wdl-section__more { font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--wdl-gold-dark); }
.wdl-section__more:hover { color: var(--wdl-ink); }

/* ==========================================================================
   8. Zeitleiste "Heute vor … Jahren"
   ========================================================================== */
.wdl-history {
  background: var(--wdl-night); border-radius: var(--wdl-radius);
  padding: 20px 22px; margin: 26px 0 6px;
}
.wdl-history__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.wdl-history__title {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--wdl-font-display); font-size: 18px; font-weight: 700;
  color: var(--wdl-cream); margin: 0;
}
.wdl-history__title .wdl-star { width: 14px; height: 14px; }
.wdl-history__date { font-size: 12.5px; color: var(--wdl-gold); letter-spacing: 0.12em; }

.wdl-history__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.wdl-history__item {
  display: flex; gap: 11px; align-items: flex-start;
  border-top: 2px solid var(--wdl-night-line); padding-top: 10px;
}
.wdl-history__item:first-child { border-top-color: var(--wdl-gold); }
.wdl-history__avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; background: var(--wdl-night-2);
  display: flex; align-items: center; justify-content: center;
}
.wdl-history__avatar img { width: 100%; height: 100%; object-fit: cover; }
.wdl-history__avatar span { font-family: var(--wdl-font-display); font-size: 14px; font-weight: 700; color: var(--wdl-gold); }
.wdl-history__year { font-family: var(--wdl-font-display); font-size: 19px; font-weight: 700; color: var(--wdl-gold); margin: 0; line-height: 1.2; }
.wdl-history__text { font-size: 13.5px; color: #d8d3c8; line-height: 1.45; margin: 2px 0 0; }
.wdl-history__text a { color: #d8d3c8; }
.wdl-history__text a:hover { color: var(--wdl-gold); }

/* ==========================================================================
   9. Legenden-Plaketten
   ========================================================================== */
.legend-rail {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.legend-card {
  position: relative; background: var(--wdl-card);
  border: 1px solid var(--wdl-line); border-radius: 12px;
  padding: 20px 14px 16px; text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.legend-card:hover { border-color: var(--wdl-gold); transform: translateY(-2px); }
.legend-card > .wdl-star { position: absolute; top: 10px; right: 10px; width: 15px; height: 15px; }
.legend-card__avatar {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 10px; background: var(--wdl-night-2);
  border: 2px solid var(--wdl-gold);
  display: flex; align-items: center; justify-content: center;
}
.legend-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.legend-card__initials {
  font-family: var(--wdl-font-display); font-size: 24px; font-weight: 700;
  color: var(--wdl-gold);
}
.legend-card__name { font-size: 15.5px; font-weight: 700; margin: 0 0 2px; line-height: 1.3; }
.legend-card__name a { color: var(--wdl-ink); }
.legend-card__name a:hover { color: var(--wdl-gold-dark); }
.legend-card__dates { font-size: 12.5px; color: var(--wdl-muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .legend-card:hover { transform: none; }
}

/* ==========================================================================
   10. Filter-Pills + News-Cards
   ========================================================================== */
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-pills a {
  font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--wdl-line); color: var(--wdl-ink-soft); background: var(--wdl-card);
}
.cat-pills a:hover { border-color: var(--wdl-night); color: var(--wdl-ink); }
.cat-pills a.is-active { background: var(--wdl-night); border-color: var(--wdl-night); color: var(--wdl-cream); }

.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.post-card {
  background: var(--wdl-card); border: 1px solid var(--wdl-line);
  border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.15s ease;
}
.post-card:hover { border-color: var(--wdl-gold); }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--wdl-night-2); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__title { font-size: 17.5px; font-weight: 700; margin: 0; line-height: 1.3; }
.post-card__title a { color: var(--wdl-ink); }
.post-card__title a:hover { color: var(--wdl-gold-dark); }
.post-card__excerpt { font-size: 14px; color: var(--wdl-ink-soft); margin: 0; font-family: var(--wdl-font-body); }
.post-card .post-meta { margin-top: auto; }

/* ==========================================================================
   11. BIN-Banner
   ========================================================================== */
.bin-banner {
  background: var(--wdl-night); border-radius: var(--wdl-radius);
  padding: 22px 26px; margin: 30px 0 4px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.bin-banner__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--wdl-gold); margin: 0 0 5px;
}
.bin-banner__eyebrow .wdl-star { width: 12px; height: 12px; }
.bin-banner__text { color: var(--wdl-cream); font-size: 16px; margin: 0; font-family: var(--wdl-font-display); }
.bin-banner__btn {
  display: inline-block; background: var(--wdl-gold); color: var(--wdl-night);
  font-size: 15px; font-weight: 700; padding: 11px 24px;
  border-radius: 8px; white-space: nowrap;
}
.bin-banner__btn:hover { background: #d9b563; color: var(--wdl-night); }

/* ==========================================================================
   12. Artikel + Seiten
   ========================================================================== */
.wdl-article { padding: 34px 0 24px; }
.wdl-article__header { max-width: var(--wdl-max-text); margin: 0 auto 22px; }
.wdl-article__title { font-size: clamp(28px, 4vw, 42px); margin: 12px 0 12px; }
.wdl-article__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-size: 14px; color: var(--wdl-muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--wdl-line);
}
.wdl-article__hero { max-width: 960px; margin: 0 auto 28px; }
.wdl-article__hero img { border-radius: var(--wdl-radius-lg); width: 100%; }
.wdl-article__hero figcaption { font-size: 13px; color: var(--wdl-muted); margin-top: 8px; }

.entry-content { max-width: var(--wdl-max-text); margin: 0 auto; }
.entry-content h2 { font-size: 27px; margin: 1.6em 0 0.6em; }
.entry-content h3 { font-size: 21px; margin: 1.4em 0 0.5em; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--wdl-gold); text-underline-offset: 2px; }
.entry-content img { border-radius: var(--wdl-radius); margin: 1.4em auto; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--wdl-gold);
  font-family: var(--wdl-font-display); font-size: 1.15em; font-weight: 500;
  color: var(--wdl-ink-soft);
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.entry-content th, .entry-content td { padding: 9px 12px; border-bottom: 1px solid var(--wdl-line); text-align: left; }
.entry-content figure { margin: 1.4em 0; }
.entry-content iframe { max-width: 100%; }

.wdl-tags { max-width: var(--wdl-max-text); margin: 28px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wdl-tags a {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: var(--wdl-card); border: 1px solid var(--wdl-line); color: var(--wdl-ink-soft);
}
.wdl-tags a:hover { border-color: var(--wdl-gold); color: var(--wdl-gold-dark); }

/* ==========================================================================
   13. Legenden-Profil (single)
   ========================================================================== */
.legend-hero {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--wdl-max-text); margin: 0 auto 26px;
  padding-bottom: 22px; border-bottom: 1px solid var(--wdl-line);
}
.legend-hero__avatar {
  flex: 0 0 auto; width: 124px; height: 124px; border-radius: 50%;
  overflow: hidden; background: var(--wdl-night-2);
  border: 3px solid var(--wdl-gold);
  display: flex; align-items: center; justify-content: center;
}
.legend-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.legend-hero__avatar .legend-card__initials { font-size: 36px; }
.legend-hero__title { font-size: clamp(26px, 4vw, 38px); margin: 6px 0 4px; }
.legend-hero__dates { font-size: 16px; color: var(--wdl-muted); margin: 0; font-family: var(--wdl-font-display); }

@media (max-width: 560px) {
  .legend-hero { flex-direction: column; text-align: center; align-items: center; }
}

/* ==========================================================================
   14. Archiv / Pagination / Footer / 404
   ========================================================================== */
.archive-header { padding: 32px 0 4px; }
.archive-header__title { font-size: clamp(24px, 3.5vw, 34px); margin: 0 0 6px; }
.archive-header__desc { color: var(--wdl-muted); max-width: 720px; margin: 0; }

.wdl-listing { padding: 20px 0 36px; }

.pagination, .navigation.pagination { margin: 32px 0 8px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nav-links .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--wdl-card); border: 1px solid var(--wdl-line); border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--wdl-ink-soft);
}
.nav-links .page-numbers.current { background: var(--wdl-night); border-color: var(--wdl-night); color: var(--wdl-cream); }
.nav-links a.page-numbers:hover { border-color: var(--wdl-night); color: var(--wdl-ink); }

.post-nav {
  max-width: var(--wdl-max-text); margin: 32px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.post-nav a {
  background: var(--wdl-card); border: 1px solid var(--wdl-line); border-radius: var(--wdl-radius);
  padding: 14px 16px; font-size: 14px; font-weight: 600; color: var(--wdl-ink);
}
.post-nav a:hover { border-color: var(--wdl-gold); color: var(--wdl-gold-dark); }
.post-nav span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wdl-muted); margin-bottom: 4px; }
.post-nav .next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } }

.site-footer { margin-top: 44px; background: var(--wdl-night); color: var(--wdl-cream-soft); padding: 28px 0; font-size: 14px; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: #d8d3c8; }
.site-footer a:hover { color: var(--wdl-cream); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer .site-logo__name { font-size: 16px; }
.site-footer .site-logo__mark { width: 26px; height: 26px; }

.error-404 { padding: 60px 0; text-align: center; }
.error-404 h1 { font-size: clamp(28px, 5vw, 42px); }
