.three-image-grid {
  background: var(--gradient-background);
  background-color: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
  padding-block: clamp(6rem, 4.16667vw, 9rem);
  max-height: 538px;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;

  @media screen and (max-width: 1180px) {
    max-height: none;
    height: 100%;
    overflow: visible;
    max-width: 100%;
  }
}

.section--padding {
  background: var(--gradient-background);
  background-color: rgb(var(--color-background));
  width: 100%;
}

.three-image-grid {
  .three-image-grid__container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 6rem;
    align-items: center;

    @media screen and (max-width: 1180px) {
      grid-template-columns: 1fr;
      gap: 2rem;
    }
  }

  .three-image-grid__images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 1.04167vw, 2.4rem);
    width: 100%;

    @media screen and (max-width: 768px) {
      display: none;
    }
  }

  .three-image-grid__image-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    width: 100%;
    min-width: 200px;

    .three-image-grid__image-link {
      display: block;
      text-decoration: none;
      color: inherit;

      &:hover {
        .three-image-grid__image {
          transform: scale(1.05);
        }
      }
    }

    .three-image-grid__image-wrapper {
      position: relative;
      width: 100%;
      height: clamp(260px, 18.05556vw, 358px);
      overflow: hidden;
    }

    .three-image-grid__image {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .three-image-grid__placeholder {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(var(--color-foreground), 0.06);
    }
  }

  .three-image-grid__content {
    display: flex;
    flex-direction: column;
    gap: 3rem;

    @media screen and (max-width: 1180px) {
      padding: 0;
      gap: 1rem;
    }

    @media screen and (max-width: 768px) {
      display: none;
    }

    .three-image-grid__heading {
      margin: 0;
      color: #02522b;
      font-family: "Bootstrap Pro", sans-serif;
      font-weight: 400;
      font-style: normal;
      font-size: clamp(32px, 2.4222vw, 44px);
      line-height: 100%;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      width: 100%;

      @media screen and (min-width: 750px) {
        font-size: clamp(32px, 2.42222vw, 44px);
      }
    }

    .three-image-grid__description {
      color: rgb(var(--color-foreground));
      font-size: clamp(16px, 1.11111vw, 22px);
      line-height: 1.6;

      @media screen and (max-width: 1180px) {
        color: white;
      }

      p {
        margin: 0 0 1rem 0;

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

      a {
        color: rgb(var(--color-link));
        text-decoration: underline;
        text-underline-offset: 0.2em;

        &:hover {
          text-decoration-thickness: 0.2em;
        }
      }
    }
  }

  &.three-image-grid--colored {
    .three-image-grid__content {
      padding: 0rem;
    }
  }

  &.page-width--full-width {
    .three-image-grid__container {
      @media screen and (min-width: 750px) {
        gap: 4rem;
      }
    }
  }

  .three-image-grid__mobile {
    display: none;
    flex-direction: column;
    gap: 3rem;
    text-align: center;

    @media screen and (max-width: 768px) {
      display: flex;
    }

    .three-image-grid__mobile-header {
      margin-bottom: 1rem;

      .three-image-grid__mobile-title {
        margin: 0;
        color: #02522b;
        font-family: "Bootstrap Pro", sans-serif;
        font-weight: 400;
        font-style: normal;
        font-size: 44px;
        line-height: 100%;
        letter-spacing: 0.6px;
        text-transform: uppercase;
      }

      @media screen and (max-width: 480px) {
        margin-bottom: 0.75rem;

        .three-image-grid__mobile-title {
          font-size: 28px;
        }
      }
    }

    .three-image-grid__mobile-image {
      position: relative;
      width: 100%;
      border-radius: 15px;
      overflow: hidden;

      .three-image-grid__mobile-image-img {
        width: 100%;
        height: auto;
        display: block;
      }

      .three-image-grid__mobile-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(var(--color-foreground), 0.06);
      }
    }

    .three-image-grid__mobile-description {
      color: rgb(var(--color-foreground));
      font-size: 1.6rem;
      line-height: 1.5;

      p {
        margin: 0 0 0.75rem 0;
        color: #616161;

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

      a {
        color: rgb(var(--color-link));
        text-decoration: underline;
        text-underline-offset: 0.2em;

        &:hover {
          text-decoration-thickness: 0.2em;
        }
      }

      @media screen and (max-width: 1180px) {
        font-size: 1.6rem;
        line-height: 1.4;
        padding: 20px 10px;
        background-color: white;
        border-radius: 16px;
        margin: 0 auto;
        max-width: calc(100% - 20px);
      }
    }
  }
}

@media screen and (max-width: 1180px) {
  .three-image-grid {
    background-color: #02522b !important;
  }

  .three-image-grid__mobile-title,
  .three-image-grid__heading {
    color: white !important;
  }
}

@media screen and (max-width: 749px) {
  .three-image-grid {
    .three-image-grid__header {
      margin-bottom: 2rem;

      .three-image-grid__title {
        font-size: 1.75rem;
      }
    }

    .three-image-grid__content {
      .three-image-grid__heading {
        font-size: 1.5rem;
      }

      .three-image-grid__description {
        font-size: 0.9rem;
      }
    }
  }
}
