/*************************************************

  サービス詳細（/souzoku/service/〇〇/）

*************************************************/
/* 下層ページ見出し（副題あり。下線は .lead に付ける） */
main > header {
  /* タイトルが長いため PC は 32px（指示書の「長い場合」） */
  & h1 {
    color: var(--color-green-dark);
    font-size: 32px;
    line-height: 1.4;
    letter-spacing: 0.08em;
  }

  & .lead {
    margin-top: 16px;
    font-size: var(--font-size-h1-sub);
    line-height: 1.4;
    letter-spacing: 0.05em;

    &::after {
      content: "";
      display: block;
      margin-top: 18px;
      width: 56px;
      height: 3px;
      background: var(--color-green);
    }
  }
}

#contents > article {
  /* 見出し */
  & > h2,
  & section.sv-bg h2,
  & section.faq h2 {
    margin: var(--space-section) auto 36px;
    width: fit-content;
    color: var(--color-green-dark);
    font-size: var(--font-size-h2);
    font-weight: 700;
    line-height: var(--line-height-heading);
    text-align: center;
    letter-spacing: var(--letter-spacing-article);

    &::after {
      content: "";
      display: block;
      margin: 18px auto 0;
      width: 56px;
      height: 2px;
      background: var(--color-heading-line);
    }
  }

  /* 小見出し */
  & section.sv-about h3,
  & .sv-merit h3 {
    display: flex;
    align-items: center;
    gap: 0 12px;
    margin: 40px 0 20px;
    border-bottom: solid 1px var(--color-green-dark);
    padding: 0 0 8px 4px;
    color: var(--color-text);
    font-size: var(--font-size-h3);
    font-weight: 700;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-article);
  }

  & section.sv-about h3::before {
    content: "";
    flex-shrink: 0;
    display: block;
    margin: 0;
    width: 8px;
    height: 8px;
    background: var(--color-green-dark);
  }

  & .sv-merit h3 {
    &::before {
      content: none;
    }

    & .num {
      color: var(--color-green);
      font-size: var(--font-size-h3);
      font-weight: 700;
    }
  }

  /* 本文 */
  & .sv-intro,
  & .sv-text,
  & .sv-check {
    margin-right: auto;
    margin-left: auto;
    width: 832px;
    max-width: 100%;
  }

  & .sv-intro {
    margin-top: 48px;
    margin-bottom: 64px;
  }

  & .sv-intro,
  & .sv-text,
  & section.sv-bg {
    & p {
      margin: 0 0 22px;
      line-height: var(--line-height-article);
    }
  }

  /* CTA の上の導入文（CTA の枠まで 32px） */
  & .sv-cta-lead {
    margin-top: var(--space-section);
    margin-bottom: 32px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  /* 問い合わせバナー（文字サイズは style.css の共通指定） */
  & .widget-inquiry2 {
    width: 832px;
  }

  /*----------------------------------
    こんなお悩みはありませんか？
  ----------------------------------*/
  & ul.sv-check {
    box-sizing: border-box;
    margin-top: 22px;
    margin-bottom: 22px;
    border: solid 1px #e3e3e3;
    border-radius: 10px;
    padding: 20px 32px;
    list-style: none;

    & li {
      position: relative;
      border-bottom: dashed 1px #c3dab7;
      padding: 12px 0 12px 32px;
      line-height: var(--line-height-li);

      &:last-child {
        border-bottom: none;
      }

      &::before {
        content: "";
        position: absolute;
        top: calc(12px + 0.5em);
        left: 8px;
        width: 10px;
        height: 5px;
        border-left: solid 2px var(--color-green);
        border-bottom: solid 2px var(--color-green);
        transform: rotate(-45deg);
      }
    }
  }

  /*----------------------------------
    全幅背景のセクション
  ----------------------------------*/
  & section.sv-bg {
    margin-top: var(--space-section);
    padding: 88px 0;
    background: #f3f8f2;

    & .wrapper {
      margin: 0 auto;
      width: 872px;
      max-width: 100%;
    }

    & h2 {
      margin-top: 0;
    }
  }

  /* 関連ページへのリンク */
  & ul.sv-related {
    margin: 22px 0 0;
    border: solid 1px #e3e3e3;
    border-radius: 10px;
    padding: 0;
    background: #fff;
    list-style: none;

    & li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      border-top: solid 1px #e3e3e3;
      padding: 20px 20px 20px 22px;

      &:first-child {
        border-top: none;
      }
    }

    & .text {
      display: flex;
      flex-direction: column;
      gap: 4px;
      line-height: var(--line-height-li);
    }

    & .case {
      font-weight: 700;
    }

    & .desc::before {
      content: "→ ";
    }

    & a {
      flex-shrink: 0;
    }
  }

  /* 枠線のボタン */
  & ul.sv-related a,
  & .more a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    border: solid 1.5px var(--color-green);
    border-radius: 24px;
    padding: 0 18px;
    height: 48px;
    background: #fff;
    color: var(--color-green-dark);
    font-family: var(--font-b);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: var(--letter-spacing-article);
    text-decoration: none;
    transition: background 0.2s;

    &::after {
      content: "";
      flex-shrink: 0;
      position: static;
      width: 12px;
      height: 10px;
      background: currentColor;
      mask: url(../arrow.min.svg) no-repeat center / contain;
    }

    &:hover {
      background: var(--color-bg-green);
    }
  }

  & .more {
    margin-top: 32px;
    text-align: center;

    & a {
      padding: 0 22px;
      min-width: 0;
    }
  }

  /* 協議→調停→審判 */
  & ol.sv-steps {
    display: flex;
    gap: 36px;
    margin: 22px 0;
    padding: 0;
    list-style: none;

    & li {
      position: relative;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 4px;
      box-sizing: border-box;
      border-radius: 6px;
      padding: 16px;
      min-height: 120px;
      background: var(--color-bg-green);
      color: var(--color-green-dark);
      text-align: center;

      &:not(:last-child)::after {
        content: "";
        position: absolute;
        top: calc(50% - 10px);
        right: -26px;
        border-style: solid;
        border-width: 10px 0 10px 12px;
        border-color: transparent transparent transparent var(--color-green);
      }

      &:last-child {
        background: var(--color-green-dark);
        color: #fff;
      }
    }

    & .name {
      font-size: var(--font-size-h3);
      font-weight: 700;
      line-height: var(--line-height-heading);
      letter-spacing: 0.1em;
    }

    /* 図中の説明（小さめのラベル） */
    & .desc {
      font-size: 16px;
      line-height: 1.6;
    }
  }

  /* 補足（クリーム背景） */
  & .sv-note {
    margin-top: 22px;
    border-radius: 10px;
    padding: 28px 32px;
    background: var(--color-bg-cream);
  }

  & section.sv-bg .sv-note p {
    margin: 0;
  }

  /*----------------------------------
    弁護士に依頼するメリット
  ----------------------------------*/
  & .sv-box {
    margin-top: 22px;
    border-radius: 10px;
    padding: 28px 32px;
    background: var(--color-bg-green);

    & p:last-child {
      margin-bottom: 0;
    }
  }

  /*----------------------------------
    解決事例
  ----------------------------------*/
  & section.sv-case {
    & .item {
      margin: 22px 0;
      border: solid 1px #e3e3e3;
      border-radius: 10px;
      padding: 28px 32px;
      background: #fff;
    }

    /* カード内の h3 */
    & .item h3 {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      margin: 0 0 20px;
      border-bottom: solid 1px #e3e3e3;
      padding: 0 0 16px;
      color: var(--color-green-dark);
      font-size: var(--font-size-h3);
      font-weight: 700;
      line-height: var(--line-height-heading);
      letter-spacing: var(--letter-spacing-article);

      &::before {
        content: none;
      }
    }

    & .badge {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-radius: 2px;
      width: 50px;
      height: 50px;
      background: var(--color-badge);
      color: var(--color-green-dark);
      font-size: 12px;
      font-weight: normal;
      line-height: 1.2;
      letter-spacing: 0.05em;

      & span {
        font-size: 18px;
        font-weight: 700;
      }
    }
  }

  /*----------------------------------
    当事務所が選ばれる理由
  ----------------------------------*/
  & ol.sv-reason {
    margin: 40px auto 0;
    padding: 0;
    width: 778px;
    max-width: 100%;
    list-style: none;
    counter-reset: reason;

    & li {
      position: relative;
      border-bottom: solid 1px #e3e3e3;
      padding: 24px 0 24px 70px;
      counter-increment: reason;

      &:first-child {
        padding-top: 0;
      }

      &:last-child {
        border-bottom: none;
      }

      &::before {
        content: counter(reason);
        position: absolute;
        top: 24px;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        background: var(--color-green-dark);
        color: #fff;
        font-size: 18px;
        font-weight: 700;
      }

      &:first-child::before {
        top: 0;
      }
    }

    /* 見出し風の行（①〜④） */
    & h3 {
      display: block;
      margin: 6px 0 20px;
      border: none;
      padding: 0;
      color: var(--color-green-dark);
      font-size: var(--font-size-h3);
      font-weight: 700;
      line-height: var(--line-height-heading);
      letter-spacing: var(--letter-spacing-article);

      &::before {
        content: none;
      }
    }

    & p {
      margin: 0;
      line-height: var(--line-height-article);
    }
  }

  /* 関連リンク（2列） */
  & ul.sv-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 48px auto 0;
    padding: 0;
    width: 792px;
    max-width: 100%;
    list-style: none;

    & a {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      box-sizing: border-box;
      border: solid 1px #dbe7d6;
      border-radius: 6px;
      padding: 12px 20px;
      height: 100%;
      min-height: 56px;
      color: var(--color-text);
      font-size: 16px;
      font-weight: 700;
      line-height: 1.6;
      letter-spacing: var(--letter-spacing-article);
      text-decoration: none;
      transition: background 0.2s;

      &::after {
        content: "";
        flex-shrink: 0;
        width: 12px;
        height: 10px;
        background: var(--color-green);
        mask: url(../arrow.min.svg) no-repeat center / contain;
      }

      &:hover {
        background: var(--color-bg-green);
      }
    }
  }

  /*----------------------------------
    弁護士費用
  ----------------------------------*/
  & section.sv-fee {
    & .sv-fee-table {
      margin: 0 0 22px;
      border: solid 1px #e3e3e3;
      border-radius: 10px;
      width: 100%;
      overflow: hidden;
      border-collapse: separate;
      border-spacing: 0;
      background: #fff;

      & th,
      & td {
        border-top: solid 1px #e3e3e3;
        padding: 16px 22px;
        font-size: var(--font-size-article);
        line-height: var(--line-height-table);
        text-align: left;
        vertical-align: top;
      }

      & tr:first-child th,
      & tr:first-child td {
        border-top: none;
      }

      & th {
        width: 192px;
        background: #f3f8f2;
        font-weight: 700;
      }

      /* 金額の強調 */
      & strong {
        color: var(--color-green-dark);
        font-size: var(--font-size-h3);
        font-weight: 700;
      }

      & .note {
        display: block;
        font-size: var(--font-size-note);
        line-height: var(--line-height-note);
        color: var(--color-note);
      }

      & small {
        font-size: var(--font-size-note);
        line-height: var(--line-height-note);
        color: var(--color-note);
      }
    }

    & p.att {
      margin: 0 0 22px;
      font-size: var(--font-size-note);
      line-height: var(--line-height-note);
      color: var(--color-note);

      & > span:first-child {
        margin-right: 0;
        color: inherit;
      }
    }
  }

  /*----------------------------------
    よくある質問（文字サイズは style.css の共通指定）
  ----------------------------------*/
  & section.faq {

    & .widget-qa {
      width: 832px;
    }

    & .qa .head {
      padding: 18px 64px 18px 60px;

      &::before {
        top: 18px;
        left: 26px;
      }

      &::after {
        right: 26px;
      }
    }

    & .qa .body {
      margin: 0 26px;
      padding: 16px 0 20px;

      &::before {
        float: left;
        font-weight: 700;
      }

      & p {
        margin: 0 0 8px;
      }

      & .more {
        margin-top: 16px;
        text-align: left;
      }
    }
  }
}

@media screen and (max-width: 768px) {
  main > header {
    & h1 {
      font-size: var(--font-size-h1);
    }

    & .lead {
      margin-top: 8px;

      &::after {
        margin-top: 12px;
        width: 40px;
      }
    }
  }

  #contents > article {
    & > h2,
    & section.sv-bg h2,
    & section.faq h2 {
      margin-bottom: 24px;
    }

    & section.sv-about h3,
    & .sv-merit h3 {
      gap: 0 10px;
      margin: 32px 0 16px;
      padding: 0 0 8px 2px;
    }

    & .sv-intro {
      margin-top: 28px;
      margin-bottom: 40px;
    }

    & .sv-cta-lead {
      margin-bottom: 24px;
      padding: 0;
    }

    & .widget-inquiry2 {
      & .att {
        padding: 0;
      }
    }

    & ul.sv-check {
      padding: 10px 16px;

      & li {
        padding-left: 26px;

        &::before {
          left: 4px;
        }
      }
    }

    & section.sv-bg {
      padding: 56px 10px;
      box-sizing: border-box;
    }

    & ul.sv-related {
      & li {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
      }

      & a {
        align-self: flex-end;
      }
    }

    & ol.sv-steps {
      flex-direction: column;
      gap: 28px;

      & li {
        min-height: 0;

        &:not(:last-child)::after {
          top: auto;
          right: calc(50% - 10px);
          bottom: -22px;
          border-width: 12px 10px 0 10px;
          border-color: var(--color-green) transparent transparent transparent;
        }
      }
    }

    & .sv-note,
    & .sv-box {
      padding: 20px 16px;
    }

    & section.sv-case {
      & .item {
        padding: 20px 16px;
      }

      & .item h3 {
        gap: 12px;
      }

      & .badge {
        width: 42px;
        height: 42px;

        & span {
          font-size: 15px;
        }
      }
    }

    & ol.sv-reason {
      & li {
        padding-left: 52px;

        &::before {
          width: 38px;
          height: 38px;
          font-size: 15px;
        }
      }

      & h3 {
        margin-top: 3px;
        margin-bottom: 12px;
      }
    }

    & ul.sv-links {
      grid-template-columns: 1fr;
      margin-top: 32px;
    }

    & section.sv-fee {
      & .sv-fee-table {
        & th,
        & td {
          display: block;
          padding: 12px 16px;
        }

        & th {
          width: auto;
        }

        & td {
          border-top: none;
        }
      }
    }

    & section.faq {
      & .qa .head {
        padding: 14px 44px 14px 40px;

        &::before {
          top: 14px;
          left: 14px;
        }

        &::after {
          right: 16px;
          width: 14px;
          height: 14px;
          top: calc(50% - 7px);
        }
      }

      & .qa .body {
        margin: 0 14px;
      }
    }
  }
}
