@keyframes slideshowTextRiseUp {
  0% {
    opacity: 0;
    transform: translateY(120%);
  }
  to {
    opacity: 1;
    transform: translateY(0%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slideshow__slide {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: opacity 1s ease-in-out;
  opacity: 0; /* Start with hidden slides */
  pointer-events: none; /* Prevent interaction while invisible */
}

.is-active {
  opacity: 1; /* Fully visible when active */
  pointer-events: auto; /* Enable interaction when active */
}

.slideshow__slider {
  position: relative;
  overflow: hidden;
  height: 100%; /* Ensure the slider has a defined height */
}

.slideshow {
  display: block;
  position: relative;
}

.slideshow__slider {
  position: relative;
  overflow: hidden;
  height: 760px;
}

@media screen and (max-width: 959px) {
  .slideshow__slider {
    height: var(--slideshow-mobile-height, "auto");
    height: 760px !important;
  }
  .slideshow {
    height: 490px !important;
  }
  .slideshow__slide {
    height: 64% !important;
  }
}

.slideshow-slide__media {
  position: relative;
  width: 100%;
  height: 100%;
}

a.slideshow-slide__media {
  display: block;
}

.slideshow-slide__media::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0 !important;
  background-color: #000;
  display: block;
  content: "";
  z-index: 1;
}

.slideshow-slide__media--adapt .slideshow-slide__image,
.slideshow-slide__media--adapt .slideshow-slide__image-placeholder {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.slideshow-slide__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slideshow-slide__image-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
  background-color: rgb(var(--color-image-background));
}

.slideshow-slide__image-placeholder > svg {
  display: block;
  height: 100%;
  max-height: 800px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media screen and (max-width: 959px) {
  .slideshow-slide__image-placeholder {
    min-height: 250px;
  }

  .slideshow-slide__image-placeholder > svg {
    height: 80%;
  }
}

.slideshow-slide__text-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto; /* Enable interaction */

  display: flex;
  align-items: var(--slideshow-pc-text-position-vertical, "center");
  justify-content: var(--slideshow-pc-text-position-horizontal, "center");

  /* padding: 0 3%; */
  padding: 0px var(--page-padding);
}

.slideshow-slide__text {
  position: relative;
  width: 53%;
  max-width: 54.5rem;
  text-align: var(--slideshow-pc-text-align, "center");
  padding: 45px 0;

  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  z-index: 3; /* Ensure text is above other elements */
}

@media (max-width: 768px) {
  .slideshow-slide__text {
    width: auto;
    padding: 20px 0; /* Adjust padding as needed for mobile */
  }
}

.slideshow-slide__text > [data-animation] {
  opacity: 0;
  transform: translateY(120%);
}

.slideshow-slide__title {
  font-size: var(--slideshow-title-size);
}

@media screen and (max-width: 959px) {
  .slideshow-slide__title {
    font-size: calc(var(--slideshow-title-size) / 2);
  }
}

@media screen and (max-width: 959px) {
  .slideshow-slide__text-wrapper {
    align-items: end;
    background: linear-gradient(to bottom, #ffffff00 73%, black 161%);
    justify-content: left;
    padding: 0 20px !important;
  }

  .slideshow-slide__text {
    text-align: var(--slideshow-mobile-text-align, "center");
  }
}

.slideshow-slide__buttons {
  margin-top: 8px;
  margin-bottom: 35px;
  z-index: 4; /* Ensure buttons are above other elements */
  pointer-events: auto; /* Ensure buttons are clickable */
}

.slideshow-slide__button {
  animation: fadeIn 1s ease forwards;
  display: inline-block;
  padding: 10px 20px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  cursor: pointer;
}

.slideshow-slide__button:hover {
  background-color: #526666;
  color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.slideshow-slide__button + .slideshow-slide__button {
  margin-left: 14px;
  animation-delay: 1.3s;
}

.slideshow-slide__sub-title,
.slideshow-slide__desc {
  margin: 0;
}

@media screen and (min-width: 960px) {
  .slideshow-slide__desc {
    margin: 8px 0;
  }
}

.is-active .slideshow-slide__text > [data-animation] {
  animation: slideshowTextRiseUp 0.8s cubic-bezier(0.26, 0.54, 0.32, 1) forwards;
}

.is-active .slideshow-slide__text .slideshow-slide__sub-title,
.is-active .slideshow-slide__text .slideshow-slide__desc {
  animation-delay: 0.6s;
}

.is-active .slideshow-slide__button {
  animation-name: fadeIn;
}

.slideshow__control {
  position: absolute;
  z-index: 2;
}

/* Arrow style switcher */

.slideshow__control--arrows {
  bottom: 0;
  right: 40px;
  transform: translateY(50%);
}

.control__arrow-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control__arrow-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background-color: #fff;
  box-shadow: 0 5px 5px rgb(0 0 0 / 10%);
  transition: transform 0.3s;
  border: none;
  z-index: 5; /* Ensure buttons are above other elements */
}

.control__arrow-button:hover {
  transform: scale(1.12);
}

.control__arrow-button[name="previous"] {
  transform: rotate(90deg);
  box-shadow: 5px 0 5px rgb(0 0 0 / 10%);
}

.control__arrow-button[name="previous"]:hover {
  transform: rotate(90deg) scale(1.12);
}

.control__arrow-button[name="next"] {
  transform: rotate(-90deg);
  box-shadow: -5px 0 5px rgb(0 0 0 / 10%);
}

.control__arrow-button[name="next"]:hover {
  transform: rotate(-90deg) scale(1.12);
}

@media screen and (max-width: 959px) {
  .slideshow__control--arrows {
    right: 20px;
  }
  .control__arrow-button {
    width: 32px;
    height: 32px;
  }
}

/* Progress bar style switcher */

.slideshow__control--bars {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.control__bars {
  display: flex;
  align-items: stretch;
  height: 6px;
  gap: 10px;
}

.control__bar {
  position: relative;
  display: block;
  width: 120px;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background 0.3s;
  overflow: hidden;
}

.control__bar:hover,
.control__bar:active {
  background-color: #fff;
}

@keyframes slideshowBars {
  0% {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.control__bar::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #fff;
  transform: translateX(-100%);
}

.control__bar:target::after,
.control__bar.is-active::after {
  animation: slideshowBars var(--slideshow-speed, 0s) linear forwards;
}

@media screen and (max-width: 959px) {
  .control__bar {
    width: 60px;
  }
}

/** Small dot style switcher */

.slideshow__control--dots {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.control__dots {
  display: none;
  align-items: center;
  gap: 6px;
}

.control__dot {
  display: block;
  padding: 0;
  width: 8px;
  height: 8px;
  margin: 7px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background 0.3s;
  cursor: pointer;
}

.control__dot.is-active {
  width: 10px;
  height: 10px;
  cursor: default;
}

.control__dot:hover,
.control__dot:active,
.control__dot:target,
.control__dot.is-active {
  background-color: #fff;
}

.slideshow-slide__text-nobtn {
  position: relative;
}

.slideshow-slide__text-mask {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 493px;
  height: 406px;
}

.slideshow-slide__text-mask.mask-deep {
  border-radius: 50%;
  background: radial-gradient(
    77.64% 77.64% at 50% 50%,
    rgba(0, 0, 0, 0.3) 59.64%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: blur(120px);
}

.slideshow-slide__text-mask.mask-light {
  border-radius: 50%;
  background: radial-gradient(
    77.64% 77.64% at 50% 50%,
    rgba(255, 255, 255, 0.3) 59.64%,
    rgba(255, 255, 255, 0) 100%
  );
  filter: blur(120px);
}

@media screen and (max-width: 959px) {
  .slideshow-slide__text-mask {
    width: 355px;
    height: 292px;
  }
}

/* The ipad end responds to the mobile end in vertical screen */

/* @custom-media --tablet (max-width: 959px); */

/* @custom-media --gt-mobile (min-width: 751px); */

/* detectingScreen need to consider the configuration of the tablet */
