/* ============================================================
   SPEED-AD Support / Tutorial Hub
   - 適用範囲: body[data-page-id="tutorial-hub"]
   - CSS カスタムプロパティは news.css の :root 定義に依存:
     --brand, --brand-ink, --brand-soft, --brand-softer,
     --ink, --ink-2, --muted, --muted-2, --line, --line-2,
     --bg, --tag-bg, --tag-ink, --shadow-sm, --shadow-md, --radius
   - support-shell.css の管理領域には触らない
   ============================================================ */

/* ===== Grid Section ============================================== */
.th-grid-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.th-grid-section__heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-transform: uppercase;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* ===== Grid ====================================================== */
.th-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ===== Card ====================================================== */
.th-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.th-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--brand-soft);
}

/* ===== Card Header =============================================== */
.th-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
}

.th-card__category {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* カテゴリ「はじめに」修飾クラス: 青系の区別色で最初の 1 枚を際立たせる */
.th-card__category--start {
  background: #EFF6FF;
  color: #1E40AF;
}

/* ===== Card Badge ================================================ */
.th-card__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.th-card__badge--new {
  background: #dcfce7;
  color: #16a34a;
}

/* 「まずここから」誘導バッジ: ブランド塗りで最初の 1 枚を強調 */
.th-card__badge--start {
  background: var(--brand);
  color: #fff;
}

.th-card__badge--soon {
  background: var(--line);
  color: var(--muted);
}

/* ===== Coming Soon Card ========================================== */
.th-card--coming-soon {
  opacity: 0.7;
  cursor: not-allowed;
}

.th-card--coming-soon:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
  border-color: var(--line);
}

.th-card__cta--disabled {
  color: var(--muted-2);
  cursor: default;
  justify-content: center;
}

.th-card--coming-soon:hover .th-card__cta--disabled {
  color: var(--muted-2);
}

/* ===== Card Body ================================================= */
.th-card__body {
  flex: 1;
  padding: 14px 20px 16px;
}

.th-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.45;
}

/* 価値サブタイトル: タイトル直下の「何ができるか」一文。説明文より目立つが控えめに */
.th-card__lead {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 8px;
  line-height: 1.65;
}

.th-card__desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

/* ===== Card Meta ================================================= */
.th-card__meta {
  display: flex;
  gap: 16px;
  padding: 0 20px 14px;
  flex-wrap: wrap;
}

.th-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted-2);
}

.th-card__meta-item .material-icons {
  font-size: 14px !important;
  color: var(--muted-2);
}

/* ===== Card CTA ================================================== */
.th-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.th-card__cta .material-icons {
  font-size: 18px !important;
  transition: transform 0.15s ease;
}

.th-card:hover .th-card__cta {
  background: var(--brand);
  color: #fff;
}
.th-card:hover .th-card__cta .material-icons { transform: translateX(3px); }

/* カード全体が <a> のためフォーカスリング: カード枠で表現、CTA 行には干渉させない */
.th-card:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.18);
}

/* ===== Responsive ================================================ */
@media (max-width: 640px) {
  .th-grid-section {
    padding: 32px 20px 60px;
  }

  .th-grid {
    grid-template-columns: 1fr;
  }

  .b-hero { padding: 36px 20px 20px; }
  .b-hero__title { font-size: 28px; }
}

/* ===== CTA Section ===============================================
   .th-cta: チュートリアルハブ専用の「お困りですか？」CTAブロック
   ※ help-center.css の .hc-cta とは独立した定義
   ============================================================== */

.th-cta-section {
  padding-top: 0;
  padding-bottom: 80px;
}

.th-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--brand-softer);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.th-cta:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* アイコンサークル */
.th-cta__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.th-cta__icon .material-icons {
  font-size: 26px !important;
}

/* テキストエリア */
.th-cta__body {
  flex: 1;
  min-width: 0;
}

.th-cta__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.4;
}

.th-cta__subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

/* ボタン群 */
.th-cta__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 共通ボタン */
.th-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease,
              box-shadow 0.15s ease, transform 0.15s ease;
}

.th-cta__btn .material-icons {
  font-size: 17px !important;
}

.th-cta__btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.18);
}

/* Primary ボタン（塗り） */
.th-cta__btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.th-cta__btn--primary:hover {
  background: var(--brand-ink);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.th-cta__btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.18);
}

/* Ghost ボタン（枠線） */
.th-cta__btn--ghost {
  background: var(--bg);
  color: var(--brand);
  border: 1.5px solid var(--brand);
}

.th-cta__btn--ghost:hover {
  background: var(--brand-soft);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.th-cta__btn--ghost:active {
  transform: translateY(0);
  box-shadow: none;
}

/* CTA レスポンシブ */
@media (max-width: 640px) {
  .th-cta-section {
    padding-bottom: 60px;
  }

  .th-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 20px;
  }

  .th-cta__actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .th-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

/* モーション低減対応 */
@media (prefers-reduced-motion: reduce) {
  .th-card,
  .th-card__cta,
  .th-card__cta .material-icons,
  .th-cta,
  .th-cta__btn {
    transition: none;
  }

  .th-card:hover,
  .th-cta:hover,
  .th-cta__btn--primary:hover,
  .th-cta__btn--ghost:hover {
    transform: none;
  }
}
