/* Dopery journal cards — restrained editorial treatment */
.dopery-story-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.dopery-story-cards article {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(246, 240, 232, 0.16) !important;
  background: #111 !important;
}

.dopery-story-cards article > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0.76;
  filter: saturate(0.72) contrast(1.03);
  transform: scale(1.02);
  transition: transform 600ms ease, opacity 300ms ease;
}

.dopery-story-cards article::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 16%, rgba(0, 0, 0, 0.12) 43%, rgba(0, 0, 0, 0.86) 100%);
  pointer-events: none;
}

.dopery-story-cards article:hover > img {
  transform: scale(1.06);
  opacity: 0.92;
}

.dopery-story-cards article > span,
.dopery-story-cards article > p {
  z-index: 1;
}

.dopery-story-cards article > span {
  right: 1rem !important;
  top: 0.8rem !important;
  color: rgba(246, 240, 232, 0.48) !important;
  font-size: 1.65rem !important;
  letter-spacing: 0.03em;
}

.dopery-story-cards article > p {
  margin: 0;
  color: #f6f0e8 !important;
  font-size: clamp(1.45rem, 2vw, 2.35rem) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.025em;
  max-width: 9ch;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

@media (max-width: 767px) {
  .dopery-story-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.625rem !important;
    margin-top: 1.5rem !important;
  }

  .dopery-story-cards article {
    min-height: 15rem !important;
    aspect-ratio: 0.72;
    padding: 1rem !important;
  }

  .dopery-story-cards article:last-child {
    grid-column: 1 / -1;
    min-height: 12rem !important;
    aspect-ratio: auto;
  }

  .dopery-story-cards article:last-child > img {
    object-position: center 38%;
  }

  .dopery-story-cards article > span {
    font-size: 1.35rem !important;
    right: 0.75rem !important;
    top: 0.65rem !important;
  }

  .dopery-story-cards article > p {
    font-size: 1.55rem !important;
    max-width: 8.5ch;
  }
}
