.wrapper-product {
    display: flex;
    justify-content: center;
    align-items: center; /* لتوسيط العنصر عموديًا أيضًا */
    height: 80vh; /* جعله يأخذ ارتفاع الشاشة بالكامل */
    width: 80vw; /* جعله يمتد بعرض الصفحة */
    margin: 100px auto; /* تأكيد التوسيط */
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.19), 0 0px 0px rgba(0, 0, 0, 0.23);
    position: relative;
}

.wrapper-before-after {
    position: relative;
    z-index: 1;
  }

  .wrapper-before-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
  }
  
.scroller {
    position: relative;
    z-index: 2;
  }
.wrapper-product .container-product {
    margin: 0 auto;
    position: relative;
    height: 100%;
    width: 100%;
    display: block;
    overflow: hidden;
}

.slideshow {
    height: 100%;
    width: 100%;
    display: block;
    overflow: hidden;
}
.slideshow .slideshow-left {
    width: 40%;
    float: left;
    position: relative;
    height: 100%;
}
.slideshow .slideshow-left .Lslide {
    height: 100%;
    display: block;
    overflow: hidden;
    position: absolute;
    bottom: 0px;
    top: 0;
    left: 0;
    right: 0;
}  
.slideshow .Lslide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
}
.slideshow .Lslide-content h2 {
    color: black;
    font-weight: 600;
    font-size: 40px;
    line-height: 0.8;
}
.slideshow .Lslide-content p {
    color: black;
    font-size: 14px;
    padding: 2.5em 0em;
}
.slideshow .Lslide-content .button {
    background-color: #fff;
    display: inline-block;
    border-radius: 25px;
    position: relative;
}
.slideshow .Lslide-content .button i {
    float: right;
    position: absolute;
    top: 50%;
    right: 2.5em;
    color: #000;
    font-size: 9px;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    transition: all 0.3s;
}
.slideshow .Lslide-content .button:hover i {
    right: 1.7em;
}

.slideshow .Lslide-content .button p {
    margin: 0;
    padding: 0;
    color: #000;
    text-align: left;
    padding: 0.8em 8em 0.8em 1.5em;
    font-size: 12px;
    font-weight: 600;
}
.slideshow .slideshow-right {
    width: 60%;
    float: left;
    position: relative;
    height: 100%;    
}     
.slideshow .slideshow-right .Rslide {
    height: 100%;
    display: block;
    overflow: hidden;
    position: absolute;
    bottom: 0px;
    top: 0;
    left: 0;
    right: 0;
} 
.Lslide, .Rslide {
    position: absolute;
    width: 100%;
    transition: all 0.8s ease-in-out;
} 
.slideshow .slideshow-right .Rslide img {
    max-width: 100%;
    object-fit: cover;
}
.control {
    position: absolute;
    left: 40%;
    top: 50%;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
}    
.control i {
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    text-align: center;
    position: absolute;
    color: #44808f;
    transition: all 0.3s;
    -ms-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -webkit-transition: all 0.3s;
}    
.control .control-top {
    width: 45px;
    height: 50px;
    background-color: #fff;
    z-index: 5;
    position: relative;
    border-radius: 0px 4px 4px 0px;
    cursor: pointer;
}
.control .control-top:hover i {
    color: #333333;
}
.control .control-bottom {
    width: 45px;
    height: 50px;
    background-color: #fff;
    z-index: 5;
    position: relative;
    border-radius: 4px 0px 0px 4px;
    left: -45px;
    cursor: pointer;
}  
.control .control-bottom:hover i {
    color: #333333;
}     
/* Media Queries for Responsive Design */
@media only screen and (max-width: 1200px) {
    .slideshow .slideshow-left, .slideshow .slideshow-right {
        width: 100%;
        height: auto;
    }
    .slideshow .slideshow-left {
        height: 50%;
    }
    .slideshow .slideshow-right {
        height: 50%;
    }
    .control {
        left: 50%;
        top: 90%;
        transform: translateX(-50%);
    }
}

@media only screen and (max-width: 768px) {
    .slideshow .Lslide-content h2 {
        font-size: 40px;
    }
    .slideshow .Lslide-content p {
        padding: 1.5em 0em;
    }
    .slideshow .Lslide-content .button p {
        padding: 0.8em 5em 0.8em 1.5em;
        font-size: 10px;
    }
}

@media only screen and (max-width: 480px) {
    .slideshow .Lslide-content h2 {
        font-size: 30px;
    }
    .slideshow .Lslide-content p {
        padding: 1em 0em;
    }
    .slideshow .Lslide-content .button p {
        padding: 0.8em 3em 0.8em 1.5em;
        font-size: 8px;
    }
    .control {
        left: 55%;
        top: 95%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .control .control-top, .control .control-bottom {
        width: 100%;
        height: 10px;
        
    }
}



#page-bba {
    position: relative;
    width: 100%;
    height: 100vh; /* حجم الشاشة الكامل */
    background-image: url('../img/ainers.jpeg');
    background-size: contain;  /* تغيير لتجنب تشويه الصورة */
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.wrapper-before-after {
    width: 80vw; /* 80% من عرض الشاشة */
    height: 70vh; /* 70% من ارتفاع الشاشة */
    max-height: 100vh;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}

.bottom, .middle, .top {
    width: 100%;
    height: 100%;
    background-size: contain; /* لضبط الصورة دون تشويه */
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.bottom {
    background: #2196f3;
}

.middle {
    background: #bbdefb;
}

.top {
    width: 50%;
    background: #ffffff;
}

.scroller {
    width: 8vw; /* حجم متجاوب حسب عرض الشاشة */
    height: 8vw;
    max-width: 50px;
    max-height: 50px;
    position: absolute;
    left: 50%;  /* تمركز مبدئي */
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background-color: #fff;
    opacity: 0.9;
    cursor: pointer;
    box-shadow: 3.5px 0px 7px rgba(100, 100, 100, 0.2);
}

.scroller:hover {
    opacity: 1;
}

.scroller__thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 7px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.scroller-middle .scroller__thumb {
    border: 5px solid #44808f;
}

.scroller-top .scroller__thumb {
    border: 5px solid #44808f;
}

/* ميديا كويري لضبط التفاعل على الشاشات الصغيرة */
@media screen and (max-width: 900px) {
    #page-bba {
        background-size: cover; /* بالنسبة لشاشات أصغر */
    }
    .wrapper-before-after {
        width: 90vw;
        height: 60vh;
    }
    .scroller {
        width: 10vw;
        height: 10vw;
    }
}

@media screen and (max-width: 600px) {
    .wrapper-before-after {
        width: 95vw;
        height: 70vh;
    }
    .scroller {
        width: 12vw;
        height: 12vw;
    }
}

.galeria {
    margin: 5vh auto 0;
    width: 70vw;
    height: 70vh;
    transform-style: preserve-3d;
  }
  .galeria:before {
    content: '';
    padding-top: 56.25%;
    display: inline-block;
    width: 0;
  }
  .galeria .card {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 2rem #44808f80;
    border-color: #44808f;
    font-family: 'Monnich';
  }
  .galeria .una {
    background-image: url(../img/after.jpeg);
  }
  .galeria .dos {
    background-image: url(../img/before.jpeg);
  }
  .galeria .tres {
    background-image: url(../img/between.jpeg);
  }
  .galeria h2 {

    color: black;
    font-family: 'monnich';
    text-align: center;
    font-size: 3vh;
    font-weight: 300;
    line-height: 8vh;
    background: white;
    box-shadow: 0 0 5px #44808f80;
    margin: 0;
  }
  .galeria h2:before {
    position: absolute;
    left: 1rem;
    font-weight: 300;
    color: #00262F;
  }
  .galeria  .card p {
    text-align: center;
    color: #44808f;
    font-size: 5vw;
    line-height: 1.3;
    text-shadow: -1px -1px 0 #0D757D, 1px 1px 0 #000;
    margin-top: 3vh;
  }
  

  .galeria input {visibility: hidden;}
  label {
    background: #44808f;
    position: absolute;
    top: 0; bottom: 0;
    margin: auto 0;
    color: #fff;
    font-size: 4vw;
    line-height: 15vh; 
    text-align: right;
    height: 15vh;
    width: 10vw;
    padding: 0 .5vw;
    cursor: pointer;
    opacity: .2;
    transition: .5s linear;
  }
  .otra + .otra,
  #uno:checked ~ .tres .afin,
  #dole:checked ~ .una .afin,
  #tele:checked ~ .dos .afin {
    right: 0;
    text-align: left;
  }
  #uno:checked ~ .una .otra,
  #dole:checked ~ .dos .otra,
  #tele:checked ~ .tres .otra {
    background:  #44808f;
    display: block;
  }
  #uno:checked ~ .una .afin,
  #dole:checked ~ .dos .afin,
  #tele:checked ~ .tres .afin,
  :not(:checked) ~ .otra
  {display: none;}
  
  .galeria .card:hover label {
    animation: pulso 1s infinite alternate;
  }
  .galeria .card:hover label + label {
    animation-delay: .5s;
  }
  .galeria .card:hover label:hover {
    animation: none;
    opacity: .8;
    width: 10vw;
    font-size: 10vw;
  }
  
  #uno:checked ~ .dos,
  #dole:checked ~ .tres,
  #tele:checked ~ .una {
    animation: 1s fuera-izq;
    animation-fill-mode: forwards;
    transform-origin: center left;
    z-index: 2;
  }
  #uno:checked ~ .tres,
  #dole:checked ~ .una,
  #tele:checked ~ .dos {
    animation: 1.5s fuera-dch;
    animation-fill-mode: forwards;
    transform-origin: center right;
    z-index: 2;
  }
  #uno:checked ~ .una,
  #dole:checked ~ .dos,
  #tele:checked ~ .tres {
    animation: 2s central;
    animation-fill-mode: forwards;
    transform-origin: center center;
    z-index:3;
  }
  
  @keyframes fuera-izq {
    0% {transform: scale(1) translatex(0%);} 
    70% {transform: scale(.9) translatex(-100%);}
    100% {transform: scale(.9) translatex(-7%);}
  }
  @keyframes fuera-dch {
    0% {transform: scale(1) translatex(0%);}
    70% {transform: scale(.9) translatex(100%);}
    100% {transform: scale(.9) translatex(7%);}
  }
  @keyframes central {
    0% {transform: scale(.8);z-index: 1;}
    80% {transform: scale(.5);z-index: 3;}
    100% {transform: scale(1);z-index: 3;}
  }
  @keyframes pulso {
    50% {opacity: .7;}
  }

