.modules {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2.5rem;
  padding: 2rem 0;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.modulesContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
  gap: 1rem;
}

@media screen and (max-width: 768px) {
  .modulesContainer {
    grid-template-columns: repeat(1, 1fr);
  }
}

.modulesContainer > :nth-child(2n) {
  grid-column: span 1;
}

.modulesContainer > :nth-child(2n+1):only-child {
  justify-self: center;
  grid-column: span 2;
}

.heading {
  font-size: 3.5rem;
  font-weight: 500;
  font-style: italic;
  line-height: 4.375rem;
}

@media screen and (max-width: 489px) {
  .heading {
    font-size: 2.5rem;
  }
}

@media screen and (max-width: 369px) {
  .heading {
    font-size: 1.5rem;
  }
}

.module {
  max-width: 31.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-self: center;
}

.moduleShowcasePreviewContainer {
  position: relative;
  display: inline-block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.moduleShowcasePreviewContainer:hover .moduleShowcasePreviewIcon,
.moduleShowcasePreviewContainer:hover .moduleShowcasePreviewOverlay {
  opacity: 1;
}

.moduleShowcasePreviewOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
}

.moduleShowcasePreviewIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #FFFFFF;
  width: 4rem;
  height: 4rem;
}

.modulePreviewImage {
  border-radius: 0.5rem;
  border: thin solid var(--uc-border-color);
  display: block;
  width: 100%;
  height: auto;
}

.moduleTitle {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35rem;
  margin: 0;
}

.moduleNavigation {
  display: flex;
  gap: 0.5rem;
}
