/* ─────────────────────────────────────────────
   ページ読み込みアニメーション
   .img_hero → 1秒後にフェードインのみ（移動なし）
   .txt_hero → 1.8秒後にフェードインのみ（移動なし）
   ───────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.img_hero {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.5s;
}

.txt_hero {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 1s;
}

/* ─────────────────────────────────────────────
   累計実績フェードイン＋上昇
   .txt_hero（delay:1s + duration:0.8s）完了後に連続して表示
   ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 1.8s;
}

/* エディター内ではアニメーション初期状態を無効化（opacity:0 で消えるのを防ぐ）
   FSE エディターの iframe body は .editor-styles-wrapper クラスを持つ */
.editor-styles-wrapper .results,
.editor-styles-wrapper .img_hero,
.editor-styles-wrapper .txt_hero {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ─────────────────────────────────────────────
   トピックスリスト [topics_list]
   ───────────────────────────────────────────── */
.topics-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topics-item {
  border-bottom: 1px solid #d8d8d8;
}

.topics-item:first-child {
  padding-top: 1rem;
}

.topics-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  text-decoration: none;
  color: inherit;
  transition: color 0.15s;
}

.topics-link:hover .topics-title {
  text-decoration: underline;
  color: var(--wp--preset--color--primary, #0051af);
}

/* カテゴリバッジ */
.topics-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #888;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  min-width: 64px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 日付 */
.topics-date {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

/* タイトル */
.topics-title {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  flex: 1;
}

/* 外部リンクアイコン（→ 矢印） */
.topics-external::after {
  content: '↗';
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .topics-link {
    flex-wrap: wrap;
    gap: 8px;
  }

  .topics-date {
    font-size: 12px;
  }

  .topics-title {
    width: 100%;
    font-size: 13px;
  }
}

/* ─────────────────────────────────────────────
   アイコン付きボタン共通 */
.wp-block-button.is-phone-button .wp-block-button__link,
.wp-block-button.is-contact-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* 疑似要素でアイコン表示 */
.wp-block-button.is-phone-button .wp-block-button__link::before,
.wp-block-button.is-contact-button .wp-block-button__link::before {
  content: '';
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 1.25em;
}

/* 電話 */
.wp-block-button.is-phone-button .wp-block-button__link::before {
  background-image: url('../img/icon-phone.svg');
}

/* メール */
.wp-block-button.is-contact-button .wp-block-button__link::before {
  background-image: url('../img/icon-mail.svg');
}

/* Header layout helpers */
.wp-block-navigation.is-header-nav-push-right {
  margin-left: auto;
  font-weight: 700;
  letter-spacing: 1px;
  padding-right: 0.5rem;
}

.wp-block-navigation.is-header-nav-push-right + .wp-block-buttons,
.wp-block-navigation.is-header-nav-push-right + .wp-block-button {
  margin-left: 1rem;
}
@media (max-width: 600px) {
  .wp-block-navigation.is-header-nav-push-right {
    padding-right: 0;
  }
  .wp-container-core-group-is-layout-67b6744b:last-child {
    justify-content: center;
  }
  .wp-block-buttons > .wp-block-button {
    display: inline-block;
    margin: 0 auto;
  }
  .wp-block-button.is-phone-button .wp-block-button__link,
  .wp-block-button.is-contact-button .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.3rem 1rem;
  }
}

/* ============================================================
   導入事例スライダー
   ============================================================ */

.case-slider-section {
  /* トラックが左右にはみ出した分をここでクリップ */
  overflow: hidden;
  padding-block: 3rem;
}

/* スライダー外枠
   overflow: hidden を持たない → 両端のカードがはみ出して見える（ピーク効果）
   クリップは親の .case-slider-section が担う */
.case-slider-wrapper {
  position: relative;
  /* padding-inline なし → カードをラッパー端まで表示 */
  box-sizing: border-box;
  /* コンテナクエリの基準としてラッパー幅を使う */
  container-type: inline-size;
  /* 横スワイプを JS に委譲し、縦スクロールはブラウザ本来の挙動を維持 */
  touch-action: pan-y;
}

/* スライドトラック：横並び */
.case-slider-track {
  display: flex;
  will-change: transform;
  /* JS で transition を制御するため CSS には書かない */
}

/* 各カード
   PC: [半分 | full | full | full | 半分] = 4 枚分幅 + gap×4 = wrapper幅
       → c = (100cqw - 4×20px) / 4
   スマホ: [半分 | full | 半分] = 2 枚分幅 + gap×2 = wrapper幅
       → c = (100cqw - 2×14px) / 2  ※ @container で上書き */
.case-slider-item {
  flex: 0 0 calc((100cqw - 4 * 20px) / 4);
  margin-right: 20px;
  position: relative; /* オーバーレイ <a> の基点 */
}

/* wpautop が <a class="case-slider-link"> を <p> で包む場合に備えて無害化 */
.case-slider-item > p {
  display: contents;
}

/* カード全面リンク（オーバーレイ） */
.case-slider-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.case-slider-item figure {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.case-slider-item:hover figure,
.case-slider-item.is-active figure {
  border-color: #0051af;
}

.case-slider-item figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-slider-body {
  padding-top: 0.6rem;
}

.case-slider-company {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #333;
}

.case-slider-desc {
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0;
  color: #555;
  /* 3行クランプ */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 前後ナビボタン */
.case-slider-prev,
.case-slider-next {
  position: absolute;
  top: calc(50% - 1.5rem); /* 画像中央あたり */
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #333;
  transition:
    background 0.2s,
    border-color 0.2s;
  z-index: 10;
}

.case-slider-prev:hover,
.case-slider-next:hover {
  background: #0051af;
  border-color: #0051af;
  color: #fff;
}

/* left/right は @container の外で上書き指定済み */

/* 「一覧を見る」ボタン配置 */
.case-slider-footer {
  text-align: center;
  margin-top: 2rem;
}

/* 「一覧を見る」アウトラインボタン */
.case-slider-archive-btn {
  border: 2px solid #0051af;
  background: transparent;
  color: #0051af;
  line-height: 1;
  padding: 0.5rem 2.5rem;
  font-weight: 700;
  transition:
    background 0.2s,
    color 0.2s;
}

.case-slider-archive-btn:hover {
  background: #0051af;
  border-color: #0051af;
  color: #fff;
}

/* ボタン位置調整：padding がなくなったので端に寄せる */
.case-slider-prev {
  left: 0.5rem;
}
.case-slider-next {
  right: 0.5rem;
}

/* レスポンシブ（コンテナクエリ）
   スマホ: [半分 | full | 半分] = 2 枚分幅 + gap×2 = wrapper幅
           → c = (100cqw - 2×14px) / 2 */
@container (max-width: 768px) {
  .case-slider-item {
    flex: 0 0 calc((100cqw - 2 * 14px) / 2);
    margin-right: 14px;
  }
}

/* ─────────────────────────────────────────────
   会社情報・子ページ サイドバーナビ
   ───────────────────────────────────────────── */
.company-page-wrapper {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  box-sizing: border-box; /* padding を幅に含める → max-width 超えを防止 */
  width: 100%;
  max-width: 1448px;
  margin: 0 auto;
  padding: 3rem 24px;
}

/* サイドバー：幅220px固定（伸縮しない） */
.company-sidebar-col {
  flex: 0 0 220px;
  width: 220px; /* flex-basisだけだと一部ブラウザで崩れるため明示 */
  min-width: 220px;
}

/* コンテンツ：残りスペースをすべて使ってリキッド表示 */
.company-content-col {
  flex: 1 1 0%;
  min-width: 0; /* テーブル等の overflow を防ぐ */
}

/* スマホ：縦積み */
@media (max-width: 781px) {
  .company-page-wrapper {
    flex-direction: column;
    padding: 1.5rem 16px 3rem;
  }

  .company-sidebar-col {
    width: 100%;
    min-width: 0;
    flex: none;
  }
}

.company-sibling-nav {
  position: sticky;
  top: 100px; /* 固定ヘッダーの高さ分 */
}

.company-sibling-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.company-sibling-nav li a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #e0e0e0;
  transition:
    background 0.15s,
    color 0.15s;
}

.company-sibling-nav li:last-child a {
  border-bottom: none;
}

.company-sibling-nav li a:hover {
  background: #f0f5ff;
  color: #0051af;
}

/* アクティブ項目：青背景・白テキスト（現在ページのみ） */
.company-sibling-nav li.is-active a {
  background: #0051af;
  color: #fff;
  font-weight: 600;
  cursor: default;
}
.bg_title {
  position: relative;
  overflow: hidden;
}

/* 背景画像レイヤー（ブラーあり） */
.bg_title::before {
  content: '';
  position: absolute;
  inset: -20px; /* blur端のにじみ防止 */
  background: inherit;
  background-position: center center;
  background-size: cover;
  filter: blur(4px);
  z-index: 0;
}

/* 白オーバーレイ */
.bg_title::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 1;
}

/* コンテンツが最前面 */
.bg_title > * {
  position: relative;
  z-index: 2;
}

/* ─────────────────────────────────────────────
   Contact Form 7
   ───────────────────────────────────────────── */
.contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
.contact-table tr {
  border-bottom: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}
.contact-table tr:first-child {
  border-top: 1px solid #e0e0e0;
}
.contact-table tr:last-child {
  border-left: none;
  border-right: none;
}
.contact-table th {
  width: 160px;
  padding: 5px 20px;
  background: #f0f5ff;
  color: #222;
  font-weight: 600;
  vertical-align: middle;
}
.contact-table td {
  padding: 5px 20px;
  vertical-align: middle;
  color: #333;
}
.contact-table .required {
  color: #cc0000;
  margin-left: 4px;
}

/* 入力フィールド共通 */
.contact-table input[type='text'],
.contact-table input[type='email'],
.contact-table input[type='tel'],
.contact-table textarea {
  width: 100%;
  max-width: 480px;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  color: #333;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.contact-table input[type='text']:focus,
.contact-table input[type='email']:focus,
.contact-table input[type='tel']:focus,
.contact-table textarea:focus {
  outline: none;
  border-color: #0051af;
  box-shadow: 0 0 0 3px rgba(0, 81, 175, 0.1);
}
.contact-table textarea {
  max-width: 100%;
  min-height: 140px;
  resize: vertical;
}

/* ラジオ・チェック */
.contact-table .wpcf7-radio .wpcf7-list-item {
  display: block;
  margin: 6px 0;
}
.contact-table input[type='radio'],
.contact-table input[type='checkbox'] {
  margin-right: 8px;
  accent-color: #0051af;
  vertical-align: middle;
}

/* エラー */
.contact-table .wpcf7-not-valid-tip {
  color: #cc0000;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}
.contact-table input.wpcf7-not-valid,
.contact-table textarea.wpcf7-not-valid {
  border-color: #cc0000;
}

/* 送信ボタン */
.contact-table .wpcf7-submit {
  display: block;
  margin: 0 auto;
  padding: 14px 60px;
  background: #0051af;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.contact-table .wpcf7-submit:hover {
  background: #003d8a;
}
.contact-table td:has(.wpcf7-submit) {
  text-align: center;
  padding: 32px 20px;
  border-top: none;
}

/* スマホ */
@media (max-width: 768px) {
  .contact-table th,
  .contact-table td {
    display: block;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
  }
  .contact-table th {
    border-bottom: none;
    padding-bottom: 4px;
  }
  .contact-table td {
    padding-top: 8px;
  }
  .contact-table input[type='text'],
  .contact-table input[type='email'],
  .contact-table input[type='tel'] {
    max-width: 100%;
  }
  .contact-table .wpcf7-submit {
    width: 100%;
    padding: 14px;
  }
}
