.education-project {
  --edge: clamp(14px, 2.8vw, 42px);
  --gallery-gap: clamp(10px, 1.2vw, 18px);
}

.education-project .breadcrumb {
  margin-top: 14px;
}

.education-project .project-head {
  align-items: start;
  gap: 12px 4%;
  padding-block: 16px 18px;
}

.education-project .project-meta {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.education-project .project-meta > div {
  display: block;
  padding-block: 4px;
}

.education-project .project-meta dd {
  line-height: 1.35;
}

.education-project .chapters {
  margin-block: 14px 6px;
}

.education-project .chapters a {
  min-height: 50px;
  padding-block: 6px;
}

.education-project .project-section {
  padding-block: clamp(19px, 2.6vw, 36px);
}

.education-project .project-section h2 {
  margin-bottom: 7px;
}

.education-project .project-section > p.copy {
  max-width: 100ch;
  line-height: 1.45;
}

.education-project .project-section .copy + .gallery,
.education-project .project-section .gallery + .gallery {
  margin-top: 12px;
}

.education-project .project-section .gallery {
  gap: var(--gallery-gap);
}

.education-project .gallery-item img {
  aspect-ratio: auto;
  height: auto;
}

.education-project .caption {
  padding-top: 5px;
  line-height: 1.35;
}

.education-project .caption small {
  margin-top: 2px;
}

.education-project .group-intro {
  margin-block: 18px 8px;
}

@media (min-width: 631px) {
  .education-project .gallery:is(.activity-views, .bathroom-views) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .education-project .gallery:is(.activity-views, .bathroom-views) > .gallery-item {
    grid-column: span 2;
  }

  .education-project .activity-views > .gallery-item:nth-child(-n + 4),
  .education-project .bathroom-views > .gallery-item:nth-child(-n + 2) {
    grid-column: span 3;
  }

  .education-project .rest-room-photos {
    grid-template-columns: repeat(2, minmax(0, 1.5fr)) minmax(0, .667fr);
  }
}

@media (max-width: 630px) {
  .education-project .chapters {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  }

  .education-project .chapters a {
    padding-inline: 9px;
  }

  .education-project .gallery:is(.activity-views, .bathroom-views) > .gallery-item {
    grid-column: auto;
  }

  .education-project .gallery:is(.activity-views, .bathroom-views) > .gallery-item:first-child {
    grid-column: 1 / -1;
  }

  .education-project .activity-details .gallery-item img {
    max-height: none;
  }

  .education-project .rest-room-photos {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .education-project .rest-room-photos > .gallery-item:first-child {
    grid-column: 1 / -1;
  }

  .education-project .rest-room-detail {
    grid-column: auto;
    display: block;
  }
}

/* Align the existing Wix shell with the approved gallery width. */
.education-project {
  --gutter: var(--edge);
  --page-width: var(--limit);
}
