/* ======================= */
/* common */

/* single.cssでthe_content出力部分すべて + editorの共通部分のみ記入
（すべてのeditorに反映されるため、ページ分岐はCSSクラスで管理）*/
/* ======================== */

/* ニュース投稿画面で使用中
フロントデザイン用クラス名：
  .news-single__contents
エディタのみクラス例：
  .post-type-news .editor-styles-wrapper */

/* コラム投稿画面で使用中
フロントデザイン用クラス名：
  .column-single__contents
エディタのみクラス例：
  .post-type-column .editor-styles-wrapper */

.news-single__container {
  margin-top: 5rem;
}

.news-single__contents,
.column-single__contents {
  display: grid;
  row-gap: 40px;
  padding-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}

.news-single__contents :where(a) {
  text-decoration: underline;
}

.column-single__contents,
.post-type-column .editor-styles-wrapper .wp-block-post-content,
.news-single__contents,
.post-type-news .editor-styles-wrapper .wp-block-post-content {
  border-top: 1px solid var(--colorGray350);
  position: relative;
}

.column-single__contents::after,
.post-type-column .editor-styles-wrapper .wp-block-post-content::after,
.news-single__contents::after,
.post-type-news .editor-styles-wrapper .wp-block-post-content::after {
  content: "";
  background-color: var(--colorRed);
  width: 7.5rem;
  height: 1px;
  position: absolute;
  top: -1px;
  left: 0;
}

.column-single__contents h2,
.post-type-column .editor-styles-wrapper h2,
.news-single__container h2,
.post-type-news .editor-styles-wrapper h2 {
  border-left: 1px solid var(--colorRed);
  letter-spacing: 0.05em;
  line-height: 1.5;
  font-size: 2rem;
  font-weight: 700;
  padding-left: 2rem;
  margin-top: 2.5rem;
}

.column-single__contents h3,
.post-type-column .editor-styles-wrapper h3,
.news-single__container h3,
.post-type-news .editor-styles-wrapper h3 {
  border-bottom: 1px solid var(--colorGray350);
  letter-spacing: 0.05em;
  line-height: 1.5;
  font-size: 1.75rem;
  font-weight: 700;
  padding-bottom: 1.5rem;
  margin-top: 2.5rem;
}

.column-single__contents h4,
.post-type-column .editor-styles-wrapper h4,
.news-single__container h4,
.post-type-news .editor-styles-wrapper h4 {
  background-color: var(--colorBg);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 0.5em 1em;
  margin-top: 2.5rem;
  white-space: normal;
  overflow-wrap: break-word;
}

.column-single__contents p,
.post-type-column .editor-styles-wrapper p,
.news-single__container p,
.post-type-news .editor-styles-wrapper p {
  line-height: 2;
  font-weight: 400;
}

/* 丸リスト */
.column-single__contents ul li,
.post-type-column .editor-styles-wrapper ul li,
.news-single__container ul li,
.post-type-news .editor-styles-wrapper ul li {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  padding-left: 1.5rem;
  position: relative;
}

.column-single__contents ul li + li,
.post-type-column .editor-styles-wrapper ul li + li,
.news-single__container ul li + li,
.post-type-news .editor-styles-wrapper ul li + li {
  margin-top: 1rem;
}

.column-single__contents ul li::before,
.news-single__container ul li::before {
  content: "";
  background-color: var(--colorRed);
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  position: absolute;
  opacity: 0.2;
  width: 1rem;
  height: 1rem;
  top: 0.2925rem;
  left: 0;
}

.column-single__contents ul li::after,
.news-single__container ul li::after {
  content: "";
  background-color: var(--colorRed);
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  top: 0.5425rem;
  left: 0.25rem;
}

/* 数字リスト */
.column-single__contents ol,
.post-type-column .editor-styles-wrapper ol,
.news-single__container ol,
.post-type-news .editor-styles-wrapper ol {
  counter-reset: first-list;
}

.column-single__contents ol li + li,
.post-type-column .editor-styles-wrapper ol li + li,
.news-single__container ol li + li,
.post-type-news .editor-styles-wrapper ol li + li {
  margin-top: 1rem;
}

.column-single__contents ol li,
.post-type-column .editor-styles-wrapper ol li,
.news-single__container ol li,
.post-type-news .editor-styles-wrapper ol li {
  counter-increment: first-list;
  padding-left: 1.5rem;
  line-height: 1.8;
  position: relative;
}

.column-single__contents ol li::after,
.post-type-column .editor-styles-wrapper ol li::after,
.news-single__container ol li::after,
.post-type-news .editor-styles-wrapper ol li::after {
  color: var(--colorRed);
  content: counter(first-list);
  font-family: var(--familyRoboto);
  font-size: 1.125rem;
  font-weight: 700;
  left: 0.1rem;
  line-height: 1.5;
  position: absolute;
  top: 0.1rem;
}

.column-single__contents ol li > ol,
.post-type-column .editor-styles-wrapper ol li > ol,
.news-single__container ol li > ol,
.post-type-news .editor-styles-wrapper ol li > ol {
  counter-reset: second-list;
  gap: 1rem;
  margin-top: 1rem;
  position: relative;
}

.column-single__contents ol li > ol li,
.post-type-column .editor-styles-wrapper ol li > ol li,
.news-single__container ol li > ol li,
.post-type-news .editor-styles-wrapper ol li > ol li {
  counter-increment: second-list;
  padding-left: 2rem;
  position: relative;
}

.column-single__contents ol li > ol li::after,
.post-type-column .editor-styles-wrapper ol li > ol li::after,
.news-single__container ol li > ol li::after,
.post-type-news .editor-styles-wrapper ol li > ol li::after {
  content: "(" counter(second-list) ")";
  font-weight: 400;
  position: absolute;
}

.column-single__contents p > a,
.post-type-column .editor-styles-wrapper p > a,
.news-single__container p > a,
.post-type-news .editor-styles-wrapper p > a {
  color: var(--colorBlack);
  text-decoration: underline;
  line-height: 2;
  font-weight: 400;
  font-size: 1rem;
  transition: all 0.3s;
}

.column-single__contents p > a:hover,
.column-single__contents p > a:focus,
.news-single__container p > a:hover,
.news-single__container p > a:focus {
  color: var(--colorRed);
  text-decoration: none;
  opacity: 1;
}

.column-single__contents .wp-block-image,
.post-type-column .editor-styles-wrapper .wp-block-image,
.news-single__container .wp-block-image,
.post-type-news .editor-styles-wrapper .wp-block-image {
  width: fit-content;
  margin: 0 auto;
}

/* 画像 */
.column-single__contents .wp-block-image img,
.post-type-column .editor-styles-wrapper .wp-block-image img,
.news-single__container .wp-block-image img,
.post-type-news .editor-styles-wrapper .wp-block-image img {
  width: clamp(45rem, -56.818rem + 127.27vw, 62.5rem);
  margin: 0 auto;
}

/* キャプション */
.column-single__contents .wp-element-caption,
.post-type-column .editor-styles-wrapper .wp-element-caption,
.news-single__container .wp-element-caption,
.post-type-news .editor-styles-wrapper .wp-element-caption {
  font-size: 0.875rem;
  color: #44444d;
  text-align: left;
}

/* YouTube */
.column-single__contents .wp-block-embed-youtube .wp-block-embed__wrapper,
.post-type-column .editor-styles-wrapper .wp-block-embed-youtube .wp-block-embed__wrapper,
.news-single__container .wp-block-embed-youtube .wp-block-embed__wrapper,
.post-type-news .editor-styles-wrapper .wp-block-embed-youtube .wp-block-embed__wrapper {
  width: clamp(45rem, -56.818rem + 127.27vw, 62.5rem);
  aspect-ratio: 16/9;
  margin: 0 auto;
  max-width: 100%;
}

.column-single__contents .wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.post-type-column .editor-styles-wrapper .wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.news-single__container .wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.post-type-news .editor-styles-wrapper .wp-block-embed-youtube .wp-block-embed__wrapper iframe {
  width: 100%;
  height: 100%;
}

/* 外部リンク */
.column-single__contents,
.news-single__container,
.post-type-column .editor-styles-wrapper,
.post-type-news .editor-styles-wrapper {
  p > a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    margin: 0 1rem 0.25rem 0.5rem;
    background: url(../../images/common/icon-target-red-nomargin.svg) no-repeat center / contain;
    vertical-align: text-bottom;
  }
}

/* テーブル */
.column-single__contents .wp-block-table,
.post-type-column .editor-styles-wrapper .wp-block-table,
.news-single__container .wp-block-table,
.post-type-news .editor-styles-wrapper .wp-block-table {
  overflow-x: auto;
  padding-bottom: 0.5rem;

  table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
  }

  thead {
    border: none;
    overflow: hidden;

    th {
      background-color: #44444d;
      color: var(--colorWhite);
      font-weight: 700;
      line-height: 1.5;
      padding: 1em;
      border: none;
      text-align: left;
      border-right: 1px solid var(--colorGray750);
    }
    th:first-child {
      width: 30%;
    }
    th:last-child {
      border-right: none;
    }
  }

  tbody {
    td {
      border: none;
      border-bottom: 1px solid var(--colorGray350);
      padding: 1em;
      font-size: 1rem;
      -webkit-text-size-adjust: 100%;
      line-height: 1.5;
      font-weight: 400;
      border-right: 1px solid var(--colorGray350);
    }
    tr td:last-child {
      border-right: none;
    }
    tr:nth-of-type(even) td {
      background-color: #f4f4f4;
    }
  }
}

/* カラムブロック（2カラム）使用時 */
.wp-block-columns.is-layout-flex {
  gap: 2.5rem;
}

@media screen and (max-width: 767px) {
  .news-single__container {
    margin-top: var(--size40);
  }

  .column-single__contents h2,
  .post-type-column .editor-styles-wrapper h2,
  .news-single__container h2,
  .post-type-news .editor-styles-wrapper h2 {
    font-size: var(--size24);
    padding-left: var(--size16);
    margin-top: var(--size32);
  }

  .column-single__contents h3,
  .post-type-column .editor-styles-wrapper h3,
  .news-single__container h3,
  .post-type-news .editor-styles-wrapper h3 {
    font-size: var(--size20);
    padding-bottom: var(--size24);
    margin-top: var(--size32);
  }

  .column-single__contents h4,
  .post-type-column .editor-styles-wrapper h4,
  .news-single__container h4,
  .post-type-news .editor-styles-wrapper h4 {
    font-size: var(--size18);
    padding: 0.889em;
    margin-top: var(--size32);
  }

  .column-single__contents::after,
  .post-type-column .editor-styles-wrapper .wp-block-post-content::after,
  .news-single__contents::after,
  .post-type-news .editor-styles-wrapper .wp-block-post-content::after {
    width: 18.8%;
  }

  /* 丸リスト */
  .column-single__contents ul li,
  .post-type-column .editor-styles-wrapper ul li,
  .news-single__container ul li,
  .post-type-news .editor-styles-wrapper ul li {
    font-size: var(--size16);
    padding-left: var(--size24);
  }

  .column-single__contents ul li::before,
  .news-single__container ul li::before {
    width: var(--size16);
    height: var(--size16);
    top: clamp(0.2925rem * var(--sp-scale-min), calc(4.68 * 100vw / 390), 0.2925rem * var(--sp-scale-max));
  }

  .column-single__contents ul li::after,
  .news-single__container ul li::after {
    width: var(--size8);
    height: var(--size8);
    top: clamp(0.5425rem * var(--sp-scale-min), calc(8.68 * 100vw / 390), 0.5425rem * var(--sp-scale-max));
    left: var(--size4);
  }

  .column-single__contents ul li + li,
  .news-single__container ul li + li {
    margin-top: var(--size16);
  }

  /* 数字リスト */
  .column-single__contents ol,
  .post-type-column .editor-styles-wrapper ol,
  .news-single__container ol li,
  .post-type-news .editor-styles-wrapper ol li {
    padding-left: var(--size24);
  }

  .column-single__contents ol li::after,
  .post-type-column .editor-styles-wrapper ol li::after,
  .news-single__container ol li::after,
  .post-type-news .editor-styles-wrapper ol li::after {
    font-size: var(--size18);
    left: clamp(0.1875rem * var(--sp-scale-min), calc(3 * 100vw / 390), 0.1875rem * var(--sp-scale-max));
    top: clamp(0.08rem * var(--sp-scale-min), calc(1.28 * 100vw / 390), 0.08rem * var(--sp-scale-max));
  }

  .column-single__contents ol li + li,
  .post-type-column .editor-styles-wrapper ol li + li,
  .news-single__container ol li + li,
  .post-type-news .editor-styles-wrapper ol li + li {
    margin-top: var(--size16);
  }

  .column-single__contents ol li > ol,
  .post-type-column .editor-styles-wrapper ol li > ol,
  .news-single__container ol li > ol,
  .post-type-news .editor-styles-wrapper ol li > ol {
    padding-left: var(--size24);
  }

  .wp-block-image.size-full > img {
    width: 100%;
  }

  .column-single__contents p > a,
  .post-type-column .editor-styles-wrapper p > a,
  .news-single__container p > a,
  .post-type-news .editor-styles-wrapper p > a {
    font-size: var(--size16);
  }

  /* テーブル */
  .column-single__contents .wp-block-table,
  .post-type-column .editor-styles-wrapper .wp-block-table,
  .news-single__container .wp-block-table,
  .post-type-news .editor-styles-wrapper .wp-block-table {
    overflow-x: auto;
    padding-bottom: var(--size8);
  }

  .wp-block-columns.is-layout-flex {
    gap: var(--size24);
  }
}

/* 固定ページ*/
.page__headText {
  margin-bottom: 4rem;
}

.post-type-page li::marker {
  content: none;
}

.post-type-page ol {
  counter-reset: first-list;
  display: grid;
  gap: 1.5rem;
  padding-left: 0;
}

.post-type-page ol li {
  counter-increment: first-list;
  padding-left: 1.5rem;
  position: relative;
  margin-left: 0 !important;
}

.post-type-page ol li::before {
  color: var(--colorRed);
  content: counter(first-list);
  font-family: var(--familyRoboto);
  font-size: 1.125rem;
  font-weight: 700;
  left: 0.1rem;
  line-height: 1.5;
  position: absolute;
  top: 0.1rem;
}

.post-type-page ol li h2 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  margin-block: 0 0.5rem;
}

.post-type-page ol li > span {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.post-type-page ol li > p {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.post-type-page ol li > ol {
  counter-reset: second-list;
  gap: 1rem;
  margin-top: 1rem;
  position: relative;
}

.post-type-page ol li > ol li {
  counter-increment: second-list;
  padding-left: 2rem;
  position: relative;
}

.post-type-page ol li > ol li::before {
  content: "(" counter(second-list) ")";
  font-weight: 400;
  position: absolute;
}

.post-type-page ol li > ol li span {
  display: inline-block;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.grayContent {
  background: var(--colorBg);
  margin-inline: auto;
  margin-top: 4rem;
  max-width: 56.25rem;
  padding: 2rem;
}

.grayContent ol {
  justify-content: flex-start;
}

.post-type-page ol li > .grayContent {
  margin-top: 0;
}

.grayContent h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.grayContent ol {
  gap: 0.5rem;
  margin-top: 2rem;
}

.companyInfo {
  margin-top: 4rem;
}

.companyInfo img {
  margin-left: auto;
  margin-top: 0.75rem;
}

.is-layout-flex {
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.grayContent .wp-block-lazyblock-arrow-button-block {
  width: fit-content;
}

.is-layout-flex > .has-iconLink {
  margin-bottom: 0.75rem;
}

/* グループ会社詳細　*/

.tag__area {
  background-color: #f3f4f4;
  padding: 1.5rem;
}

.tag__area + .tag__area {
  margin-top: 8px;
}

.tag__area h3 {
  font-size: 1.125rem;
  font-weight: 700;
  padding-left: 1.3em;
  position: relative;
  width: 100%;
}

.tag__area h3::before {
  content: "";
  width: 1rem;
  height: 1rem;
  background-color: rgb(224, 29, 17, 0.2);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.tag__area h3::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--colorRed);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(50%, -50%);
}

.tag__area p {
  line-height: 1.8;
  width: 100%;
}

.post-type-corporate-group .editor-styles-wrapper .logo__area,
.single-corporate-group .corporate__right .logo__area {
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  max-height: 4rem;
}
.post-type-corporate-group .editor-styles-wrapper .logo__area img,
.single-corporate-group .corporate__right .logo__area img {
  max-height: 4rem;
  width: auto;
}

.wp-block-image a {
  transition: 0.3s;
}

@media (hover: hover) {
  .wp-block-image a:hover {
    opacity: 0.7;
  }
}

/* CSR 固定ページ. */

.csrList {
  padding-block: 2rem;
  border-bottom: 1px solid #ddd;
  gap: 1rem;
}

.csrList:last-of-type {
  border-bottom: none;
}

.csrList__title {
  font-weight: 700;
  line-height: 1.5;
  font-size: 1.5rem;
  padding-left: calc(1rem + 0.8rem);
  position: relative;
  width: 100%;
}

.csrList__title::before,
.csrList__title::after {
  content: "";
  background-color: var(--colorRed);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.csrList__title::before {
  opacity: 0.2;
  width: 1rem;
  height: 1rem;
  left: 0;
}

.csrList__title::after {
  width: 0.5rem;
  height: 0.5rem;
  left: 0.25rem;
  z-index: 2;
}

.csrList__text {
  margin-top: 1rem;
  line-height: 1.8;
  width: 100%;
}

.fz-14 {
  font-size: 0.875rem;
}

.fz-16 {
  font-size: 1rem;
}

.csrGrayGroup {
  width: 100%;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;

  .csr__group-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
  }

  .csr__group-text {
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.8;
    margin-top: 0.5rem;
  }

  .wp-block-group:has(img) {
    flex: 0 0 80px;
  }
}

.fw-700 {
  font-weight: 700;
}

@media screen and (max-width: 767px) {
  .csrList {
    padding-block: var(--size32);
    gap: var(--size16);
  }

  .csrList__title {
    font-size: var(--size24);
    padding-left: var(--size24);
    position: relative;
    width: 100%;
  }

  .csrList__title::before {
    width: var(--size16);
  }

  .csrList__title::after {
    width: var(--size8);
    height: var(--size8);
    left: var(--size4);
  }

  .csrList__text {
    margin-top: var(--size16);
    line-height: 1.8;
    font-size: var(--size16);
  }

  .csrGrayGroup {
    padding: var(--size16);
    gap: var(--size16);

    .csr__group-title {
      font-size: var(--size16);
    }

    .csr__group-text {
      font-size: var(--size12);
      margin-top: var(--size8);
    }

    .wp-block-group:has(img) {
      flex: 0 0 64px;
    }
  }

  .fz-14 {
    font-size: var(--size14);
  }

  .fz-16 {
    font-size: var(--size16);
  }
}
