/* =========================================================================
   Wirtschaft-Magazin — standalone stylesheet for the generated advertorial
   and ranking pages. Mirrors the relaunch theme; no WordPress dependency.
   Values are taken from the live theme (style.css, header.css, home.css,
   footer.css) so generated pages sit flush with the editorial site.

   Type floor: nothing below 12px. Uppercase kickers may use 12px; body copy
   is 16px/18px. Please keep this rule when adding anything.
   ========================================================================= */

:root {
  --red:      #C41A1A;
  --black:    #0D0D0D;
  --off:      #F7F5F0;
  --border:   #D4D0C8;
  --white:    #FFFFFF;
  --gray-500: #6B6B6B;
  --ground:   #C8C4BC;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  --text-xs:   0.75rem;   /* 12px — kickers only */
  --text-sm:   0.875rem;  /* 14px — meta */
  --text-base: 1rem;      /* 16px — body floor */
  --text-lg:   1.125rem;  /* 18px — article body */
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  --page-max: 980px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 0 0 60px;
  background-color: var(--ground);
  font-family: var(--font-ui);
  color: var(--black);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* The 980px white page, centred on the grey-beige ground. */
.wm-page {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.2);
}

/* ── Header ─────────────────────────────────────────────────────────── */
.wmh-topbar {
  background: var(--black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  height: 44px;
}
.wmh-topbar-links { display: flex; gap: 18px; }
.wmh-topbar a { color: #ccc; font-size: var(--text-sm); letter-spacing: 0.02em; }
.wmh-topbar a:hover { color: #fff; }
.wmh-date { color: #999; font-size: var(--text-sm); }
.wmh-cta {
  background: var(--red); color: #fff !important; font-weight: 600;
  font-size: var(--text-sm); padding: 7px 14px; letter-spacing: 0.02em; white-space: nowrap;
}

.wmh-masthead { background: var(--off); text-align: center; padding: 26px 16px 18px; }
.wmh-logo { display: inline-block; color: var(--black); }
.wmh-logo-main {
  font-family: var(--font-display); font-weight: 900; font-size: 58px;
  line-height: 1; letter-spacing: 0.02em;
}
.wmh-logo-sub { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.wmh-logo-sub .line { display: block; width: 92px; height: 2px; background: var(--red); }
.wmh-logo-sub .word {
  font-family: var(--font-ui); font-weight: 500; font-size: 15px;
  letter-spacing: 0.55em; text-indent: 0.55em;
}

.wmh-subnav { background: var(--off); border-top: 1px solid var(--border); border-bottom: 2px solid var(--red); }
.wmh-subnav__list { display: flex; justify-content: center; align-items: stretch; }
.wmh-subnav a {
  font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 22px; border-left: 1px solid var(--border); white-space: nowrap;
}
.wmh-subnav__list > a:first-child,
.wmh-subnav__list > .wmh-has-sub:first-child > a { border-left: none; }
.wmh-subnav a:hover, .wmh-subnav a.active { color: var(--red); }

/* Toggle is mobile-only. */
.wmh-navtoggle { display: none; }

/* Verzeichnis dropdown — hover and :focus-within, no JS. */
.wmh-has-sub { position: relative; display: flex; }
.wmh-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 60; min-width: 210px;
  background: var(--off); border: 1px solid var(--border); border-top: 0;
  opacity: 0; visibility: hidden; transition: opacity .12s ease;
}
.wmh-has-sub:hover .wmh-dropdown,
.wmh-has-sub:focus-within .wmh-dropdown { opacity: 1; visibility: visible; }
.wmh-dropdown a { display: block; border-left: 0; border-bottom: 1px solid var(--border); padding: 12px 18px; }
.wmh-dropdown a:last-child { border-bottom: 0; }

/* ── Section bar + kicker ───────────────────────────────────────────── */
.sec-bar {
  margin: 1px 0 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: 2px solid var(--black); border-bottom: 1px solid var(--border);
  background: var(--off); padding: 10px 24px 8px;
}
.sec-bar--red-top { border-top-color: var(--red); }
.sec-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; }
.sec-more {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--red);
}
.sec-more:hover { text-decoration: underline; }

.kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kicker__rule { display: block; width: 20px; height: 1px; background: var(--red); }
.kicker__text {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--red);
}

/* ── Card grid (flush hairlines, matching the homepage) ─────────────── */
.wm-grid { --max: 3; display: flex; flex-wrap: wrap; gap: 0; }
.wm-grid > * {
  flex: 0 1 calc((100% - (var(--max) - 1) * 1px) / var(--max));
  min-width: 0;
  box-shadow: -1px 0 0 0 var(--border), 0 -1px 0 0 var(--border);
}
.card { display: block; background: #fff; padding: 16px 18px 20px; }
.card__img { width: 100%; aspect-ratio: 1.9; object-fit: cover; margin-bottom: 12px; }
.card__img--empty { display: block; background: var(--off); }
.card__title {
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
  line-height: 1.25; margin: 0 0 6px;
}
.card:hover .card__title { color: var(--red); }
.card__teaser {
  font-family: var(--font-body); font-size: var(--text-base); font-weight: 300;
  line-height: 1.6; color: #444; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__source { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--gray-500); margin-top: 10px; }

/* ── Rubrik chips (overview) ────────────────────────────────────────── */
.rubrik-list { display: flex; flex-wrap: wrap; gap: 0; }
.rubrik-list > a {
  flex: 0 1 calc((100% - 4px) / 5); min-width: 0;
  box-shadow: -1px 0 0 0 var(--border), 0 -1px 0 0 var(--border);
  background: #fff; padding: 14px 16px;
  font-family: var(--font-ui); font-size: var(--text-base); font-weight: 500;
}
.rubrik-list > a:hover { color: var(--red); }
.rubrik-list .count { display: block; font-size: var(--text-xs); color: var(--gray-500); margin-top: 4px; }

/* ── Article (single report) ────────────────────────────────────────── */
.article { padding: 28px 90px 40px; }
.article__title {
  font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 900;
  line-height: 1.12; margin: 0 0 14px;
}
.article__teaser {
  font-family: var(--font-body); font-size: var(--text-xl); font-weight: 300;
  line-height: 1.55; color: #333; margin: 0 0 18px;
}
.article__meta {
  font-family: var(--font-ui); font-size: var(--text-sm); color: var(--gray-500);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 10px 0; margin-bottom: 22px;
}
.article__figure { margin: 0 0 22px; }
.article__figure.is-img-missing { display: none; }
.article__figcaption { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--gray-500); margin-top: 6px; }
.article__body { font-family: var(--font-body); font-size: var(--text-lg); line-height: 1.7; color: #1a1a1a; }
.article__body h2 {
  font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700;
  line-height: 1.25; margin: 32px 0 10px;
}
.article__body p { margin: 0 0 18px; }
.article__body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* The Advertorial notice stays on the single report (homepage tiles do not). */
.advertorial-note {
  font-family: var(--font-ui); font-size: var(--text-sm); color: var(--gray-500);
  background: var(--off); border-left: 3px solid var(--red);
  padding: 10px 14px; margin: 0 0 20px;
}

.company-box { border: 1px solid var(--border); background: var(--off); padding: 18px 20px; margin-top: 32px; }
.company-box__title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; margin: 0 0 10px; }
.company-box__row { font-family: var(--font-ui); font-size: var(--text-base); margin: 0 0 4px; }
.company-box__row a { color: var(--red); text-decoration: underline; }

/* ── Ranking table ──────────────────────────────────────────────────── */
.rk-intro { padding: 24px 90px 8px; }
.rk-title { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 900; margin: 0 0 8px; }
.rk-sub { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 300; color: #444; margin: 0; }
.rk-stats { display: flex; gap: 0; margin: 20px 0 0; }
.rk-stats > div {
  flex: 1 1 0; background: #fff; padding: 14px 16px;
  box-shadow: -1px 0 0 0 var(--border), 0 -1px 0 0 var(--border), 0 1px 0 0 var(--border);
}
.rk-stats .k { font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray-500); }
.rk-stats .v { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.rk-table { width: 100%; border-collapse: collapse; }
.rk-table th, .rk-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: var(--text-base); }
.rk-table th {
  font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--gray-500);
  border-top: 2px solid var(--black); border-bottom: 1px solid var(--border); background: var(--off);
}
.rk-table td.rank { font-family: var(--font-display); font-weight: 700; color: var(--red); width: 64px; }
.rk-table td.name { font-family: var(--font-display); font-weight: 700; }
.rk-table tbody tr:hover { background: var(--off); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.wm-footer { background: var(--black); color: #fff; padding: 40px 32px 0; }
.wm-footer__grid { display: flex; flex-wrap: wrap; gap: 32px; }
.wm-footer__col { flex: 1 1 180px; }
.wm-footer__logo { font-family: var(--font-display); font-weight: 900; font-size: var(--text-xl); letter-spacing: 0.02em; }
.wm-footer__logo-sub { font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: 0.4em; color: var(--red); border-top: 2px solid var(--red); display: inline-block; padding-top: 4px; margin-top: 4px; }
.wm-footer__col-heading {
  font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: 1.4px;
  text-transform: uppercase; color: #fff; margin-bottom: 12px;
}
.wm-footer__nav { list-style: none; margin: 0; padding: 0; }
.wm-footer__nav li { margin-bottom: 7px; }
.wm-footer__nav a { color: #9a9a9a; font-size: var(--text-sm); }
.wm-footer__nav a:hover { color: #fff; }
.wm-footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid #262626; margin-top: 32px; padding: 16px 0 24px;
  font-family: var(--font-ui); font-size: var(--text-xs); color: #777;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .wm-grid { --max: 2; }
  .rubrik-list > a { flex-basis: calc((100% - 2px) / 3); }
  .article, .rk-intro { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 640px) {
  body { padding-bottom: 0; }
  .wm-page { box-shadow: none; max-width: 100%; }
  .wm-grid { --max: 1; }
  .rubrik-list > a { flex-basis: 100%; }
  .article, .rk-intro { padding-left: 16px; padding-right: 16px; }
  .article__title, .rk-title { font-size: var(--text-2xl); }
  .wmh-logo-main { font-size: 38px; }
  .wmh-logo-sub .line { width: 48px; }
  .wmh-topbar-links { display: none; }
  .wmh-navtoggle {
    display: flex; width: 100%; align-items: center; justify-content: space-between;
    gap: 10px; background: none; border: 0; margin: 0; padding: 12px 16px; cursor: pointer;
    font-family: var(--font-ui); font-size: 15px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--black);
  }
  .wmh-navtoggle__icon,
  .wmh-navtoggle__icon::before,
  .wmh-navtoggle__icon::after {
    display: block; width: 20px; height: 2px; background: var(--black);
  }
  .wmh-navtoggle__icon { position: relative; }
  .wmh-navtoggle__icon::before,
  .wmh-navtoggle__icon::after { content: ''; position: absolute; left: 0; }
  .wmh-navtoggle__icon::before { top: -6px; }
  .wmh-navtoggle__icon::after  { top: 6px; }

  .wmh-subnav__list { display: none; flex-direction: column; border-top: 1px solid var(--border); }
  .wmh-subnav__list.is-open { display: flex; }
  .wmh-subnav a { padding: 12px 16px; font-size: var(--text-sm); border-left: none; border-bottom: 1px solid var(--border); }
  .wmh-has-sub { display: block; width: 100%; }
  .wmh-dropdown { position: static; min-width: 0; border: 0; opacity: 1; visibility: visible; }
  .wmh-dropdown a { padding-left: 34px; font-size: var(--text-sm); }
  .rk-stats { flex-wrap: wrap; }
  .rk-stats > div { flex-basis: 50%; }
  .rk-table th:nth-child(4), .rk-table td:nth-child(4) { display: none; }
  .wm-footer { padding: 32px 16px 0; }
}

/* ── Content additions ──────────────────────────────────────────────── */
.wm-main { display: block; }

.wm-breadcrumb { padding: 14px 24px 0; font-family: var(--font-ui); font-size: var(--text-xs); }
.wm-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; }
.wm-breadcrumb li { display: inline-flex; align-items: center; }
.wm-breadcrumb li + li::before { content: '/'; margin: 0 6px; color: var(--gray-500); }
.wm-breadcrumb a { color: var(--gray-500); }
.wm-breadcrumb a:hover { color: var(--red); }

.wm-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-ui); font-size: var(--text-sm);
}
.wm-pagination__item { min-width: 130px; }
.wm-pagination__item:last-child { text-align: right; }
.wm-pagination__link {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--red);
}
.wm-pagination__link:hover { text-decoration: underline; }
.wm-pagination__current { color: var(--gray-500); }

.article__body figure { margin: 0 0 22px; }
.article__body figcaption { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--gray-500); margin-top: 6px; }
.article__body figcaption .copyright:not(:empty)::before { content: '\00A9 '; }
.article__body h3 {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700;
  line-height: 1.3; margin: 28px 0 10px;
}
.article__body ul, .article__body ol { margin: 0 0 18px; padding-left: 24px; }
.article__body li { margin-bottom: 6px; }
.article__body blockquote {
  margin: 0 0 18px; padding: 0 0 0 18px; border-left: 3px solid var(--red);
  font-style: italic; color: #333;
}
.article__body iframe { max-width: 100%; border: 0; }
.article__body video { display: block; width: 100%; height: auto; }
.article__body [data-type="video"] { margin: 0 0 22px; }
.article__body [data-type="video"] > iframe {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0;
}
.article__body .adcs-youtube-container { width: 100%; max-width: 100%; margin: 0 auto; }
.article__body .adcs-youtube {
  position: relative; width: 100%; height: 0;
  padding-bottom: 56.25%; overflow: hidden;
}
.article__body .adcs-youtube iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.article__body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.article__body th, .article__body td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.article__body strong.k { font-weight: 700; }

.article__body [data-type="header"] h2 {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray-500);
}
.article__body [data-type="links"] strong {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700;
  display: block; margin-bottom: 12px;
}
.article__body [data-type="links"] ul { list-style: none; margin-left: 0; padding-left: 0; }
.article__body [data-type="links"] li a strong,
.article__body [data-type="links"] li strong { font-family: inherit; font-size: inherit; font-weight: 400; display: inline; }

.article__body [data-type="faq"] { margin-top: 32px; }
.article__body [data-type="faq"] > strong { display: block; font-weight: 700; margin-bottom: 12px; }
.article__body [data-type="faq"] ul { list-style: none; margin: 0; padding: 0; }
.article__body [data-type="faq"] li { margin-bottom: 10px; }
.article__body [data-type="faq"] li > span {
  display: inline-block; margin-right: 8px; color: var(--red);
  font-weight: 700; cursor: pointer;
}
.article__body [data-type="faq"] li > div { display: inline; font-weight: 700; cursor: pointer; }
.article__body [data-type="faq"] blockquote {
  display: none; margin: 8px 0 0; padding: 0 0 0 18px;
  border-left: 3px solid var(--red); font-size: var(--text-base); font-weight: 400;
}
.article__body [data-type="faq"] blockquote::before { content: ''; }

.article__body [data-type="quellen"],
.article__body [data-type="disclaimer"],
.wm-sources, .wm-disclaimer { margin-top: 32px; }
.wm-sources header, .wm-disclaimer header {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray-500); margin-bottom: 8px;
}
.wm-sources *, .wm-disclaimer * { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--gray-500); }
.wm-sources ol { padding-left: 20px; }

.adcs-cta-button, .article__body .cta, .company-box .cta {
  display: inline-block; margin-top: 14px; padding: 10px 16px;
  background: var(--red); color: #fff !important; font-family: var(--font-ui);
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none;
}
.adcs-cta-button:hover, .article__body .cta:hover, .company-box .cta:hover { background: var(--black); }

.article__body a.cta,
.article__body a.ctam,
.article__body a.adcs-cta {
  display: block; width: auto; max-width: 60%; margin: 0 auto 24px; padding: 12px 18px;
  background: var(--red); color: #fff !important; text-align: center;
  font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none;
}
.article__body a.cta:hover,
.article__body a.ctam:hover,
.article__body a.adcs-cta:hover { background: var(--black); }
.article__body a.ctam { margin-top: 16px; }

.wm-author, .wm-authors { padding: 28px 90px 40px; }
.wm-author__title, .wm-authors__title {
  font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 900;
  line-height: 1.12; margin: 0 0 18px;
}
.wm-author__profile { display: flex; gap: 24px; align-items: flex-start; margin: 0 0 32px; }
.wm-author__photo { flex: 0 0 140px; margin: 0; }
.wm-author__photo img { width: 140px; height: 140px; object-fit: cover; }
.wm-author__details { flex: 1 1 auto; min-width: 0; }
.wm-author__text { font-family: var(--font-body); font-size: var(--text-lg); line-height: 1.7; }
.wm-author__social { display: flex; gap: 12px; margin-top: 12px; }
.wm-author__social a {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--red);
}
.wm-authors-grid { display: flex; flex-wrap: wrap; gap: 0; }
.author-card {
  flex: 0 1 calc((100% - 3px) / 4); min-width: 0;
  box-shadow: -1px 0 0 0 var(--border), 0 -1px 0 0 var(--border);
  padding: 16px 18px 20px; background: #fff;
}
.author-card__img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--off); margin-bottom: 12px; }
.author-card__img--empty { display: block; }
.author-card__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.author-card:hover .author-card__name { color: var(--red); }

@media (max-width: 1024px) {
  .wm-author, .wm-authors { padding-left: 40px; padding-right: 40px; }
  .author-card { flex-basis: calc((100% - 2px) / 3); }
}

@media (max-width: 640px) {
  .wm-author, .wm-authors { padding-left: 16px; padding-right: 16px; }
  .wm-author__title, .wm-authors__title { font-size: var(--text-2xl); }
  .wm-author__profile { display: block; }
  .wm-author__photo { margin-bottom: 16px; }
  .wm-pagination { padding: 18px 16px; }
  .wm-pagination__item { min-width: 0; }
  .author-card { flex-basis: calc((100% - 1px) / 2); }
}
