/* BlogCard — a post preview in the "Stories, strategies…" grid.

   House change from the source reference: the image is NOT a small thumbnail in
   the corner. It fills the top of the card as a large media surface. Below the
   media: a meta row (date · read time), the title, and an excerpt.

   Hover (the two effects the brand asked for, both at --transition-btn):
     1. the media image scales up gently (card clips the overflow), and
     2. the title gets a house-orange underline that wipes in from the left. */

.ds-blogcard {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  background: var(--surface-white);
  border-radius: var(--radius-24);
  overflow: hidden;               /* clip the scaling image + round the media */
  text-decoration: none;
  color: inherit;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

/* ---- Media: large, fills the top of the card ---- */
.ds-blogcard__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  margin: var(--gap-24) var(--gap-24) 0;   /* small inset from the card edge */
  width: auto;
  border-radius: var(--radius-image-sm);   /* nested image inside a card — always 12px */
  overflow: hidden;
  background: var(--color-icon-well);
}
.ds-blogcard--ai .ds-blogcard__media::after {
  content: 'KI-unterstützte Bildgestaltung';
  position: absolute;
  right: 10px;
  bottom: 9px;
  z-index: 2;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--font-weight-body-base);
  letter-spacing: 0.02em;
  line-height: 1;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
  pointer-events: none;
}
.ds-blogcard__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1);
  transition: transform var(--transition-btn) ease;
  will-change: transform;
}
.ds-blogcard:hover .ds-blogcard__img,
.ds-blogcard:focus-visible .ds-blogcard__img {
  transform: scale(1.045);
}

/* ---- Body ---- */
.ds-blogcard__body {
  display: flex;
  flex-direction: column;
  padding: var(--gap-24);
}

/* Meta row: date (left) · read time (right) */
.ds-blogcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-16);
  color: var(--color-muted);
  font-size: var(--text-s);        /* 14px */
}
.ds-blogcard__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-8);
}
.ds-blogcard__meta svg { width: 18px; height: 18px; stroke-width: 1.7; }
.ds-blogcard__dot {
  width: 7px; height: 7px; border-radius: var(--radius-100);
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ---- Hover overlay: slight dim + centred white CTA ---- */
.ds-blogcard__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.18);   /* super-subtle darken for contrast */
  opacity: 0;
  transition: opacity var(--transition-btn) ease;
  pointer-events: none;
}
.ds-blogcard:hover .ds-blogcard__overlay,
.ds-blogcard:focus-visible .ds-blogcard__overlay {
  opacity: 1;
}
.ds-blogcard__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-8);
  padding: 12px 20px;
  border-radius: var(--radius-button);
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-s);        /* 14px */
  font-weight: var(--font-weight-medium);
  line-height: 1;
  white-space: nowrap;
}
.ds-blogcard:hover .ds-blogcard__cta,
.ds-blogcard:focus-visible .ds-blogcard__cta {
  transform: none;
}
.ds-blogcard__cta-icon { flex-shrink: 0; }

/* Title */
.ds-blogcard__title {
  align-self: flex-start;
  margin: var(--gap-32) 0 0;
  font-family: var(--font-display);
  font-size: var(--text-h4);       /* 32px */
  font-weight: var(--font-weight-heading);
  line-height: var(--leading-h4);
  letter-spacing: var(--tracking-h4);
  color: var(--color-ink);
}

/* Excerpt — house base body text (Text S): Inter 14 / 400 / 21, schwarz */
.ds-blogcard__excerpt {
  margin: var(--gap-16) 0 0;
  font-family: var(--font-body);
  font-size: var(--text-body-base);        /* 14px */
  font-weight: var(--font-weight-body-base);   /* 400 */
  line-height: var(--leading-body-base);       /* 21px */
  letter-spacing: var(--tracking-body-base);
  color: var(--color-ink);                 /* schwarz */
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .ds-blogcard__img,
  .ds-blogcard__overlay,
  .ds-blogcard__cta { transition: none; }
}

/* ---- Mobile (≤640px) ----
   Title (--text-h4) is fluid via the tokens; the card's insets tighten. In a
   grid context, put the cards in a .ds-cardrow — on mobile it becomes a
   horizontal swipe carousel. */
@media (max-width: 640px) {
  .ds-blogcard__media { margin: var(--gap-16) var(--gap-16) 0; }
  .ds-blogcard__body { padding: var(--gap-16) var(--gap-16) var(--gap-24); }
  .ds-blogcard__title { margin-top: var(--gap-24); }
}
