/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    /* margin: 10% auto; */
    padding: 0px 30px 20px;
    border: 1px solid #888;
    /* width: 70%;  */
    max-width: 70%; 
    border-radius: 10px;
    text-align: center;
}
.modal-content.modal-youtube-content{
  max-width: 800px;
  max-height: 450px;
}
.mySlides {
  width: 90%;
  height: 70%;
  margin: 0 auto;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.mySlides img{
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 動画 */
.modal-content iframe {
    width: 640px;
    max-width: 640px; 
    height: 320px; 
    margin:0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* モーダル全体のスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    /* padding-top: 100px; */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
  }
  
  /* モーダルコンテンツのスタイル */
  .modal-content {
    position: relative;
    margin: auto;
    padding: 20px 30px 20px;
    height: 80vh;
    width: 90%;
    max-width: 1200px;
    min-height: 480px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }
  
  /* 閉じるボタンのスタイル */
  .close {
    /* color: white;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer; */
  }
  
  .close:hover,
  .close:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
  }
  
  /* 前後ナビゲーションボタンのスタイル */
  .prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #ccc;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
  }
  
  .prev{
    left: 0%;
  }
  .next {
    right: 0;
    border-radius: 3px 0 0 3px;
  }
  
  .prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
  }
  
  .modal-content a.download-button {
    font-size: 1.2em;
    margin: 20px auto;
    background-color: #DB4E72;
    color: #fefefe;
    padding: 1rem 2rem;
    font-weight: bold;
    border-radius: 1.5rem;
    text-decoration: none;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

@media screen and (max-width: 768px) {
    .modal-content {
        width: 90%;
        /* margin: 20% auto;  */
    }

    .modal-content iframe {
        height: 300px;
    }
    .modal-youtube-content iframe{
      max-width: 80vw;
    }

    .modal-content a.download-button {
      font-size: 1.0em;
  }
}

@media screen and (max-width: 480px) {
    .modal-content {
        width: 90%; 
        /* margin: 30% auto;  */
    }

    .modal-content iframe {
        height: 200px;
    }
}
