.paragraph--related-article-wrapper {
  margin: 2rem 0;
}

.paragraph--related-article-wrapper .paragraph__inner {
  background: #edf1f3;
  border: 1px solid #d9e0e4;
  border-radius: 1.5rem;
  padding: 1.5rem;
}

.node--view-mode-related-article {
  margin: 0;
}

.related-article-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.related-article-card__media {
  overflow: hidden;
  border-radius: 1rem;
}

.related-article-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-article-card__body {
  min-width: 0;
}

.related-article-card__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: var(--bisbat-leading-tightest);
  font-weight: 700;
  color: var(--bisbat-color-primary-dark);
}

.related-article-card:hover .related-article-card__title,
.related-article-card:focus-visible .related-article-card__title {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}



.paragraph--other-articles-wrapper {
  margin: 2.5rem 0;
}

.paragraph--other-articles-wrapper .paragraph__inner {
  background: #edf1f3;
  border: 1px solid #d9e0e4;
  border-radius: 1.5rem;
  padding: 1rem;
}

.paragraph--other-articles-wrapper .paragraph__section-title {
  margin: 0 0 1.75rem;
}

.paragraph--other-articles-wrapper .paragraph__section-title > div {
  margin: 0;
  font-size: var(--bisbat-text-xl);
  line-height: var(--bisbat-leading-tight);
  font-weight: 500;
  color: var(--bisbat-color-text-muted);
}

/* El primer div dins .other-articles-grid és el wrapper del field */
.other-articles-grid > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: start;
}

.other-articles-grid > div > div {
  min-width: 0;
}

.node--view-mode-other-articles {
  margin: 0;
  height: 100%;
}

.other-article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.other-article-card__media {
  margin-bottom: 0.9rem;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 16 / 9;
  background: #e7ecef;
}

/* wrappers reals que genera Drupal dins del media */
.other-article-card__media > div,
.other-article-card__media > div > div,
.other-article-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.other-article-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.other-article-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: var(--bisbat-leading-tightest);
  font-weight: 700;
  color: var(--bisbat-color-primary-dark);
}

.other-article-card__title span {
  display: inline;
}

.other-article-card__date {
  font-size: 0.92rem;
  line-height: var(--bisbat-leading-tight);
  color: var(--bisbat-color-text-muted);
  font-weight: 600;
}

.other-article-card:hover .other-article-card__title,
.other-article-card:focus-visible .other-article-card__title {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}


@media (max-width: 980px) {
  .other-articles-grid > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .paragraph--related-article-wrapper .paragraph__inner,
  .paragraph--other-articles-wrapper .paragraph__inner {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  .related-article-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .related-article-card__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .paragraph--other-articles-wrapper .paragraph__inner {
    padding: 1.25rem;
  }

  .other-articles-grid > div {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}