/* Service Category Pages (shared) */

/* --- Utilities --- */
html.transition-reset * { transition: none !important; }
.only-sp { display: none; }

/* Page base */
.service-category-page{
  font-family: "Noto Sans JP", sans-serif;
  color: #000;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Title (H1) + Line */
.service-category-page-title{
  font-size: 40px;
  font-weight: 700;
  text-align: left;
  margin: 150px auto 0;
  max-width: 1140px;
  padding: 0 20px;
  display: inline-block;
}

.page-title-line{
  width: 765px; /* h1の長さで調整 */
  height: 3px;
  background: #EB5F51;
  margin: 6px auto 30px;
  max-width: 1140px;
  position: relative;
}

.page-title-line::after{
  content:"";
  position:absolute;
  right:-8px;
  top:-4px;
  width:0;
  height:0;
  border-left:12px solid #EB5F51;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
}

/* Layout: main + side */
.main-and-side{
  display: flex;
  gap: 40px;
  margin-top: 50px;
  margin-bottom: 150px;
  padding: 0 60px;
  align-items: flex-start;
}

/*  Side Menu (PC) */
.side-menu{
  width: 280px;
  min-width: 280px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.side-menu-ul{
  list-style: none;
  margin: 0;
  padding: 0 20px;
}
ul.side-menu-ul {
	margin-top:80px;
}
.side-menu-ul li{
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid #9c9c9c;
}

.side-menu-ul li:first-of-type{
  border-top: 1px solid #9c9c9c;
  font-weight: 700;
}

.side-menu-ul a{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  color: #222;
  text-decoration: none;
}

.side-menu-ul a:hover{ color: #e73424; }
.side-menu-ul .current-page{ color: #9c9c9c; }

/* hover下線アニメ（:has対応ブラウザのみ） */
.side-menu-ul li:not(:has(.current-page))::after{
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 4px;
  background: linear-gradient(to right, #ffd4c6, #EB5F51);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.side-menu-ul li:not(:has(.current-page)):hover::after{
  transform: scaleX(1);
}

/*  Main */
.main-general{
  max-width: 1500px;
  flex: 1;
  min-width: 0;
  padding: 0 clamp(0px, 4vw, 80px);
  margin: 0;
  box-sizing: border-box;
}

/*  Category blocks */
.category-base{
  background-color: #f6f6f6;
  padding: 20px 0;
}
.category-base:not(:last-child){ margin-bottom: 60px; }

.category-top{
  display: flex;
  flex-direction: column;
  max-width: 1340px;
  margin: 0 80px 20px;
  background-color: #fff;
}

.category-title{
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-top: 20px;
}

.category-description{
  font-size: 13px;
  width: 100%;
  max-width: 1420px;
  box-sizing: border-box;
  padding: 0 80px 20px;
}

.dash{
  height: 4px;
  max-width: 1340px;
  margin: 0 80px;
  background-image: linear-gradient(to right, #808080 0 12px, transparent 12px 24px);
  background-size: 24px 100%;
  background-repeat: repeat-x;
}

/*  Service cards */
.service{
  display: flex;
  flex-direction: column;
  max-width: 1340px;
  background-color: #fff;
  margin: 50px 80px;
  text-decoration: none;
  color: inherit;
}

.service-upper{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 30px;
  border-bottom: 2px solid #eee;
  gap: min(6.8vw, 130px);
}

.wrapper-service-logo{
  display: flex;
  flex: 0 0 40%;
  justify-content: center;
}

.service-logo{
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
}

.service-upper-right{
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-name{
  font-size: 20px;
  font-weight: 500;
  margin: clamp(25px, 4vw, 116px) 0;
  margin-right: auto;
}
.service-name span{
  font-size: 14px;
  font-weight: 400;
}

.service-manager{
  font-size: 11px;
  margin-top: 8px;
  margin-right: auto;
  margin-bottom: min(25px, 100px);
}

.service-description{
  font-size: 13px;
  width: 100%;
  max-width: 1420px;
  box-sizing: border-box;
  padding: 0 30px;
  margin-bottom: 30px;
}

/* --- Arrow system --- */
.service > .wrapper-arrow{
  width: 150px;
  margin-left: auto;
  margin-bottom: 30px;
}

.wrapper-arrow{
  text-decoration: none;
  color: inherit;
  display: block;
  transition: .3s ease;
}

.arrow-btn{
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  width: 18px;
  transition: width .4s ease;
  cursor: default;
  pointer-events: none;
}

.service:hover .wrapper-arrow{ transform: scale(1.05); }
.service:hover .arrow-btn{ width: 120px; }
.service:hover .arrow-btn::before{
  content: "＞＞";
  background: linear-gradient(
    to right,
    #EB5F51 0%,
    #e67360 30%,
    #cc7e66 50%,
    #808080 80%,
    #000 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/*  Hi-DPI */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 2dppx){
  html{
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Responsive */
@media (max-width: 1160px){
  .main-general{ padding-right: 0; }

  .main-and-side{
    gap: 20px;
    padding: 0;
  }

  .category-top{ margin: 0 20px 20px; }
  .service{ margin: 50px 20px; }
  .category-description{ padding: 20px; }
  .dash{ margin: 0 20px; }

  /* サイドは追従解除 */
  .side-menu{
    position: static;
    min-width: auto;
    margin-top: 40px;
    top: auto;
  }
}

@media (max-width: 765px){
  .only-sp{ display: inline; }

  .main-and-side{
    flex-direction: column;
    padding: 0;
  }

  .service-category-page-title{ font-size: 30px; }
  .page-title-line{ width: 330px; }

  .category-top,
  .service{
    margin: 20px;
  }

  .service-upper{
    flex-direction: column;
    gap: 20px;
  }

  .service-upper-right{ width: 100%; }

  .wrapper-service-logo,
  .service-logo{
    width: 100%;
    max-width: 330px;
  }

  /* タイル化(背景画像)を使いたい時だけ有効化 */
  /*
  .side-menu{
    width: 100%;
    margin-top: 40px;
    border-top: 1px solid #ddd;
  }

  .side-menu-ul{
    display: flex;
    flex-wrap: wrap;
    padding: 0;
  }

  .side-menu-ul li{
    flex: 0 0 50%;
    height: 48px;
    border-bottom: 1px solid #ddd;
  }
  */
}
@media screen and (max-width: 1160px) {
  .side-menu{
    position: sticky !important;
    top: 100px;
    align-self: flex-start;
  }
  .main-and-side{
    display: flex;
    flex-wrap: nowrap;
  }
  .main-general{
    min-width: 0;
  }
}
@media (min-width: 1025px){
    .side-menu{
        position: sticky;
        top: 90px;
    max-height: calc(100vh - 90px - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .side-menu::after{
        content: "";
        display: block;
        height: 120px;
    }
}