/* ====== Layout ====== */
.sec-map .container {
  display: flex;
  flex-direction: row-reverse;
  overflow: hidden;
  width: 100vw;;
}
.sec-map .main {
  background: #f0f0ea;
  padding: 4rem 2rem;
  width: 50%;
}
.sec-map .main .h2 {
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: .5em;
  text-align: center;
}
.sec-map .main .map {
  margin: 0 auto;
  max-width: 59rem;
  position: relative;
}
.sec-map .main .map .sol {
  left: 22rem;
  top: 1rem;
  justify-content: center;
  position: absolute;
}
.sec-map .main .map .cowork {
  left: 26rem;
  top: 6rem;
  justify-content: center;
  position: absolute;
}
.sec-map .main .map .sol:hover,
.sec-map .main .map .cowork:hover
{
  transform: translateY(-1px);
	opacity: 0.9;
}
.sec-map .main .map .numbers .number {
  align-items: center;
  background: #726d6b;
  border: solid 1px #fff;
  border-radius: 100%;
  color: #fff;
  display: flex;
  font-size: 1.6rem;
  font-weight: 400;
  height: 2.5rem;
  justify-content: center;
  position: absolute;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  width: 2.5rem;
}
.sec-map .main .map .numbers .number:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
.sec-map .main .sup {
  text-align: center;
}

.sec-map .left {
  align-items: center;
  background-color: #f0f0ea;
  background-image: url(../../images/map/bg.png);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 63.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* opacity: 0; */
  pointer-events: none;
  position: relative;
  transition: opacity .25s ease;
  width: 50%;
}
/* 親 hover / focus 内で出現 */
.sec-map:hover .left, .sec-map:focus-within .left {
  opacity: 1;
  pointer-events: auto;
}
/* モーダル open 中は常時表示 */
.sec-map .left.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sec-map .left .p {
  font-size: 1.6rem;
  line-height: calc(37/16);
  text-align: center;
}

/* ====== Modal base ====== */
.sec-map .left .modal-contents {
  align-items: center;
  display: flex;
  height: 100vh;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 50vw;
}
/* オーバーレイがクリックを受けられるようにしておく */
.sec-map .left .modal-contents .overlay {
  background: rgba(0,0,0,.7);
  inset: 0;                     /* ← 念のため全面に広げる */
  /* どちらかの方式で表示制御 */
  /* A) display切替派： */
  /* display: none; */
  /* B) フェード派（ふわっと表示する場合）： */
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity .3s ease;
}

/* モーダルopen時に有効化 */
.sec-map .left.is-open .modal-contents .overlay {
  /* A) display切替派： display: block; */
  /* B) フェード派： */
  opacity: 1;
  pointer-events: auto;
}
/* モーダル項目：クロスフェード＆“ふわっ” */
.sec-map .left .modal-contents .modal-item {
  align-items: center;
  display: flex !important;      /* display: none は使わない */
  filter: blur(.3px);
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 0 2rem;
  pointer-events: none;
  position: absolute;
  transform: translateY(8px) scale(.985);
  transition: opacity .35s ease,
  transform .45s cubic-bezier(.2,.7,.2,1),
  filter .35s ease;
  will-change: opacity, transform, filter;
  z-index: 0;
}
.sec-map .left .modal-contents .modal-item.active {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 2;
}

/* 切替方向のニュアンス（左右に少し乗せる） */
.sec-map .left[data-dir='next'] .modal-contents .modal-item:not(.active) {
  transform: translateX(16px) scale(.985);
}
.sec-map .left[data-dir='prev'] .modal-contents .modal-item:not(.active) {
  transform: translateX(-16px) scale(.985);
}

/* カード本体 */
.sec-map .left .modal-contents .modal-item .modal-container {
  background: #fff;
  box-shadow: 0 2rem 4rem rgba(0,0,0,.16);
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  justify-content: space-between;
  max-width: 50rem;
  padding: 2rem 5rem 4rem;
  position: relative;
}

.sec-map .left .modal-contents .modal-item .number {
  align-items: center;
  background: #ffff;
  border-radius: 0 0 .5rem 0;
  display: flex;
  height: 3.5rem;
  justify-content: center;
  left: 5rem;
  position: absolute;
  top: 2rem;
  width: 3.5rem;
}
.sec-map .left .modal-contents .modal-item .number span {
  align-items: center;
  align-items: center;
  background: #726d6b;
  border-radius: 100%;
  color: #fff;
  display: flex;
  font-size: 1.6rem;
  font-weight: 500;
  height: 2.3rem;
  justify-content: center;
  text-align: center;
  width: 2.3rem;
}
.sec-map .left .modal-contents .modal-item.active .number span {
  background: #517251;
}

/* サムネ・カテゴリ・ロゴ */
.sec-map .left .modal-contents .modal-item .thumb {
  aspect-ratio: 415/251;
  overflow: hidden;
  width: 100%;
}
.sec-map .left .modal-contents .modal-item .thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.sec-map .left .modal-contents .modal-item .thumb img {
  transition: opacity 0.3s ease;
}
.sec-map .left .modal-contents .modal-item .thumb .thumb-link:hover img {
  opacity: 0.8;
}
.sec-map .left .modal-contents .modal-item .txt .link {
  color: #726d6b;
  font-size: 1.2rem;
  font-weight: 400;
  text-align: center;
  transition: .3s;
}
.sec-map .left .modal-contents .modal-item .txt .link:hover {
  opacity: .7;
}
.sec-map .left .modal-contents .modal-item .txt .cats {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.sec-map .left .modal-contents .modal-item .txt .cats .cat {
  display: flex;
  gap: .5rem;
}
.sec-map .left .modal-contents .modal-item .txt .cats .cat .icon {
  width: 2.7rem;
}
.sec-map .left .modal-contents .modal-item .txt .cats .cat .txt {
  color: #726d6b;
  font-size: 1.2rem;
  font-weight: 400;
}
.sec-map .left .modal-contents .modal-item .logo {
  flex-grow: 2;
  margin-top: 1rem;
}
.sec-map .left .modal-contents .modal-item .logo .img {
  height: 9rem;
  max-width: 15rem;
  width: 100%;
}
.sec-map .left .modal-contents .modal-item .logo .img img {
  width: auto;              /* 横幅を自動にして比率維持 */
  height: auto;             /* 高さ100%を解除して自然拡大 */
  max-width: 130px;         /* ロゴの最大サイズ（好みに合わせて調整） */
  object-fit: contain;      /* 元の比率を維持 */
  object-position: center;  /* 中央寄せ */
  display: block;
  margin: 0 auto;           /* 中央揃え */
}
/*.sec-map .left .modal-contents .modal-item .logo .img img {
  height: 100%;
  object-fit: contain;
  object-position: center left;
  width: 100%;
}*/


/* 閉じる */
.sec-map .left .modal-contents .modal-item .close {
  align-items: center;
  background: #c1c1c1;
  border-radius: 10rem;
  bottom: 1.5rem;
  bottom: 1rem;
  display: flex;
  font-size: 1.2rem;
  font-weight: 400;
  height: 2rem;
  justify-content: center;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  transition: .3s;
  width: 6.4rem;
  z-index: 3;
}
.sec-map .left .modal-contents .modal-item .close:hover {
  background: #000;
  color: #fff;
}

/* 矢印ナビ（JSで自動挿入） */
.sec-map .left .modal-contents .modal-item .nav-btn {
  background-image: url(../../images/map/prev.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 99%;
  border-radius: 100%;
  bottom: 0;
  font-size: 0;
  height: 3rem;
  margin: auto;
  position: absolute;
  top: 0;
  transition: .3s;
  width: 3rem;
  z-index: 4;
}
.sec-map .left .modal-contents .modal-item .nav-btn svg {
  opacity: 0;
}
.sec-map .left .modal-contents .modal-item .nav-btn:hover {
  opacity: .7;
}
.sec-map .left .modal-contents .modal-item .nav-btn.prev {
  left: 1rem;
}
.sec-map .left .modal-contents .modal-item .nav-btn.next {
  right: 1rem;
  transform: rotate(180deg);
}

/* 番号アクティブ見た目 */
.sec-map .main .map .numbers .number.active {
  background: #517251;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

/* 重なり順の安全策 */
.sec-map .main {
  position: relative;
  z-index: 1;
}
.sec-map .left {
  z-index: 999;
}
.sec-map .left .modal-contents .overlay {
  z-index: 1;
}
.sec-map .left .modal-contents .modal-item {
  z-index: 2;
}

/* アニメーションが苦手な環境の配慮 */
@media (prefers-reduced-motion: reduce) {
  .sec-map .left, .sec-map .left .modal-contents .overlay, .sec-map .left .modal-contents .modal-item, .sec-map .main .map .numbers .number {
    transition: none !important;
  }
}

/* SPレイアウト */
@media (max-width: 850px) {
  .sec-map .container {
    flex-direction: column;
    position: relative;
    width: 100vw;
  }
  .sec-map .main {
    padding: 34rem 1rem 4rem ;
    width: 100%;
  }
  .sec-map .main .h2 {
    font-size: 2.8rem;
  }
	
  /* 両ボタンの高さを統一し、縦基準で縮小 */
  .sec-map .main .map .sol img,
  .sec-map .main .map .cowork img {
    height: 22px;  /* ← 高さを基準に統一（例: 40px〜50px） */
    width: auto;   /* 比率維持 */
    display: block;
  }
  /* 位置調整 */
  .sec-map .main .map .sol {left: 8.5rem;top: 1.1rem;
  }
  .sec-map .main .map .cowork {left: 16.5rem;top: 4.1rem;
  }
  .sec-map .main .map .numbers .number {
    border: solid .1rem #fff;
    display: flex;
    font-size: 1.2rem;
    height: 1.6rem;
    width: 1.6rem;
  }
  .sec-map .main .sup {
    font-size: 1.4rem;
  }

  .sec-map .left {
    background-image: none;
    opacity: 1;
    padding: 4rem 0;
    pointer-events: all;
    width: 100%;;
  }
  .sec-map .left .p {
    background-image: url(../../images/map/bg_sp.png);
    background-position: top right .5rem;
    background-repeat: no-repeat;
    background-size: 40.8rem;
    padding: 6rem 0;
    position: absolute;
    top: -63rem;
    width: 100vw;
  }
  /* ====== Modal base ====== */
  .sec-map .left .modal-contents {
    height: auto;
    height: 38rem;
    margin-top: -7rem;
    position: relative;
    top: 0;
    touch-action: pan-y;
    width: 100%;
  }
  .sec-map .left .modal-contents .overlay {
    display: none;
  }
  .sec-map .left .modal-contents .modal-item {
    padding: 0 3rem;
  }
  .sec-map .left .modal-contents .modal-item .modal-container {
    gap: 0;
    padding: 1rem;
  }
  .sec-map .left .modal-contents .modal-item .number {
    left: 1rem;
    top: 1rem;
  }
  .sec-map .left .modal-contents .modal-item .cats .cat .icon {
    width: 2.3rem;
  }
  .sec-map .left .modal-contents .modal-item .cats .cat .txt {
    font-size: 1.2rem;
  }
  /* 閉じる */
  .sec-map .left .modal-contents .modal-item .close {
    display: none;
  }
  /* 矢印ナビ（JSで自動挿入） */
  .sec-map .left .modal-contents .modal-item .nav-btn {
    background-color: #fff;
    height: 3rem;
    width: 3rem;
  }
  .sec-map .left .modal-contents .modal-item .nav-btn.prev {
    left: -1.5rem;
  }
  .sec-map .left .modal-contents .modal-item .nav-btn.next {
    right: -1.5rem;
  }
}


