/* ベースとなるリセットとボックスサイジング設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}




/* スライダーコンテナのスタイル */
.slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* スライダーのスタイル */
.slider {
  display: flex;
  transition: transform 0.4s ease;
  list-style: none;
  width: 100%;
  scroll-snap-type: x mandatory;
}

/* スライダーアイテムのスタイル - モバイルファースト（412px幅を考慮） */
.topicWrap-listItem {
  min-width: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}

/* 画像のスタイル - 左右の余白なし */
.topicWrap-listItem img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* マスクとキャプションのスタイル */
.topicWrap-listItem-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px;
}

.topicWrap-listItem-maskCaption-dade {
  font-weight: bold;
  margin-bottom: 5px;
}

.topicWrap-listItem-maskCaption-text {
  font-size: 0.9rem;
}

/* ナビゲーションボタン */
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 2;
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

/* ドットのスタイル */
.slider-dots {
  display: flex;
  justify-content: center;
  margin: 1em 0 1em 0;
}

.dot {
  width: 1em;
  height: 1em;
  background-color: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background-color: #333;
}

/* 説明テキスト */
.topicWrap-text {
  padding: 0 15px;
  margin: 15px 0;
  line-height: 1.6;
}



/* PC表示用のメディアクエリ（768px以上） */
@media (min-width: 768px) {
 /* .topicWrap {
    max-width: 960px;
  }*/
  /* PCでは2枚ずつ表示 */
  .topicWrap-listItem {
    min-width: 50%;
    flex: 0 0 50%;
  }



  .topicWrap-text {
    margin: 25px auto;
    max-width: 80%;
  }
}


/* PC表示用のCSS追加 */
@media (min-width: 768px) {
  .slider {
    display: flex;
    transition: transform 0.4s ease;
  }
  
  .topicWrap-listItem {
    min-width: 50%; /* 2枚表示のため50%幅に設定 */
    flex: 0 0 50%;
  }
}






/*   以下スライダー　最初は非表示マスクホーバー表示追加対応　*/
.topicWrap-listItem img {
/*    margin-top:0.5em;*/
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-family: 'object-fit: cover;'; /*IE対策*/
    box-shadow: 3px 3px 4px 0px rgba(68,71,75,0.36);
    -webkit-box-shadow: 3px 3px 4px 0px rgba(68,71,75,0.36);
    -moz-box-shadow:3px 3px 4px 0px rgba(68,71,75,0.36);
    }
.topicWrap-listItem-mask {/*マスクの設定*/
    width: 96%;
    height: 100%;
    position: absolute;	/* 絶対位置指定 */
    top: 0;
    left: auto;
    opacity: 0;	/* マスクを表示しない */
    background-color:	rgba(0,0,0,0.4);	/* マスクは半透明 */
    -webkit-transition:	all 0.4s ease;
    transition:		all 0.4s ease;
}
.topicWrap-listItem-maskCaption{/*マスクの上の*/
    font-size: 14px;
    text-align: left;
    position: absolute;
    padding: 10px;
    bottom: 0;
    color:#fff;
}
.topicWrap-listItem:hover .topicWrap-listItem-mask{
    opacity: 1;	/* マスクを表示する */
}