/* Central article and header corrections for RETTWI */

/* Joomla already renders the site description. Keep that single source only. */
.container-header .brand-logo::after {
  content: none !important;
  display: none !important;
}

.container-header .site-description {
  display: block !important;
}

/* The main navigation is sufficient; breadcrumbs add visual noise here. */
.container-breadcrumbs,
nav[aria-label="Breadcrumbs"],
.mod-breadcrumbs,
.breadcrumb {
  display: none !important;
}

/* Consistent metadata row for every article card on the homepage. */
.rettwi-home .mod-articles-item-content {
  padding: 22px !important;
}

.rettwi-home .mod-articles-item dl {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px 14px !important;
  margin: 8px 0 16px !important;
  padding: 0 !important;
}

.rettwi-home .mod-articles-item dl dt {
  display: none !important;
}

.rettwi-home .mod-articles-category {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.rettwi-home .mod-articles-date {
  flex: 0 0 auto !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #53637c !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

.rettwi-home .mod-articles-category [class*="icon-"],
.rettwi-home .mod-articles-date [class*="icon-"] {
  margin: 0 !important;
  font-size: 14px !important;
}

.rettwi-home .mod-articles-item-content > p:not(.readmore) {
  margin: 0 !important;
}

/*
 * Joomla routes standalone posts through itemid-101 (the homepage).  The
 * homepage reset must therefore be undone for every regular article.  Rich
 * landing pages identify themselves through .rettwi-home or
 * .rettwi-page-intro and keep their purpose-built layouts.
 */
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) {
  box-sizing: border-box !important;
  width: min(100%, 1040px) !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding: clamp(38px, 5vw, 64px) clamp(24px, 4vw, 48px) 80px !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > .page-header {
  display: block !important;
}

/* Suppress the inherited menu heading (for example "Startseite"). */
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > .page-header:first-of-type {
  display: none !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > .page-header + .page-header {
  display: block !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > .page-header + .page-header h2 {
  margin: 0 !important;
  color: #071d42 !important;
  font-size: clamp(34px, 4.4vw, 54px) !important;
  font-weight: 780 !important;
  line-height: 1.08 !important;
  letter-spacing: -.03em !important;
}

/* Time-relevant posts retain their metadata, but in a quieter, tidy row. */
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > dl.article-info {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 18px !important;
  margin: 0 0 30px !important;
  padding: 0 0 20px !important;
  border-bottom: 1px solid #dfe5ee !important;
  color: #667085 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > dl.article-info dt {
  display: none !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > dl.article-info dd {
  margin: 0 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body {
  width: 100% !important;
  color: #17233a !important;
  font-size: clamp(16px, 1.2vw, 18px) !important;
  line-height: 1.75 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body > p,
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body > ul,
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body > ol {
  max-width: 74ch !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body h2 {
  margin: 44px 0 14px !important;
  color: #071d42 !important;
  font-size: clamp(25px, 3vw, 34px) !important;
  line-height: 1.2 !important;
  letter-spacing: -.018em !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .com-content-article__body h3 {
  margin: 32px 0 12px !important;
  color: #0b2f62 !important;
  font-size: clamp(20px, 2.4vw, 26px) !important;
  line-height: 1.25 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .rettwi-article-lead {
  max-width: 68ch !important;
  margin-bottom: 30px !important;
  color: #34425a !important;
  font-size: clamp(18px, 1.7vw, 22px) !important;
  line-height: 1.6 !important;
}

body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) + .pagenavigation,
body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) .pagenavigation {
  box-sizing: border-box !important;
  width: min(100%, 1040px) !important;
  margin: 0 auto 64px !important;
  padding-inline: clamp(24px, 4vw, 48px) !important;
}

@media (max-width: 600px) {
  body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) {
    padding: 34px 22px 64px !important;
  }

  body.view-article .com-content-article.item-page:not(:has(.rettwi-home)):not(:has(.rettwi-page-intro)) > dl.article-info {
    gap: 6px 14px !important;
  }
}
