/* Blog Teaser block — latest posts. Figma 313-8608 ("sunrise Blog").
   Sits on the page background; cards go white on hover (component 415-4808). */
.sun-blog {
  padding: clamp(48px, 6vw, 96px) 0;
}
.sun-blog__inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

/* Heading row — title left, text link bottom-right, 48px gap to cards */
.sun-blog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 48px;
}
.sun-blog__heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.17;
  letter-spacing: -0.48px;
  color: var(--sun-secondary);                    /* #132140 */
}

/* Grid — 3 columns desktop (410px cards @ 1280, gap 24) */
.sun-blog__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.sun-blog__item { display: flex; min-width: 0; }

/* Card — 28px padding, text above 16:9 image ("Box Image under"). */
.sun-blog__card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;                                      /* meta ↔ image */
  width: 100%;
  padding: 28px;
  background: transparent;                        /* white only on hover (Figma 415-4808) */
  border-radius: 4px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.sun-blog__card--linked:hover {
  background: var(--sun-base);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(19, 33, 64, .12);
}

/* Meta: date label + title */
.sun-blog__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.sun-blog__date {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--sun-secondary);               /* #132140 */
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--xs);    /* 12px */
  line-height: 16px;
  color: var(--sun-base);
}
.sun-blog__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: var(--sun-secondary);                    /* #132140 */
}
.sun-blog__cat { color: var(--sun-primary); }     /* orange lead-in */

/* Stretched-link (same pattern as usecases/branchen) */
.sun-blog__card-link { color: inherit; text-decoration: none; }
.sun-blog__card-link:hover,
.sun-blog__card-link:focus { text-decoration: none; }
.sun-blog__card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
}
.sun-blog__card-link:focus-visible::after { outline: 2px solid var(--sun-primary); outline-offset: 2px; }

/* Media — 16:9, rounded, cover; brand accent line grows at the bottom on hover */
.sun-blog__media {
  position: relative;
  aspect-ratio: 160 / 90;
  width: 100%;
  margin-top: auto;                               /* images sit flush at the card bottom */
  overflow: hidden;
  border-radius: 4px;
}
.sun-blog__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.sun-blog__card--linked:hover .sun-blog__img { transform: scale(1.06); }

/* Hover: the image's bottom-right corner is CUT AWAY (clip-path on the img,
   like Figma's "Subtract") so the white card shows through — no white overlay
   layer at all, hence no composited-layer hairline. Coincident 4th vertex in
   the resting polygon makes the cut morph smoothly out of the corner. */
.sun-blog__img {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%);
  transition: clip-path .3s cubic-bezier(.4, 0, .2, 1), transform .4s ease;   /* keep the zoom */
}
.sun-blog__card--linked:hover .sun-blog__img {
  clip-path: polygon(0 0, 100% 0, 100% 52%, 60% 100%, 0 100%);
}
.sun-blog__arrow {
  position: absolute;
  right: 8px; bottom: 4px;
  z-index: 2;
  display: inline-flex;
  color: var(--sun-secondary);
  opacity: 0;
  transition: opacity .2s ease;
}
.sun-blog__arrow .sun-blog__arrow-icon { width: 32px; height: 32px; }
.sun-blog__card--linked:hover .sun-blog__arrow { opacity: 1; transition-delay: .12s; }
.sun-blog__img--placeholder {
  background: linear-gradient(135deg, var(--sun-muted), var(--sun-border));
}

/* Button row — 48px above */
.sun-blog__cta { padding-top: 48px; }

/* Responsive: 3 → 2 → horizontal scroll-snap (like usecases ≤640) */
@media (max-width: 1024px) {
  .sun-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sun-blog__card { padding: 20px; }
}
@media (max-width: 640px) {
  .sun-blog__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 32px;
  }
  /* Figma 375w: cards stack vertically (no carousel). */
  .sun-blog__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .sun-blog__item {
    width: auto;
  }
  .sun-blog__cta { padding-top: 32px; }
}

/* Respect reduced-motion: no zoom/lift/slide transitions. */
@media (prefers-reduced-motion: reduce) {
  .sun-blog__card,
  .sun-blog__img,
  .sun-blog__arrow { transition: none; }
  .sun-blog__card--linked:hover { transform: none; }
  .sun-blog__card--linked:hover .sun-blog__img { transform: none; }
}
