/* =========================================================
   地域医療支援センター：ページ専用CSS
   ========================================================= */

/* ---------- PC / SP 切り替え ---------- */
.cmsc-role-pc { display: block; }
.cmsc-role-sp { display: none; }

/* ---------- PC：役割図 ---------- */
.cmsc-role-figure { margin: 20px 0 0; }
.cmsc-role-img { width: 100%; height: auto; display: block; }
.cmsc-role-caption { font-size: 0.9em; margin-top: 10px; }

/* ---------- SP ---------- */
@media screen and (max-width: 767px) {

  .cmsc-role-pc { display: none; }
  .cmsc-role-sp { display: block; }

  .cmsc-flow-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* ===== 親（紺） ===== */
  .cmsc-flow-item {
    position: relative;
    padding-left: 44px;
    margin-bottom: 16px;
  }

  /* 縦線 */
  .cmsc-flow-item::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 0;
    bottom: -16px;
    width: 2px;
    background: #1c3f7a;
    opacity: 0.35;
  }

  /* 丸 */
  .cmsc-flow-item::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1c3f7a;
    z-index: 2;
  }

  /* 親カード */
  .cmsc-flow-card {
    display: block;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    position: relative;
  }

  /* 横棒（紺） */
  .cmsc-flow-card::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 22px;
    width: 28px;
    height: 2px;
    background: #1c3f7a;
    opacity: 0.6;
    z-index: 3;
  }

  .cmsc-flow-card__title {
    padding: 12px 14px;
    font-weight: 700;
    background: #eef3f7;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .cmsc-flow-card__text {
    padding: 12px 14px;
  }

  /* ===== 子（オレンジ） ===== */
  .cmsc-flow-sublist {
    list-style: none;
    margin: 10px 0 0;
    padding-left: 22px;
    position: relative;
  }

  .cmsc-flow-sublist::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #f09a3e;
    opacity: 0.45;
  }

  .cmsc-flow-subitem {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
  }

  .cmsc-flow-subitem::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 18px;
    width: 14px;
    height: 2px;
    background: #f09a3e;
    opacity: 0.55;
  }

  .cmsc-flow-subitem::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f09a3e;
  }

  .cmsc-flow-subcard {
    display: block;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
  }

  .cmsc-flow-subcard__title {
    padding: 10px 12px;
    font-weight: 700;
    background: #fff3e5;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .cmsc-flow-subcard__text {
    padding: 10px 12px;
  }
}

/* =========================================================
   tp-media：画像＋テキスト 横並び（PC）／縦並び（SP）
   ========================================================= */

.tp-media {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 20px;
}

.tp-media__body {
  flex: 1 1 40%;
}

.tp-media__img {
  flex: 0 0 60%;
}

.tp-media__img img {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (max-width: 767px) {
  .tp-media {
    flex-direction: column;
    gap: 12px;
  }

  .tp-media__img {
    order: 2;
  }

  .tp-media__body {
    order: 1;
  }
}


/* =========================================================
   アンカーリンク位置補正（固定ヘッダー対策）
   ========================================================= */

/* デフォルト：PC（ヘッダー約160px） */
[id^="anc"] {
  scroll-margin-top: 160px;
}

/* SP（<=768px）：ヘッダー約80px */
@media only screen and (max-width: 768px) {
  [id^="anc"] {
    scroll-margin-top: 80px;
  }
}


/* =========================================================
   マウスオーバー
   ========================================================= */
.cmsc-role-figure {
  position: relative;
}
.map-hover-overlay{
  position:absolute;
  border: 3px solid rgba(255,200,0,0.95);
  background: rgba(255,230,120,0.25);
  box-sizing:border-box;
  pointer-events:none;
  display:none;
  border-radius:4px;
}



