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

  サービス詳細（/souzoku/service/will/）
  遺言書作成・生前対策

*************************************************/
/* 下層ページ見出し（副題あり。下線は .lead に付ける） */
main > header {
  & .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);
    }
  }

  /* 小見出し（■ 付き／番号付き） */
  & .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);
  }

  & .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 {
    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;
  }

  /*----------------------------------
    全幅背景のセクション
  ----------------------------------*/
  & 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;
    }

    & .wrapper > :last-child {
      margin-bottom: 0;
    }
  }

  /* 枠線のボタン（関連ページへ） */
  & .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 22px;
    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;
  }

  /* 本文中のボタン（次の見出しまでの余白） */
  & .sv-merit .more {
    margin: 10px 0 56px;

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

  /*----------------------------------
    弁護士費用
  ----------------------------------*/
  & 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: 20px 22px;
        font-size: var(--font-size-article);
        line-height: var(--line-height-table);
        text-align: left;
        vertical-align: middle;
      }

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

      & tbody th {
        width: 38%;
        background: #f3f8f2;
        font-weight: 700;
        vertical-align: top;
      }

      & td {
        border-left: solid 1px #e3e3e3;
      }

      /* 表の見出し行（濃い緑） */
      & thead th {
        padding: 14px 22px;
        background: var(--color-green-dark);
        color: #fff;
        font-size: 16px;
        font-weight: 700;

        & + th {
          border-left: solid 1px rgba(255, 255, 255, 0.3);
        }
      }

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

    & 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;
      }
    }

    & .wrapper > .more:last-child {
      margin-bottom: 0;
    }
  }

  /*----------------------------------
    よくある質問（文字サイズは 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;
      }
    }
  }
}

@media screen and (max-width: 768px) {
  main > header {
    & .lead {
      margin-top: 8px;

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

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

    & .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;
      }
    }

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

    & .more a {
      padding: 0 18px;
    }

    & .sv-merit .more {
      margin: 0 0 40px;
    }

    & section.sv-fee {
      & .sv-fee-table {
        /* SP は見出し行を出さず、項目→費用の縦並び */
        & thead {
          display: none;
        }

        & th,
        & td {
          display: block;
          padding: 12px 16px;
        }

        & tbody th {
          width: auto;
          border-top: solid 1px #e3e3e3;
        }

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

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

        & strong {
          font-size: 18px;
        }
      }
    }

    & 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;
      }
    }
  }
}
