/* ========================================
   Career Pages - Animation Styles
   対象: potential / professional / sp
======================================== */

/* --- MV Fade-in (CSS animation, JS不要) --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.potMv__content,
.proMv__content,
.careerSpMv__content {
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* --- Scroll Fade-in --- */
.js-fadein {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.js-fadein.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Button Arrow Hover Loop --- */
@keyframes arrowLoop {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  40% {
    transform: translateX(20px);
    opacity: 0;
  }
  41% {
    transform: translateX(-20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 純粋な矢印SVG → SVG全体をアニメーション */
/* ポテンシャル: 社員の声カード */
.potVoice__card:hover .potVoice__more svg {
  animation: arrowLoop 0.5s ease forwards;
}
/* ポテンシャル: エントリーバナー */
.potEntry__banner:hover .potEntry__bannerArrow svg {
  animation: arrowLoop 0.5s ease forwards;
}

/* プロフェッショナル: 社員の声カード */
.proVoice__card:hover .proVoice__arrow {
  animation: arrowLoop 0.5s ease forwards;
}

/* rect背景付きSVG → line+polygonだけアニメーション */
/* プロフェッショナル: エントリーバナー */
.proEntry__banner:hover .proEntry__bannerArrow line,
.proEntry__banner:hover .proEntry__bannerArrow polygon {
  animation: arrowLoop 0.5s ease forwards;
}
/* SP: CTAボタン */
.careerSpCta:hover .careerSpCta__arrow line,
.careerSpCta:hover .careerSpCta__arrow polygon {
  animation: arrowLoop 0.5s ease forwards;
}

/* --- SP Image Modal (Potential TTP) --- */
.ttp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.ttp-modal.is-open {
  display: flex;
}
.ttp-modal__img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.ttp-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.ttp-modal__close::before,
.ttp-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 2px;
  background: #fff;
}
.ttp-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.ttp-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
