/* 特徴セクション: 上余白 */
.front-features {
  --case-before-color: #7c7c7c;
  padding-top: 80px;
  background: var(--brand-gray-dark);
}

/* 特徴パネル: 黒背景の説明ボックス */
.front-features .features-panel {
  background: var(--brand-gray-dark);
  color: var(--brand-white);
  border-radius: 32px 32px 0 0;
  margin: 0 calc(50% - 50vw);
}

/* 特徴パネル: 背景内のコンテンツ幅 */
.front-features .features-panel-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 54px 64px;
}

/* 特徴パネル: 見出し */
.front-features .features-panel h2 {
  text-align: center;
  font-family: var(--font-title);
  font-style: var(--font-style-mincho-italic);
  font-weight: var(--weight-mincho-regular);
  font-size: 30px;
  margin: 0 0 14px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

/* 特徴パネル: タイトル左の折り鶴 */
.front-features .features-title-orizuru {
  width: 42px;
  height: auto;
  display: block;
}

/* 特徴パネル: リード文の配置 */
.front-features .features-lead-wrap {
  margin-top: 12px;
}

/* 特徴パネル: リード文 */
.front-features .features-lead {
  text-align: left;
  font-size: 15px;
  font-weight: var(--weight-gothic-regular);
  color: var(--brand-gray);
  max-width: 612px;
  margin: 0 auto;
}

/* 図解: 円と矢印の並び */
.front-features .diagram {
  margin: 40px auto 189px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* 図解: 各要素のラッパー */
.front-features .diagram-item {
  text-align: center;
}

/* 図解: 丸いアイコン枠 */
.front-features .diagram-circle {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: var(--brand-white);
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  color: var(--color-text);
}

/* 図解: アイコン画像サイズ */
.front-features .diagram-circle img {
  width: 86px;
  height: 86px;
}

/* 図解: 要素名のラベル */
.front-features .diagram-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  border: 2px solid var(--brand-white);
  background: var(--brand-black);
  color: var(--brand-white);
  font-family: var(--font-gothic);
  font-size: 16px;
  font-weight: var(--weight-gothic-medium);
  line-height: 1.2;
}

/* 図解: 要素をつなぐ線 */
.front-features .diagram-connector {
  width: 60px;
  height: 2px;
  background: var(--brand-orange);
  position: relative;
}

/* 図解: 点線コネクターはPCで非表示 */
.front-features .diagram-connector.dashed {
  display: none;
}

/* 図解: 両端矢印の装飾 */
.front-features .diagram-connector.double::before,
.front-features .diagram-connector.double::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid var(--brand-orange);
  border-left: none;
  border-bottom: none;
  top: -3px;
}

/* 図解: 左側の矢印 */
.front-features .diagram-connector.double::before {
  left: -1px;
  transform: rotate(-135deg);
}

/* 図解: 右側の矢印 */
.front-features .diagram-connector.double::after {
  right: -1px;
  transform: rotate(45deg);
}

/* 図解: 片矢印の装飾 */
.front-features .diagram-connector.single::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--brand-orange);
  border-left: none;
  border-bottom: none;
  transform: rotate(45deg);
}

/* 復学ケース: セクションタイトル */
.front-features .case-title {
  text-align: center;
  font-family: var(--font-gothic);
  margin-top: 0;
  margin-bottom: 20px;
}

/* 復学ケース: もっと見る導線 */
.front-features .case-more {
  text-align: center;
  margin-top: 50px;
}

/* 復学ケース: もっと見るボタンはニュースの矢印ボタン準拠 */
.front-features .case-more .case-more-btn {
  width: 229px;
  box-sizing: border-box;
  justify-content: center;
  gap: 15px;
  padding: 10px 0;
  background: var(--brand-white);
  color: var(--color-text);
  border: none;
}

/* 復学ケース: もっと見る文言の改行制御 */
.front-features .case-more .case-more-text {
  display: block;
  padding-left: 22px;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 768px) {
  /* モバイル: パネル余白と図解の三角配置 */
  .front-features {
    padding-top: 54px;
  }

  .front-features .features-panel {
    border-radius: 15px 15px 0 0;
  }

  .front-features .features-panel-inner {
    padding: 36px 24px;
  }

  /* モバイル: リード文は1文目の後で改行 */
  .front-features .features-lead-break {
    display: block;
  }

  .front-features .diagram {
    position: relative;
    width: min(336px, 100%);
    max-width: 336px;
    aspect-ratio: 336 / 434;
    height: auto;
    margin: 32px auto 83px;
    display: block;
  }

  .front-features .diagram-item {
    position: absolute;
    z-index: 1;
    width: 40.1786%;
    aspect-ratio: 1 / 1;
  }

  /* モバイル: 丸いアイコン枠サイズ */
  .front-features .diagram-circle {
    width: 100%;
    height: 100%;
  }

  .front-features .diagram-circle img {
    width: 63.7037%;
    height: auto;
  }

  .front-features .diagram-item.diagram-consultant {
    top: 0;
    left: 29.7619%;
  }

  .front-features .diagram-item.diagram-parent {
    top: 68.894%;
    left: 0;
  }

  .front-features .diagram-item.diagram-child {
    top: 68.894%;
    left: 59.8214%;
  }

  .front-features .diagram-label {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .front-features .diagram-connector {
    position: absolute;
    height: 2px;
    z-index: 0;
    background: var(--brand-orange);
    transform-origin: left center;
  }

  .front-features .diagram-connector.double {
    width: 27.9762%;
    left: 37.2024%;
    top: 42.6267%;
    transform: rotate(117.6deg);
  }

  .front-features .diagram-connector.dashed {
    display: block;
    width: 27.9762%;
    left: 63.6905%;
    top: 42.6267%;
    background: repeating-linear-gradient(
      90deg,
      var(--brand-orange) 0 6px,
      transparent 6px 12px
    );
    border-top: none;
    transform: rotate(62.4deg);
  }

  .front-features .diagram-connector.single {
    width: 9.5238%;
    left: 45.8333%;
    top: 84.3318%;
  }

  .front-features .diagram-connector.double::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -3px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--brand-orange);
    border-left: none;
    border-bottom: none;
    transform: rotate(-135deg);
  }

  .front-features .diagram-connector.double::after,
  .front-features .diagram-connector.dashed::after,
  .front-features .diagram-connector.single::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -3px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--brand-orange);
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg);
  }

}

@media (min-width: 768px) {
  .front-features {
    padding-bottom: 0;
  }

  .front-features .features-panel-inner {
    padding-bottom: 150px;
  }

  /* 特徴パネル: 見出しサイズ（PC） */
  .front-features .features-panel h2 {
    font-size: 40px;
    margin-bottom: 50px;
  }

  .front-features .features-title-orizuru {
    width: 75px;
  }

  /* PC: リード文を少し左に寄せたまま内側に収める */
  .front-features .features-lead-wrap {
    margin-top: 0;
    padding-right: 32px;
  }

  /* PC: 1文目と2文目の間は改行しない */
  .front-features .features-lead-break {
    display: none;
  }

  /* PC: 図解は円の上端を基準に揃える */
  .front-features .diagram {
    margin-top: 80px;
    align-items: flex-start;
  }

  /* PC: 線を円の中心高さに合わせる */
  .front-features .diagram-connector {
    margin-top: 72px;
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  .front-features .case-more {
    margin-top: 60px;
  }
}
