/* =============================================
   CTA Button — 全下層共通ボタン
   背景スライド + アイコンシフトのホバーアニメーション
   ============================================= */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: var(--cta-btn-width);
  height: var(--cta-btn-height);
  background: var(--color-x);
  color: var(--color-white);
  font-family: var(--font-ja);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
  transition: color 0.4s var(--ease-main);
}

/* 背景スライド用疑似要素 */
.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-white);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s var(--ease-main);
}

.cta-button:hover {
  color: var(--color-x);
}

.cta-button:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

/* アイコン */
.cta-button__icon {
  position: absolute;
  font-size: 32px;
  line-height: 1;
  color: inherit;
  transition: transform 0.4s var(--ease-main), color 0.4s var(--ease-main);
}

.cta-button--next .cta-button__icon {
  right: 32px;
}

.cta-button--prev .cta-button__icon {
  left: 32px;
}

/* ホバーでアイコンがシュッと動く */
.cta-button--next:hover .cta-button__icon {
  transform: translateX(6px);
}

.cta-button--prev:hover .cta-button__icon {
  transform: translateX(-6px);
}

/* 枠線（反転時に境界を見せる） */
.cta-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-x);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-main);
}

.cta-button:hover::after {
  opacity: 1;
}

/* MORE */
.cta-button--more {
  font-family: var(--font-heading);
  font-size: 32px;
  letter-spacing: 0.43em;
}

@media (max-width: 1024px) {
  .cta-button {
    width: 360px;
    height: 72px;
    font-size: 22px;
  }
  .cta-button--more { font-size: 28px; }
}

@media (max-width: 768px) {
  .cta-button {
    width: 100%;
    max-width: 100%;
    height: 64px;
    font-size: 18px;
  }
  .cta-button__icon { font-size: 24px; }
  .cta-button--next .cta-button__icon { right: 20px; }
  .cta-button--prev .cta-button__icon { left: 20px; }
  .cta-button--more { font-size: 22px; letter-spacing: 0.3em; }
}
