.campus-gallery {
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;

  h2 {
    font-weight: 500;
    font-style: Medium;
    font-size: 36px;
    line-height: 38px;
    letter-spacing: 0%;
    color: #000000;
  }

  .gallery {
    background: #af0e2e;
    .container {
      padding-block: 77px;

      h1 {
        font-weight: 500;
        font-size: 67px;
        line-height: 88px;
        letter-spacing: -3%;
        color: #ffffff;
      }

      .gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 352px;
        gap: 24px;
        max-width: 1244px;
        margin: 0 auto;

        .grid {
          position: relative;
          overflow: hidden;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
          }

          &.grid-content {
            background: #d42347;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 64px 24px;
            gap: 24px;

            h3 {
              font-weight: 500;
              font-size: 28px;
              line-height: 40px;
              letter-spacing: -3%;
              color: #ffffff;
            }

            p {
              font-weight: 400;
              font-size: 16px;
              line-height: 25px;
              letter-spacing: 0%;
              color: #ffffff;
            }
          }

          &.two-columns-one-row {
            grid-column: span 2;
          }

          &.two-rows-one-column {
            grid-row: span 2;
          }

          &.one-column-one-row,
          &.one-row-one-column {
            grid-column: span 1;
            grid-row: span 1;
          }
        }
      }
    }
  }

  @media (max-width: 1024px) {
    .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
      padding: 0 24px;

      .two-columns-one-row {
        grid-column: span 1;
      }
    }
  }

  @media (max-width: 768px) {
    .gallery-grid {
      grid-template-columns: 1fr;
      grid-auto-rows: auto;

      .two-rows-one-column {
        grid-row: span 1;
      }
    }

    .gallery h1 {
      font-size: 40px;
      line-height: 1.2;
      padding-left: 24px;
    }
  }
}

.image {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 120px;

  img {
    width: 100%;
    height: 560px;
    max-width: 1200px;
    max-height: 560px;
    border: none;
    border-radius: 16px;
    box-shadow: 4px 11px 35px 0px #00000012;
    object-fit: cover;
    display: block;
  }
}

@media screen and (max-width: 450px) {
  .campus-gallery {
    margin-top: 60px;

    h2 {
      font-size: 28px !important;
      line-height: 38px !important;
    }

    .gallery {
      .container {
        padding-block: 40px;

        h1 {
          font-size: 34px;
          line-height: 40px;
          padding-left: 15px;
          margin-bottom: 20px;
        }

        .gallery-grid {
          grid-template-columns: 1fr;
          grid-auto-rows: minmax(250px, auto);
          gap: 16px;
          padding: 0 15px;

          .grid {
            grid-column: span 1 !important;
            grid-row: span 1 !important;

            &.grid-content {
              padding: 30px 20px;
              gap: 16px;

              h3 {
                font-size: 22px;
                line-height: 28px;
              }

              p {
                font-size: 14px;
                line-height: 22px;
              }
            }

            img {
              height: 300px;
            }
          }
        }
      }
    }
  }

  .image {
    max-height: 211px !important;

    img {
      max-height: 211px !important;
    }
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .campus-gallery {
    margin-top: 100px;
    gap: 32px;

    h2 {
      font-size: 32px;
      line-height: 44px;
    }

    .gallery {
      .container {
        padding-block: 56px;

        h1 {
          font-size: 52px;
          line-height: 72px;
        }

        .gallery-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          grid-auto-rows: 320px;
          gap: 20px;
          max-width: 1000px;

          .grid {
            &.two-columns-one-row {
              grid-column: span 2;
            }

            &.two-rows-one-column {
              grid-row: span 2;
            }
          }
        }
      }
    }
  }

  .image {
    margin-top: 100px;

    img {
      max-width: 960px;
      max-height: 480px;
    }
  }
}
