
/* ==================================
   MAP 共通ベース（PC / SP）
================================== */

/* コンテナ共通 */
.map-container {
  position: relative;
  max-width: 80%;
  margin: 0 auto;
  border-radius: 18px;
  overflow: visible;
  background: #eaf6fb;
  box-shadow: 0 2px 16px #0eb0e014;
  padding: 12px;
}

/* PC用メインマップ画像 */
.map-image {
  width: 100%;
  display: block;
}

/* SP用マップ画像 */
.map-image-sp {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ピン（デフォルトは PC アニメ用：非表示） */
.map-container .pin {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 100px;
  cursor: pointer;
  z-index: 2;
  /*opacity: 0;*/
}

/* PC でスクロールインしたら .animate が付く前提 */
.map-container .pin.animate {
  animation: drop 1s ease-out forwards;
  opacity: 1;
}

/* ピンの位置（PC / SP 共通の割合） */
.pin01 {
  top: 72%;
  left: 10%;
}

.pin02 {
  top: 60%;
  left: 88%;
}


/* 落下アニメーション */
@keyframes drop {
  0% {
    transform: translate(-50%, -300%);
    opacity: 0;
  }
  70% {
    transform: translate(-50%, -90%);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -100%);
  }
}

/* ツールチップの基本スタイル（狭め画面に合わせたサイズ） */
.projection-film .tooltip {
  position: absolute;
  left: 50%;
  bottom: 5%;                    /* マップより少し下側に逃がす */
  transform: translate(-50%, 0);   /* 上下のズレをなくす */
  display: none;
  z-index: 3;

  width: min(480px, 80vw);         /* 画面に合わせて自動で縮む */
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid #ccc;

  background-image: linear-gradient(
      129deg,
      rgba(95, 95, 95, 1),
      rgba(180, 180, 180, 1) 20%,
      rgba(124, 124, 124, 1) 38%,
      rgba(156, 156, 156, 1) 53%,
      rgba(129, 129, 129, 1) 69%,
      rgba(190, 190, 190, 1) 82%,
      rgba(132, 132, 132, 1)
    ),
    linear-gradient(145deg, rgba(233, 233, 233, 1) 48%, rgba(0, 0, 0, 1)),
    linear-gradient(145deg, rgba(233, 233, 233, 1) 48%, rgba(0, 0, 0, 1));
}

.projection-film .tooltip img,
.projection-film .tooltip video {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* マウスがツールチップの上に移っても消えないように */
.projection-film .pin:hover + .tooltip,
.projection-film .tooltip:hover {
  display: block;
}


.projection-film .tooltip p {
  color: #fff;
}

/* 画面が狭くなったときのツールチップ調整（PC幅用） */
@media (max-width: 1200px) and (min-width: 769px) {
  .projection-film .tooltip {
    /* マップの下側に出す */
    bottom: 5%;                 /* 元は bottom: 0% くらい */
    transform: translate(-50%, 0);

    /* 少しコンパクトに */
    width: min(480px, 80vw);
    padding: 6px 10px;
    border-radius: 14px;
  }

  .projection-film .tooltip img,
  .projection-film .tooltip video {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }

  .projection-film .tooltip p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}

/* ==================================
   MAP（SP用セクション）
================================== */

.map-section--sp {
  padding: 32px 16px;
}

.map-title-sp {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 16px;
}

/* 施工一覧リスト */
.map-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.map-point {
  font-size: 1.2rem;
  line-height: 1.6;
}

.map-text {
  flex: 1;
}

.map-name {
  font-size: 1rem;
  font-weight: 600;
}

.map-address {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* SPだけ pin hover→リスト強調 */
@media (max-width: 768px) {
  body:has(#pin2:hover) #map-item-saijo {
    transform: scale(1.05);
    background-color: rgba(12, 245, 182, 0.18);
    box-shadow: 0 0 12px rgba(12, 245, 182, 0.35);
  }

  body:has(#pin1:hover) #map-item-orizuru {
    transform: scale(1.05);
    background-color: rgba(12, 245, 182, 0.18);
    box-shadow: 0 0 12px rgba(12, 245, 182, 0.35);
  }

  body:has(#pin2:hover) #map-item-saijo .map-name,
  body:has(#pin1:hover) #map-item-orizuru .map-name {
    font-size: 1.05rem;
    font-weight: 700;
  }
}


/* ==================================
   SP版マップ：ピンも drop アニメ（最終上書き）
   ※ このブロックは CSS ファイルの一番最後に置いてください
================================== */
@media (max-width: 768px) {
  /* SPマップコンテナの調整 */
  #proj-map-sp .map-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0; /* お好みで */
  }

  /* SP ピン：drop アニメ（読み込み時に落ちてくる） */
  #proj-map-sp .map-container .pin {
    position: absolute;
    width: 70px;       /* SPで少し小さめ */
    z-index: 10;
    cursor: pointer;

    /* ここでベースの .map-container .pin を上書き */
    transform: translate(-50%, -300%);
    /*opacity: 0 !important;*/
    animation: drop 0.9s ease-out forwards;
  }

  /* 位置は PC と同じ割合でOK */
  #proj-map-sp .pin01 {
    top: 72%;
    left: 10%;
  }

  #proj-map-sp .pin02 {
    top: 60%;
    left: 88%;
  }

}