/* =============================================================================
   DPL Latest Posts — homepage row of recent blog articles
   ============================================================================= */

.dpl-blog-latest {
  padding: 64px 0;
}

.dpl-blog-latest__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.dpl-blog-latest__title {
  font-size: 26px;
  font-weight: 500;
  color: #0d0d0d;
  line-height: 1.2;
  margin: 0 0 8px;
}

.dpl-blog-latest__subtitle {
  font-size: 15px;
  font-weight: 400;
  color: #6b6b6b;
  line-height: 1.6;
  margin: 0;
  max-width: 60ch;
}

.dpl-blog-latest__viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ff9a01;
  text-decoration: none;
  white-space: nowrap;
}

.dpl-blog-latest__viewall:hover {
  text-decoration: underline;
}

.dpl-blog-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dpl-blog-latest__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.dpl-blog-latest__card:hover {
  border-color: #ff9a01;
  background: #fff6e8;
  text-decoration: none;
}

/* 3:2 keeps the cover in proportion without dominating the card */
.dpl-blog-latest__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #ffffff;
}

.dpl-blog-latest__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dpl-blog-latest__placeholder {
  width: 40%;
  height: 40%;
  opacity: 0.15;
}

.dpl-blog-latest__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dpl-blog-latest__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px;
}

.dpl-blog-latest__date {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #adadad;
  margin-bottom: 8px;
}

.dpl-blog-latest__card-title {
  font-size: 16px;
  font-weight: 500;
  color: #0d0d0d;
  line-height: 1.35;
  margin: 0 0 8px;
}

.dpl-blog-latest__excerpt {
  font-size: 14px;
  font-weight: 400;
  color: #6b6b6b;
  line-height: 1.55;
  margin: 0 0 14px;
}

.dpl-blog-latest__readmore {
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ff9a01;
}

@media screen and (max-width: 1024px) {
  .dpl-blog-latest__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* a third card would be left stranded on its own row */
  .dpl-blog-latest__item:nth-child(n + 3) {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .dpl-blog-latest {
    padding: 40px 0;
  }

  .dpl-blog-latest__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .dpl-blog-latest__title {
    font-size: 20px;
  }

  .dpl-blog-latest__subtitle {
    font-size: 14px;
  }

  .dpl-blog-latest__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dpl-blog-latest__item:nth-child(n + 3) {
    display: block;
  }

  .dpl-blog-latest__body {
    padding: 16px;
  }
}
