@charset "UTF-8";

* {
  box-sizing: border-box;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* スライドする要素 */
.content {
  width: 240px;
  height: 160px;
}

.content:nth-child(1) {
  background-color: tomato;
}

.content:nth-child(2) {
  background-color: orange;
}

.content:nth-child(3) {
  background-color: blue;
}

.content:nth-child(4) {
  background-color: green;
}

/* スライドレールの枠 */
.wrap {
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 340px; 
  margin-bottom: 10px;
}

@media (max-width: 768px) {
.wrap {
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 340px; 
  margin-bottom: 0px;
  margin-top: -90px;
}
}

/* content4つをまとめたスライドブロック */
.slideshow {
  display: flex;
  -webkit-animation: loop-slide 20s infinite linear 1s both;
  animation: loop-slide 40s infinite linear 1s both;
}

@-webkit-keyframes loop-slide { 
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes loop-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
} 

/* ホバー時に動きを止める（パターン2・3）*/
.slide-paused:hover .slideshow {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}

/* ホバー時の装飾（パターン3） */
.content-hover {
  transition: all 0.2s;
  margin-right: 20px;
}

.content-hover:hover {
  transform: translateY(-20px);
  border-radius: 0 10%;
  box-shadow: 0 3px 10px 0 #333;
  opacity: 0.8;
  cursor: pointer;
}