@media screen and (max-width:3000px){

.center-container {
  position: relative;
  width: 100%;
  aspect-ratio:1500/1500;background:#3E2723;
  overflow: hidden;
}

.centerslider {
  width: 100%;
  height: 100%;
}

.centerslide {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* 各スライドの背景画像を直接CSSで設定 */
.slide1 {
  background: url("../img/index20_MM.jpg") no-repeat;background-size:cover;
}

.slide2 {
  background: url("../img/index21_MM.jpg") no-repeat;background-size:cover;
}

.slide3 {
  background: url("../img/index22_MM.jpg") no-repeat;background-size:cover;
}

.slide4 {
  background: url("../img/index23_MM.jpg") no-repeat;background-size:cover;
}

.centerslide.active {
  opacity: 1;
  visibility: visible;
}

.text-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  width: 80%;
  opacity: 0;
  visibility: hidden;
}

.text-overlay.active {
  opacity: 1;
  visibility: visible;
}

.center-title, .center-subtitle {
  opacity: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.center-title {
  /*font-size: 3.5rem;*/
  margin-bottom: 1rem;
}

.center-subtitle {
  /*font-size: 1.8rem;
  font-weight: 300;*/
}

/* オーバーレイを追加して画像を少し暗くし、テキストを見やすくする */
.centerslide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);}

}

@media (max-width: 768px) {
  .center-container {
  position: relative;
  width: 100%;
  aspect-ratio:960/640;background:#3E2723;
  overflow: hidden;
}

.centerslider {
  width: 100%;
  height: 100%;
}

.centerslide {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* 各スライドの背景画像を直接CSSで設定 */
.slide1 {
  background: url("../img/index20_M.jpg") no-repeat;background-size:cover;
}

.slide2 {
  background: url("../img/index21_M.jpg") no-repeat;background-size:cover;
}

.slide3 {
  background: url("../img/index23_M.jpg") no-repeat;background-size:cover;
}

.slide4 {
  background: url("../img/index23_M.jpg") no-repeat;background-size:cover;
}

.centerslide.active {
  opacity: 1;
  visibility: visible;
}

.text-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  width: 80%;
  opacity: 0;
  visibility: hidden;
}

.text-overlay.active {
  opacity: 1;
  visibility: visible;
}

.center-title, .center-subtitle {
  opacity: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.center-title {
  /*font-size: 3.5rem;*/
  margin-bottom: 1rem;
}

.center-subtitle {
  /*font-size: 1.8rem;
  font-weight: 300;*/
}

/* オーバーレイを追加して画像を少し暗くし、テキストを見やすくする */
.centerslide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);}
}