.capstone-project-layout {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.capstone-project-layout td {
  vertical-align: top;
  border: 0;
  padding: 0;
}

/* Text column */
.capstone-project-info {
  width: 62%;
  padding-right: 2rem !important;
}

.capstone-project-info p {
  max-width: 68ch;
}

/* Image column */
.capstone-project-gallery {
  width: 38%;
}

.capstone-project-gallery .highlight-image {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 260px;
  object-fit: cover;
  margin: 0 0 0.875rem auto;
  border-radius: 6px;
}

/* Let the first/team image be slightly larger if it is the primary team photo */
.capstone-project-gallery .highlight-image:first-child {
  max-height: 320px;
}

/* Responsive layout */
@media (max-width: 900px) {
  .capstone-project-layout,
  .capstone-project-layout tbody,
  .capstone-project-layout tr,
  .capstone-project-layout td {
    display: block;
    width: 100%;
  }

  .capstone-project-info {
    padding-right: 0 !important;
  }

  .capstone-project-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
    margin-top: 1.5rem;
  }

  .capstone-project-gallery .highlight-image {
    width: 100%;
    max-width: 100%;
    max-height: 260px;
    margin: 0;
  }
}

@media (max-width: 560px) {
  .capstone-project-gallery {
    grid-template-columns: 1fr;
  }

  .capstone-project-gallery .highlight-image {
    max-height: none;
  }
}