/* =============================================
 * Function Section - 最終FIX
 * ============================================= */

#function > .page-title {
  font-weight: 700;
  /* font-size: 48px; */
  font-size: 40px;
  letter-spacing: 0.05em;
  line-height: 66px;
  text-align: center;
  margin: 104px 0 56px;
  color: #000;
}
#function > .page-title span {
  display: block;
  font-size: 19px;
  letter-spacing: 0.025em;
  line-height: 32px;
  font-weight: 500;
  /* text-transform: uppercase; */
  /* font-family: "Plus Jakarta Sans", sans-serif; */
  font-family: 'Oswald', sans-serif;
}

/* 機能紹介セクションの全体ラッパー（PCでは2カラム） */
#function .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  align-items: stretch; /* グリッドアイテムの高さを揃える */
}

/* WordPressが自動挿入する不要なpタグを非表示にする */
#function .wrap > p {
  display: none;
}

/* 各機能ブロックのコンテナ */
.function {
  display: flex;
  flex-direction: column; /* 子要素を縦に並べる */
  gap: 24px;
  margin-block-end: 112px;
}
.function:last-child {
  margin-block-end: 0;
}
.function:nth-of-type(5){
  margin-block-end: 0;
}
/* 画像エリア */
.func01 {
  width: 100%;
}

.function img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* テキストコンテンツのコンテナ(.func02) */
.function {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4; 
  gap: 24px;
}

/* h3 タイトル */
.function h3 {
  font-size: 32px;
  font-weight: bold;
  line-height: 1;
  margin: 0;
}

.function h3 span {
  /* font-family: "Plus Jakarta Sans", "Noto Sans JP", sans-serif; */
  font-family: 'Oswald', sans-serif;
  /* font-weight: 700; */
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 16px;
  display: block;
  color: #aaa;
  /*line-height: 1;*/
  margin-bottom: 8px;
}

/* p 説明文 */
.func_p {
  font-size: 14px;
  margin: 0;
  padding: 0;
  border: none;
  flex-grow: 1; /* ★この要素が伸びて、下の要素を押し下げる */
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* 「活用ポイント」セクションのグレーのボックス */
.key-points {
  background-color: #f6f6f6;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* h4 「活用ポイント」タグ */
.function h4 {
  display: inline-block;
  width: auto;
  padding: 4px 12px;
  background: #333;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
}

/* ul ポイント一覧 */
.function ul {
  margin-top: 16px;
  list-style: disc;
  margin-left: 20px;
  line-height: 160%;
  font-size: 16px;
  font-weight: bold;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.function ul li {
  position: relative;
  margin-bottom: 10px;
}
.function ul li::before {
  content: "";
  position: absolute;
  top: .6em;
  left: -16px;
  background: #333;
  width: 6px;
  height: 6px;
  border-radius: 100%;
}
/* =============================================
 * Responsive for Function Section
 * ============================================= */
@media screen and (max-width: 767px) {
  /* SPでは1カラムにする */
  #function .wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .func_p {
    flex-grow: 0; /* SPでは伸ばさない */
  }

  /* 以下、SP用のスタイル調整 */
  .function {
    display: block;
  }
  .func01,
  .func02 {
    width: 100%;
  }
  .key-points {
    padding: 20px;
    margin-top: 15px;
  }
  .function h3 {
    font-size: 28px;
    margin-bottom: 16px;
    margin-top: 16px;
  }
  .function h3 span {
    font-size: 14px;
  }
  .function h4 {
    font-size: 14px;
  }
  .function ul {
    font-size: 14px;
    margin-top: 12px;
  }
  .func_p {
    font-size: 14px;
    margin-top: 16px;
    margin-bottom: 24px;
  }
  #function > .page-title {
    margin: 64px 0 40px;
    /* font-size: 40px; */
    font-size: 32px;
    line-height: 1;
    font-weight: 500;
  }
  #function > .page-title span {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 11px;
  }
  .function {
  margin-block-end: 56px;
}
  .function:nth-of-type(5){
  margin-block-end: 56px;
}
}

/* ---- Equalize key-points box height per row (PC) ---- */
@media screen and (min-width: 768px) {
  /* 文章は自然高さ、ポイントボックスが伸びて揃う */
  .function .func_p {
    flex-grow: 0;
  }
  .function .key-points {
    /* flex-grow: 1; を削除し、高さ制御をJSに一本化 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================
 * Function List Section
 * ============================================= */

#function-list {
  padding-top: 40px;
  padding-bottom: 120px;
}

#function-list .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* WordPressが自動挿入する不要なpタグを非表示にする */
#function-list .wrap > p {
  display: none;
}

#function-list .section-title {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 0;
}

#function-list .section-title span {
  display: block;
  font-size: 19px;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
  color: #aaa;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
}

#function-list .section-title h2 {
  /* font-size: 48px; */
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-top: 11px;
  color: #000000;
}

.function-card {
  background-color: #fff;
  border: 1px solid #eeeeee;
  border-radius: 16px;
  padding: 32px;
  align-items: flex-start;
  text-align: left;
}

.function-card {
  align-items: flex-start;
  text-align: left;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 16px 0;
  width: 100%;
  text-align: left;
  line-height: 1.6;
}

.card-description {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  text-align: left;
  flex-grow: 0;
}

/* =============================================
 * Responsive for Function List Section
 * ============================================= */
@media screen and (max-width: 1024px) {
  #function-list .wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  #function-list {
    padding: 64px 0;
  }

  #function-list .section-title {
    margin-bottom: 0;
  }

  #function-list .section-title h2 {
    /* font-size: 40px; */
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 23px;
  }

  #function-list .section-title span {
    font-size: 15px;
  }

  #function-list .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .function-card {
    padding: 32px;
  }
}

@media screen and (max-width: 1023px) {
  body.page-id-32 .sec_wallper {
    padding-bottom: 0;
  }

  #function.sec_wallper {
    padding-bottom: 16px;
  }
}

/* =============================================
 * Function Section – remove fixed inline sizes
 * ============================================= */
@media screen and (max-width: 767px) {
  .function .func_p {
    min-height: 0 !important;
  }
  .function .key-points {
    height: auto !important;
  }
}
