/*
Theme Name: Will Style Theme
Theme URI: https://www.willstyle.co.jp
Author: Will Style Inc.
Author URI: https://www.willstyle.co.jp
Description: 
Version: 2.0
*/

/* ========================================================
   トップページ ファーストビュー動画エリア用CSS
   ======================================================== */
.hero--content {
  margin-top: 40px; /* 各パーツが上すぎるため全体を少し下げる */
}

/* hero--img内のレイアウト設定 */
.hero--img {
  margin-top: -20px; /* 動画及びフレームを少し上に配置 */
  padding-left: 30px; /* hero--contentとhero--imgの間に少しスペースを入れる */
}
.hero--movie-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* メインモニター */
.hero--main-monitor {
  position: relative;
  width: 75%;
  margin-left: auto;
  z-index: 2;
}

.hero--monitor-frame {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

/* 動画の枠 */
.hero--movie-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* 動画の比率 */
  padding: 2%; /* 枠の太さ */
  background-color: #212327; /* 枠の色 */
  border: 1px solid #d1d5db;
  border-radius: 12px; /* 枠全体の角丸 */
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 枠の影 */
  z-index: 3;
}
.hero--movie-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px; /* 画面内側（映像）の角丸 */
  display: block;
}

/* サブモニター */
.hero--sub-monitor {
  position: absolute;
  bottom: calc(-5% + 30px);
  left: 0;
  width: 25%; /* PC版は過去の程よい大きさに戻す */
  z-index: 3;
}

/* PC版：サブモニターを動画幅の約3分の1で左下に重ねる */
@media (min-width: 1200px) {
  .hero--inner {
    align-items: flex-end;
  }
  .hero--movie-wrapper {
    transform: none;
  }
  .hero--main-monitor {
    width: 92.625%;
    transform: translateX(50px);
  }
  .hero--sub-monitor {
    bottom: calc(-5% - 20px);
    left: calc(12% - 75px);
    width: 33.301125%;
  }
  .hero--floating-icon {
    transform: scale(1.235475);
    transform-origin: center;
  }
}

/* 浮遊するアイコン */
.hero--floating-icon {
  position: absolute;
  z-index: 3;
  width: 15%; /* ベースサイズ */
}
/* アイコン個別の位置設定（完成イメージに基づく概算） */
.hero--floating-icon.icon-01 {
  top: calc(-8% - 30px);
  left: -10%;
} /* 左上の歯車など */
.hero--floating-icon.icon-02 {
  top: calc(15% - 30px);
  right: -5%;
  width: 18%; /* 12%から少し大きく調整 */
} /* 右上のサーバーなど */
.hero--floating-icon.icon-03 {
  bottom: 30%;
  right: -8%;
  width: 12%;
} /* 右下のクラウドなど */
.hero--floating-icon.icon-04 {
  bottom: -10%;
  left: 30%;
} /* 中央下部のロボットなど */

@media (min-width: 1200px) {
  .hero--floating-icon.icon-01 {
    top: calc(-8% + 45px);
    left: calc(-10% - 20px);
    width: 14.55%;
  }
  .hero--floating-icon.icon-02 {
    top: calc(15% + 40px);
    width: 20%;
  }
}

/* heroエリア全体の上下バランス調整 */
#hero--wrapper {
  padding-bottom: 4%; /* 背景の下にくっつかないようにスペースを追加 */
}

/* スマホ用のお問い合わせボタンとコンテナはPCでは非表示 */
.hero--content-sp {
  display: none;
}

/* レスポンシブ時の並び順（タブレット・スマホ表示） */
@media (max-width: 1199.98px) {
  #hero--wrapper {
    height: auto !important; /* コンテンツが上に溢れて見えなくなるのを防ぐ */
    justify-content: flex-start !important;
    padding-top: 0 !important; /* 固定ヘッダーとの余白を上へ詰める */
    padding-bottom: 0 !important; /* ヒーローの青地を元に戻す(50px短くする) */
  }
  .hero--inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding-top: 16px !important;
  }
  .hero--content {
    flex: auto !important; /* PC用の横幅480px指定が縦幅になってしまうのをリセット */
    width: 100% !important;
    margin-top: 0 !important; /* PC用のmargin-top: 40pxをリセットして上に詰める */
    margin-bottom: 20px;
  }
  .hero--content-sp {
    display: block !important;
    margin-top: 0 !important; /* 全体用のmargin-top:40pxをリセットし動画とくっつける */
    margin-bottom: 0 !important;
  }
  .hero--img {
    width: 100% !important;
    margin-top: 10px !important; /* コピーと動画の間の余白を詰める */
    margin-bottom: 0 !important; /* 動画と下のボタンをくっつける */
    padding-left: 0 !important; /* PC用の左余白をリセット */
  }
  /* PC用ボタンを隠し、スマホ用ボタンを表示 */
  .hero--contact-pc {
    display: none !important;
  }
  #hero--wrapper .hero--inner .hero--content .hero--contact.hero--contact-sp {
    display: flex !important;
    flex-direction: column;
    gap: 3px !important; /* ボタン同士の間隔を半分に(3px) */
    width: calc(100% - 30px) !important; /* 左右マージン */
    margin-top: 6px !important; /* 動画とボタンの間隔 */
    margin-bottom: 0px !important; /* 下の要素を自然に配置 */
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 6px 20px !important; /* 白下地の上下余白を6px、左右余白を20pxに */
    inset: auto !important;
    position: relative !important;
    z-index: 10;
    border-radius: 12px !important; /* 角丸下地 */
    background: #fff !important; /* 白いボタン下地を復活 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important; /* 影 */
    box-sizing: border-box !important;
  }
  .p-index__intro {
    padding-top: 34px !important; /* 高さを4分の3にし、中央配置 */
    padding-bottom: 34px !important; /* 高さを4分の3にし、中央配置 */
  }
  .hero--main-monitor {
    width: 90% !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 767.98px) {
  #hero--wrapper {
    background: linear-gradient(
      to bottom,
      #008cee 0,
      #008cee calc(100% - 102px),
      #f8f8f8 calc(100% - 102px),
      #f8f8f8 100%
    ) !important;
  }
  #hero--wrapper::after {
    clip-path: inset(0 0 102px 0);
  }
  .hero--inner {
    padding-top: 12px !important;
  }
  .hero--sub-monitor {
    display: none !important;
  }
  #hero--wrapper .hero--inner .hero--content .hero--contact.hero--contact-sp {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
  .hero--floating-icon {
    transform: scale(1.44);
    transform-origin: center;
  }
  .hero--floating-icon.icon-01 {
    top: -8%;
  }
  .hero--floating-icon.icon-02 {
    top: 15%;
  }
  .hero--content {
    margin-bottom: 8px;
  }
  .hero--img {
    margin-top: 0 !important;
  }
  .p-index__intro {
    padding-top: 34px !important; /* 高さを4分の3にし、中央配置 */
    padding-bottom: 34px !important; /* 高さを4分の3にし、中央配置 */
  }
}
