/* The add-on enhances the complete Hero module, not only the right image card. */
.hero.livana-carousel-enhanced {
  position: relative !important;
  min-height: clamp(560px, calc(100svh - 120px), 860px) !important;
  height: min(860px, calc(100svh - 120px)) !important;
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
  background: #110e0d;
}

.hero.livana-carousel-enhanced > :not(.hero-visual):not(.livana-carousel) {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(120px, 18vh, 210px) 24px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.hero.livana-carousel-enhanced > .hero-visual {
  display: none !important;
}

.livana-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #110e0d;
  overflow: hidden;
}

.livana-carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(17, 14, 13, 0.88) 0%, rgba(17, 14, 13, 0.56) 38%, rgba(17, 14, 13, 0.08) 72%, rgba(17, 14, 13, 0.2) 100%), linear-gradient(0deg, rgba(17, 14, 13, 0.55) 0%, transparent 34%);
}

.livana-carousel__slide {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 680ms ease;
  background: #110e0d;
  z-index: 0;
}

.livana-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.livana-carousel__slide img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  user-select: none;
  -webkit-user-drag: none;
}

.livana-carousel__link {
  display: block;
  width: 100%;
  height: 100%;
}

.livana-carousel__control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(242, 233, 222, 0.72);
  border-radius: 50%;
  background: rgba(17, 14, 13, 0.36);
  color: #f2e9de;
  font: 25px/36px Georgia, serif;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.86;
  transition: background 180ms ease, opacity 180ms ease;
}

.livana-carousel__control:hover,
.livana-carousel__control:focus-visible {
  opacity: 1;
  background: rgba(17, 14, 13, 0.78);
}

.livana-carousel__control--prev { left: 24px; }
.livana-carousel__control--next { right: 24px; }

.livana-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 9px;
  align-items: center;
  transform: translateX(-50%);
}

.livana-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid rgba(242, 233, 222, 0.9);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease, border-color 180ms ease;
}

.livana-carousel__dot.is-active {
  width: 30px;
  border-color: #d4af37;
  border-radius: 8px;
  background: #d4af37;
}

@media (max-width: 900px) {
  .hero.livana-carousel-enhanced {
    min-height: auto !important;
    height: min(78svh, 760px) !important;
    aspect-ratio: 16 / 9;
  }

  .hero.livana-carousel-enhanced > :not(.hero-visual):not(.livana-carousel) {
    min-height: 100%;
    padding: 48px 20px 86px;
    justify-content: flex-end;
  }

  .livana-carousel__control {
    width: 34px;
    height: 34px;
    font-size: 20px;
    line-height: 28px;
  }

  .livana-carousel__control--prev { left: 12px; }
  .livana-carousel__control--next { right: 12px; }
  .livana-carousel__dots { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .livana-carousel__slide { transition: none; }
}
