:is(p, ol, ul):last-child {
  margin-bottom: 0;
}

/* to customise background images for each box/dialog, put each box-dialog pair in a div with id
then use "#id .image-box" and "#id .info-dialog-title" selectors to customise */

.image-boxes-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* change according to your needs */
  gap: 30px;
  margin-top: 30px;
}

.image-box {
  position: relative;
  display: flex;
  height: 200px;
  padding: 25px 46px;
  align-items: center;
  justify-content: center;
  background-image: url("/media/classroom.jpg"); /* change according to your needs */
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: black;
  border-radius: 10px;
  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 0;
  cursor: pointer;
  transition: box-shadow 0.2s, background-size 0.6s;
}
.image-box:hover {
  background-size: 115%;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.7);
}
/* if changing no. of columns, should also change the following */
.image-box:nth-of-type(2n+1) {
  grid-column: 1 / 1;
}
.image-box:nth-of-type(2n) {
  grid-column: 2 / 2;
}
.image-box::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

.image-box > span {
  text-align: center;
  color: #fff;
  font-size: 24px;
  z-index: 2;
  transition: transform 0.6s;
}
.image-box:hover > span {
  transform: scale(1.15);
}

.info-dialog-wrapper {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  opacity: 0;
  z-index: 22;
  pointer-events: none;
  transition: opacity 0.4s;
  will-change: opacity;
}
.info-dialog-wrapper.dialog-active {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: initial;
  opacity: 1;
}

.info-dialog {
  position: relative;
  /* width: 60%; */
  width: calc(100% - 60px);
  max-width: 1100px;
  margin: 55px auto;
  border-radius: 15px;
  background-color: #fff;
  box-shadow: 0 0 40px 0 rgb(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 21;
}

.info-dialog-title {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 350px;
  padding: 30px;
  background-image: url("/media/placeholder-artwork.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-size: 60px;
}
.info-dialog-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

.info-dialog-title > span {
  align-self: flex-end;
  z-index: 30;
}

.info-dialog-content {
  padding: 17.5px 19.5px;
}

.info-dialog-content > p:first-child {
  margin-top: 0;
}

.info-dialog-close-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  width: 70px;
  height: 70px;
  border: none;
  background-image: url("/media/close-2.svg");
  background-position: center;
  background-size: 40px;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.47);
  cursor: pointer;
  transition: background-color 0.2s;
}
.info-dialog-close-button:hover {
  background-color: rgba(0, 0, 0, 0.65);
}

@media screen and (max-width: 944px) {
  .info-dialog {
    width: calc(100% - 45px);
    margin: 22.5px auto;
  }
}

@media screen and (max-width: 820px) {
  .info-dialog-title {
    font-size: 50px;
  }
}

@media screen and (max-width: 540px) {
  .info-dialog-title {
    font-size: 47px;
  }
}

@media screen and (max-width: 500px) {
  .info-dialog-title {
    font-size: 40px;
  }

  .image-boxes-container {
    display: block !important;
    /* display: grid; */
    /* grid-template-columns: repeat(2, 1fr);\ */
    /* gap: 30px; */
    margin-top: 30px;
  }

  .image-boxes-container > * {
    margin-top: 30px;
    display: block;
  }
}

@media screen and (max-width: 400px) {
  .info-dialog-title {
    padding: 24px;
    font-size: 40px;
  }
}