.fade-slider {
  /* === Globální proměnné pro slider === */
  /*
  --slider-overlay-color: rgba(206, 0, 0, 0.9);
  --slider-overlay-gradient: linear-gradient(to right, rgba(206, 0, 0, 0.7) 0%, transparent 50%);
  */
  --slider-overlay-color: rgba(0, 0, 0, 0.9);
  --slider-overlay-gradient: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, transparent 50%);

  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
  background-color: var(--slider-overlay-color);
  isolation: isolate;
}

.fade-slider.visible {
  opacity: 1;
}

/* === Slide === */
.fade-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(-5%);
  transition: opacity 1.2s ease, transform 1.2s ease;
  z-index: 0;
  display: block;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.fade-slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 1;
}

.fade-slide.leaving {
  transform: translateX(5%);
  opacity: 0;
}

/* === Overlay slidu  === */
.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.slide-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--slider-overlay-gradient);
  pointer-events: none;
  z-index: 2;
}

/* === Textový obsah === */
.slide-content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 5%;
  color: white;
}

.slide-content .text {
  position: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 500px;
}

.slide-content h2 {
  width: calc(100% - 2 * 5%);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 130%;
  color: white!important;
  margin: 0;
  opacity: 0;
  transform: translateX(30%);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.fade-slide.active .slide-content h2 {
  opacity: 1;
  transform: translateX(0%);
}

.fade-slide.leaving .slide-content h2 {
  opacity: 0;
  transform: translateX(-30%);
  transition: opacity 1s ease, transform 1s ease;
}

.slide-content p {
  width: calc(100% - 2 * 5%);
  font-size: 0.8rem;
  font-weight: 400;
  color: white;
  margin-bottom: 0;
  margin-block-end: 0;
  opacity: 0;
  transform: translateX(10%);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.fade-slide.active .slide-content p {
  opacity: 1;
  transform: translateX(0%);
}

.fade-slide.leaving .slide-content p {
  opacity: 0;
  transform: translateX(-10%);
  transition: opacity 1s ease, transform 1s ease;
}

.slide-content .btn {
  background-color: rgb(206, 0, 0);
  opacity: 0;
  transition: opacity 1s ease 1s;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 5px;
  color: white;
}

.fade-slide.active .slide-content .btn {
  opacity: 1;
}

.slide-content .post-meta {
  width: calc(100% - 2 * 5%);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateX(15%);
  transition: opacity 1.5s ease, transform 1.5s ease;
  display: flex;
  flex-direction: row;
  align-items: center;

  .post-date,
  .post-time {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  svg {
    height: 14px;
    width: auto;
    margin-right: 3px;

    path {
      fill: white;
    }
  }
}

.fade-slide.active .slide-content .post-meta {
  opacity: 1;
  transform: translateX(0%);
}

.fade-slide.leaving .slide-content .post-meta {
  opacity: 0;
  transform: translateX(-15%);
  transition: opacity 1s ease, transform 1s ease;
}

/* === Init stav bez animace při prvním zobrazení === */
.fade-slide.init {
  transition: none !important;
}

.fade-slide.init .slide-content {
  transition: none !important;
}

/* === Mobilní verze < 768px === */
@media (max-width: 767px) {
  .fade-slider {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .fade-slide {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .slide-bg::before {
    background: linear-gradient(0deg, var(--slider-overlay-color) 15%, rgba(0, 0, 0, 0) 100%);
  }

  .slide-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 1.5rem;
    z-index: 3;
    transform: translateX(50px);
    opacity: 0;
    transition: opacity 1.5s ease, transform 1.5s ease;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .fade-slide.active .slide-content {
    transform: translateX(0);
    opacity: 1;
  }

  .fade-slide.leaving .slide-content {
    transform: translateX(-50px);
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
  }

  .slide-content .text {
    text-align: left;
    max-width: 100%;
  }

  .slide-content h2 {
    font-size: 1.3rem;
  }
  

  .slide-content .btn {
    padding: 0.7rem 1rem;
  }
}