/* =============================
   共通スタイル
============================= */

[class^="sample"] {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 10px auto;
}

[class^="sample"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[class^="sample"] .mask {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.8s ease-in-out; /* デフォルト値（個別で上書き可） */
}

/* =============================
   個別設定（sample1〜sample4）
============================= */

/*基本形 sample1: フェードイン型（3:2比率） */
.sample1 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample1 .mask {
  opacity: 0;
}
.sample1:hover .mask {
  opacity: 1;
}



/*基本形 sample2: フェードイン型（2:3比率） */
.sample2 {
  max-width: 300px;
  aspect-ratio: 2 / 3;
}
.sample2 .mask {
  opacity: 0;
}
.sample2:hover .mask {
  opacity: 1;
}


/* sample3: 🌀 スピンイン（クルクル回転しながら登場） */
.sample3 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample3 .mask {
  transform: scale(0) rotate(360deg);
  opacity: 0;
  transition: all 0.8s ease-out;
}
.sample3:hover .mask {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}



/* sample4: 💫 スケール＋回転＋シャドウ（ダイナミック登場） */
.sample4 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample4 .mask {
  transform: scale(0.5) rotate(-15deg);
  opacity: 0;
  box-shadow: none;
  transition: all 0.6s ease-out;
}
.sample4:hover .mask {
  transform: scale(1) rotate(0deg);
  opacity: 1;
  box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}


/* =============================
   個別設定（sample5〜sample11）
============================= */

/* sample5: 🔄フリップ（カードが裏返るような動き） */
.sample5 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
  perspective: 1000px;
}
.sample5 .mask {
  transform: rotateY(180deg);
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}
.sample5:hover .mask {
  transform: rotateY(0deg);
}




/* sample6: フェードイン／フェードアウト */
.sample6 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample6 .mask {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.sample6:hover .mask {
  opacity: 1;
}




/* sample7: 縦写真　回転しながら表示 */
.sample7 {
  max-width: 300px;
  aspect-ratio: 2 / 3;
}
.sample7 .mask {
  transform: scale(0) rotate(-180deg);
  opacity: 0;
  transition: all 0.8s ease;
}
.sample7:hover .mask {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}



/* sample8: スライドイン（下から） */
.sample8 {
  max-width: 300px;
  aspect-ratio: 2 / 3;
}
.sample8 .mask {
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.8s ease;
}
.sample8:hover .mask {
  transform: translateY(0);
  opacity: 1;
}



/* sample9: マスクの拡がり（clip-path） */
.sample9 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample9 .mask {
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 1.8s ease-in-out;/*0.8s ease;*/
}
.sample9:hover .mask {
  clip-path: circle(100% at 50% 50%);/*(150% at 50% 50%)*/
}



/* sample10: 「ふわっと出る」マスク演出 */
.sample10 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample10 .mask {
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow 0.8s ease;
}
.sample10:hover .mask {
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}



/* sample11: ふわっと＋回転 */
.sample11 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample11 .mask {
  transform: scale(0.8) rotate(-5deg);
  opacity: 0;
  transition: all 0.8s ease;
}
.sample11:hover .mask {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}




/* =============================
   個別設定スライドイン（sample20〜sample）
============================= */

/* sample20: ⬇️ 上からスライドイン */
.sample20 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample20 .mask {
 transform: translateY(-200px); /* 少し上から -30px)*/
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}
.sample20:hover .mask {
  transform: translateY(0);
  opacity: 1;
}



/* sample21: ➡️ 右からスライドイン */
.sample21 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample21 .mask {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample21:hover .mask {
  transform: translateX(0);
  opacity: 1;
}



/* sample22: ⬅️ 左からスライドイン */
.sample21 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample21 .mask {
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample21:hover .mask {
  transform: translateX(0);
  opacity: 1;
}



/* sample23: ⬅️ 左からスライドイン */
.sample23 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample23 .mask {
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample23:hover .mask {
  transform: translateX(0);
  opacity: 1;
}


/* =============================
   個別設定 斜め敬スライドイン
============================= */

/* sample24: 🔽 右上から斜めにスライドイン */
.sample24 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample24 .mask {
  transform: translate(100%, -100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample24:hover .mask {
  transform: translate(0, 0);
  opacity: 1;
}



/* sample25: 左下から斜めにスライドイン */
.sample25 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample25 .mask {
  transform: translate(-100%, 100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample25:hover .mask {
  transform: translate(0, 0);
  opacity: 1;
}



/* sample26: 左上から斜めにスライドイン */
.sample26 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample26 .mask {
  transform: translate(-100%, -100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample26:hover .mask {
  transform: translate(0, 0);
  opacity: 1;
}



/* sample27: 右下から斜めにスライドイン */
.sample27 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
}
.sample27 .mask {
  transform: translate(100%, 100%);
  opacity: 0;
  transition: all 0.6s ease;
}
.sample27:hover .mask {
  transform: translate(0, 0);
  opacity: 1;
}






/*✅ sample40: 上下 横写真 hoverでスライドイン／外したらスライドアウト */
.sample40 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
}

/* captionエリア */
.sample40 .mask {
  position: absolute;
  inset: 0;
  transform: translateY(-200px); /* 最初は上に隠れている */
  opacity: 0;
}

/* hoverしたら下にスライドして表示 */
.sample40:hover .mask {
  animation: slideDownIn 1.2s ease forwards;/*0.8s*/
}

/* hoverを外した時：さらに下にスライドして消える */
.sample40:not(:hover) .mask {
  animation: slideDownOut 0.8s ease forwards;
}

/* スライドイン */
@keyframes slideDownIn {
  0% {
    transform: translateY(-200px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* スライドアウト（下方向へ） */
@keyframes slideDownOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(200px);
    opacity: 0;
  }
}



/*✅ sample41: 上下 縦写真 hoverでスライドイン／外したらスライドアウト */
.sample41 {
  max-width: 300px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  position: relative;
}

/* captionエリア */
.sample41 .mask {
  position: absolute;
  inset: 0;
  transform: translateY(-200px); /* 最初は上に隠れている */
  opacity: 0;
}

/* hoverしたら下にスライドして表示 */
.sample41:hover .mask {
  animation: slideDownIn 1.2s ease forwards;/*0.8s*/
}

/* hoverを外した時：さらに下にスライドして消える */
.sample41:not(:hover) .mask {
  animation: slideDownOut 0.8s ease forwards;
}

/* スライドイン */
@keyframes slideDownIn {
  0% {
    transform: translateY(-200px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* スライドアウト（下方向へ） */
@keyframes slideDownOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(200px);
    opacity: 0;
  }
}







/*✅ sample50: 左右  横写真 左からスライドイン → 右へスライドアウト */

.sample50 {
  max-width: 400px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
}

/* captionエリア */
.sample50 .mask {
  position: absolute;
  inset: 0;
  transform: translateX(-200px); /* ← 左側からスタート */
  opacity: 0;
}

/* hoverしたらスライドイン（左→中央） */
.sample50:hover .mask {
  animation: slideInFromLeft 0.8s ease forwards;
}

/* hoverを外したらスライドアウト（中央→右） */
.sample50:not(:hover) .mask {
  animation: slideOutToRight 0.8s ease forwards;
}

/* 左から入る */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-200px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 右に抜ける */
@keyframes slideOutToRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(200px);
    opacity: 0;
  }
}



/*✅ sample51: 左右  縦写真 左からスライドイン → 右へスライドアウト */

.sample51 {
  max-width: 300px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  position: relative;
}

/* captionエリア */
.sample51 .mask {
  position: absolute;
  inset: 0;
  transform: translateX(-200px); /* ← 左側からスタート */
  opacity: 0;
}

/* hoverしたらスライドイン（左→中央） */
.sample51:hover .mask {
  animation: slideInFromLeft 0.8s ease forwards;
}

/* hoverを外したらスライドアウト（中央→右） */
.sample51:not(:hover) .mask {
  animation: slideOutToRight 0.8s ease forwards;
}

/* 左から入る */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-200px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 右に抜ける */
@keyframes slideOutToRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(200px);
    opacity: 0;
  }
}










/* =============================
   キャプション
============================= */
[class^="sample"] .caption01 {
  font-size: 1.2rem;
  color: #fff;
  line-height: 1.5;
}

/* =============================
   レスポンシブ調整
============================= */
@media (max-width: 768px) {
  [class^="sample"] { max-width: 90%; }
  [class^="sample"] .caption { font-size: 1rem; }
}

@media (max-width: 480px) {
  [class^="sample"] { max-width: 95%; }
  [class^="sample"] .caption { font-size: 0.9rem; }
}
