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

  サービス詳細（/souzoku/service/reserved-portion/）
  遺留分侵害額請求

*************************************************/
/* 下層ページ見出し（副題あり。下線は .lead に付ける。イラストは style.css の共通指定） */
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.sv-fee 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 {
    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);

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

  /* 本文 */
  & .sv-intro,
  & .sv-text,
  & .sv-check,
  & section.sv-fee {
    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,
  & section.sv-fee {
    & 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;
    }

    & .wrapper > p: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-text p.sv-formula {
    margin: 22px 0;
    border-radius: 10px;
    padding: 22px 24px;
    background: var(--color-bg-green);
    font-weight: 700;
    line-height: 1.9;
    text-align: center;
  }

  /*----------------------------------
    表（計算例・弁護士費用 共通）
  ----------------------------------*/
  & .sv-table,
  & .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: middle;
    }

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

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

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

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

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

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

  /*----------------------------------
    弁護士費用
  ----------------------------------*/
  & section.sv-fee {
    & .sv-fee-table {
      & tbody th,
      & tbody td {
        padding-top: 20px;
        padding-bottom: 20px;
        vertical-align: top;
      }

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

      & .note {
        display: block;
      }
    }

    & 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: 100%;
    }

    & .qa {
      border-color: #e3e3e3;
    }

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

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

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

    & .qa .body {
      margin: 0 26px;
      border-top-color: #e3e3e3;
      padding: 16px 0 20px;

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

      & p {
        margin: 0 0 8px;
      }

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

@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.sv-fee h2,
    & section.faq h2 {
      margin-bottom: 24px;
    }

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

    & .sv-text p.sv-formula {
      padding: 16px;
      text-align: left;
    }

    /* 表は縦積み（見出し行は非表示） */
    & .sv-table,
    & .sv-fee-table {
      & thead {
        display: none;
      }

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

      & tbody th {
        width: auto;
      }

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

      & tbody tr + tr th {
        border-top: solid 1px #e3e3e3;
      }
    }

    & section.sv-fee {
      & .sv-fee-table {
        & tbody th,
        & tbody td {
          padding-top: 12px;
          padding-bottom: 12px;
        }
      }
    }

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