/* ==========================================================================
   Home industry block (業種別ブロック) - js/home-hero.js 専用
   style.css は触らない。色は style.css の変数をそのまま使う。
   ========================================================================== */

/* --- 切替チップ ---------------------------------------------------------
   コミュニティCTAの下・中央に小さく置く。選択中だけ薄い色、他は文字だけにして主張を抑える */

.hv-chips-wrap {
  margin: 40px 0 0; /* コミュニティCTAの下。ここから下が業種別 */
}

.hv-chips {
  display: flex;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto; /* 中央寄せ。入りきらないモバイルでは左端から横スクロール */
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hv-chips::-webkit-scrollbar {
  display: none;
}

.hv-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-sub);
  transition: background 0.15s ease, color 0.15s ease;
}

.hv-chip:hover {
  color: var(--color-primary-dark);
}

.hv-chip[aria-current="page"] {
  background: var(--color-bg-tint);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.hv-chip:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* --- コミュニティCTA(ヒーロー文言のすぐ下・チップの上) ---------------------- */

.hv-cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hv-cta .btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 13px;
}

/* --- 業種ブロック: 中央に見出し1行+サブ1行、その下に2列で流れるテンプレート --- */

body[data-page="home"] .page-main {
  overflow-x: clip; /* テンプレート帯を画面幅いっぱいに出すため(横スクロールを出さない) */
}

.hv-block {
  --hv-h: 104px;
  margin: 14px auto 0;
  text-align: center;
  animation: hv-fade 0.25s ease;
}

.hv-h {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}

.hv-h em {
  font-style: normal;
  color: var(--color-primary-dark);
}

.hv-nb {
  white-space: nowrap; /* 日本語は語中でも折れるので、折れてほしくない語のまとまりを固定 */
}

.hv-sub {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-sub);
  text-wrap: balance;
}

.hv-rows {
  width: 100vw;
  margin: 24px 0 0 calc(50% - 50vw);
}

.hv-strip {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.hv-strip + .hv-strip {
  margin-top: 12px;
}

.hv-track {
  display: flex;
  width: max-content;
  animation: hv-marquee 60s linear infinite;
}

.hv-strip[data-dir="right"] .hv-track {
  animation-direction: reverse;
  animation-duration: 70s;
}

.hv-strip:hover .hv-track {
  animation-play-state: paused;
}

.hv-set {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}

.hv-set img {
  height: var(--hv-h);
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
  background: var(--color-bg-alt);
}

@keyframes hv-marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes hv-fade {
  from {
    opacity: 0;
  }
}

/* 動きを減らす設定: 自動スクロールをやめて、指でスワイプする列にする */
@media (prefers-reduced-motion: reduce) {
  .hv-block {
    animation: none;
  }

  .hv-strip {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hv-track {
    animation: none;
  }

  .hv-set[aria-hidden="true"] {
    display: none;
  }
}

@media (min-width: 900px) {
  .hv-block {
    --hv-h: 168px;
  }

  .hv-cta {
    margin-top: 28px;
  }

  .hv-cta .btn {
    padding: 12px 22px;
    font-size: 14px;
  }

  .hv-sub {
    font-size: 15px;
  }

  .hv-rows {
    margin-top: 30px;
  }

  .hv-strip + .hv-strip {
    margin-top: 16px;
  }

  .hv-set {
    gap: 16px;
    padding-right: 16px;
  }
}
