/**
 * MAIVELO Ratgeber archive and single-article foundation.
 *
 * Every selector is scoped to the native Blog template classes so existing
 * page, WooCommerce, calculator, contact and Tarifprüfer surfaces remain
 * outside this release.
 */

.maivelo-ratgeber-layout,
.maivelo-ratgeber-main {
  width: 100%;
  max-width: none;
  margin: 0;
}

.maivelo-ratgeber-main {
  min-width: 0;
  overflow-x: clip;
  color: var(--maivelo-bg);
  background: var(--maivelo-cream-light);
}

.maivelo-ratgeber-hero {
  width: 100%;
  margin: 0;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 4vw, 3rem);
  color: var(--maivelo-bg);
  background: var(--maivelo-cream);
  border-block-end: 1px solid rgba(139, 107, 86, .32);
}

.maivelo-ratgeber-hero__inner {
  width: min(100%, 75rem);
  max-width: 75rem;
  margin-inline: auto;
}

.maivelo-ratgeber-hero__inner > * {
  max-width: 52rem;
  margin-inline-start: 0;
  margin-inline-end: auto;
}

.maivelo-ratgeber-eyebrow,
.maivelo-ratgeber-title,
.maivelo-ratgeber-intro {
  margin-block: 0;
}

.maivelo-ratgeber-eyebrow {
  color: var(--maivelo-bg);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .18em;
}

.maivelo-ratgeber-title {
  margin-block-start: 1rem;
  color: var(--maivelo-bg);
  font-family: var(--maivelo-font-body);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 750;
  line-height: .98;
  letter-spacing: -.045em;
  overflow-wrap: normal;
  word-break: normal;
}

.maivelo-ratgeber-intro,
.maivelo-ratgeber-hero .wp-block-term-description {
  margin-block-start: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--maivelo-bg);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.maivelo-ratgeber-hero--taxonomy {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.maivelo-ratgeber-hero--taxonomy .maivelo-ratgeber-title {
  max-width: 46rem;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
}

.maivelo-ratgeber-listing {
  width: 100%;
  margin: 0;
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--maivelo-cream-light);
}

.maivelo-ratgeber-listing__inner {
  width: min(100%, 75rem);
  max-width: 75rem;
  margin-inline: auto;
}

.maivelo-ratgeber-query,
.maivelo-ratgeber-grid,
.maivelo-ratgeber-card,
.maivelo-ratgeber-card__media,
.maivelo-ratgeber-card__body,
.maivelo-ratgeber-card__meta,
.maivelo-ratgeber-pagination,
.maivelo-ratgeber-empty {
  margin-block: 0;
}

.maivelo-ratgeber-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding: 0;
}

.maivelo-ratgeber-grid > li {
  min-width: 0;
  margin: 0;
}

.maivelo-ratgeber-grid > li:only-child {
  grid-column: 1 / -1;
}

.maivelo-ratgeber-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .38);
  border-block-start: 3px solid var(--maivelo-gold);
  border-radius: var(--maivelo-radius-md);
  box-shadow: 0 1rem 2.5rem rgba(36, 26, 22, .07);
}

.maivelo-ratgeber-card__media {
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--maivelo-cream);
  background: color-mix(in srgb, var(--maivelo-gold) 18%, var(--maivelo-cream));
  aspect-ratio: 16 / 9;
}

.maivelo-ratgeber-card__media:not(:has(img)) {
  display: none;
}

.maivelo-ratgeber-card__image,
.maivelo-ratgeber-card__image a,
.maivelo-ratgeber-card__image img {
  display: block;
  width: 100%;
  height: 100%;
}

.maivelo-ratgeber-card__image {
  margin: 0;
}

.maivelo-ratgeber-card__image img {
  object-fit: cover;
  transition: transform 360ms ease;
}

.maivelo-ratgeber-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.375rem, 2.4vw, 2rem);
}

.maivelo-ratgeber-card__body > * {
  margin-block-start: 0;
}

.maivelo-ratgeber-card__meta,
.maivelo-ratgeber-article__meta {
  gap: .45rem 1rem;
  color: var(--maivelo-bronze);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.5;
}

.maivelo-ratgeber-card__meta a,
.maivelo-ratgeber-article__meta a {
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

.maivelo-ratgeber-card__title {
  margin-block: 1rem 0;
  color: var(--maivelo-bg);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.18;
  letter-spacing: -.025em;
  overflow-wrap: normal;
  word-break: normal;
}

.maivelo-ratgeber-card__title a {
  text-decoration: none;
}

.maivelo-ratgeber-card__title a:hover,
.maivelo-ratgeber-card__title a:focus-visible {
  color: var(--maivelo-bronze);
}

.maivelo-ratgeber-card__excerpt {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin-block-start: 1rem;
  color: color-mix(in srgb, var(--maivelo-bg) 78%, var(--maivelo-bronze));
  line-height: 1.65;
}

.maivelo-ratgeber-card__excerpt > p:first-child {
  margin-block-start: 0;
}

.maivelo-ratgeber-card__excerpt .wp-block-post-excerpt__more-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block-start: auto;
  color: var(--maivelo-bg);
  font-weight: 800;
  text-decoration-color: var(--maivelo-gold);
  text-decoration-thickness: .14em;
  text-underline-offset: .3em;
}

.maivelo-ratgeber-card__excerpt .wp-block-post-excerpt__more-link:hover,
.maivelo-ratgeber-card__excerpt .wp-block-post-excerpt__more-link:focus-visible {
  color: var(--maivelo-bronze);
}

@media (min-width: 64.01rem) {
  .maivelo-ratgeber-grid > li:only-child .maivelo-ratgeber-card:has(.maivelo-ratgeber-card__image img) {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(20rem, .78fr);
    min-height: 25rem;
  }

  .maivelo-ratgeber-grid > li:only-child .maivelo-ratgeber-card__media {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .maivelo-ratgeber-grid > li:only-child .maivelo-ratgeber-card__title {
    font-size: clamp(1.9rem, 3vw, 2.75rem);
    line-height: 1.08;
  }
}

.maivelo-ratgeber-pagination {
  gap: 1rem;
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
  padding-block-start: 1.5rem;
  border-block-start: 1px solid rgba(139, 107, 86, .35);
}

.maivelo-ratgeber-pagination a,
.maivelo-ratgeber-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: .75rem;
  color: var(--maivelo-bg);
  font-weight: 750;
}

.maivelo-ratgeber-pagination .current {
  color: var(--maivelo-white);
  background: var(--maivelo-bg);
  border-radius: var(--maivelo-radius-sm);
}

.maivelo-ratgeber-empty {
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--maivelo-bronze);
  text-align: center;
  background: var(--maivelo-white);
  border-block-start: 2px solid var(--maivelo-gold);
}

.maivelo-ratgeber-article {
  width: 100%;
  margin: 0;
  padding-block: clamp(3rem, 7vw, 6rem);
  background: var(--maivelo-cream-light);
}

.maivelo-ratgeber-article__header,
.maivelo-ratgeber-article-content,
.maivelo-ratgeber-post-navigation {
  width: min(calc(100% - 2.5rem), 50rem);
  max-width: 50rem;
  margin-inline: auto;
}

.maivelo-ratgeber-back,
.maivelo-ratgeber-article__meta,
.maivelo-ratgeber-article__title {
  margin-block: 0;
}

.maivelo-ratgeber-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--maivelo-bronze);
  font-size: .875rem;
  font-weight: 800;
  text-decoration-thickness: .1em;
  text-underline-offset: .25em;
}

.maivelo-ratgeber-back a::before {
  margin-inline-end: .55rem;
  content: '←';
}

[dir="rtl"] .maivelo-ratgeber-back a::before {
  content: '→';
}

.maivelo-ratgeber-article__meta {
  margin-block-start: 1.25rem;
}

.maivelo-ratgeber-article__title {
  margin-block-start: clamp(1.25rem, 3vw, 2rem);
  color: var(--maivelo-bg);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  word-break: normal;
}

.maivelo-ratgeber-article__media {
  width: min(calc(100% - 2.5rem), 75rem);
  max-width: 75rem;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  overflow: hidden;
  background: var(--maivelo-cream);
  border-radius: var(--maivelo-radius-md);
  aspect-ratio: 16 / 9;
}

.maivelo-ratgeber-article__media:not(:has(img)) {
  display: none;
}

.maivelo-ratgeber-article__image,
.maivelo-ratgeber-article__image img {
  display: block;
  width: 100%;
  height: 100%;
}

.maivelo-ratgeber-article__image {
  margin: 0;
}

.maivelo-ratgeber-article__image img {
  object-fit: cover;
}

.maivelo-ratgeber-article-content {
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
  color: var(--maivelo-bg);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.8;
}

.maivelo-ratgeber-article-content > :first-child {
  margin-block-start: 0;
}

.maivelo-ratgeber-article-content h2 {
  margin-block: clamp(2.75rem, 6vw, 4.5rem) 1rem;
  color: var(--maivelo-bg);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.maivelo-ratgeber-article-content h3 {
  margin-block: clamp(2rem, 4vw, 3rem) .75rem;
  color: var(--maivelo-bg);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25;
}

.maivelo-ratgeber-article-content :where(p, ul, ol, blockquote) {
  max-width: 100%;
}

.maivelo-ratgeber-article-content :where(ul, ol) {
  padding-inline-start: 1.35em;
}

.maivelo-ratgeber-article-content li + li {
  margin-block-start: .55rem;
}

.maivelo-ratgeber-article-content a {
  color: var(--maivelo-bronze);
  font-weight: 650;
  overflow-wrap: anywhere;
  text-decoration-thickness: .09em;
  text-underline-offset: .2em;
}

.maivelo-ratgeber-article-content blockquote {
  margin-inline: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--maivelo-bg);
  background: var(--maivelo-cream);
  border-inline-start: 4px solid var(--maivelo-gold);
}

.maivelo-ratgeber-article-content .maivelo-ratgeber-sources {
  margin-block-start: clamp(3rem, 6vw, 5rem);
  padding-block-start: 1.5rem;
  border-block-start: 1px solid rgba(139, 107, 86, .45);
}

.maivelo-ratgeber-article-content .maivelo-ratgeber-cta {
  margin-block-start: clamp(3rem, 6vw, 5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--maivelo-cream);
  background: var(--maivelo-bg);
  border-block-start: 3px solid var(--maivelo-gold);
  border-radius: var(--maivelo-radius-md);
}

.maivelo-ratgeber-article-content .maivelo-ratgeber-cta a {
  color: var(--maivelo-gold);
}

.maivelo-ratgeber-post-navigation {
  gap: 1rem 2rem;
  margin-block-start: clamp(3rem, 6vw, 5rem);
  padding-block-start: 1.5rem;
  border-block-start: 1px solid rgba(139, 107, 86, .4);
}

.maivelo-ratgeber-post-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--maivelo-bg);
  font-weight: 750;
}

[dir="rtl"] :where(.maivelo-ratgeber-title, .maivelo-ratgeber-article__title, .maivelo-ratgeber-card__title) {
  letter-spacing: 0;
}

@media (hover: hover) and (pointer: fine) {
  .maivelo-ratgeber-card:hover .maivelo-ratgeber-card__image img {
    transform: scale(1.025);
  }
}

@media (max-width: 64rem) {
  .maivelo-ratgeber-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .maivelo-ratgeber-hero,
  .maivelo-ratgeber-listing {
    padding-inline: clamp(1.125rem, 5vw, 1.5rem);
  }

  .maivelo-ratgeber-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .maivelo-ratgeber-article__header,
  .maivelo-ratgeber-article-content,
  .maivelo-ratgeber-post-navigation,
  .maivelo-ratgeber-article__media {
    width: min(calc(100% - 2.25rem), 50rem);
  }

  .maivelo-ratgeber-post-navigation {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 24rem) {
  .maivelo-ratgeber-hero {
    padding-block: 3rem;
  }

  .maivelo-ratgeber-title,
  .maivelo-ratgeber-article__title {
    font-size: 2.125rem;
  }

  .maivelo-ratgeber-listing {
    padding-block: 3rem;
  }

  .maivelo-ratgeber-card__body {
    padding: 1.25rem;
  }

  .maivelo-ratgeber-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .maivelo-ratgeber-hero__inner {
    animation: maivelo-ratgeber-reveal 600ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .maivelo-ratgeber-grid > li {
    animation: maivelo-ratgeber-reveal 520ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .maivelo-ratgeber-grid > li:nth-child(2) {
    animation-delay: 70ms;
  }

  .maivelo-ratgeber-grid > li:nth-child(3) {
    animation-delay: 140ms;
  }

  .maivelo-ratgeber-article__media {
    animation: maivelo-ratgeber-reveal 620ms 100ms cubic-bezier(.22, 1, .36, 1) both;
  }
}

@keyframes maivelo-ratgeber-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
