/* HE背景（PC・スマホ両対応） */
.bg-he {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/products/he/background.webp") no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* VM背景（PC・スマホ両対応） */
.bg-vm {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/products/vm/background.webp") no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* ReFa背景（PC・スマホ両対応） */
.bg-refa {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/products/refa/background.webp") no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* コンテンツ（スクロール領域） */
.content {
  position: relative;
  z-index: 1;
  padding: 50px 20px;
  text-align: center;
}

/* 文字画像のベーススタイル */
.text-img {
  display: block;
  height: auto;
  margin: 0 auto 50px auto;
  transition: all 0.3s ease;
}

/* PC・タブレット向け（768px以上） */
@media (min-width: 768px) {
  .text-img {
    max-width: 80%;
    margin: 100px auto;
  }
  
  .content {
    padding: 50px 40px;
  }
}

/* スマートフォン向け（767px以下） */
@media (max-width: 767px) {
  .text-img {
    max-width: 95%;
    width: 95%;
    margin: 30px auto;
  }
  
  .content {
    padding: 20px 10px;
  }
}

/* 大型スマートフォン（iPhone Plus、Max系など）向け */
@media (max-width: 767px) and (min-width: 414px) {
  .text-img {
    max-width: 92%;
    width: 92%;
    margin: 40px auto;
  }
}

/* 小型スマートフォン（iPhone SE系など）向け */
@media (max-width: 413px) {
  .text-img {
    max-width: 98%;
    width: 98%;
    margin: 25px auto;
  }
  
  .content {
    padding: 15px 5px;
  }
}

/* 縦長画面での最適化 */
@media (max-height: 667px) and (max-width: 767px) {
  .text-img {
    margin: 20px auto;
  }
}

/* 画像の読み込み最適化 */
.text-img {
  loading: lazy;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 画像が読み込まれるまでのプレースホルダー */
.text-img:not([src]) {
  background: #f0f0f0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-img:not([src])::before {
  content: "読み込み中...";
  color: #999;
}