.sa-project-archive__header {
  margin-bottom: clamp(2.75rem, 6vw, 5rem);
}

.sa-project-archive__intro,
.sa-project-single__excerpt {
  color: var(--sa-gray);
  font-size: var(--wp--preset--font-size--lead);
  max-width: 48rem;
}

.sa-project-selection {
  margin-block: 0;
}

.sa-project-selection--default {
  background: var(--sa-white);
}

.sa-project-selection--muted {
  background: var(--sa-paper);
}

.sa-project-selection--blue {
  background: var(--sa-blue);
  color: var(--sa-white);
}

.sa-project-selection__inner {
  box-sizing: border-box;
  margin-inline: auto;
  max-width: var(--wp--style--global--wide-size);
  width: 100%;
}

.sa-project-selection__header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 52rem;
}

.sa-project-selection__header h2,
.sa-project-selection__subline {
  margin-bottom: 0;
  margin-top: 0;
}

.sa-project-selection__subline {
  color: var(--sa-gray);
  margin-top: 0.85rem;
}

.sa-project-selection--blue .sa-project-selection__header h2,
.sa-project-selection--blue .sa-project-selection__subline {
  color: var(--sa-white);
}

.sa-project-selection--blue .sa-project-card {
  background: var(--sa-white);
  color: var(--sa-ink);
  padding: 1.25rem;
}

.sa-project-teasers__more {
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
}

.sa-project-selection--blue .sa-project-teasers__more a {
  color: var(--sa-white);
}

.sa-project-selection--blue .sa-project-teasers__more a:focus-visible {
  outline-color: var(--sa-white);
}

.sa-project-grid {
  display: grid !important;
  gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.sa-project-grid--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.sa-project-grid--count-1 {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 26rem;
}

.sa-project-card {
  border-top: 1px solid var(--sa-line);
  min-width: 0;
  padding-block: 1.25rem 0;
}

.sa-project-card .wp-block-post-featured-image {
  margin: 0 0 1.25rem;
  overflow: hidden;
}

.sa-project-card .wp-block-post-featured-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 320ms ease;
  width: 100%;
}

.sa-project-card:hover .wp-block-post-featured-image img {
  transform: scale(1.015);
}

.sa-project-card .sa-project-category {
  margin-bottom: 0.6rem;
}

.sa-project-card .wp-block-post-title {
  margin: 0;
}

.sa-project-card--selection .wp-block-post-title {
  font-size: var(--wp--preset--font-size--lead);
  line-height: 1.35;
}

.sa-project-card--selection .wp-block-post-title a {
  color: var(--sa-ink);
  text-decoration: none;
}

.sa-project-card--selection .wp-block-post-title a:hover {
  color: var(--sa-blue-dark);
  text-decoration: underline;
}

.sa-project-card .wp-block-post-excerpt {
  color: var(--sa-gray);
  margin-top: 0.85rem;
}

.sa-project-card .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.sa-project-card .wp-block-read-more {
  display: inline-block;
  font-weight: 600;
  margin-top: 1rem;
  text-underline-offset: 0.22em;
}

.sa-project-archive__empty {
  background: var(--sa-paper);
  border-left: 3px solid var(--sa-blue);
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.sa-project-archive__empty h2 {
  font-size: var(--wp--preset--font-size--large);
  margin-bottom: 0.65rem;
}

.sa-project-archive__empty p {
  color: var(--sa-gray);
  margin: 0;
}

.sa-project-pagination {
  border-top: 1px solid var(--sa-line);
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.25rem;
}

.sa-project-single {
  padding: 0;
}

.sa-project-breadcrumbs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.sa-project-single__hero .wp-block-post-title {
  max-width: 18ch;
}

.sa-project-single__gallery,
.sa-project-single__content {
  padding-inline: var(--sa-gutter);
}

.sa-project-single__hero-image .sa-project-single__featured-link {
  display: block;
  height: 100%;
}

.sa-project-single__featured-image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.sa-project-gallery {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
}

.sa-project-gallery__item {
  margin: 0;
  min-width: 0;
}

.sa-project-gallery__link {
  aspect-ratio: 4 / 3;
  background: var(--sa-paper);
  border: 1px solid var(--sa-line);
  border-radius: 4px;
  box-sizing: border-box;
  display: block;
  overflow: hidden;
}

.sa-project-lightbox-link:focus-visible {
  outline: 3px solid var(--sa-blue);
  outline-offset: 4px;
}

.sa-project-single__featured-link:focus-visible {
  outline-offset: -4px;
}

.sa-project-gallery__image {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
  width: 100%;
}

.sa-project-gallery__link:hover .sa-project-gallery__image {
  transform: scale(1.015);
}

.sa-project-single__content {
  margin-block: clamp(3rem, 7vw, 6rem);
}

.sa-project-single__content > .wp-block-post-content {
  margin-inline: auto;
  max-width: 48rem;
}

.sa-project-single__content :is(h2, h3) {
  margin-top: 2.2em;
}

.pswp__schimek-caption {
  background: rgba(0, 0, 0, 0.44);
  border-radius: 2px;
  bottom: 1.25rem;
  color: #fff;
  font-size: 0.9rem;
  left: 50%;
  max-width: min(44rem, calc(100vw - 2rem));
  padding: 0.45rem 0.7rem;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
}

@media (max-width: 1023px) {
  .sa-project-grid,
  .sa-project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 639px) {
  .sa-project-grid {
    grid-template-columns: 1fr !important;
  }

  .sa-project-grid--count-1 {
    max-width: none;
  }

  .sa-project-gallery {
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-project-card .wp-block-post-featured-image img,
  .sa-project-gallery__image {
    transition: none;
  }
}

.sa-project-teasers__more {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.sa-project-teasers__more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.7rem 1rem;
  border: 1px solid var(--wp--preset--color--primary, #066aaf);
  border-radius: 3px;
  color: var(--wp--preset--color--primary, #066aaf);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.sa-project-teasers__more-button:hover,
.sa-project-teasers__more-button:focus-visible {
  background: var(--wp--preset--color--primary, #066aaf);
  color: #fff;
  text-decoration: none;
}

.sa-project-teasers__more-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 639px) {
  .sa-project-teasers__more {
    justify-content: flex-start;
  }
}

.sa-project-teasers__more {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

@media (max-width: 639px) {
  .sa-project-teasers__more {
    justify-content: flex-start;
  }
}
