/* ==========================================================================
   About Page Styles
   ========================================================================== */

.p_about .ttl-page {
  background: url("../images/about/bg_ttl.webp") no-repeat center center/cover;
}

/*---------- ABOUT SECTION TITLE ----------*/
.p-about-section-title {
  background-color: #eef7fd;
  color: #1175b9;
  font-size: 30px;
  font-weight: 600;
  padding: 20px 30px;
}

@media only screen and (max-width: 767px) {
  .p-about-section-title {
    font-size: 20px;
    padding: 15px 20px;
  }
}

/*---------- ABOUT LOADING ----------*/
.p-about-loading {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 165, 255, 0.7);

  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.p-about-loading {
  &.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition-delay: 0.7s;

    & .p-about-loading__text {
      transform: translateY(110%);
    }
  }
}

.p-about-loading__mask {
  overflow: hidden;

  @media only screen and (max-width: 767px) {
    display: block;
  }

  @media only screen and (min-width: 768px) {
    display: inline-block;
  }
}

.p-about-loading__text {
  color: #ffffff;
  line-height: 1.4;
  font-weight: 600;
  text-align: center;

  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);

  @media only screen and (max-width: 767px) {
    font-size: 5vw;
  }

  @media only screen and (min-width: 768px) {
    font-size: 1.4vw;
  }
}

/*---------- ABOUT MAIN IMAGE ----------*/
.p-about-main-image-wrapper {
  position: relative;
  width: 100%;
}

.p-about-main-image-wrapper .scroll-hint-icon-wrap {
  z-index: 10;
}

.p-about-main-image {
  width: 100%;
  position: relative;
}

.p-about-main-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 768px〜1199px（タブレット・小さいPC）でドラッグスクロール有効 */
@media only screen and (max-width: 1199px) and (min-width: 768px) {
  .p-about-main-image-wrapper {
    cursor: grab;
  }

  .p-about-main-image-wrapper.is-dragging {
    cursor: move;
    user-select: none;
  }

  .p-about-main-image-wrapper.is-dragging .p-about-pin {
    pointer-events: none;
  }

  .p-about-main-image {
    width: 1200px;
    min-width: 1200px;
  }
}

/* 767px以下（SP）はoverflow-xでスクロール */
@media only screen and (max-width: 767px) {
  .p-about-main-image-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* SPのスクロールバーを非表示 */
  .p-about-main-image-wrapper::-webkit-scrollbar {
    display: none;
  }

  .p-about-main-image-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .p-about-main-image {
    width: 1200px;
    min-width: 1200px;
  }
}

/*---------- ABOUT PIN (吹き出し) ----------*/
@keyframes pinBounceIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -100%) scale(0);
  }

  50% {
    transform: translate(-50%, -100%) scale(1.15);
  }

  70% {
    transform: translate(-50%, -100%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
}

.p-about-pin {
  position: absolute;
  transform: translate(-50%, -100%) scale(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  opacity: 0;
}

/* スクロールイン時にアニメーション発火 */
.p-about-pin.is-visible {
  animation: pinBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.p-about-pin.is-visible:nth-child(2) {
  animation-delay: 0.1s;
}

.p-about-pin.is-visible:nth-child(3) {
  animation-delay: 0.2s;
}

.p-about-pin.is-visible:nth-child(4) {
  animation-delay: 0.3s;
}

.p-about-pin.is-visible:nth-child(5) {
  animation-delay: 0.4s;
}

.p-about-pin.is-visible:nth-child(6) {
  animation-delay: 0.5s;
}

.p-about-pin.is-visible:nth-child(7) {
  animation-delay: 0.6s;
}

.p-about-pin.is-visible:nth-child(8) {
  animation-delay: 0.7s;
}

.p-about-pin.is-visible:nth-child(9) {
  animation-delay: 0.8s;
}

/* Floating Smooth */
@keyframes floatingSmooth {
  0% {
    transform: translate3d(-50%, -100%, 0) translateY(0);
  }

  50% {
    transform: translate3d(-50%, -100%, 0) translateY(-10px);
  }

  100% {
    transform: translate3d(-50%, -100%, 0) translateY(0);
  }
}

.p-about-pin.is-visible.is-floating {
  opacity: 1;
  transform: translate(-50%, -100%);
  animation-name: floatingSmooth;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: 3s;
}

.p-about-pin.is-visible.is-floating:nth-child(2) {
  animation-delay: 0s;
}

.p-about-pin.is-visible.is-floating:nth-child(3) {
  animation-delay: 0.1s;
}

.p-about-pin.is-visible.is-floating:nth-child(4) {
  animation-delay: 0.2s;
}

.p-about-pin.is-visible.is-floating:nth-child(5) {
  animation-delay: 0.3s;
}

.p-about-pin.is-visible.is-floating:nth-child(6) {
  animation-delay: 0.4s;
}

.p-about-pin.is-visible.is-floating:nth-child(7) {
  animation-delay: 0.5s;
}

.p-about-pin.is-visible.is-floating:nth-child(8) {
  animation-delay: 0.6s;
}

.p-about-pin.is-visible.is-floating:nth-child(9) {
  animation-delay: 0.7s;
}

.p-about-pin__label {
  background-color: #00a5ff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  min-width: 85px;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.35s, transform 0.35s cubic-bezier(0.68, -1.01, 0.32, 2.5);
}

.p-about-pin:hover .p-about-pin__label {
  background-color: #0090e0;
  box-shadow: 0 4px 16px rgba(0, 165, 255, 0.4);
  transform: scale(1.2);
  will-change: transform;
}

.p-about-pin__label::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #00a5ff;
  transition: border-top-color 0.3s ease;
}

.p-about-pin:hover .p-about-pin__label::after {
  border-top-color: #0090e0;
}


/*---------- ABOUT MODAL ----------*/
.p-about-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.p-about-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.p-about-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.p-about-modal__content {
  position: relative;
  background-color: #f5fdff;
  padding: 30px 40px 40px;
  max-width: 1240px;
  width: 95%;
  height: 70vh;
  overflow: scroll;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;

  @media screen and (max-width: 1080px) {
    overflow-x: hidden;
    display: block;
  }

  @media screen and (max-width: 1300px) {
    height: 90vh;
  }
}

.p-about-modal.is-active .p-about-modal__content {
  transform: translateY(0);
}

.p-about-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 100;
}

.p-about-modal__close:hover {
  color: #1175b9;
}

body.is-modal-open {
  overflow: hidden;
}

@media only screen and (max-width: 767px) {
  .p-about-modal__close {
    top: 0;
    right: 10px;
  }

  .p-about-modal__content {
    padding: 30px 20px;
  }
}

/*---------- ABOUT CTA SECTION ----------*/
.p-about-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 80px;
}

.p-about-cta__title {
  font-size: 24px;
  font-weight: 600;
  color: #1175b9;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-about-cta__deco {
  font-size: 20px;
  font-weight: 400;
  color: #1175b9;
}

.p-about-cta__deco--left {
  margin-right: 4px;
}

.p-about-cta__deco--right {
  margin-left: 4px;
}

.p-about-cta__num {
  font-size: 32px;
  font-weight: 700;
  color: #1175b9;
}

.p-about-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 60px;
  border: 2px solid #1175b9;
  background-color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.p-about-cta__btn:hover {
  background-color: #1175b9;
}

.p-about-cta__btn:hover .p-about-cta__btn-text,
.p-about-cta__btn:hover .p-about-cta__btn-arrow {
  color: #fff;
}

.p-about-cta__btn-text {
  font-size: 16px;
  font-weight: 600;
  color: #1175b9;
  transition: color 0.3s ease;
}

.p-about-cta__btn-arrow {
  position: absolute;
  right: 20px;
  font-size: 16px;
  color: #1175b9;
  transition: color 0.3s ease;
}

@media only screen and (max-width: 767px) {
  .p-about-cta {
    padding: 40px 20px 60px;
  }

  .p-about-cta__title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .p-about-cta__num {
    font-size: 26px;
  }

  .p-about-cta__btn {
    width: 240px;
    height: 50px;
  }

  .p-about-cta__btn-text {
    font-size: 14px;
  }
}

/*---------- MODAL (モーダル) ----------*/
.p-facility-modal__title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.p-facility-modal__title::before,
.p-facility-modal__title::after {
  content: '';
  width: 50px;
  height: 2px;
  background-color: #333;
}

.p-facility-modal__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  flex: 1;
  min-height: 0;

  @media screen and (max-width: 1080px) {
    display: block;
  }
}

.p-facility-modal__left {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: -15px;

  @media screen and (max-width: 1080px) {
    overflow-x: scroll;
    display: block;
  }
}

#modal-complex .p-facility-modal__left {
  margin-top: 35px;
}

.p-facility-modal__image-wrap {
  position: relative;
  min-width: max-content;
  max-width: max-content;

  @media screen and (max-width: 1080px) {
    margin-top: 60px;
  }
}

.p-facility-modal__image {
  display: block;
  height: auto;
  max-height: 500px;

  @media screen and (max-width: 1300px) {
    max-width: 700px;
  }
}
#modal-commercial .p-facility-modal__image,
#modal-factory .p-facility-modal__image {
  max-width: none;
}
#modal-logistics .p-facility-modal__image {
  max-width: 780px;
}

/* 工場吹き出しボタン */
.p-facility-btn {
  position: absolute;
  transform: translateX(-50%) scale(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  opacity: 0;
}

.p-facility-btn.is-active {
  z-index: 100;
}

/* モーダル表示時にアニメーション発火 */
.p-about-modal.is-active .p-facility-btn {
  animation: facilityBtnBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}


@keyframes facilityBtnBounceIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }

  50% {
    transform: translateX(-50%) scale(1.15);
  }

  70% {
    transform: translateX(-50%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.p-facility-btn__label {
  background-color: #00a5ff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
  position: relative;
  transition: background-color 0.3s ease;
}

.p-facility-btn__label::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #00a5ff;
  transition: border-top-color 0.3s ease;
}

.p-facility-btn__icon {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  margin-top: 8px;
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
  border-radius: 100px;
  border: 1px solid #026eb7;
  background-color: #fff;
  padding: 12px 16px;
  transform-origin: center top;
  flex-shrink: 0;
  width: max-content;
}

.p-facility-btn__icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.p-facility-btn__icon-item img {
  width: auto;
  height: 35px;
  object-fit: contain;
  flex-shrink: 0;
}

.p-facility-btn__icon--has-circle {
  padding: 9px 16px 9px 8px;
}

.p-facility-btn__icon-item--circle {
  transform: scale(1.35);
}

/* ホバー・選択時のスタイル */
.p-facility-btn:hover .p-facility-btn__label,
.p-facility-btn.is-active .p-facility-btn__label {
  background-color: #fff;
  color: #00a5ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid #00a5ff;
}

.p-facility-btn.is-active .p-facility-btn__label {
  font-size: 14px;
  padding: 7px 14px;
}

/* 三角形のボーダー用（外側） */
.p-facility-btn:hover {
  z-index: 15;
}

.p-facility-btn.is-active {
  z-index: 14;
}

.p-facility-btn:hover .p-facility-btn__label::before,
.p-facility-btn.is-active .p-facility-btn__label::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8.5px solid #00a5ff;
}

.p-facility-btn:hover .p-facility-btn__label::after,
.p-facility-btn.is-active .p-facility-btn__label::after {
  border-top-color: #fff;
  bottom: -6px;
}

.p-facility-btn:hover .p-facility-btn__icon,
.p-facility-btn.is-active .p-facility-btn__icon {
  transform: scale(1.18);
}

/* 画像1つの場合は円形 */
.p-facility-btn--single .p-facility-btn__icon,
.p-facility-btn--circle .p-facility-btn__icon {
  border-radius: 50%;
  padding: 12px;
  width: 80px;
  height: 80px;
  justify-content: center;
  align-items: center;
}

.p-facility-btn--single .p-facility-btn__icon-item img {
  height: 40px;
}

.p-facility-btn--circle .p-facility-btn__icon-item img {
  height: 70px;
}

/* 右側：対象サービス */
.p-facility-modal__right {
  width: 285px;
  flex-shrink: 0;
  margin-left: auto;

  @media screen and (max-width: 1080px) {
    margin-right: auto;
    margin-top: 30px;
  }
}

.p-facility-modal__service-title {
  font-size: 18px;
  font-weight: 600;
  color: #00a5ff;
  text-align: center;
  margin-bottom: 15px;
}

.p-facility-service {
  background-color: #fff;
  border: 2px solid #ddd;
  overflow: hidden;
  height: 88px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column-reverse;
  text-decoration: none;
}

.p-facility-service__logo,
.p-facility-service__logo-text {
  padding-block: 2.5px;
}

.p-facility-service__logo {
  max-height: 35px;
}

.p-facility-service__logo-text {
  max-height: 20px;
}

.p-facility-service img {
  width: auto;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.p-facility-service__text {
  padding-block: 2.5px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.6;
  text-align: center;
}

/* 初期状態：プレースホルダー表示、タイトル・サービスカード非表示 */
.p-facility-modal__placeholder {
  font-size: 15px;
  font-weight: bold;
  color: #00a5ff;
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
  border: 2px solid #00a5ff;
  border-radius: 8px;
  margin-bottom: 12px;
}

.p-facility-modal__right .p-facility-modal__service-title {
  display: none;
}

.p-facility-modal__services {
  display: none;
  flex-direction: column;
  gap: 12px;
}

/* クリック後：プレースホルダー非表示、タイトル・サービスカード表示 */
.p-facility-modal__right.is-clicked .p-facility-modal__panel {
  background-color: #fff;
  border: 2px solid #00a5ff;
  border-radius: 8px;
  padding: 12px;
}

.p-facility-modal__right.is-clicked .p-facility-modal__placeholder {
  display: none;
}

.p-facility-modal__right.is-clicked .p-facility-modal__service-title {
  display: block;
}

.p-facility-modal__right.is-clicked .p-facility-modal__services {
  display: flex;
}