/*========= モーダル表示のためのCSS ===============*/
/*ビデオ要素*/
.video {
  width: 110%;
}
@media (max-width: 480px) {
.video {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
}
.card-wrapper {
  background-color: #f8f8f8;
  border-radius: 8px;
  display: flex;
  justify-content: center;
}

/*モーダルを開くボタン*/
/*
.modal-open{
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 50px;
    font-weight: bold;
    color: #fff;
    background: #000;
    margin: auto;
    cursor: pointer;
    transform: translate(-50%,-50%);
  }
  */
  /*モーダル本体の指定 + モーダル外側の背景の指定*/
  .modal-container,.modal-container2{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background: rgba(0,0,0,50%);
    padding: 40px 20px;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    box-sizing: border-box;
  }

  .modal-container2{
    padding: 20px 20px;
    background: rgba(0,0,0,80%);
  }


  /*モーダル本体の擬似要素の指定*/
  .modal-container:before,.modal-container2:before{
    content: "";
    display: inline-block;
    vertical-align: middle;
    height: 100%;
  }
  /*モーダル本体に「active」クラス付与した時のスタイル*/
  .modal-container.active,.modal-container2.active{
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    visibility: visible;
    z-index: 999999;
  }

  /*モーダル枠の指定*/
  .modal-body{
    position: relative;
    display: inline-block;
    vertical-align: middle;
    height: auto;
    width: 70%;
    padding: 10px 8px 10px 10px;
  }
  @media (max-width: 480px) {
    .modal-body {
      width: 93%;
    }
  }
  /*モーダルを閉じるボタンの指定*/
  .modal-close,.modal-close2{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 90px;
    right: 150px;
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
  }
  /*モーダル内のコンテンツの指定*/
  .modal-content{
  /* background: #fff;*/
  }

  /*スタートmodal*/
  @media (max-width: 480px) {
  .modal-body {
    height: 90%;
  }
  }


  .video-overlay {
    position: fixed; /* ここを absolute から fixed に変更 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 3; /* ここを調整してオーバーレイが全画面に広がるようにします */
}

.msbtn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4; /* video-overlayよりも上に配置 */
}
@media (max-width: 480px) {
.msbtn {
  width: 300px;
}
}

.modal-close {
    z-index: 2; /* video-overlayの下に配置 */
}

/* 動画の背景を設定するスタイル */
.video-background {
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 60px;
  width: 100%;
  height: 500px;
}

/* YouTubeの埋め込み動画サイズのスタイル */
.video-embed {
  width: 100%;
  height: calc(100% - 40px); /* これにより、動画の周りに20pxのマージンが確保されます。paddingの2倍の値になるようにしてください。 */
}

/* 動画の背景のタイトルのスタイル */
.video-title {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white; /* 白色の文字 */
  font-size: 24px; /* 文字サイズ、必要に応じて調整 */
  font-weight: bold; /* 太字 */
  z-index: 2; /* 動画よりも上に表示 */
  margin: 30px;
}

.start_img{
  width: 400px;
}


@media (max-width: 768px) {
  .modal-close, .modal-close2 {
    top: 32%;
    right: 10px;
}

}
