/* raydorim.com\wp-content\themes\deer_child\assets\css\carousel.css */
/* ==================================================
   通常スタイル
================================================== */

/* --------------------------------
   カルーセル全体
-------------------------------- */
.carousel {
  margin: 20px auto;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.slick-slider .slick-track {
  display: flex;
}

/* --------------------------------
   パネル全体共通設定
-------------------------------- */
.carousel__panel {
  min-width: 300px;
  max-width: 600px;
  margin: 10px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* --------------------------------
   パネル内のモジュール
-------------------------------- */
/* 画像設定 */
.carousel__panel img {
  border-radius: 8px;
  display: block;
  width: 100%;
  height: auto;
}

/* 説明文 */
.carousel__caption .carousel__desc {
  overflow: hidden;
}

/* 続きを読むリンク */
.carousel__caption .carousel__toggle-desc {
  float: right; /* 右端に寄せる */
  display: inline-block;
  background: none;
  padding: 2px 5px;
  font-size: 14px;
  margin-top: 5px;
  cursor: pointer;
  z-index: 2;
}

/* ページを開くボタン */
.carousel__panel .carousel__detail {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  padding: 10px 20px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
  cursor: pointer;
  z-index: 100;
}

/* ホバー時ボタン拡大 */
.carousel__panel .carousel__detail:hover {
  transform: translateX(-50%) scale(1.05);
}

/* 画像に境界線が出るのを無効化（古いUA対策含む） */
.js-carousel-panel img {
  border: 0;
  display: block;
}

/* ボタンを使っている場合のデフォルト枠消し（使ってなければ無視される） */
.js-carousel-panel button {
  border: none;
  background: none;
  padding: 0;
}

/* タップ時の黒いハイライトを消す（Android Chrome） */
.js-carousel-panel a,
.js-carousel-panel button,
.js-carousel-panel img {
  -webkit-tap-highlight-color: transparent;
}

/* タッチ環境ではフォーカス枠を消し、キーボード操作では残す */
@media (hover: none) {
  .js-carousel-panel a:focus,
  .js-carousel-panel button:focus,
  .js-carousel-panel img:focus { outline: none; }
}




/* ==================================================
   レスポンシブ（1200px以上）
================================================== */
@media (min-width: 1200px) {

  /* Slickスライドの効果設定 */
  .carousel .slick-slide {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .carousel .slick-slide:not(.slick-center) {
    transform: scale(0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .carousel .slick-center {
    transform: scale(1.0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  .carousel .slick-slide:not(.slick-center):hover {
    transform: scale(0.82);
  }
  .carousel .slick-center:hover {
    transform: scale(1.05);
  }

  /* パネルサイズ調整 */
  .carousel__panel {
    width: 30vw !important;
    height: 600px !important;
    transition: transform 0.3s ease;
  }
  .carousel__panel:hover {
    transform: scale(1.05);
  }

  /* 説明文調整 */
  .carousel__caption .carousel__desc {
    height: clamp(100px, calc(270px - ((100vw - 1200px) * 0.1)), 270px);
  }
}

/* ==================================================
   レスポンシブ（601px～1199px）
================================================== */
@media (min-width: 601px) and (max-width: 1199px) {
  .carousel__panel:hover .carousel__caption {
    opacity: 1;
  }
  /* ← ここだけ置き換え：a のみ表示 */
  .carousel__panel:hover a.carousel__detail--go {
    display: block;
  }
}



/* ==================================================
 レスポンシブ（1199px以下）
================================================== */
@media (max-width: 1199px) {

/* パネル全体調整（修正済） */
.carousel__panel {
  /* clamp(最小値, 基準値, 最大値)で柔軟に幅を調整 */
  width: clamp(400px, 90vw, 1000px) !important;
  margin: 35px auto !important;
  max-width: none !important;
  min-width: auto !important;
}

/* 中心パネル拡大率調整（そのまま維持） */
.carousel .slick-center,
.carousel .slick-center-fix {
  transform: scale(0.95);
}

/* パネル内モジュール（維持・調整なし） */
.carousel__caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center; /* 縦方向中央揃え */
  align-items: center;     /* 横方向中央揃え */
  text-align: center;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  z-index: 99;
  box-sizing: border-box; /* padding含めて中央揃え */
}


/* 説明文の高さ調整（維持・調整なし） */
.carousel__caption .carousel__desc {
  position: relative; /* 必須 */
  overflow: hidden;   /* 必須 */
  height: clamp(150px, calc(470px - ((1200px - 100vw) * 0.8)), 470px);
  max-width: 90%;
  margin: 0 auto;
}

/* ボタン位置の調整（追加推奨）*/
.carousel__detail {
  bottom: 25px !important;
}

.carousel__caption .carousel__desc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px; /* 強めのフェード */
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  display: none;
}
.carousel__caption .carousel__desc.is-overflow::after {
  display: block;
}  

@media (max-width: 1199px) {
  /*続きを読むの位置*/
  .carousel__caption .carousel__toggle-desc {
    align-self: flex-end;   /* 横方向：右寄せ */
    margin-right: 15px;     /* パネルの右端から15px内側へ */
    margin-top: 5px;        /* 上下位置はそのまま */
    display: inline-block;
    background: none;
    padding: 2px 5px;
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
  }
}

}

/* ==================================================
   レスポンシブ（600px以下）
================================================== */
@media (max-width: 600px) {
  .carousel__caption {
    display: block !important;
    opacity: 1 !important;
    background: transparent !important;
    pointer-events: none;
  }
  .carousel__caption > :not(.carousel__detail) {
    display: none !important;
  }
  .carousel__detail {
    bottom: 10px !important;
    right: 15px !important;
    left: auto !important;
    transform: none !important;
    font-size: clamp(12px, 2.5vw, 16px) !important;
    padding: clamp(6px, 1.5vw, 12px) clamp(10px, 2.5vw, 20px) !important;
  }
  .carousel__panel {
    width: 90vw !important; /* ウィンドウ幅に対して90%の幅に調整 */
    margin: 10px auto !important; /* 中央配置・上下余白 */
  }

  @media (max-width: 600px) {
    /*モーダルの位置を調整*/
    #read-more-modal {
      left: 0; /* 左端を固定 */
      justify-content: center;
      align-items: center;
    }
    .modal-content {
      margin: 0 auto; /* 中央寄せ */
    }
  }
  

}
/* ==================================================
 通常スタイル
================================================== */

/* --------------------------------
 カルーセル全体
-------------------------------- */
.carousel {
  margin: 20px auto;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.slick-slider .slick-track {
  display: flex;
}

/* --------------------------------
   パネル全体共通設定
-------------------------------- */
.carousel__panel {
  min-width: 300px;
  max-width: 600px;
  margin: 10px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* --------------------------------
   パネル内のモジュール
-------------------------------- */
/* 画像設定 */
.carousel__panel img {
  border-radius: 8px;
  display: block;
  width: 100%;
  height: auto;
}

/* 説明文 */
.carousel__caption .carousel__desc {
  overflow: hidden;
  margin-bottom: 5px !important;
}

/* 続きを読むリンク */
.carousel__caption .carousel__toggle-desc {
  float: right; /* 右端に寄せる */
  display: inline-block;
  background: none;
  padding: 2px 5px;
  font-size: 14px;
  margin-top: 5px;
  cursor: pointer;
  z-index: 2;
}

/* ページを開くボタン */
.carousel__panel .carousel__detail {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  padding: 10px 20px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
  cursor: pointer;
  z-index: 100;
}

/* ホバー時ボタン拡大 */
.carousel__panel .carousel__detail:hover {
  transform: translateX(-50%) scale(1.05);
}

/* ==================================================
   レスポンシブ（1200px以上）
================================================== */
@media (min-width: 1200px) {

  /* Slickスライドの効果設定 */
  .carousel .slick-slide {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .carousel .slick-slide:not(.slick-center) {
    transform: scale(0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .carousel .slick-center {
    transform: scale(1.0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  .carousel .slick-slide:not(.slick-center):hover {
    transform: scale(0.82);
  }
  .carousel .slick-center:hover {
    transform: scale(1.05);
  }

  /* パネルサイズ調整 */
  .carousel__panel {
    width: 30vw !important;
    height: 600px !important;
    transition: transform 0.3s ease;
  }
  .carousel__panel:hover {
    transform: scale(1.05);
  }

  /* 説明文調整 */
  .carousel__caption .carousel__desc {
    height: clamp(100px, calc(270px - ((100vw - 1200px) * 0.1)), 270px);
  }
}

/* ==================================================
   レスポンシブ（601px～1199px）
================================================== */
@media (min-width: 601px) and (max-width: 1199px) {
  .carousel__panel:hover .carousel__caption {
    opacity: 1;
  }
  /* ← ここだけ置き換え：a のみ表示 */
  .carousel__panel:hover a.carousel__detail--go {
    display: block;
  }
}



/* ==================================================
 レスポンシブ（1199px以下）
================================================== */
@media (max-width: 1199px) {

/* パネル全体調整（修正済） */
.carousel__panel {
  /* clamp(最小値, 基準値, 最大値)で柔軟に幅を調整 */
  width: clamp(400px, 90vw, 1000px) !important;
  margin: 35px auto !important;
  max-width: none !important;
  min-width: auto !important;
}

/* 中心パネル拡大率調整（そのまま維持） */
.carousel .slick-center,
.carousel .slick-center-fix {
  transform: scale(0.95);
}

/* パネル内モジュール（維持・調整なし） */
.carousel__caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center; /* 縦方向中央揃え */
  align-items: center;     /* 横方向中央揃え */
  text-align: center;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  z-index: 99;
  box-sizing: border-box; /* padding含めて中央揃え */
}


/* 説明文の高さ調整（維持・調整なし） */
.carousel__caption .carousel__desc {
  position: relative; /* 必須 */
  overflow: hidden;   /* 必須 */
  height: clamp(150px, calc(470px - ((1200px - 100vw) * 0.8)), 470px);
  max-width: 90%;
  margin: 0 auto;
}

/* ボタン位置の調整（追加推奨）*/
.carousel__detail {
  bottom: 25px !important;
}

.carousel__caption .carousel__desc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px; /* 強めのフェード */
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  display: none;
}
.carousel__caption .carousel__desc.is-overflow::after {
  display: block;
}  

@media (max-width: 1199px) {
  /*続きを読むの位置*/
  .carousel__caption .carousel__toggle-desc {
    align-self: flex-end;   /* 横方向：右寄せ */
    margin-right: 15px;     /* パネルの右端から15px内側へ */
    margin-top: 5px;        /* 上下位置はそのまま */
    display: inline-block;
    background: none;
    padding: 2px 5px;
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
  }
}

}

/* ==================================================
   レスポンシブ（600px以下）
================================================== */
@media (max-width: 600px) {
  .carousel__caption {
    display: block !important;
    opacity: 1 !important;
    background: transparent !important;
    pointer-events: none;
  }
  .carousel__caption > :not(.carousel__detail) {
    display: none !important;
  }
  .carousel__detail {
    bottom: 10px !important;
    right: 15px !important;
    left: auto !important;
    transform: none !important;
    font-size: clamp(12px, 2.5vw, 16px) !important;
    padding: clamp(6px, 1.5vw, 12px) clamp(10px, 2.5vw, 20px) !important;
  }
  .carousel__panel {
    width: 80vw !important; /* ウィンドウ幅に対して90%の幅に調整 */
    margin: 10px auto !important; /* 中央配置・上下余白 */
  }

  @media (max-width: 600px) {
    /*モーダルの位置を調整*/
    #read-more-modal {
      left: 0; /* 左端を固定 */
      justify-content: center;
      align-items: center;
    }
    .modal-content {
      margin: 0 auto; /* 中央寄せ */
    }
  }
  
}
/* ==================================================
 通常スタイル
================================================== */

/* --------------------------------
 カルーセル全体
-------------------------------- */
.carousel {
  margin: 20px auto;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.slick-slider .slick-track {
  display: flex;
}

/* --------------------------------
   パネル全体共通設定
-------------------------------- */
.carousel__panel {
  min-width: 300px;
  max-width: 600px;
  margin: 10px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* --------------------------------
   パネル内のモジュール
-------------------------------- */
/* 画像設定 */
.carousel__panel img {
  border-radius: 8px;
  display: block;
  width: 100%;
  height: auto;
}

/* 説明文 */
.carousel__caption .carousel__desc {
  overflow: hidden;
}

/* 続きを読むリンク */
.carousel__caption .carousel__toggle-desc {
  float: right; /* 右端に寄せる */
  display: inline-block;
  background: none;
  padding: 2px 5px;
  font-size: 14px;
  margin-top: 0px;
  cursor: pointer;
  z-index: 2;
}

/* ページを開くボタン */
.carousel__panel .carousel__detail {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  padding: 10px 20px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
  cursor: pointer;
  z-index: 100;
}

/* ホバー時ボタン拡大 */
.carousel__panel .carousel__detail:hover {
  transform: translateX(-50%) scale(1.05);
}

/* ==================================================
   レスポンシブ（1200px以上）
================================================== */
@media (min-width: 1200px) {

  /* Slickスライドの効果設定 */
  .carousel .slick-slide {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .carousel .slick-slide:not(.slick-center) {
    transform: scale(0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .carousel .slick-center {
    transform: scale(1.0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  .carousel .slick-slide:not(.slick-center):hover {
    transform: scale(0.82);
  }
  .carousel .slick-center:hover {
    transform: scale(1.05);
  }

  /* パネルサイズ調整 */
  .carousel__panel {
    width: 30vw !important;
    height: 600px !important;
    transition: transform 0.3s ease;
  }
  .carousel__panel:hover {
    transform: scale(1.05);
  }
  /*タイトルの位置を調整*/
  .carousel__title {
   margin-top: 20px; /* 好みの値に調整 */
  }

  /* 説明文調整 */
  .carousel__caption .carousel__desc {
    height: clamp(100px, calc(270px - ((100vw - 1200px) * 0.1)), 270px);
  }
}

/* ==================================================
   レスポンシブ（601px～1199px）
================================================== */
@media (min-width: 601px) and (max-width: 1199px) {
  .carousel__panel:hover .carousel__caption {
    opacity: 1;
  }
  /* ← ここだけ置き換え：a のみ表示 */
  .carousel__panel:hover a.carousel__detail--go {
    display: block;
  }
}



/* ==================================================
 レスポンシブ（1199px以下）
================================================== */
@media (max-width: 1199px) {

/* パネル全体調整（修正済） */
.carousel__panel {
  /* clamp(最小値, 基準値, 最大値)で柔軟に幅を調整 */
  width: clamp(0px, 90vw, 1000px) ;
  margin: 35px auto !important;
  max-width: none !important;
  min-width: auto !important;
}

/* 中心パネル拡大率調整（そのまま維持） */
.carousel .slick-center,
.carousel .slick-center-fix {
  transform: scale(0.95);
}

/* パネル内モジュール（維持・調整なし） */
.carousel__caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center; /* 縦方向中央揃え */
  align-items: center;     /* 横方向中央揃え */
  text-align: center;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  z-index: 99;
  box-sizing: border-box; /* padding含めて中央揃え */
}


/* 説明文の高さ調整（維持・調整なし） */
.carousel__caption .carousel__desc {
  position: relative; /* 必須 */
  overflow: hidden;   /* 必須 */
  height: clamp(150px, calc(470px - ((1200px - 100vw) * 0.8)), 470px);
  max-width: 90%;
  margin: 0 auto;
}

/* ボタン位置の調整（追加推奨）*/
.carousel__detail {
  bottom: 25px !important;
}

.carousel__caption .carousel__desc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px; /* 強めのフェード */
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  display: none;
}
.carousel__caption .carousel__desc.is-overflow::after {
  display: block;
}  

@media (max-width: 1199px) {
  /*続きを読むの位置*/
  .carousel__caption .carousel__toggle-desc {
    align-self: flex-end;   /* 横方向：右寄せ */
    margin-right: 25px;     /* パネルの右端から15px内側へ */
    margin-top: 0px;        /* 上下位置はそのまま */
    display: inline-block;
    background: none;
    padding: 2px 5px;
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
  }
}

}

/* ==================================================
   レスポンシブ（600px以下）
================================================== */
@media (max-width: 600px) {
  .carousel__caption {
    display: block ;
    opacity: 1 ;
    background: transparent ;
    pointer-events: none;
  }
  .carousel__caption > :not(.carousel__detail) {
    display: none ;
  }
  .carousel__detail {
    bottom: 10px ;
    right: 15px ;
    left: auto ;
    transform: none ;
    font-size: clamp(12px, 2.5vw, 16px) ;
    padding: clamp(6px, 1.5vw, 12px) clamp(10px, 2.5vw, 20px) ;
  }
  .carousel__panel {
    width: 80vw ; /* ウィンドウ幅に対して90%の幅に調整 */
    margin: 10px auto ; /* 中央配置・上下余白 */
  }

  @media (max-width: 600px) {
    /*モーダルの位置を調整*/
    #read-more-modal {
      left: 0; /* 左端を固定 */
      justify-content: center;
      align-items: center;
    }
    .modal-content {
      margin: 0 auto; /* 中央寄せ */
    }
  }
  
}
