:root {
  --card-border: 20px;
  --carousel-card-color: white;
}

.carousel_wrapper {
  display: flex;
  width: 100%;
  max-width: 500px;
  height: 75%;
  background-color: rgb(225, 225, 225);
  overflow: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
  scroll-snap-type: x mandatory;
  align-items: stretch;
  gap: 20px;
  scrollbar-width: none;
}

.carousel_buttons {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.carousel_buttons > * {
  border-radius: 50%;
  border: 0;
  padding: 0px;
  height: 30px;
  width: 30px;
}

.carousel_buttons .carousel_arrow {
  width: 100%;
}

.carousel_arrow.left_arrow {
  transform: rotateZ(180deg);
}

.carousel_slide {
  background-color: var(--carousel-card-color);
  border-radius: var(--card-border);
  flex: 0 0 auto;
  height: 100%;
  /* Possibly good for limiting too much growth */
  max-height: 600px;
  width: 100%;
  /* padding: 20px; */
  transition: 1s ease-in-out;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
}

.slide_container {
  border: 2px solid rgb(200, 200, 200);
  background-size: cover;
  background-position: center;
  border-radius: var(--card-border);
  position: relative;
  color: grey;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1.5fr 1fr;
  grid-template-columns: 1fr;
  align-items: end;
  justify-content: center;
  overflow-y: hidden;
}

.slide_title {
  text-align: center;
  margin: 0px;
  padding: 10px;
  color: white;
  border-radius: 5px 5px 0px 0px;

  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
}

.slide_body {
  align-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-wrap: wrap;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 1);
}

.slide_body_text_wrapper {
  max-width: 200px;
}

@media (height<400px) {
  .services_content_container {
    gap: 5px;
  }
  .carousel_wrapper {
    min-height: 170px;
    max-width: 300px;
  }
  .services_header {
    margin: 0px;
  }

  .slide_title {
    height: 100%;
  }

  .slide_container {
    grid-template-rows: 1fr 2fr;
  }
}

@media (width>1000px) and (height > 1400px) {
  .carousel_wrapper {
    display: grid;
    width: 100%;
    max-width: 1500px;
    grid-template-columns: 1fr 1fr;
    padding: 0px 10% 0px 10%;
    justify-items: center;
    align-items: center;
  }

  .carousel_slide {
    max-width: 700px;
  }

  .carousel_buttons {
    display: none;
  }
}

@media (1000px < width < 1399px) and (height < 1400px) {
  .carousel_wrapper {
    width: 100%;
    max-width: 100%;
    background-color: transparent;
    padding: 20px;
  }

  .carousel_slide {
    width: 50%;
  }

  .slide_container {
    max-width: 100%;
  }
}

@media (width>1350px) and (height < 1400px) {
  .carousel_wrapper {
    display: flex;
    width: 100%;

    max-width: 100%;
    height: 60vh;
    overflow: hidden;
    align-items: stretch;
  }

  .carousel_buttons {
    display: none;
  }

  .carousel_slide {
    transition: flex-grow 0.3s ease, width 0.3s ease;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    position: relative;
  }
  .slide_container {
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .slide_title {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: end;
    height: max-content;
    width: 100%;
    margin: 0;
    bottom: 0px;
    text-align: center;
    transition: bottom 0.4s ease;
    padding: 20px;
  }
  .slide_body {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50%;
    bottom: -50%;
    transition: bottom 0.4s ease;
  }

  .carousel_slide.tapped {
    flex-grow: 1.3;
    transition: flex-grow 0.3s ease, width 0.3s ease;
  }

  .carousel_slide.tapped .slide_title {
    bottom: 50%;
  }

  .carousel_slide.tapped .slide_body {
    bottom: 0;
    width: 100%;
  }

  .carousel_slide:not(.tapped):hover .slide_body {
    pointer-events: none;
    bottom: 0;
    width: 100%;
  }

  .carousel_slide:not(.tapped):hover .slide_title {
    bottom: 50%;
  }

  .carousel_slide:hover:not(.tapped) {
    flex-grow: 1.3;
    transition: flex-grow 0.3s ease, width 0.3s ease;
  }
}
