/* =============================================================
   diagnosis-hub.css — 診断ハブページ・業種個別ページ 専用スタイル
   edel-theme-child
   ============================================================= */

/* -------------------------------------------------------
   デザイントークン
   ------------------------------------------------------- */
:root {
  --h-bg:        #f8fafc;
  --h-surface:   #ffffff;
  --h-text:      #182640;
  --h-muted:     #475569;
  --h-subtle:    #94a3b8;
  --h-border:    #e2e8f0;
  --h-accent:    #2563eb;
  --h-accent-dk: #1d4ed8;
  --h-accent-bg: #eff6ff;
  --h-radius:    8px;
  --h-font:      'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
}

/* -------------------------------------------------------
   ページ全体ラッパー
   ------------------------------------------------------- */
.hub-page {
  min-height: 100vh;
  background: var(--h-bg);
  font-family: var(--h-font);
  color: var(--h-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
}

.hub-page *,
.hub-page *::before,
.hub-page *::after {
  box-sizing: border-box;
}

/* -------------------------------------------------------
   トップバー
   ------------------------------------------------------- */
.hub-topbar {
  background: var(--h-surface);
  border-bottom: 1px solid var(--h-border);
  padding: 0 32px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hub-topbar__brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--h-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.hub-topbar__brand:hover {
  color: var(--h-accent);
}

.hub-topbar__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--h-accent);
  background: var(--h-accent-bg);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------
   ヒーローセクション
   ------------------------------------------------------- */
.hub-hero {
  padding: 64px 32px 52px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hub-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--h-accent);
  margin-bottom: 20px;
}

.hub-hero__title {
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--h-text);
  margin: 0 0 18px;
}

.hub-hero__desc {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--h-muted);
  line-height: 1.8;
  margin: 0 auto 36px;
  max-width: 540px;
}

/* 検索ボックス */
.hub-search {
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}

.hub-search__input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 20px;
  border: 1.5px solid var(--h-border);
  border-radius: 100px;
  font-size: 14px;
  font-family: var(--h-font);
  background: var(--h-surface);
  color: var(--h-text);
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none;
}

.hub-search__input::placeholder {
  color: var(--h-subtle);
}

.hub-search__input:focus {
  border-color: var(--h-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.hub-search__icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--h-subtle);
  pointer-events: none;
  font-size: 16px;
  line-height: 1;
}

/* -------------------------------------------------------
   メインコンテナ
   ------------------------------------------------------- */
.hub-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* -------------------------------------------------------
   カテゴリセクション
   ------------------------------------------------------- */
.hub-section {
  margin-top: 56px;
}

.hub-section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--h-text);
  margin-bottom: 24px;
}

.hub-section__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.hub-section__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--h-text);
}

.hub-section__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--h-subtle);
  flex-shrink: 0;
}

/* -------------------------------------------------------
   カードグリッド
   ------------------------------------------------------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--h-border);
  border: 1px solid var(--h-border);
  border-radius: var(--h-radius);
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 860px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .hub-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   カード
   ------------------------------------------------------- */
.hub-card {
  background: var(--h-surface);
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  cursor: pointer;
  transition: background .12s;
}

.hub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--h-accent-bg);
  opacity: 0;
  transition: opacity .12s;
  pointer-events: none;
}

.hub-card:hover::after {
  opacity: 1;
}

.hub-card.is-hidden {
  display: none;
}

.hub-card__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.hub-card__title a {
  color: var(--h-text);
  text-decoration: none;
}

/* stretched link */
.hub-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hub-card__title a:hover {
  color: var(--h-accent);
}

.hub-card__title a:focus-visible::after {
  outline: 2px solid var(--h-accent);
  outline-offset: -2px;
  border-radius: var(--h-radius);
}

.hub-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.hub-card__tags li {
  font-size: 10px;
  color: var(--h-muted);
  background: var(--h-bg);
  border: 1px solid var(--h-border);
  border-radius: 3px;
  padding: 1px 7px;
}

.hub-card__desc {
  font-size: 12px;
  color: var(--h-muted);
  margin: 0;
  line-height: 1.65;
  flex: 1;
  position: relative;
  z-index: 1;
}

.hub-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--h-accent);
  background: var(--h-accent-bg);
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 4px 10px;
  margin-top: 4px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  width: fit-content;
  text-decoration: none;
  transition: background .12s, border-color .12s;
}

.hub-card__arrow::after {
  content: '→';
  transition: transform .15s;
}

.hub-card:hover .hub-card__arrow {
  background: #dbeafe;
  border-color: #93c5fd;
}

.hub-card:hover .hub-card__arrow::after {
  transform: translateX(3px);
}

/* -------------------------------------------------------
   FAQ
   ------------------------------------------------------- */
.hub-faq {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--h-border);
}

.hub-faq__title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.hub-faq__item {
  border-bottom: 1px solid var(--h-border);
}

.hub-faq__q {
  font-size: 14px;
  font-weight: 600;
  padding: 18px 36px 18px 0;
  cursor: pointer;
  list-style: none;
  margin: 0;
  position: relative;
  line-height: 1.6;
  color: var(--h-text);
  user-select: none;
}

.hub-faq__q::-webkit-details-marker { display: none; }

.hub-faq__q::before {
  content: 'Q.';
  color: var(--h-accent);
  font-weight: 800;
  margin-right: 8px;
}

.hub-faq__q::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 300;
  color: var(--h-subtle);
  line-height: 1;
  transition: transform .2s, color .2s;
}

details[open] .hub-faq__q::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--h-accent);
}

.hub-faq__a {
  font-size: 14px;
  color: var(--h-muted);
  line-height: 1.8;
  padding: 4px 0 20px 28px;
  margin: 0;
}

/* -------------------------------------------------------
   ミニフッター
   ------------------------------------------------------- */
.hub-footer {
  border-top: 1px solid var(--h-border);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--h-surface);
}

.hub-footer__copy {
  font-size: 12px;
  color: var(--h-subtle);
  margin: 0;
}

.hub-footer__nav {
  display: flex;
  gap: 20px;
}

.hub-footer__nav a {
  font-size: 12px;
  color: var(--h-muted);
  text-decoration: none;
}

.hub-footer__nav a:hover {
  color: var(--h-text);
}

/* -------------------------------------------------------
   業種個別ページ ヘッダー
   ------------------------------------------------------- */
.ind-hero {
  background: var(--h-surface);
  border-bottom: 1px solid var(--h-border);
  padding: 40px 0 36px;
}

.ind-hero__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

.ind-breadcrumb {
  font-size: 12px;
  color: var(--h-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ind-breadcrumb a {
  color: var(--h-muted);
  text-decoration: none;
}

.ind-breadcrumb a:hover {
  color: var(--h-accent);
  text-decoration: underline;
}

.ind-breadcrumb__sep {
  color: var(--h-border);
}

.ind-hero__category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--h-accent);
  margin-bottom: 12px;
}

.ind-hero__title {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--h-text);
}

.ind-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.ind-hero__tags li {
  font-size: 11px;
  color: var(--h-muted);
  background: var(--h-bg);
  border: 1px solid var(--h-border);
  border-radius: 4px;
  padding: 3px 10px;
}

.ind-hero__desc {
  font-size: 14px;
  color: var(--h-muted);
  line-height: 1.8;
  margin: 0;
}

.ind-body {
  max-width: 860px;
  margin: 40px auto 80px;
  padding: 0 32px;
}

/* -------------------------------------------------------
   検索で全カードが消えたセクションは非表示
   ------------------------------------------------------- */
.hub-section[data-empty="true"] {
  display: none;
}

/* -------------------------------------------------------
   レスポンシブ
   ------------------------------------------------------- */
@media (max-width: 640px) {
  .hub-topbar        { padding: 0 16px; }
  .hub-hero          { padding: 48px 16px 40px; }
  .hub-body          { padding: 0 16px 60px; }
  .hub-footer        { padding: 16px; }
  .ind-hero          { padding: 28px 0 24px; }
  .ind-hero__inner   { padding: 0 16px; }
  .ind-body          { padding: 0 16px; margin-top: 28px; }
}
