/* ==========================================================================
   contact-style.css
   お問い合わせページ（page-contact.php）専用スタイル
   デザイントークン：ネイビー #004183／コーラル #C63031
   フォント：Zen Old Mincho（見出し）／Zen Kaku Gothic New（本文）
   company-style.css / scientific-hub-style.css / voice-style.css の構成に準拠
   2026-07-20新規作成：エンドユーザー向け／動物病院・獣医師向けの2分岐フォーム
   ========================================================================== */

.ct-page {
  --ct-navy: #004183;
  --ct-coral: #C63031;
  --ct-bg-soft: #F7F9FB;
  --ct-text: #262626;
  --ct-border: #E5E9ED;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--ct-text);
  line-height: 1.8;
}

.ct-page h1,
.ct-page h2,
.ct-page h3 {
  font-family: "Zen Old Mincho", serif;
  color: var(--ct-navy);
}

.ct-page section > div {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.ct-section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
  position: relative;
}
.ct-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--ct-coral);
  margin: 12px auto 0;
}
/* 【2026-08-27】「どちらでお問い合わせですか？」は見出し自体を削除したため、
   直前に追加した .ct-branch .ct-section-title::after の下線非表示ルールは対象要素が
   無くなり不要（クリーンアップ済み）。 */
.ct-section-lead {
  text-align: center;
  font-size: 1.06rem;
  color: #666;
  margin: 0 0 36px;
}

/* ---------- ヒーロー ---------- */
/* 2026-07-29：全ページのメインビジュアル高さ統一（Scientific Hubの数値に合わせる） */
/* 2026-07-30：背景画像対応（.ct-hero__bg、他ページと同じfile_exists()フォールバック方式）を追加。
   あわせて、hospital-map-style.cssで発生した詳細度バグ（.ct-page h1,h2,h3の色指定が
   単純クラスの.ct-hero__titleに勝ってしまい白文字が効かなくなる不具合）を先回りして防止するため、
   .ct-hero__titleのセレクタを最初から「.ct-hero .ct-hero__title」の2クラスにしてある。 */
.ct-hero {
  position: relative;
  background: var(--ct-navy);
  padding: 88px 0;
  text-align: center;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: center;
}
.ct-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}
.ct-hero .ct-hero__bg {
  /* 2026-07-30修正：「.ct-page section > div」（詳細度0,1,2）が単純クラスの.ct-hero__bg
     （詳細度0,1,0）に勝ってしまい、max-width:720px・padding:0 24pxが適用されて背景画像が
     中央に小さく箱型で表示されてしまっていた（ユーザー指摘のスクリーンショットで発覚）。
     company-style.css(.co-hero .co-hero__bg)・voice-style.css(.vo-hero .vo-hero__bg)と
     同じ2クラスセレクタに揃えて、確実にmax-width:noneとフルブリード表示を優先させる。 */
  position: absolute;
  inset: 0;
  max-width: none;
  padding: 0;
  margin: 0;
  z-index: 0;
}
.ct-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}
.ct-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,65,131,0.3), rgba(0,65,131,0.5));
}
.ct-hero__eyebrow {
  color: #fff;
  opacity: 0.7;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.ct-hero .ct-hero__title {
  color: #fff;
  font-size: 2.2rem;
  margin: 0 0 12px;
}
.ct-hero__sub {
  color: #fff;
  opacity: 0.92;
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- 分岐選択カード ---------- */
.ct-branch {
  background: #fff;
  padding: 56px 0;
}
.ct-branch__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ct-branch__card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--ct-bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 28px 28px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.ct-branch__card:hover,
.ct-branch__card:focus-visible {
  border-color: var(--ct-navy);
}
.ct-branch__card-label {
  display: block;
  font-family: "Zen Old Mincho", serif;
  color: var(--ct-navy);
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.ct-branch__card-desc {
  display: block;
  font-size: 0.98rem;
  color: #666;
}

/* ---------- フォームエリア ---------- */
.ct-form-wrap {
  background: #fff;
  padding: 16px 0 72px;
}
.ct-form-wrap[hidden],
.ct-branch[hidden] {
  display: none;
}
.ct-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ct-navy);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  font-family: inherit;
}
.ct-back-link:hover {
  text-decoration: underline;
}
.ct-form-title {
  font-size: 1.4rem;
  margin: 0 0 28px;
}

.ct-field {
  margin-bottom: 22px;
}
.ct-field label {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 8px;
  color: var(--ct-navy);
}
.ct-field .ct-required {
  display: inline-block;
  background: var(--ct-coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.ct-field .ct-optional {
  display: inline-block;
  color: #999;
  font-size: 0.82rem;
  font-weight: 400;
  margin-left: 6px;
}
.ct-field input[type="text"],
.ct-field input[type="email"],
.ct-field input[type="tel"],
.ct-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ct-text);
  background: #fff;
}
.ct-field input:focus,
.ct-field textarea:focus {
  outline: none;
  border-color: var(--ct-navy);
}
.ct-field textarea {
  min-height: 160px;
  resize: vertical;
}

.ct-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.94rem;
  margin-bottom: 28px;
}
.ct-consent input {
  margin-top: 4px;
}
.ct-consent a {
  color: var(--ct-navy);
}

.ct-submit {
  display: inline-block;
  width: 100%;
  background: var(--ct-coral);
  color: #fff;
  font-weight: 700;
  font-size: 1.12rem;
  padding: 16px 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.ct-submit:hover {
  opacity: 0.85;
}

/* ---------- 完了・エラーメッセージ ---------- */
.ct-notice {
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
  font-size: 0.98rem;
}
.ct-notice--success {
  background: #EAF3EC;
  color: #1E6B3C;
  border: 1px solid #BFE0C9;
}
.ct-notice--error {
  background: #FBEAEA;
  color: var(--ct-coral);
  border: 1px solid #F0C4C4;
}
.ct-notice ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* ---------- 電話・その他の連絡先 ---------- */
.ct-alt {
  background: var(--ct-bg-soft);
  padding: 48px 0 64px;
  text-align: center;
}
.ct-alt__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ct-alt__list a {
  color: var(--ct-navy);
  font-weight: 700;
  text-decoration: none;
}
.ct-alt__list a:hover {
  text-decoration: underline;
}
.ct-alt__note {
  font-size: 0.9rem;
  color: #888;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .ct-hero {
    /* 2026-07-29：全ページ共通のコンテンツ最大値に合わせた固定height＋flex中央寄せ方式
       （詳細はcompany-style.css .co-heroのコメント参照） */
    padding: 110px 0;
    height: 437px;
  }
  .ct-hero .ct-hero__title {
    font-size: 2.6rem;
  }
  .ct-branch__list {
    flex-direction: row;
  }
  .ct-branch__card {
    flex: 1;
  }
}
