* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --slide-bg-image: none;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slider {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Fondo con blur a nivel global */
.slider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background-image: var(--slide-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(32px) brightness(0.7);
  pointer-events: none;
}

.slide {
  position: absolute;
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.slide.has-blur::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: var(--blur-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(32px) brightness(0.7);
  pointer-events: none;
}

/* Fondo difuminado para imágenes */
.slide[type="image"]::before,
.slide.img-blur::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: var(--blur-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(32px) brightness(0.7);
  pointer-events: none;
}

/* Fondo difuminado para vídeos */
.slide[type="video"]::before,
.slide.video-blur::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: var(--blur-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(32px) brightness(0.7);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 2rem;
  border: none;
  padding: 1rem;
  cursor: pointer;
  z-index: 2;
}

.nav.prev {
  left: 10px;
}

.nav.next {
  right: 10px;
}
