.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: auto;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
  position: relative;
}

.item {
  min-width: 100%;
  flex-shrink: 0;
  position: absolute;
  top: 0;
  left: 0;
  /* Image animation */
}
.item.active {
  z-index: 1;
}
.item .text {
  position: relative;
  transform: translateX(-100%);
  opacity: 0;
}
.item.active .text {
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: translateX(0);
  opacity: 1;
}
.item.exiting .text {
  transition: transform 0.5s ease, opacity 0.25s ease;
  opacity: 0;
  transform: translateX(100%);
}
.item .image-wrapper .image {
  position: absolute;
  transform: translateX(-100%);
  opacity: 0;
}
.item.active .image-wrapper .image {
  transition: transform 0.5s ease;
  transform: translateX(0);
  opacity: 1;
}
.item.exiting .image-wrapper .image {
  transition: transform 0.5s ease;
  transform: translateX(100%);
  /* Odchod doprava */
  opacity: 1;
}

/* Navigation buttons */
.carousel-control {
  position: absolute;
  height: 100%;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  text-shadow: 0px 0px 0.75rem rgba(0, 0, 0, 0.9);
  border: none;
  font-size: 2rem;
  padding: 0.75rem;
  cursor: pointer;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.carousel-control:hover {
  opacity: 1;
}
.carousel-control.prev {
  left: 0;
}
.carousel-control.next {
  right: 0;
}

.carousel {
  height: 27rem;
  padding-top: 2.9rem;
  margin-bottom: -8rem;
}
@media (max-width: 500px) {
  .carousel {
    height: 50rem;
    margin-bottom: -12rem;
  }
}

.carousel-inner {
  /* margin-top: 2.9rem; */
  height: 100%;
}
.carousel-inner::before {
  content: "";
  display: block;
  border-top: 1rem solid var(--white);
  width: 7.5rem;
  position: absolute;
  top: 0;
  left: 0;
}
.carousel-inner::after {
  content: "";
  display: block;
  border-left: 1rem solid var(--white);
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.carousel .item {
  height: 100%;
}
.carousel .item h1 {
  font-size: 2rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
@media (max-width: 500px) {
  .carousel .item h1 {
    font-size: 1.5rem;
  }
}
.carousel .item .text-wrapper {
  margin-top: 2.05rem;
  margin-left: 1rem;
  overflow-x: hidden;
  position: relative;
}
@media (min-width: 501px) {
  .carousel .item .text-wrapper {
    width: calc(100% - 13.25rem);
    position: absolute;
    top: 0;
    left: 0;
  }
}
@media (max-width: 500px) {
  .carousel .item .text-wrapper {
    height: calc(100% - 27rem);
  }
}
.carousel .item .text {
  margin-left: 1.65rem;
  max-width: min(40rem, 100%);
}
.carousel .item .image-wrapper {
  width: 25rem;
  height: 25rem;
  position: absolute;
  top: -1rem;
  right: 0;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
}
@media (max-width: 500px) {
  .carousel .item .image-wrapper {
    top: auto;
    bottom: 0;
  }
}
.carousel .item .image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
}
.carousel div:has(> .date) {
  margin-bottom: 1.35rem;
}
@media (max-width: 500px) {
  .carousel div:has(> .date) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
.carousel .date,
.carousel .adress {
  font-size: 1rem;
  color: var(--black);
  font-weight: 400;
  line-height: 1.5rem;
  display: flex;
  margin-right: 0.8rem;
}
.carousel .date span,
.carousel .adress span {
  font-size: 1.5rem;
  color: var(--grey);
  margin-right: 0.2rem;
}