/* ============================================================
   Blog "Ratgeber"  (ED-F003)
   ------------------------------------------------------------
   The post card (overview /ratgeber and the homepage teaser),
   the post page (/ratgeber/<slug>), and the teaser's "all
   posts" link.

   Transcribed from section 3 of the approved mockups
   docs/mockups/ed-03-05-002-mockup-blog-overview.html,
   ed-03-05-003-mockup-blog-post.html and
   ed-03-05-004-mockup-home.html. The blog follows the live
   site's look, not the design system (owner, 12 Oct 2026).

   Loaded AFTER main.css so it builds on the template's design
   tokens (--accent-color, --surface-color, --heading-color …),
   and only by the blog pages and by the homepage while at
   least one post exists. The two site-wide changes that came
   with the blog (menu spacing, page-title side space) live in
   main.css.
   ============================================================ */

/* --- Post card: the whole card is one link (the title) ------- */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 12px;
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.post-card:has(.post-card__title a:focus-visible) {
  outline: 2px solid var(--heading-color);
  outline-offset: 3px;
}

@supports not selector(:has(*)) {
  .post-card:focus-within {
    outline: 2px solid var(--heading-color);
    outline-offset: 3px;
  }
}

.post-card__img {
  aspect-ratio: 16 / 9;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
}

.post-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 24px 28px 28px;
}

/* After the title in the code, above it on screen */
.post-card time {
  order: -1;
  font-size: 0.875rem;
  color: var(--default-color);
}

.post-card__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.3;
  hyphens: manual;
  overflow-wrap: break-word;
}

.post-card__title a {
  color: var(--heading-color);
  text-decoration: none;
}

.post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card__title a:focus-visible {
  outline: none;
}

.post-card__summary {
  margin: 0;
  line-height: 1.65;
  color: var(--default-color);
}

.post-card__more {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading-color);
}

.post-card__more i {
  color: var(--accent-color);
  margin-left: 4px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.post-card:hover .post-card__more i {
  transform: translateX(4px);
}

/* The newest post on the overview: image left, text right from 992 px */
@media (min-width: 992px) {
  .post-card--featured {
    flex-direction: row;
  }

  .post-card--featured .post-card__img {
    flex: 0 0 58%;
    aspect-ratio: 16 / 9;
  }

  .post-card--featured .post-card__body {
    justify-content: center;
    padding: 40px 44px;
    gap: 14px;
  }

  .post-card--featured .post-card__title {
    font-size: 1.9rem;
  }

  .post-card--featured .post-card__summary {
    font-size: 1.05rem;
  }
}

/* --- Overview -------------------------------------------------- */
.blog-list {
  padding-top: 20px;
}

.blog-list .post-card--featured {
  margin-bottom: 32px;
}

/* --- Post page ------------------------------------------------- */
.post-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--default-color);
}

/* ~75 characters per line at 18 px */
.post-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.post-hero {
  margin: 0 0 32px;
}

.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-summary {
  margin: 0 0 40px;
  padding: 24px 28px;
  border-left: 4px solid var(--accent-color);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent-color), white 88%);
}

/* Beausite Grand at 12-13 px in caps loses its hairlines ("KURZ GESAGT"
   read as "GFSAGT") - the labels are set in Slick */
.post-summary__label,
.post-author__label {
  margin: 0 0 8px;
  font-family: var(--default-font);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--heading-color);
}

.post-summary__text {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--heading-color);
}

.post-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--default-color);
}

.post-text h2 {
  margin: 48px 0 16px;
  font-size: 1.65rem;
  line-height: 1.3;
  color: var(--heading-color);
  hyphens: manual;
  overflow-wrap: break-word;
}

.post-text h3 {
  margin: 32px 0 12px;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--heading-color);
  hyphens: manual;
  overflow-wrap: break-word;
}

.post-text p {
  margin: 0 0 20px;
}

.post-text ul {
  margin: 0 0 20px;
  padding-left: 1.25rem;
}

.post-text li {
  margin-bottom: 8px;
}

.post-text li::marker {
  color: var(--accent-color);
}

.post-text strong {
  color: var(--heading-color);
}

.post-text img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-text a {
  color: var(--heading-color);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post-text a:focus-visible,
.post-author a:focus-visible {
  outline: 2px solid var(--heading-color);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-author {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
}

.post-author img {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author__name {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--heading-color);
}

.post-author__role {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--default-color);
}

.post-author__bio {
  margin: 0 0 12px;
  line-height: 1.65;
  color: var(--default-color);
}

.post-author__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading-color);
  text-decoration: none;
}

.post-author__more i {
  color: var(--accent-color);
  margin-left: 4px;
}

@media (max-width: 575px) {
  .post-summary {
    padding: 20px 20px;
  }

  .post-author {
    gap: 16px;
  }

  .post-author img {
    width: 72px;
    height: 72px;
  }
}

/* --- Homepage teaser: the link to the overview ----------------- */
.teaser-all {
  margin-top: 40px;
  text-align: center;
}

.teaser-all a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--heading-color);
  text-decoration: none;
}

.teaser-all a i {
  color: var(--accent-color);
  margin-left: 6px;
}

.teaser-all a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-underline-offset: 4px;
}

.teaser-all a:focus-visible {
  outline: 2px solid var(--heading-color);
  outline-offset: 4px;
  border-radius: 2px;
}
