@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins;
}

.slider-container {
  position: relative;
  max-width: 100vw;
  overflow: hidden;
  width: 110%;
  height: 600px;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 0 1rem 0;
  margin-top: -2rem;
}

/* Ocultar inputs radio */
.slider-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.slide {
  position: absolute;
  width: 320px;
  height: 450px;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(0deg, var(--primary-background-color), lightgrey);
  display: flex;
  flex-direction: column;
}

.slide-content{
  margin-top: auto;
  padding: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slide img{
  width: 100%;
  height: 400px;
  object-fit: cover;
  background: var(--primary-color);
  mask-image: linear-gradient(to bottom, black 50%, transparent);
}

.slide-title{
  font-size: 0.95rem;
  color: var(--paragraph-color);
  font-weight: bold;
}

.slide-title span{
  font-size: 0.8rem;
  font-weight: normal;
  color: hsl(from var(--paragraph-color) h s calc(l + 20));
}

.contact-btn{
  display: block;
  width: 100%;
  text-align: center;
}

/* Posiciones por defecto - slide 3 activo */
#slide1:checked~.slider-wrapper .slide:nth-child(1),
#slide2:checked~.slider-wrapper .slide:nth-child(2),
#slide3:checked~.slider-wrapper .slide:nth-child(3),
#slide4:checked~.slider-wrapper .slide:nth-child(4),
#slide5:checked~.slider-wrapper .slide:nth-child(5) {
  transform: translate(-50%, -50%) translateZ(0) scale(1);
  opacity: 1;
  z-index: 5;
}

/* Slide 1 activo */
#slide1:checked~.slider-wrapper .slide:nth-child(2) {
  transform: translate(-30%, -50%) rotateY(-45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide1:checked~.slider-wrapper .slide:nth-child(3) {
  transform: translate(-10%, -50%) rotateY(-30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

#slide1:checked~.slider-wrapper .slide:nth-child(4) {
  transform: translate(10%, -50%) rotateY(-15deg) translateZ(-300px) scale(0.4);
  opacity: 0.3;
  z-index: 2;
}

#slide1:checked~.slider-wrapper .slide:nth-child(5) {
  transform: translate(30%, -50%) rotateY(0deg) translateZ(-400px) scale(0.2);
  opacity: 0.1;
  z-index: 1;
}

/* Slide 2 activo */
#slide2:checked~.slider-wrapper .slide:nth-child(1) {
  transform: translate(-70%, -50%) rotateY(45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide2:checked~.slider-wrapper .slide:nth-child(3) {
  transform: translate(-30%, -50%) rotateY(-45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide2:checked~.slider-wrapper .slide:nth-child(4) {
  transform: translate(-10%, -50%) rotateY(-30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

#slide2:checked~.slider-wrapper .slide:nth-child(5) {
  transform: translate(10%, -50%) rotateY(-15deg) translateZ(-300px) scale(0.4);
  opacity: 0.3;
  z-index: 2;
}

/* Slide 3 activo (por defecto) */
#slide3:checked~.slider-wrapper .slide:nth-child(1) {
  transform: translate(-90%, -50%) rotateY(30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

#slide3:checked~.slider-wrapper .slide:nth-child(2) {
  transform: translate(-70%, -50%) rotateY(45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide3:checked~.slider-wrapper .slide:nth-child(4) {
  transform: translate(-30%, -50%) rotateY(-45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide3:checked~.slider-wrapper .slide:nth-child(5) {
  transform: translate(-10%, -50%) rotateY(-30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

/* Slide 4 activo */
#slide4:checked~.slider-wrapper .slide:nth-child(1) {
  transform: translate(-110%, -50%) rotateY(15deg) translateZ(-300px) scale(0.4);
  opacity: 0.3;
  z-index: 2;
}

#slide4:checked~.slider-wrapper .slide:nth-child(2) {
  transform: translate(-90%, -50%) rotateY(30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

#slide4:checked~.slider-wrapper .slide:nth-child(3) {
  transform: translate(-70%, -50%) rotateY(45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

#slide4:checked~.slider-wrapper .slide:nth-child(5) {
  transform: translate(-30%, -50%) rotateY(-45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

/* Slide 5 activo */
#slide5:checked~.slider-wrapper .slide:nth-child(1) {
  transform: translate(-130%, -50%) rotateY(0deg) translateZ(-400px) scale(0.2);
  opacity: 0.1;
  z-index: 1;
}

#slide5:checked~.slider-wrapper .slide:nth-child(2) {
  transform: translate(-110%, -50%) rotateY(15deg) translateZ(-300px) scale(0.4);
  opacity: 0.3;
  z-index: 2;
}

#slide5:checked~.slider-wrapper .slide:nth-child(3) {
  transform: translate(-90%, -50%) rotateY(30deg) translateZ(-200px) scale(0.6);
  opacity: 0.5;
  z-index: 3;
}

#slide5:checked~.slider-wrapper .slide:nth-child(4) {
  transform: translate(-70%, -50%) rotateY(45deg) translateZ(-100px) scale(0.8);
  opacity: 0.7;
  z-index: 4;
}

/* Controles */
.controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.arrow {
  width: 40px;
  height: 40px;
  background: lightgray;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  color: hsl(from var(--primary-color)h s calc(l - 10));
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  user-select: none;
}

.arrow:hover {
  background: linear-gradient(25deg, var(--primary-color), var(--secondary-color));
  transform: scale(1.1);
  color: var(--tertiary-color);
}

.arrow:active {
  transform: scale(0.95);
}

/* Indicadores de puntos */
.indicators {
  display: flex;
  gap: 15px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(from var(--primary-color)h s calc(l + 35));
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid transparent;
}

.indicator:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* Indicador activo */
#slide1:checked~.controls .indicators .indicator:nth-child(1),
#slide2:checked~.controls .indicators .indicator:nth-child(2),
#slide3:checked~.controls .indicators .indicator:nth-child(3),
#slide4:checked~.controls .indicators .indicator:nth-child(4),
#slide5:checked~.controls .indicators .indicator:nth-child(5) {
  background: var(--primary-color);
  border-color: hsl(from var(--primary-color)h s calc(l + 25));
  transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
  .slider-container {
    height: 600px;
  }

  .slide {
    width: 320px;
    height: 450px;
  }

  .slide-number {
    font-size: 36px;
  }

  .slide-title {
    font-size: 18px;
  }

  .slide-description {
    font-size: 12px;
  }
}