/* 
   Project Solution Single CSS
*/

/* ========================
   Head
   ======================== */
.p-solution-single__head {
  position: relative;
}

.p-solution-single__bg {
  display: block;
  max-width: 100vw;
  width: 100%;
  height: calc(100% + 80px);
  overflow: hidden;
  position: absolute;
  top: -80px;
  left: 0;
  z-index: -1;

  @media (max-width: 640px) {
    height: calc(100% + 64px);
    top: -64px;
  }

  &:before {
    content: '';
    position: absolute;
    top: -320px;
    left: 30%;
    width: 500px;
    height: 456px;
    transform: rotate(45deg);
    padding: 0px 40px;
    border-radius: 10000px;
    opacity: 0.8;
    background: linear-gradient(310deg, var(--color-surface-primary-stop));
    filter: blur(100px);
    z-index: -1;

    @media (max-width: 640px) {
      top: -340px;
      left: 0;
      width: 400px;
      height: 360px;
      filter: blur(50px);
    }
  }
}

.p-solution-single__tags {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ========================
   Navigation
   ======================== */
/* wp管理画面のメニュー干渉回避 */
.admin-bar .p-solution-single__nav {
  top: 32px;
  @media screen and (max-width: 782px) {
    top: 0;
  }
}

.p-solution-single__nav {
  height: 80px;
  border-top: 1px solid rgba(var(--color-surface-secondary-rgb), 0.48);
  border-bottom: 1px solid rgba(var(--color-surface-secondary-rgb), 0.48);
  position: sticky;
  top: 0;
  left: 0;
  padding: 0 40px;
  z-index: 100;

  @media (max-width: 640px) {
    height: 64px;
    padding: 0 16px;
  }
}

.is-drawer-opened ~ main article .p-solution-single__nav {
  z-index: 98;
}

.p-solution-single__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  gap: 8px;

  @media (max-width: 640px) {
    gap: 0;
  }
}

.p-solution-single__nav-link {
  height: 100%;
  padding: 0 16px;
  text-decoration: none;
  font-size: var(--typography-button-md-size);
  font-weight: var(--typography-button-md-weight);
  line-height: var(--typography-button-md-line-height);
  text-box: trim-both cap alphabetic;

  &.is-focus {
    color: var(--color-surface-secondary);
    border-bottom: 2px solid var(--color-surface-secondary);
  }

  @media (max-width: 640px) {
    padding: 0 12px;
    font-size: var(--typography-button-sm-size);
  }
}

@media (max-width: 640px) {
  .p-solution-single__nav-button {
    font-size: var(--typography-button-sm-size);
    font-weight: var(--typography-button-sm-weight);
    line-height: var(--typography-button-sm-line-height);
    gap: 4px;
    height: 32px;
    min-width: 80px;
    padding: 8px 16px;

    & .u-icon {
      font-size: 16px;
    }
  }
}

/* ========================
   Main
   ======================== */
.p-solution-single__main {
  max-width: 100vw;
  width: 100%;
  overflow: hidden;
}

/* 課題・解決策セクション */
.p-solution-single__solutionーlist {
  list-style: none;
  counter-reset: list;
  margin: 0;
  padding: 0;
}

.p-solution-single__solutionーitem::before {
  counter-increment: list;
  content: counter(list, decimal-leading-zero) '/';
  display: inline-block;
  margin-bottom: 16px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-surface-secondary);
}

.p-solution-single__solutionーtext {
  padding-left: 24px;
  border-left: 2px solid;
  border-image-source: linear-gradient(0deg, var(--color-surface-primary-stop));
  border-image-slice: 1;
}

.p-solution-single__solutionーimage {
  width: 100%;
  max-width: 640px;

  & img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(var(--color-surface-secondary-rgb), 0.2);
  }
}

/* リッチエディタ */
.p-solution-single__editor-style {
  width: 100%;

  & > :first-child {
    margin-top: 0;
  }

  & p {
    font-size: var(--typography-body-size);
  }

  & h2 {
    font-size: var(--typography-heading-lg-size);
    @media (max-width: 640px) {
      font-size: 28px;
    }
  }

  & h3 {
    font-size: var(--typography-heading-md-size);
    @media (max-width: 640px) {
      font-size: 18px;
    }
  }

  & h4 {
    font-size: var(--typography-heading-sm-size);
    @media (max-width: 640px) {
      font-size: 16px;
    }
  }

  & h5 {
    font-size: var(--typography-heading-xs-size);
    @media (max-width: 640px) {
      font-size: 14px;
    }
  }

  & h6 {
    font-size: var(--typography-heading-2xs-size);
  }

  & a {
    color: var(--color-surface-secondary);
  }

  & figure {
    width: 100%;
    max-width: 640px;
    margin: 32px 0 64px;
  }

  & img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(var(--color-surface-secondary-rgb), 0.2);
  }
}

/* カルーセル */
.p-solution-single__carousel-image {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background:
    linear-gradient(
      0deg,
      rgba(var(--color-gray-900-rgb), 0.05) 0%,
      rgba(var(--color-gray-900-rgb), 0.05) 100%
    ),
    var(--color-surface-primary);
  border-radius: 8px;
  border: 1px solid rgba(var(--color-surface-secondary-rgb), 0.2);
}

/* splide : カルーセル処理 */
.splide {
  overflow: hidden;
  width: 100vw;
  position: relative;
}

.splide__track {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}

.splide__slide {
  min-width: auto;
}

.splide__pagination {
  position: static;
  padding: 0;
}

.splide__pagination__page {
  margin: 8px;
  opacity: 1;
  background-color: rgba(var(--color-surface-secondary-rgb), 0.4);

  &.is-active {
    background-color: var(--color-gray-900);
    transform: scale(1);
  }
}

.splide__arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;

  @media (max-width: 640px) {
    gap: 40px;
    justify-content: center;
    padding: 0 24px;
    margin-top: 32px;
  }
}

.splide__arrow {
  width: 80px;
  height: 80px;
  background-color: var(--color-gray-900);
  color: var(--color-common-white);
  opacity: 1;
  transition: background-color 0.2s ease;

  &:disabled {
    opacity: 0;

    @media (max-width: 640px) {
      opacity: 1;
    }
  }

  &:hover:not(:disabled) {
    background-color: var(--color-gray-500);
  }

  @media (max-width: 640px) {
    width: 32px;
    height: 32px;
    position: static;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .splide__arrow .material-symbols-outlined {
    font-size: 16px;
  }
}

/* デモ環境 */
.p-solution-single__demo-main {
  width: 100%;
  justify-items: flex-start;
}

.p-solution-single__demo-account {
  width: 100%;
}

.p-solution-single__demo-password {
  border-radius: 8px;

  @media (max-width: 640px) {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

.p-solution-single__demo-link {
  text-decoration: none;
  width: 100%;
  min-height: 320px;
  padding: 40px;
  border-radius: 24px;
  background-repeat: no-repeat;
  background-size: cover;
  gap: 24px;

  @media (max-width: 640px) {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}

.p-solution-single__demo-button {
  width: 240px;

  @media (max-width: 640px) {
    width: auto;
  }
}

/* セミオーダー */
.p-solution-single__semi-order-made {
  max-width: calc(100vw - 80px);
  width: 100%;
  margin: 64px 40px;

  @media (max-width: 640px) {
    max-width: calc(100vw - 48px);
    margin: 32px 24px;
  }
}

.p-solution-single__semi-order-made-inner {
  padding: 64px 40px;

  @media (max-width: 640px) {
    padding: 32px 24px;
  }
}

.p-solution-single__semi-order-made-list {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 40px;
  width: 100%;

  @media (max-width: 640px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .p-solution-single__semi-order-made-item {
    flex-direction: row;

    & p {
      text-align: left;
    }

    & br {
      display: none;
    }
  }
}

.p-solution-single__semi-order-made-icon {
  width: 24px;
  height: 24px;
  border-radius: 100px;
  margin-bottom: 12px;

  @media (max-width: 640px) {
    margin: 0 12px 0 0;
  }
}

@media (max-width: 640px) {
  .p-solution-single__semi-order-made-text {
    text-align: left;
  }
}

.p-solution-single__semi-order-made-link {
  width: 240px;
  white-space: nowrap;
}
