* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* WRAPPER MASSE WERDEN MIT JS berechnet before_after */
.r_before_after_wrapper {
  position: relative;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  width: 100%;
  margin: auto;
  cursor: pointer;
  max-height: 80vh;
}

.r_transparent_layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(0, 0, 0, 0.5); */
    background-color: rgb(127 156 185 / 47%);

  z-index: 1; /* Behind finger and button, over images */
  transition: opacity 0.3s ease; /* Smooth fade */
  z-index: 10;
}

.r_before_text {
  /* position: absolute;
  top: 10px;
  left: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 30px;
  font-weight: 600; */
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 2;
  color: #fff;
  font-size: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  background-color: rgba(37, 7, 7, 0.36);
  padding: 5px 10px;
  border-bottom-right-radius: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.r_after_text {
  /* position: absolute;
  top: 10px;
  right: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 30px;
  font-weight: 600; */
  position: absolute;
  top: 0px;
right: 0px;
  z-index: 2;
  color: #fff;
  font-size: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  background-color: rgba(37, 7, 7, 0.36);
  padding: 5px 10px;
  border-bottom-left-radius: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}



.r_slider_wrapper {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  border-right: 2px solid rgb(110, 58, 58);
  overflow: hidden;
}


.r_before_image,
.r_after_image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.r_headline {
  position: absolute;
  text-align: center;
  z-index: 1;
  color: #fff;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  margin: 0;
}

.r_headline span {
  position: absolute;
  font-size: 44px;
  line-height: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.r_before_image {
  background-image: url('../img/nachher.jpg');
  z-index: 0;
}

.r_after_image {
  background-image: url('../img/vorher.jpg');
  z-index: 1;
}

.r_slider_btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  z-index: 11;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.r_slider_icon {
  position: absolute;
  background-color: #1b3c5e;
  z-index: 2;
  display: block;
}

.r_left {
  left: 1px;
  top: 0;
  width: 45px;
  height: 90px;
  padding-left: 10px;
  border-bottom-left-radius: 45px;
  border-top-left-radius: 45px;
}

.r_right {
  left: calc(50% - 1px);
  top: 0;
  width: 45px;
  height: 90px;
  padding-right: 10px;
  border-bottom-right-radius: 45px;
  border-top-right-radius: 45px;
}



.r_slider_icon svg {
  position: absolute;
  top: 50%;
  left: 50%;
  fill: #b7a5a1; /* Updated to match HTML */
  transform: translate(-50%, -50%);
  font-size: 20px;
}

/* .r_slider_btn:before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 55px;
  height: 110px;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  border-bottom-left-radius: 55px;
  border-top-left-radius: 55px;
} */

/* .r_slider_btn:after {
  content: '';
  position: absolute;
  top: -10px;
  left: 45px;
  width: 55px;
  height: 110px;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-bottom-right-radius: 55px;
  border-top-right-radius: 55px;
} */

/* MEDIA QUERIES */

@media (max-width: 992px) {
  .r_before_after_wrapper {
    height: 400px;
  }
  .r_slider_btn {
    width: 60px;
    height: 60px;
  }
  .r_left {
    width: 30px;
    height: 60px;
    padding-left: 10px;
    border-bottom-left-radius: 30px;
    border-top-left-radius: 30px;
  }
  .r_right {
    width: 30px;
    height: 60px;
      padding-right: 10px;
    border-bottom-right-radius: 30px;
    border-top-right-radius: 30px;
  }
  .r_slider_btn:before {
    top: -10px;
    left: -10px;
    width: 40px;
    height: 80px;
    border-bottom-left-radius: 55px;
    border-top-left-radius: 55px;
  }
  .r_slider_btn:after {
    content: '';
    position: absolute;
    top: -10px;
    left: 30px;
    width: 40px;
    height: 80px;
    /* background-color: rgba(0, 0, 0, 0.2); */
    z-index: 1;
    border-bottom-right-radius: 55px;
    border-top-right-radius: 55px;
  }
  .r_headline span {
    font-size: 36px;
    line-height: 1;
  }
}

@media (max-width: 576px) {
  .r_slider_btn {
    width: 50px;
    height: 50px;
  }
  .r_left {
    width: 25px;
    height: 50px;
    border-bottom-left-radius: 25px;
    border-top-left-radius: 25px;
    left: 1px;
  }
  .r_right {
    width: 25px;
    height: 50px;
    border-bottom-right-radius: 25px;
    border-top-right-radius: 25px;
    left: 50%;
  }
  .r_slider_btn:before {
    top: -5px;
    left: -5px;
    width: 20px;
    height: 40px;
    border-bottom-left-radius: 55px;
    border-top-left-radius: 55px;
  }
  .r_slider_btn:after {
    top: -5px;
    left: 15px;
    width: 20px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-bottom-right-radius: 55px;
    border-top-right-radius: 55px;
  }
  .r_before_text,
  .r_after_text {
    font-size: 16px;
  }
  .r_before_text {
    left: 0px;
    top: 0px;
  }
  .r_after_text {
    right: 0px;
    top: 0px;
  }
  .r_headline {
    font-size: 18px;
  }
  .r_watermark {
    bottom: 10px;
    right: 10px;
  }
  .r_watermark img {
    width: 40px;
  }
  .r_headline span {
    font-size: 24px;
    line-height: 1.1;
  }
}

/* FINGER ANIMATION STYLES */

.r_finger_animation {
  position: absolute;
  top: 50%;
  z-index: 13;
  left: 50%;
  transform: translate(-50%, -120px);
}

.r_finger_animation svg {
  height: 60px;
  overflow: visible;
}

/* SVG */
.cls-1 {
  fill: #fff;
}

.cls-2 {
  fill: none;
  stroke: #fff;
  stroke-width: 2px;
}

.cls-2,
.cls-3 {
  stroke-miterlimit: 10;
}

.cls-3 {
  fill: none;
  stroke: #231f20;
  stroke-width: 0.75px;
}

#arrow {
  transform: translateX(0px);
  opacity: 1;
  -webkit-animation-name: arrow-movement;
  animation-name: arrow-movement;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

#hand {
  transform: translateX(0px);
  -webkit-animation-name: hand-movement;
  animation-name: hand-movement;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

@-webkit-keyframes arrow-movement {
  0% {
    transform: translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes arrow-movement {
  0% {
    transform: translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(30px);
  }
}

@-webkit-keyframes hand-movement {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0px);
  }
}

@keyframes hand-movement {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0px);
  }
}

@media (max-width: 768px) {
  .r_finger_animation {
    transform: translate(-50%, -105px);
  }
}

@media (max-width: 576px) {
  .r_finger_animation {
    transform: translate(-50%, -80px);
  }
  .r_finger_animation svg {
    height: 50px;
  }
}
