/* --- Research cards --- */

.research-cards {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.research-card {
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background-color: rgba(38, 53, 170, 0.03);
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Two-column layout when card has an image */
.research-card.has-image {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}

.research-card-image img {
  width: clamp(150px, 20vw, 300px);
  border-radius: 0.25rem;
  border: 1px solid rgba(38, 53, 170, 0.1);
}

.research-card-content {
  h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    margin: 0 0 0.25rem;
    text-align: left;
  }

  time {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.6;
    margin-bottom: 1rem;
  }
}

.research-card-description {
  p {
    margin: 0 0 0.75rem;
  }

  p:last-child {
    margin-bottom: 0;
  }
}

.research-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;

  &:hover {
    text-decoration: underline;
  }

  svg {
    flex-shrink: 0;
  }
}

/* Stack image above text on narrow screens */
@media (max-width: 768px) {
  .research-card.has-image {
    grid-template-columns: 1fr;
  }

  .research-card-image img {
    width: clamp(150px, 60vw, 250px);
  }
}