.ys-companyprofile {
  margin-block-start: -50px;
}
.ys-companyprofile__philosophy {
  overflow: hidden;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    bottom: var(--wp--preset--spacing--80);
    right: 50%;
    transform: translateX(60%);
    width: 960px;
    height: 830px;
    /* background:
      linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 33.33%, transparent 33.33%),
      linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 66.66%, transparent 66.66%),
      linear-gradient(to bottom, rgba(5, 53, 96, 0.05)); */

    background-image: url(../images/ys-companyprofile__philosophy-before.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    z-index: 1;
  }
}


@media screen and (max-width: 1039px) {
  .ys-companyprofile__philosophy {
    min-height: 800px;
    &::before {
      left: 0;
      right: unset;
      bottom: 0;
      transform: translateX(-500px);
    }
  }
}

.p-philosophy {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--40);
  position: relative;
  height: 830px;
  z-index: 1;
}
@media screen and (max-width: 1039px) {
  .p-philosophy {
    height: auto;
    padding-block: 100px 0;
    justify-content: flex-end;

  }
}

.p-philosophy__block {
  position: relative;
  padding-block: 85px 0px;
}
@media screen and (max-width: 1039px) {
  .p-philosophy__block {
    padding-block: 0px;
  }
}

.p-philosophy__title {
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}
@media screen and (max-width: 1039px) {
  .p-philosophy__title {
    text-align: left;
  }
}

.p-philosophy__title-en {
  font-size: 12px;
  font-family: var(--wp--preset--font-family--questrial);
  font-weight: 400;
  text-align: center;
  margin-block-end: var(--wp--preset--spacing--20);
}
@media screen and (max-width: 1039px) {
  .p-philosophy__title-en {
    text-align: left;
  }
}

.p-philosophy__text {
  font-size: 24px;
  color: var(--wp--preset--color--custom-tk-blue);
  font-weight: 500;
  text-align: center;
}
@media screen and (max-width: 1039px) {
  .p-philosophy__text {
    text-align: left;
    font-size: 20px;
  }
}

.ys-companyprofile__message {
  background-color: var(--wp--preset--color--custom-gray-01);
  .ys-title {
    margin-block-end: var(--wp--preset--spacing--60);
  }
}
@media screen and (max-width: 1039px) {
  .ys-companyprofile__message {
    .ys-title {
      margin-block-end: var(--wp--preset--spacing--40);
    }
  }
}

.p-message {
  display: flex;
  gap: var(--wp--preset--spacing--60);
}
@media screen and (max-width: 1039px) {
  .p-message {
    flex-direction: column-reverse;
    gap: var(--wp--preset--spacing--30);
  }
}


.p-message__block {
  flex: 0 1 50%;
  &:nth-child(2) {
    flex: 0 1 50%;
  }
  img {
    width: 100%;
    height: auto;
  }
}

.p-message__title {
  font-size: var(--wp--preset--font-size--x-large);
  margin-block-end: 8px;
}

.p-message__roll {
  font-size: var(--wp--preset--font-size--xx-small);
  color: var(--wp--preset--color--custom-gray-02);
  margin-block-end: var(--wp--preset--spacing--20);
}

.p-message__text {

}

.p-message__image {

}

.ys-companyprofile__company {
  .ys-title {
    margin-block-end: var(--wp--preset--spacing--60);
  }
}
@media screen and (max-width: 1039px) {
  .ys-companyprofile__company {
    .ys-title {
      margin-block-end: var(--wp--preset--spacing--40);
    }
  }
}

.p-company {
}

.p-company__list {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--20);
  border-top: 1px solid var(--wp--preset--color--custom-gray-01);
}

.p-company__item {
  display: flex;
  border-bottom: 1px solid var(--wp--preset--color--custom-gray-01);
  padding-block: var(--wp--preset--spacing--40);
}
@media screen and (max-width: 1039px) {
  .p-company__item {
    flex-direction: column;
    gap: var(--wp--preset--spacing--40);
  }
}

.p-company__term {
  width: 200px;
  font-weight: 500;
  color: var(--wp--preset--color--custom-black);
  font-size: 16px;
}

.p-company__desc {
  flex: 1;
  color: var(--wp--preset--color--custom-black);
  font-size: 18px;
}
.p-company__desc-map {
  font-family: var(--wp--preset--font-family--questrial);
  font-size: 20px;
  color: var(--wp--preset--color--custom-tk-blue);
  margin-inline-start: 24px;
  display: inline-block;
  position: relative;
  &::before {
    display: inline-block;
    content: "";
    width: 16px;
    height: 16px;
    background-image: url(../images/icon-map.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}


.ys-companyprofile__history {
  background-color: var(--wp--preset--color--custom-bg-black);
  .ys-title {
    color: var(--wp--preset--color--custom-white);
    margin-block-end: var(--wp--preset--spacing--60);
  }  
}
@media screen and (max-width: 1039px) {
  .ys-companyprofile__history {
    .ys-title {
      margin-block-end: var(--wp--preset--spacing--40);
    }
  }
}

.p-history {

}

.p-history__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-history__item {
  width: calc(464 / 960 * 100%);
  max-width: 464px;
  background-color: var(--wp--preset--color--custom-tk-blue);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding-inline: 16px;
  padding-block: 8px;

  ol {
    display: flex;
    flex-direction: column;

    li {
      display: flex;
      justify-content: flex-start;
      gap: 8px;
    }
  }
  position: relative;
  &::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--wp--preset--color--custom-gray-02);
    border-radius: 50%;
    top: 30px;
    right: -24px;
  }
  &::after {
    content: "";
    position: absolute;
    width: 10px;
    height: calc(100% - 24px);
    background-color: var(--wp--preset--color--custom-black);
    top: 54px;
    right: -21px;
  }

  &:nth-child(even) {
    margin-inline: auto 0;

    &::before {
      right: auto;
      left: -24px;
    }
    &::after {
      right: auto;
      left: -21px;
    }
  }
}
@media screen and (max-width: 1039px) {
  .p-history__item {
    width: calc(100% - 24px);
    margin-inline: auto 0;

    &::before {
      right: unset;
      left: -24px;
    }
    &::after {
      right: unset;
      left: -21px;
    }
  
    &:nth-child(even) {
  
      &::before {
        right: auto;
        left: -24px;
      }
      &::after {
        right: auto;
        left: -21px;
      }
    }
  }

}


.p-history__year {
  color: var(--wp--preset--color--custom-white);
  font-family: var(--wp--preset--font-family--questrial);
  font-size: 40px;
  flex-shrink: 0;
}

.p-history__month {
  color: var(--wp--preset--color--custom-white);
  font-size: 16px;
  padding-block-start: 24px;
  padding-block-end: 10px;
  flex-shrink: 0;
}

.p-history__text {
  color: var(--wp--preset--color--custom-white);
  font-size: 16px;
  padding-block-start: 24px;
  padding-block-end: 10px;
  flex-shrink: 1;
}

.ys-companyprofile__factory {
  .ys-title {
    margin-block-end: var(--wp--preset--spacing--60);
  }  
}
@media screen and (max-width: 1039px) {
  .ys-companyprofile__factory {
    .ys-title {
      margin-block-end: var(--wp--preset--spacing--40);
    }
  }
}

.p-factory {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--60);
}

.p-factory__lead {
  margin-block-end: var(--wp--preset--spacing--60);
}
@media screen and (max-width: 1039px) {
  .p-factory__lead {
    margin-block-end: 0;
  }
}


.p-factory__block {

}

.p-factory__title {
  font-size: var(--wp--preset--font-size--x-large);
  margin-block-end: var(--wp--preset--spacing--60);
}

.p-factory__list {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--60);
}

.p-factory__item {
  display: flex;
  gap: var(--wp--preset--spacing--60);
  align-items: flex-start;
}
@media screen and (max-width: 1039px) {
  .p-factory__item {
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
  }
}


.p-factory__info {
  flex: 0 1 50%;
}

.p-factory__name {
  font-size: var(--wp--preset--font-size--x-large);
  margin-block-end: 8px;
}

.p-factory__address {
  font-size: var(--wp--preset--font-size--xx-small);
  color: var(--wp--preset--color--custom-gray-02);
  margin-block-end: 16px;
}

.p-factory__text {

}

.p-factory__images {
  flex: 0 1 50%;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);

  img {
    width: 100%;
    height: auto;
  }

}

.p-factory__image {

}


.ys-companyprofile__movie {
  background-color: var(--wp--preset--color--custom-gray-01);
  .ys-title {
    margin-block-end: var(--wp--preset--spacing--60);
  }
}
@media screen and (max-width: 1039px) {
  .ys-companyprofile__movie {
    .ys-title {
      margin-block-end: var(--wp--preset--spacing--40);
    }
  }
}

.p-movie {

}

.p-movie__block {
  width: 100%;
}

.p-movie__video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  iframe {
    width: 100%;
    height: 100%;
  }
}

