.background-slider {
  width: 100%;
  height: 100%;
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
}

.background-slider-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: var(--normal-border-radius);
  touch-action: manipulation;
}

/* Background layer - cycles through images */
.background-slider-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transform: translateX(var(--background-slide-offset, 0%));
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.background-slider-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.background-slider-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
  z-index: 1;
}

.slider-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Foreground layer - stays static */
.background-slider-foreground {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
  z-index: 2;
  isolation: isolate;
}

.background-slider-foreground .slider-content {
  position: relative;
  text-align: center;
  color: white;
  max-width: 70vw;
  min-height: 0;
  background: rgba(255,255,255,0.01);
  transform: translateY(30px);
  overflow-y: auto;
}

/* Ensure buttons within foreground have proper rendering */
.background-slider-foreground .btn.transparent {
  isolation: isolate;
}

.background-slider-controls {
  height: var(--background-slider-controls-height, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
}

.background-slider-nav-overlay .background-slider-controls {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  height: auto;
  display: block;
}

.background-slider-control {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background-slider-nav-overlay .background-slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.background-slider-nav-overlay:hover .background-slider-control {
  opacity: 1;
}

.background-slider-nav-overlay .background-slider-control.prev {
  left: 10px;
}

.background-slider-nav-overlay .background-slider-control.next {
  right: 10px;
}

.background-slider-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.background-slider-nav-overlay .background-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--dark-back);
  backdrop-filter: var(--background-blur);
  pointer-events: auto;
}

.background-slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dark-back);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.background-slider-dot:hover {
  background: var(--dark-back-hover);
  box-shadow: var(--hover-shadow);
}

.background-slider-dot.active {
  background: var(--lr-blue);
  transform: scale(1.3);
  box-shadow: var(--hover-shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
  .background-slider-foreground {
    padding: 20px;
  }

  .background-slider-foreground .slider-content {
    max-width: 90vw;
    max-height: 300px;
  }

  .background-slider-control {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .background-slider-foreground .slider-content {
    max-height: 250px;
  }
}
