/**
 * Base
 */
 body {
    font-size: 100%; 
  }
  /* Fallback for hidden attribute */
  .hidden {
    display: none;
  }
  section{
    width: 95%;
    margin: auto;
  }
  section p{
    font-size: 20px;
    font-weight: 600;
    color: rgb(88, 61, 80);
    margin:40px 100px 20px 0;
    border-bottom: 1px solid purple;
  }

  @keyframes autoplay {
      /* position of the first slide */
      0% {
        left: 0;
      }
      /* position of the second slide */
      20% {
        left: -24%;
      }
      /* position of the third slide */
      35% {
        left: -48%;
      }
      /* position of the fourth slide */
      50% {
        left: -72%;
      }
      70% {
        left: -72%;
      }
      80% {
        left: -48%;
      }
      90% {
        left: -24%;
      }
      100% {
        left: 0%;
      }
  }

  @keyframes nonAutoplay {
      /* position of the first slide */
      0%{
        left: 0;
      }
      /* position of the second slide */
      8%{
        left: -306px;
      }
      10%{
        left: -306px;
      }
      /* position of the third slide */
      18%{
        left: -618px;
      }
      20%{
        left: -618px;
      }
      28%{
        left: -930px;
      }
      30%{
        left: -930px;
      }
      38%{
        left: -1242px;
      }
      40% {
        left: -1242px;
      }
      48% {
        left: -1554px;
      }
      50% {
        left: -1554px;
      }
      58% {
        left: -1242px;
      }
      60% {
        left: -1242px;
      }
      68%{
        left: -930px;
      }
      70%{
        left: -930px;
      }
      78%{
        left: -618px;
      }
      80%{
        left: -618px;
      }
      88%{
        left: -306px;
      }
      90%{
        left: -306px;
      }
      98%{
        left: 0;
      }
      100%{
        left: 0;
      }
  }
  /**
   * pace
   */
  .pace {
    position: relative;
    /* top margin is for purposes of demo 
    margin-top: 3rem;*/
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    width: 100%;
    height: 150px;
    /* box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); */
  }
  
  .pace__list {
    display:flex;
    justify-content: space-around;
    position: absolute;
    left: 0;
    width: 190%;
    margin:0;
    padding:0;
  }
  
  .pace__slide {
    float: left;
  }
  
  /* pace control */
   .pace__control {
    /* margin-right: auto; */
    margin-left: auto;
    width: 4.5rem;
    font-family: sans-serif;
    position: relative;
    top:-60px;
  }
  .pace__control label{
    position: relative;
    display: block;
    margin-top: 2rem;
    margin-bottom: 1rem;
    width: 4.5rem;
    height: 2rem;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.5;
    color: transparent;
    background: #b38eb1;
    border-radius: 2rem;
    cursor: pointer;
    transition: left 0.15s ease-out;
  }
  .pace__control label:before{
    content: "Auto slide ";
    position: absolute;
    /* top: 2.5rem; */
    top: 6px;
    left: -130%;
    color: #333;
    font-size: .9rem;
    font-weight: bold;
    text-transform: uppercase;
  }
  .pace__control label:after{
    content: "";
    position: absolute;
    top: .25rem;
    left: .25rem;
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 2rem;
    background: #fff;
    transition: left 0.15s ease-out;
    -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
  } 
/* =================== FOR AUTO CHECK ======================== */
   .pace > .pace__list {
    -webkit-animation-name: autoplay;
            animation-name: autoplay;
    -webkit-animation-duration: 20s;
            animation-duration: 20s;
    -webkit-animation-iteration-count: infinite;
            animation-iteration-count: infinite;
  }
  
  .pace__switch + .pace + .pace__control > label {
    background: #705375;
  }
  .pace__switch + .pace + .pace__control > label:after {
    left: 2.75rem;
  } 
    
   .pace__switch:checked + div + div > .wrapper {
    -webkit-animation-name: nonAutoplay;
            animation-name: nonAutoplay;
    -webkit-animation-duration: 60s;
            animation-duration: 60s;
    -webkit-animation-iteration-count: infinite;
            animation-iteration-count: infinite;
  }
  
  .pace__switch:checked  + .pace__control > label {
    background: #49104b;
  }
  .pace__switch:checked + .pace__control > label:after {
    left: 2.75rem;
  }
  
@media only screen and (max-width: 500px) {
  
  section p{
    font-size: 16px;
    font-weight: 500;
    color: rgb(88, 61, 80);
    margin:40px 10px 20px 0;
    border-bottom: 1px solid rgba(128, 0, 128, 0.226);
  }
   .pace__control {
    width: 2.5rem;
    font-family: sans-serif;
    position: relative;
    top: -55px;
  }
  .pace__control label{
    width: 2.5rem;
    height: 1.4rem;
    font-size: 1rem;
  }
  .pace__control label:before{
    top: 4px;
    left: -180%;
    font-weight: 600;
    font-size: .7rem;
  }
  .pace__control label:after{
    top: .15rem;
    left: .25rem;
    width: 1.0rem;
    height: 1.0rem;
  } 
  .pace__switch:checked + .pace__control > label:after {
    left: 1.25rem;
  }

  @keyframes nonAutoplay {
    /* position of the first slide */
    0%{
      left: 0;
    }
    /* position of the second slide */
    8%{
      left: -273px;
    }
    10%{
      left: -273px;
    }
    18%{
      left: -549px;
    }
    20%{
      left: -549px;
    }
    28%{
      left: -825px;
    }
    30%{
      left: -825px;
    }
    38%{
      left: -1101px;
    }
    40% {
      left: -1101px;
    }
    48% {
      left: -1377px;
    }
    50% {
      left: -1377px;
    }
    58% {
      left: -1101px;
    }
    60% {
      left: -1101px;
    }
    68%{
      left: -825px;
    }
    70%{
      left: -825px;
    }
    78%{
      left: -549px;
    }
    80%{
      left: -549px;
    }
    88%{
      left: -273px;
    }
    90%{
      left: -273px;
    }
    98%{
      left: 0;
    }
    100%{
      left: 0;
    }
  }
}