/* カスタムCSS */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.mobile-menu-button__line {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 9999px;
  background-color: #202020;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#mobile-menu-button {
  position: relative;
}

.mobile-menu-button__line:nth-child(1) {
  transform: translate(-50%, calc(-50% - 8px));
}

.mobile-menu-button__line:nth-child(3) {
  transform: translate(-50%, calc(-50% + 8px));
}

#mobile-menu-button[aria-expanded="true"] .mobile-menu-button__line:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

#mobile-menu-button[aria-expanded="true"] .mobile-menu-button__line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-button[aria-expanded="true"] .mobile-menu-button__line:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

input::placeholder,
textarea::placeholder {
  color: #b2b2b2 !important;
}

/* 確認画面・完了画面は確認ボタン押下まで非表示 */
.confirm_area,
.thanks_area {
  display: none;
}

/* CF7 デフォルトの送信完了メッセージを非表示（/thanks へリダイレクトするため） */
.wpcf7-response-output {
  display: none;
}

.submit-button,
.confirm_button {
  padding: 20px 0;
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  background-color: #027F87;
  color: white;
  cursor: pointer;
  border: none;
}

.submit-button:disabled,
.confirm_button:disabled {
  background-color: #f3f3f3;
  color: #202020;
  cursor: not-allowed;
}

.submit-button:hover,
.confirm_button:hover {
  opacity: 0.8;
}

.wpcf7-list-item {
  margin-left: 0 !important;
}

.wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #027F87;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 9999px;
}

.template-section {
  border-bottom: 1px dashed #cbd5e1;
}

.usage-slider {
  --usage-slide-width: min(1000px, calc(100vw - 160px));
}

.usage-slider__slide {
  width: var(--usage-slide-width);
}

.usage-slider__track {
  padding-inline: calc((100vw - var(--usage-slide-width)) / 2);
}

.science-slider {
  --science-slide-width: min(1000px, calc(100vw - 160px));
}

.science-slider__slide {
  width: var(--science-slide-width);
}

.science-slider__track {
  padding-inline: calc((100vw - var(--science-slide-width)) / 2);
}

.voice-slider {
  --voice-slide-width: min(800px, calc(100vw - 260px));
}

.voice-slider__viewport {
  position: relative;
}

.voice-slider__slide {
  width: var(--voice-slide-width) !important;
  background: #fff;
}

.voice-slider__track {
  align-items: center;
}

@media (max-width: 700px) {
  .usage-slider {
    --usage-slide-width: calc(100vw - 60px);
  }

  .science-slider {
    --science-slide-width: calc(100vw - 60px);
  }

  .voice-slider {
    --voice-slide-width: 275px;
  }
}

@media (max-width: 767px) {
  .voice-slider {
    --voice-slide-width: 275px;
  }
}

.usage-slider__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9999px;
  background: #202020;
  cursor: pointer;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.usage-slider__button img {
  width: 10px;
  height: auto;
}

.usage-slider__button:disabled {
  background: rgba(32, 32, 32, 0.25);
  cursor: default;
}

.usage-slider__button:not(:disabled):hover {
  opacity: 0.8;
}

.voice-slider__button {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 9999px;
  background: #202020;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-50%);
}

.voice-slider__button--prev {
  left: calc(50% - var(--voice-slide-width) / 2 - 59px);
}

.voice-slider__button--next {
  right: calc(50% - var(--voice-slide-width) / 2 - 59px);
}

.voice-slider__button img {
  width: 11px;
  height: auto;
}

.voice-slider__button:hover {
  opacity: 0.82;
}

@media (max-width: 767px) {
  .voice-slider__button {
    width: 36px;
    height: 36px;
  }

  .voice-slider__button--prev {
    left: calc(50% - var(--voice-slide-width) / 2 - 48px);
  }

  .voice-slider__button--next {
    right: calc(50% - var(--voice-slide-width) / 2 - 48px);
  }

  .voice-slider__button img {
    width: 9px;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .voice-slider {
    --voice-slide-width: calc(100vw - 220px);
  }

  .voice-slider__button--prev {
    left: 40px;
  }

  .voice-slider__button--next {
    right: 40px;
  }
}

.pagination .page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #027F87;
  border-radius: 50%;
  color: #027F87;
  text-decoration: none;
  font-size: 16px;
}

.template-ready.is-ready {
  color: #027F87;
  opacity: 1;
  font-weight: 600;
}


.anim-box.fadeup {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
}

.anim-box.fadeup.is-animated {
  animation: fadeup 1s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes fadeup {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-box.fadeup,
  .anim-box.fadeup.is-animated {
    animation: none;
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}