@charset "UTF-8";

.main_visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end; /* 下寄せ */
  flex-direction: column;
  align-items: center; /* 中央寄せ */
}
/*ボタン設定*/
.detail_btn {
  position: absolute;
  max-width: 240px;
  width: auto;
  bottom: 3%; /* 下からの余白を調整 */
  z-index: 2;
}
.detail_btn_link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: min(2.27vw, 10px);
  padding-inline: min(11.36vw, 50px);
  font-size: min(5.45vw, 24px);
  font-style: normal;
  font-weight: bold;
  letter-spacing: 10%;
  border-radius: min(0.78vw, 6px);
  transition: all 0.3s ease;
  background-color: var(--btn-color);
  color: var(--white--);
}

@media screen and (min-width: 1023px) {
  .main_visual {
    width: 100%;
    aspect-ratio: 2 / 1; /* 2:1の比率で1440pxなら720px */
    max-height: 920px; /* 最大920pxに制限 */
    overflow: hidden;
    position: relative;
    align-items: flex-start; /* 左寄せ */
  }

  .main_visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /*ボタン設定*/
  .detail_btn {
    position: static; /* absoluteを外す */
    margin-top: -9%; /* bottomからの余白を調整 */
    margin-left: 9%; /* 左右中央寄せ */
    width: min(21.94vw, 316px) !important;
    max-width: min(21.94vw, 316px) !important;
    z-index: 2;
  }
  .detail_btn_link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-block: min(1.11vw, 16px);
    padding-inline: min(3.47vw, 50px);
    font-size: min(1.66vw, 24px);
    font-style: normal;
    font-weight: bold;
    letter-spacing: 10%;
    border-radius: min(0.78vw, 6px);
    transition: all 0.3s ease;
    background-color: var(--btn-color);
    color: var(--white--);
  }
  .detail_btn:hover {
    opacity: 0.8;
  }
}

@media screen and (max-width: 300px) {
  .main_visual {
    height: 200px; /* 高さを縮小 */
  }
  .detail_btn {
    min-width: 80px;
    max-width: 90%;
    bottom: -5%; /* 下からの余白を調整 */
  }
  .detail_btn_link {
    font-size: clamp(8px, 4vw, 24px);
    padding: 6px 8px;
  }
  /* 画像も縮小対応 */
  .main_visual img {
    height: 100%;
    object-fit: cover;
  }
}
