/* ============================================================
   contact.css
   /contact/ 配下ページスタイル
   ============================================================ */


/* ── Hero override ──────────────────── */
.ct-page-hero {
  padding-inline: max(var(--container-pad), calc((100% - var(--container-max)) / 2));
  background-image: url('/assets/images/common/page_hero.webp');
  background-color: var(--color-bg-light);
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--color-border);
}


/* ── Intro text ──────────────────── */
.ct-intro {
  font-size: clamp(0.9375rem, 1.5vw, 1.1875rem);   /* 15–19px */
  font-weight: var(--font-light);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-lg);
}


/* ── Region selector cards ──────────────────── */
.ct-region-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.ct-region-card {
  display: block;
  padding: clamp(1rem, 2vw, 1.75rem) clamp(1rem, 2.5vw, 2.5rem);
  border: 1px solid var(--color-text-dark);
  border-radius: var(--radius-sm);
  background: linear-gradient(to bottom, var(--color-bg-white), var(--color-bg-light));
  text-decoration: none;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.ct-region-card__title {
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);   /* 18–26px */
  font-weight: var(--font-medium);
  color: var(--color-text-dark);
  line-height: var(--leading-tight);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  margin-top: 0;
  margin-bottom: var(--space-sm);
  transition: var(--transition-normal);
}

.ct-region-card__desc {
  font-size: clamp(0.875rem, 1.4vw, 1.0625rem);  /* 14–17px */
  font-weight: var(--font-light);
  color: var(--color-text-sub);
  line-height: var(--leading-normal);
}

.ct-region-card:hover {
  border-color: rgba(27, 143, 203, 0.7);
  box-shadow: 0 0 12px rgba(27, 143, 203, 0.4);
}
.ct-region-card:hover * {
  color: var(--color-primary);
}


/* ── Contact section ──────────────────── */
.ct-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.ct-section__header h3 {
  margin-bottom: 0;
}


/* ── Region content sections (JSで表示切替、フェード遷移) ──────────────────── */
#north-america,
#europe,
#asia {
  opacity: 0;
  transition: opacity var(--transition-normal);
}

#north-america.is-visible,
#europe.is-visible,
#asia.is-visible {
  opacity: 1;
}


/* ── Contact box (common content area) ──────────────────── */
.ct-contact-box {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
}

/* 国選択に連動するリンクボックス（Europe）: 選択に応じてふわっと表示・非表示を切り替える */
.ct-contact-box__row[data-link-id] {
  opacity: 0;
  justify-content: flex-start;
  transition: opacity 0.25s ease;
}

/* テキストを伸ばさず、ボタンを右端ではなく間隔を空けた左寄せにする */
.ct-contact-box__row[data-link-id] .ct-contact-box__text {
  flex: none;
}

.ct-contact-box__row[data-link-id][hidden] {
  display: none;
}

.ct-contact-box__row[data-link-id].is-visible {
  opacity: 1;
}

.ct-contact-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* 上段コンテンツがある場合のみ区切りボーダーを引く */
.ct-contact-box__row:not(:first-child) {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  /* ボックスのパディングを打ち消して端まで線を伸ばす */
  margin-inline: calc(-1 * var(--space-lg));
  padding-inline: var(--space-lg);
}

.ct-contact-box__text {
  font-size: clamp(0.875rem, 1.4vw, 1.1875rem);
  font-weight: var(--font-regular);
  color: var(--color-text);
  line-height: var(--leading-normal);
  flex: 1;
}

.ct-contact-box h3 {
  margin-top: 0;
}


/* ── Select (dropdown) ──────────────────── */
/* 基本スタイルは forms.css の .td-select-wrap / .td-select を参照 */

.td-form .td-select-wrap {
  width: 50%;
  flex: none;
  margin-bottom: 0;
}

.td-form .td-select option {
  font-weight: var(--font-regular);
  color: var(--color-text);
}

.td-form .td-select option:first-child {
  color: var(--color-text-sub);
  font-weight: var(--font-light);
}


/* ── Steps indicator ──────────────────── */
.ct-steps {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: clamp(0.8125rem, 1.2vw, 1.0625rem);  /* 13–17px */
  flex-shrink: 0;
}

.ct-steps__step {
  font-weight: var(--font-light);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.ct-steps__step.is-active {
  color: var(--color-primary);
  font-weight: var(--font-regular);
}

.ct-steps__step:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--color-border-light);
  border-right: 1px solid var(--color-border-light);
  transform: rotate(45deg);
  vertical-align: middle;
  margin-left: 0.4em;
}


/* ── Asia section two-column layout ──────────────────── */
.ct-asia-layout {
  display: flex;
  gap: var(--space-lg);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-lg);
  align-items: start;
  border-radius: var(--radius-sm);
}


/* ── Corp info ──────────────────── */
.ct-corp-info {
  flex: 0 1 auto;
  max-width: 250px;
}

.ct-corp-info__name {
  font-size: clamp(1rem, 1.8vw, 1.375rem);   /* 16–22px */
  font-weight: var(--font-medium);
  color: var(--color-text-dark);
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.ct-corp-info__address {
  font-size: var(--text-xs);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.ct-corp-info__tel {
  font-size: clamp(0.8125rem, 1.2vw, 1.0625rem);
  color: var(--color-text);
  display: flex;
  gap: 0.4em;
}

.ct-corp-info__tel-label {
  color: var(--color-text);
}

.ct-corp-info__tel-num {
  color: var(--color-text-dark);
  letter-spacing: 0.04em;
}


/* ── Form (Asia section) ──────────────────── */
.ct-form-area {
  flex: 1;
}

.ct-form-intro {
  font-size: clamp(0.875rem, 1.4vw, 1.1875rem);
  font-weight: var(--font-regular);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-sm);
}

.ct-form-required-note {
  font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  color: var(--color-error);
}

/* 基本スタイルは forms.css の .td-form / .td-form__field / .td-required-label を参照 */
/* 基本スタイルは forms.css の .td-input / .td-textarea を参照 */


/* ── Privacy notice area ──────────────────── */
.ct-form__privacy {
  background: var(--color-bg);
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1rem, 2vw, 2.5rem);
  margin: var(--space-lg) 0;
  border-radius: var(--radius-sm);
}

.ct-form__privacy-text {
  font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
}

.ct-form__consent {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  justify-content: center;
}

.ct-form__consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius-sm);
  background: var(--color-bg-white);
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.ct-form__consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: url('/assets/images/common/icon/icon_checkbox.svg') center / contain no-repeat;
  border-radius: 2px;
}

.ct-form__consent-label {
  font-size: clamp(0.9375rem, 1.5vw, 1.1875rem);
  color: var(--color-text-dark);
}


/* ── Form action buttons ──────────────────── */
.ct-form__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ct-form__actions .wp-block-button__link.outline-btn {
  min-width: 200px;
}

.ct-form__actions .ct-btn--dark {
  min-width: 320px;
}


/* ── Right quick-nav panel (shared with events) ──────────────────── */
.ct-quick-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  background: var(--color-bg-white);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(27, 143, 203, 0.5);
  z-index: 90;
  overflow: hidden;
}

.ct-quick-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 6px;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.ct-quick-nav__item:last-child {
  border-bottom: none;
}

.ct-quick-nav__item:hover {
  background: var(--color-bg-light);
}

.ct-quick-nav__item.is-active {
  background: rgba(27, 143, 203, 0.1);
}

.ct-quick-nav__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.ct-quick-nav__label {
  font-size: 12px;
  font-weight: var(--font-medium);
  color: var(--color-primary);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.2;
}


/* ── Responsive ──────────────────── */
@media (max-width: 1200px) {
  .ct-quick-nav {
    display: none;
  }
}

@media (max-width: 960px) {
  .ct-region-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .ct-asia-layout {
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  .ct-contact-box__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .td-select-wrap {
    width: 100%;
  }

  .ct-section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ct-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .ct-form-intro {
    font-size: var(--text-md);
    font-weight: var(--font-medium);
    color: var(--color-text-dark);
    margin-bottom: var(--space-sm);
  }
  .ct-corp-info__address {
    font-size: var(--text-md);
    margin-bottom: var(--space-md);
  }
  .ct-form__field {
    flex-wrap: wrap;
  }

  .ct-required-label {
    font-size: 12px;
  }

  .td-form .td-select-wrap {
    flex: 1;
  }

  .ct-form__actions {
    flex-flow: column;
    margin-bottom: var(--space-lg);
  }

  .ct-form__actions button {
    width: 80%;
  }

  .ct-form__actions button[type="reset"] {
    display: none;
  }

  .ct-form__actions .wp-block-button__link.outline-btn,
  .ct-form__actions .ct-btn--dark {
    width: 100%;
    min-width: unset;
  }
}

/* CAPTCHA */
.td-form__turnstile {
	display: flex;
	justify-content: center;
	margin: var(--space-md) 0;
}
.wpcf7-spinner {
  display: none;
}
.ct-form-area .wpcf7-form-control-wrap {
  flex: 1;
}
.td-agree .wpcf7-form-control-wrap {
  flex: 0;
}