body, html {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh; 
  text-align: center;
  overflow: hidden;
  user-select: none;
  background-color: #000;
}

.sr-only {
  position: absolute;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
  color: transparent;
}

/* Ocultamos los radio buttons manteniendo su posición */
input {
  position: absolute;  
  opacity: 0;
  margin-top: calc(100dvh - 25px);
  cursor: pointer;
  z-index: 30;
}

/* Posición de los puntos en la parte inferior dentro del área visible */
label {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: solid 2px white;
  border-radius: 999px;
  background-color: transparent;
  margin: calc(100dvh - 25px) 6px 0 6px;
  z-index: 30;
  cursor: pointer;
  transition-duration: .4s;
  box-shadow: 0 0 20px 0 #000;
}

input:checked + label {
  background-color: white;
}

/* Flecha izquierda */
input + label::after {
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 512' width='100' style='fill:white'%3E%3Cpath d='M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 55%;
  background-size: 60px 60px;
  transition: background-size 200ms;
  position: absolute;
  color: white;
  height: calc(100dvh - 25px);
  width: 70px;
  top: 0;
  left: 0;
  z-index: 20;
}

input + label:hover::after {
  background-size: 70px 70px;
}

input:checked + label::after {
  background-image: none;
  width: 100vw;
  left: 0;
  z-index: 10;
}

input:checked + label + .slide ~ input + label::after {
  display: none;
}

/* Flecha derecha */
input:checked + label + .slide + input + label::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 512' width='100' fill='white'%3E%3Cpath d='M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z' /%3E%3C/svg%3E");
  display: block;
  width: 70px;
  right: 0;
  left: auto;
}

input:focus + label {
  box-shadow: 0 0 0 2px teal, 0 0 18px white;
}

/* Diapositivas */
.slide {
  position: absolute;
  background-position: center center;
  background-size: cover; /* Cámbialo a 'contain' si prefieres ver la foto entera sin recortes */
  background-repeat: no-repeat;
  width: 100%;
  height: 100dvh;
  top: 0;
  left: 0;
  z-index: 1;
  transform: translateX(-100%);
  transition-duration: .4s;
  opacity: 1;
}

input:checked ~ .slide {
  transform: translateX(100%);
}

input:checked + label + .slide {
  transform: translateX(0);
  opacity: 1;
}

.bg1 { background-image: url('img/lemures.jpg'); }
.bg2 { background-image: url('img/barcos.jpg'); }
.bg3 { background-image: url('img/gaviota.jpg'); }
.bg4 { background-image: url('img/tablas-surf.jpg'); }
.bg5 { background-image: url('img/flamencos.jpg'); }
.bg6 { background-image: url('img/cobayas.jpg'); }
.bg7 { background-image: url('img/peces.jpg'); }
.bg8 { background-image: url('img/lobos.jpg'); }

/* Ajustes específicos para cuando el móvil está en horizontal (landscape) */
@media (orientation: landscape) {
  body, html {
    height: 100dvh;
  }

  input, 
  label {
    margin-top: calc(100dvh - 20px) !important;
  }

  input + label::after,
  input:checked + label + .slide + input + label::after {
    height: calc(100dvh - 20px) !important;
    width: 50px; /* Hacemos las flechas laterales un poco más estrechas en horizontal */
    background-size: 40px 40px; /* Reducimos el tamaño del icono de la flecha */
  }

  .slide {
    height: 100dvh;
  }
}