/* ========================================
   セカンドオピニオン診療科ボタン一覧
   ※HTMLは変更しない前提
======================================== */
.second-opinion-department-links{
  list-style: none;
  margin: 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  gap: 16px 18px;
}

.second-opinion-department-links > li{
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.second-opinion-department-links > li::marker{
  content: "" !important;
}

/* ========================================
   共通ピル型ボタン
   ※ li に付いている class 用
======================================== */
.second-opinion-department-links > li.common-pill-button{
  position: relative;
  display: block;

  width: 100%;
  max-width: 280px;
  min-height: 57px;

  margin: 0;
  padding: 0;

  border: 1px solid #1759A5;
  border-radius: 60px;
  background: #fff;

  box-sizing: border-box;
  transition: .2s;
  overflow: hidden;
}

/* li の中の a をボタン全面に広げる */
.second-opinion-department-links > li.common-pill-button > a{
  display: flex;
  align-items: center;
  justify-content: flex-start;

  width: 100%;
  min-height: 57px;
  padding: 0 14px 0 23px;

  color: #1759A5 !important;
  text-decoration: none !important;

  font-size: 20px;
  font-weight: 400;
  line-height: 1;

  box-sizing: border-box;
}

/* 矢印丸 */
.second-opinion-department-links > li.common-pill-button > a::after{
  content: "›";
  margin-left: auto;

  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;

  width: 28px;
  height: 28px;

  border-radius: 50%;
  background: #1759A5;
  color: #fff !important;

  font-size: 20px;
  line-height: 1;
  box-sizing: border-box;

  padding-top: 1px;
  padding-left: 1px;
}

/* 子要素干渉防止 */
.second-opinion-department-links > li.common-pill-button > a *,
.second-opinion-department-links > li.common-pill-button > a:link,
.second-opinion-department-links > li.common-pill-button > a:visited,
.second-opinion-department-links > li.common-pill-button > a:hover,
.second-opinion-department-links > li.common-pill-button > a:focus,
.second-opinion-department-links > li.common-pill-button > a:active{
  color: inherit;
  text-decoration: none !important;
}

/* hover / focus は li と a の両方に対応 */
.second-opinion-department-links > li.common-pill-button:hover,
.second-opinion-department-links > li.common-pill-button:focus-within{
  background: #4F93D8;
  border-color: #4F93D8;
}

.second-opinion-department-links > li.common-pill-button:hover > a,
.second-opinion-department-links > li.common-pill-button:focus-within > a{
  color: #fff !important;
  text-decoration: none !important;
}

.second-opinion-department-links > li.common-pill-button:hover > a::after,
.second-opinion-department-links > li.common-pill-button:focus-within > a::after{
  background: #1759A5;
  color: #fff !important;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 1024px){
  .second-opinion-department-links{
    grid-template-columns: repeat(2, minmax(0, 280px));
  }
}

@media (max-width: 767px){
  .second-opinion-department-links{
    grid-template-columns: 1fr;
  }

  .second-opinion-department-links > li.common-pill-button{
    max-width: 100%;
  }

  .second-opinion-department-links > li.common-pill-button > a{
    font-size: 18px;
  }
}

.befor_secondopinion{
  border-top: 2px solid #1759A5;
  border-bottom: 2px solid #1759A5;
  padding: 28px 0;
  margin: 40px 0;
}

.befor_secondopinion > p:first-of-type{
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: #4A4A4A;
}

.befor_secondopinion > p:first-of-type::before,
.befor_secondopinion > p:first-of-type::after{
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: url("https://towada-chp.jp/wp-content/themes/tch/assets/img/pages/secondopinion_cation.svg") no-repeat center / contain;
}

.befor_secondopinion > p{
  margin: 0;
  font-size: 16px;
  line-height: 2;
  color: #333;
}

.befor_secondopinion > p + p{
  margin-top: 6px;
}

/* ========================================
   セカンドオピニオン：申込手順リスト
======================================== */
.page-content ol.wp-block-list.second-opinion-flow{
  counter-reset: second-opinion-step;
  list-style: none;
  margin: 40px 0;
  padding: 0;
}

.page-content ol.wp-block-list.second-opinion-flow > li{
  position: relative;
  margin: 0 0 54px;
  padding: 26px 40px 26px 96px;

  border: 1px solid #1759A5;
  border-radius: 999px;
  background: #fff;

  font-size: 16px;
  line-height: 1.9;
  color: #2F2F2F;
}

.page-content ol.wp-block-list.second-opinion-flow > li::before{
  counter-increment: second-opinion-step;
  content: counter(second-opinion-step);

  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  border-radius: 50%;

  background: #1759A5;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.page-content ol.wp-block-list.second-opinion-flow > li:not(:last-child)::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);

  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid #1759A5;
}

.page-content ol.wp-block-list.second-opinion-flow > li strong{
  font-weight: 700;
}

.page-content ol.wp-block-list.second-opinion-flow > li a{
  color: #1759A5;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  word-break: break-word;
}

@media (max-width: 767px){
  .page-content ol.wp-block-list.second-opinion-flow{
    margin: 32px 0;
  }

  .page-content ol.wp-block-list.second-opinion-flow > li{
    margin: 0 0 42px;
    padding: 18px 18px 18px 68px;
    border-radius: 28px;

    font-size: 15px;
    line-height: 1.8;
  }

  .page-content ol.wp-block-list.second-opinion-flow > li::before{
    left: 18px;
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .page-content ol.wp-block-list.second-opinion-flow > li:not(:last-child)::after{
    bottom: -20px;
    border-left-width: 13px;
    border-right-width: 13px;
    border-top-width: 20px;
  }
}

/* PDFリンクアイコン */
.page-content a[href$=".pdf"]::after{
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 6px;

  background: url("https://towada-chp.jp/wp-content/themes/tch/assets/img/pages/pdf.svg") no-repeat center / contain;

  vertical-align: middle;
}
