@charset "utf-8";

/*=================================================================
   一覧
=================================================================*/
/* モデルケース
-------------------------------------*/
@media screen and (max-width: 767px) {
   .model{
      padding: 30px 20px 0;
   }
   .model__list{
      margin-bottom: 0;
   }
}

/* ターム一覧
-------------------------------------*/
.under-case__head {
   display: flex;
   align-items: center;
}
.under-case__tag-title {
   font-size: 1.6rem;
   margin-right: 2.5rem;
}
.under-case__tag-items {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 1.2rem;
   list-style: none;
   margin: 0;
   padding: 0;
}
.under-case__tag-link {
   display: block;
   color: var(--color-blue);
   text-decoration: none;
   font-size: 1.6rem;
   font-weight: 600;
   border-radius: 50px;
   padding: 4px 12px;
   border: 1px solid var(--color-blue);
   background: #fff;
}
.under-case__tag-link:hover {
   background: var(--color-blue);
   color: #fff;
}

/* 事例一覧
-------------------------------------*/
@media screen and (max-width: 767px) {
   .under-case{
      padding: 0 20px;
   }
   /* ターム一覧
   -------------------------------------*/
   .under-case__head {
      display: block;
   }
   .under-case__tag-title {
      text-align: center;
      font-weight: 700;
      margin-right: initial;
   }
   .under-case__tag-items {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      row-gap: 0.7rem;
      column-gap: 1rem;
      margin-top: 1.4rem;
   }
   .under-case__tag-link{
      text-align: center;
      
   }
}

/*=================================================================
   詳細
=================================================================*/
.case-single {
   max-width: 850px;
   margin-top: 6.7rem;
   margin-bottom: 10rem;
}
.case-single__title {
   font-size: 3.2rem;
   font-weight: bold;
   margin-top: 2rem;
   line-height: calc(44/32);
}
.case-single__company {
   font-size: 1.8rem;
}
.case-single__image {
   margin-top: 3.6rem;
   aspect-ratio: 863/400;
   margin-inline: auto;
}
.case-single__image img {
   object-fit: cover;
   height: 100%;
}
.case-single__tag-items {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 1.2rem;
   list-style: none;
   margin-top: 2.5rem;
   padding: 0;
}
.case-single__tag-item {
   text-align: center;
}
.case-single__tag-item a {
   display: block;
   color: var(--color-blue);
   text-decoration: none;
   font-size: 1.6rem;
   font-weight: 600;
   border-radius: 50px;
   padding: 4px 17px;
   border: 1px solid var(--color-blue);
   background: #fff;
}
.case-single__tag-item a:hover {
   background: var(--color-blue);
   color: #fff;
}
.case-single__info {
   margin-top: 4.7rem;
}
.company-info__row {
   border-bottom: 1px solid #cccccc;
   display: flex;
   align-items: flex-start;
   background: linear-gradient(
      to right,
      var(--color-lightblue) calc(174 / 850 * 100%),
      transparent calc(174 / 850 * 100%)
   );
}
.company-info__row:first-child{
   border-top: 1px solid #cccccc;
}
.company-info__row dt,
.company-info__row dd {
   display: grid;
   place-content: center;
   justify-content: start;
   padding-block: 1.8rem;
   font-size: 1.8rem;
   line-height: 1.5;
   padding-left: 3.5rem;
   margin: 0;
}
.company-info__row dt {
   width: calc(174 / 850 * 100%);
   font-weight: 700;
}
.company-info__row dd {
   width: calc((850 - 174) / 850 * 100%);
}

@media screen and (max-width: 767px) {
   .case-single{
      padding: 0 20px;
      margin-top: 25px;
      margin-bottom: 70px;
   }
   .case-single__company {
      font-size: 1.2rem;
   }
   .case-single__title {
      font-size: 2rem;
      margin-top: 10px;
      line-height: calc(28/20);
   }
   .case-single__tag-items{
      margin-top: 15px;
   }
   .case-single__tag-item a {
      font-size: 1.2rem;
   }
   .case-single__image {
      margin-top: 1.8rem;
      aspect-ratio: 345/205;
   }
   .case-single__info {
      margin-top: 3rem;
   }
   .company-info__row {
      background: linear-gradient(
         to right,
         var(--color-lightblue) calc(214 / 676 * 100%),
         transparent calc(214 / 676 * 100%)
      );
   }
   .company-info__row dt,
   .company-info__row dd {
      font-size: 1.4rem;
      padding-block: 1.2rem;
      padding-left: 1.5rem;
   }
   .company-info__row dt {
      width: calc(214 / 676 * 100%);
      font-weight: 700;
   }
   .company-info__row dd {
      width: calc((676 - 214) / 676 * 100%);
   }
}

/* 本文部分
-------------------------------------*/
.case-article {
   margin-top: 3rem;
   line-height: calc(36 / 17);
}
.case-article img {
   max-width: 100%;
   height: auto;
   vertical-align: bottom;
}
@media screen and (min-width: 768px) {
   .case-article img {
      max-width: 600px;
   }
}

.case-article p {
   font-size: 1em;
   line-height: 1.7;
   overflow: hidden;
   margin-block: 0.8em 0;
}
.case-article h2 {
   position: relative;
   color: var(--color-base);
   font-size: 1.6em;
   line-height: 1.6;
   margin-top: 2em;
   padding: 0 0 0 1.4em;
}
.case-article h2::before {
   position: absolute;
   left: 0;
   top: 0;
   display: block;
   content: "";
   background: #0054a7;
   width: 15px;
   height: 100%;
   border-radius: 0;
}
.case-article h3 {
   position: relative;
   color: var(--color-base);
   font-size: 1.6em;
   line-height: 1.4;
   padding: 0 0 2rem;
   margin-top: 1.2em;
   border-bottom: 3px solid var(--color-blue);
}
.case-article h3:before {
   position: absolute;
   top: 100%;
   left: 50px;
   transform: skew(40deg);
   height: 18px;
   width: 15px;
   border-left: 4px solid var(--color-blue);
   background-color: white;
   content: "";
}
.case-article h4{
   position: relative;
   margin-top: 1.2em;
   font-size: 1.7rem;
   line-height: 1.5;
}
/* .case-article h4::before{
   position: absolute;
   left: 0;
   top: 0;
   display: block;
   content: "";
   background: rgba(var(--color-blue-rgb) ,.6);
   width: 4px;
   height: 100%;
   border-radius: 4px;
} */

.case-article h5{
   position: relative;
   font-size: 1.15em;
   margin: 1.5em 0 1em;
   padding-bottom: 1em;
   border-bottom: 3px solid #ddd;
}
.case-article h5::before {
   display: block;
   content: "";
   width: 20%;
   border-bottom: solid 3px rgba(var(--color-blue-rgb) ,.4);
   position: absolute;
   bottom: -3px;
   left: 0;
   z-index: 1;
}
.case-article .aligncenter{
   margin: 0;
}


/* 1セット（文章＋画像） */
.case-article .case-block{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

/* PCだけ横並び：右を画像カラムとして固定 */
@media (min-width: 768px){
  .case-article .case-block{
   flex-direction: row;
   align-items: flex-start;
   gap: 20px;
   margin-top: 16px;
  }
  /* 左（文章） */
  .case-block__text {
    flex: 1; /* 余白全部使う */
  }
  /* 右（画像） */
  .case-block__media {
    flex: 0 0 33%;
    align-self: center;
  }

  /* 画像が左のレイアウト用 */
  .case-article .case-block.img-left {
      flex-direction: row-reverse; /* 表示順を反転 */
      margin-top: 20px; 
  }
  .case-article .case-block.img-left .case-block__media {
    margin-top: 0; /* 上の余白をリセット */
  }
}

/* 右の画像エリア：1枚でも2枚でも縦に積む（幅は必ず揃う） */
.case-article .case-block__media{
  display: grid;
  gap: 30px;
}

/* WP captionが入れる固定幅を殺す */
.case-article .case-block__media .wp-caption{
  width: 100% !important;
  max-width: 100%;
  margin: 0;
}

/* 画像は比率維持で枠いっぱい */
.case-article .case-block__media img{
  display: block;
  width: 100%;
  height: auto;
}


/* h4見出し用マークバッジ */
.mark-badge {
   display: inline-block;
   font-size: 1.3rem;
   padding: 0.5rem 1.3rem;
   border-radius: 4px;
   margin-right: 0.5em;
   vertical-align: middle;
   line-height: 1.2;
   position: relative;
   top: -2px;
}
.mark-red {
   background-color: #FDE2E2;
   color: #D32F2F;
}
.mark-blue {
   background-color: #E3F2FD;
   color: #1976D2;
}
.mark-text {
   background-color: #EEEEEE;
   padding: 0.02em 0.3em;
   margin-left: 0.2em;
}

.case-single__btn {
   margin-top: 8.6rem;
}

@media screen and (max-width: 767px) {
   .case-article{
      margin-top: 4rem;
      line-height: calc(23 / 14);
   }
   .case-article h2 {
      font-size: 1.45em;
   }
   .case-article h3 {
      font-size: 1.45em;
      border-width: 2px;
   }
   .case-article h3::before {
      height: 15px;
      border-width: 2px;
   }
   .case-article h4::before{
      width: 3px;
   }
   .case-single__btn {
      margin-top: 40px;
   }
}

/* 関連記事
-------------------------------------*/
.case-footer {
   padding: 0px 0 50px;
}
.case-footer__heading {
   font-size: 2.6rem;
   font-weight: bold;
   text-align: center;
}
@media print, screen and (min-width: 768px) {
   .case-footer .case-study{
      width: 31.5%!important;
   }
}
@media screen and (max-width: 767px) {
   .case-footer {
      overflow: hidden;
      padding: 0px 0 50px;
   }
   .case-footer__heading {
      font-size: 1.6rem;
   }
   .case-footer .case-studies{
      position: relative;
      margin: 0 20px;
      padding-top: 2.6rem;
   }
   .swiper-pagination {
      bottom: -20px;
   }
}

/* タグリスト（カード内）
-------------------------------------*/
.case_tag-list {
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem; /* タグ間の余白 */
   list-style: none;
   padding: 0;
   margin: 0 0 1rem 0;
}

/* 記事内テーブル
-------------------------------------*/
.case-article table {
   width: 100%;
   display: block;
}
.case-article tbody {
   display: block;
   width: 100%;
}
.case-article tr {
   display: flex;
   width: 100%;
   box-sizing: border-box;
   break-inside: avoid;
   page-break-inside: avoid;
}
.case-article th,
.case-article td {
   display: flex;
   align-items: center;
   background: #fff;
   border: none;
   border-bottom: 1px solid;
   padding: 1em;
   box-sizing: border-box;
}
.case-article th {
   width: 35%;
   border-bottom-color: #000;
   font-weight: 700;
}
.case-article td {
   flex: 1;
   border-bottom-color: #ccc;
   word-break: break-all; /* URLなどがはみ出さないように改行 */
}
@media screen and (max-width: 767px) {
   .case-article tr {
      width: 100%;
   }
}
@media print, screen and (min-width: 768px) {
   .case-article tbody {
      display: grid;
      grid-template-columns: 1fr 1fr; /* 2列 */
      grid-template-rows: repeat(4, auto); /* 全8項目÷2列＝4行 */
      grid-auto-flow: column; /* 縦方向（左列）から先に埋める */
      column-gap: 2rem; /* 左右の列の間隔 */
   }
}
