body {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 500px;
  min-width: 300px;
  margin: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

#image-carousel {
  width: 100%;
}

.splide__arrow {
  width: 45px !important;
  height: 100% !important;
  background: none !important;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-size: 40px !important;
  color: black;
  opacity: 1 !important;
}

.splide__arrow:disabled {
  color: #E4E4E4;
  cursor: not-allowed;
}

.splide__arrow--next:focus,
.splide__arrow--prev:focus {
  outline: none;
  border: 3px solid red;
  border-radius: 0;
}

.splide__arrow--prev {
  left: 0 !important;
}

.splide__arrow--next {
  right: 0 !important;
}

.splide__slide {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box {
  border-radius: 20px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

a:focus .box {
  border: 3px solid red !important;
}

.box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0);
  background: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 100%);
}

a {
  float: none;
  display: inline-block;
  width: 100%;
}

.h3 {
  position: absolute;
  font-family: 'Lato', sans-serif;
  margin-left: 7%;
  margin-top: 5%;
  float: left;
  top: 0%;
  color: #FFF;
  font-style: normal;
  font-weight: 1000;
  line-height: normal;
  letter-spacing: 2px;
  padding-right: 3%;
  box-sizing: border-box;
  width: 100%;
}

.title {
  width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details {
  font-family: "Montserrat", sans-serif;
  width: 90%;
  height: 54%;
  position: absolute;
  padding-left: 7%;
  padding-top: 0%;
  float: left;
  bottom: 0%;
  color: #fff;
  font-style: normal;
  line-height: normal;
}

.date {
  font-family: "Montserrat", sans-serif;
  position: relative;
  top: 0%;
  letter-spacing: 3px;
  font-weight: bolder;
  width: 90%;
  margin-bottom: 2%;
}

.time {
  font-family: "Montserrat", sans-serif;
  position: relative;
  letter-spacing: 0.3px;
  width: 100%;
  margin-bottom: 0%;
}

.location {
  font-family: "Montserrat", sans-serif;
  position: relative;
  margin-top: 0%;
  letter-spacing: 0.3px;
  width: 100%;

  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

@supports (-webkit-line-clamp: 1) {
  .location {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: initial;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
}

/* custom styling for mobile sizes */
@media (min-width: 599px) {
  .box {
    width: 330px;
    height: 180px;
  }

  .splide__slide {
    width: 330px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .h3 {
    font-size: 1.3em;
  }

  .date {
    font-size: 30px;
  }

  .time {
    font-size: 1.06em;
  }

  .location {
    font-size: 1.06em;
  }
}

@media (min-width: 414px) and (max-width: 599px) {
  .box {
    width: 300px;
    height: 165px;
  }

  .splide__slide {
    width: 300px;
    height: 185px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .h3 {
    font-size: 1.15em;
  }

  .date {
    font-size: 27.5px;
  }

  .time {
    font-size: 1.04em;
  }

  .location {
    font-size: 1.04em;
  }
}

@media (min-width: 375px) and (max-width: 413px) {
  .box {
    width: 270px;
    height: 150px;
  }

  .splide__slide {
    width: 270px;
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .splide__arrow--prev {
    left: 3% !important;
  }

  .splide__arrow--next {
    right: 3% !important;
  }

  .h3 {
    font-size: 1em;
  }

  .date {
    font-size: 25px;
  }

  .time {
    font-size: 0.8em;
    width: 100% !important;
  }

  .location {
    font-size: 0.8em;
  }
}

@media (max-width: 375px) {
  .box {
    width: 250px;
    height: 140px;
  }

  .splide__slide {
    width: 250px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .splide__arrow--prev {
    left: 0% !important;
  }

  .splide__arrow--next {
    right: 0% !important;
  }

  .h3 {
    font-size: 1em;
  }

  .date {
    font-size: 25px;
  }

  .time {
    font-size: 0.8em;
    width: 100% !important;
  }

  .location {
    font-size: 0.8em;
  }
}
