/* ===== BRAVEMEDICA — column (コラム) =====
 * common.css の変数・命名（.wrap / .block / .subhero / .crumb / .case-wrap /
 * .case-body / .case-back など）はそのまま再利用し、ここでは新規に追加するもの
 * だけを定義する。common.css は編集しない。
 *
 * クラス接頭辞は bl_（block） / el_（element）。これは手書きページのダッシュ命名
 * （case-card 等）とは別系統で、_script/news/render.py が実際に組み立てる
 * カード・記事HTMLのクラス名（bl_newsCard, el_newsBadge, bl_articleBody 系）に
 * 合わせてある。設計メモの雛形にあった bl_columnCards_item 等の名前は、
 * render.py の実装（_card_html）が実際に出す bl_newsCard 系と一致しないため
 * 採用していない（詳細は task-2-report.md）。
 */

/* ===== SVGスプライト（_symbols.html）を非表示にする =====
 * common.css には .el_symbols を隠すルールが無い。何も当てないと <svg> が
 * <header> 直後にブラウザ既定の 300×150 で通常フローに乗り、全コラムページで
 * subhero が約150〜190px押し下げられる（レビューで実描画して確認された不具合）。
 * junbanmachi-jp の css/style.css にある解と同じもの（display:none だと
 * Safari 系で <use> 参照が解決されない実装があるため、視覚的に隠しつつ
 * DOMには残す clip-path 方式）をそのまま採用する。
 */
.el_symbols {
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  clip-path: inset(1px);
}

/* ===== 一覧カード（render.build_column_cards_html が組み立てる <li> を包む） ===== */
.bl_columnCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
  list-style: none;
}

.bl_newsCard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: .2s;
}

.bl_newsCard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--main);
}

.bl_newsCard_link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bl_newsCard_thumb {
  display: block;
  width: 100%;
  height: 200px;
  background: var(--bg-tint);
  overflow: hidden;
}

.bl_newsCard_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.bl_newsCard_body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 24px;
}

.bl_newsCard_meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.bl_newsCard_date {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray);
}

.bl_newsCard_title {
  display: block;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 10px;
}

.bl_newsCard_summary {
  display: block;
  flex: 1;
  font-size: 13.5px;
  line-height: 1.78;
  color: #46565e;
}

/* カテゴリ／クラスタのバッジ。5クラスタは既存サイトで実際に使われている色
 * （--main / --navy / --main-d / ヒーローの装飾グラデーション色 #8ED2E2 / --gray）
 * の組み合わせに寄せ、ブランドガイドに無い新しい色は増やさない。 */
.el_newsBadge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--main-d);
  background: var(--bg-tint);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.el_newsBadge__wait { color: var(--main-d); background: var(--bg-tint); }
.el_newsBadge__pharmacy { color: #fff; background: var(--navy); }
.el_newsBadge__payment { color: #fff; background: var(--main-d); }
.el_newsBadge__attract { color: var(--navy); background: #DFF3F7; }
.el_newsBadge__ops { color: #fff; background: var(--gray); }
/* お知らせ・事例カードが混ざっても崩れないよう、コラム以外のカテゴリにも既定色を用意 */
.el_newsBadge__column,
.el_newsBadge__case,
.el_newsBadge__feature,
.el_newsBadge__service,
.el_newsBadge__partner,
.el_newsBadge__notice { color: var(--main-d); background: var(--bg-tint); }

.el_industryBadge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* 出典・注釈のインラインアイコン（外部リンクの ↗ 相当。#icon_blank） */
.el_icon {
  display: inline-block;
  width: .8em;
  height: .8em;
  vertical-align: -0.05em;
  fill: currentColor;
}

.el_icon__inline {
  margin-left: 4px;
}

/* ===== コラム一覧ページ ===== */
.bl_columnIndex_lead {
  max-width: 780px;
}

/* ===== 記事ページ ===== */
.bl_columnArticle_meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--gray);
  font-weight: 600;
}

.bl_article_readTime {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--gray);
}

.bl_article_readTime_icon {
  flex: none;
}

/* 記事本文。common.css の .case-body（p / h2）をベースに、Markdown が
 * 生成しうる h3 / list / blockquote / hr / figure / table 分だけ足す。 */
.bl_columnArticle_body h3 {
  margin: 38px 0 14px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.6;
}

.bl_columnArticle_body ul,
.bl_columnArticle_body ol {
  margin: 0 0 22px;
  padding-left: 1.5em;
  font-size: 16px;
  line-height: 2;
  color: #3a4d56;
}

.bl_columnArticle_body li + li {
  margin-top: .3em;
}

.bl_columnArticle_body blockquote {
  margin: 0 0 22px;
  padding: 18px 22px;
  border-left: 4px solid var(--main);
  background: var(--bg);
  color: #46565e;
  border-radius: 0 12px 12px 0;
}

.bl_columnArticle_body blockquote p {
  margin: 0;
}

.bl_columnArticle_body hr {
  margin: 40px 0;
  border: none;
  border-top: 1px solid var(--line);
}

.bl_columnArticle_body strong {
  font-weight: 700;
  color: var(--navy);
}

.bl_columnArticle_body a {
  color: var(--main-d);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ヒーロー画像（build.py _hero が組み立てる <figure class="bl_article_hero">）。
 * 記事ページのみで使うクラスだが、これまで column.css にルールが無く、common.css の
 * img{max-width:100%} だけが当たっていた。max-width は幅の上限を決めるだけで幅そのもの
 * は 1200px の属性値のまま、height も 630px の属性値のまま残るため、コンテナ幅まで
 * 縮んだときに高さだけ固定されて縦に伸びる（.bl_article_figure と同じ不具合。
 * 2026-09-21 Task 11 でレンダリングして実測）。 */
.bl_article_hero {
  margin: 0 0 32px;
}

.bl_article_hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  margin: 0;
}

.bl_article_figure {
  margin: 32px 0;
}

/* width:100% だけだと、height を明示しない限り img[width][height] 属性由来の
 * 縦px値（例 675px）がそのまま残り、幅だけコンテナ幅に縮んで縦に伸びる
 * （HTML の width/height 属性は「著者スタイルより優先度は低いが未指定のプロパティを
 * 埋める」プレゼンテーションヒントとして働くため）。height:auto で明示的に解放する。 */
.bl_article_figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  margin: 0;
}

.bl_article_figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray);
  text-align: center;
}

/* ===== 記事内の表 =====
 * PC では表全体が収まり、モバイルでは横スクロールし、かつスクロールできる
 * ことが見て分かる形にする（ワークスペース規約）。table 自身に overflow-x は
 * 当てず、.bl_tableScroll（ラッパー）に持たせる。table-layout:fixed で
 * 列幅を均等割りにし、幅の広い列1つでラッパーごと溢れるのを防ぐ。
 * スクロール可否・スクロール済みの判定は js/table-scroll.js（bravemedica用に
 * 移植）が .is_scrollable / .is_scrolled を付け外しして行う。CSS だけでは
 * 「はみ出しているか」が分からないため。
 */
.bl_tableWrap {
  position: relative;
  margin: 0 0 22px;
}

.bl_tableScroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.bl_tableScroll::-webkit-scrollbar {
  height: 8px;
}

.bl_tableScroll::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 999px;
}

.bl_tableScroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.bl_tableScroll table {
  display: table;
  width: 100%;
  min-width: 34em;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14.5px;
}

.bl_tableScroll th,
.bl_tableScroll td {
  padding: 12px 16px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
  word-break: break-word;
}

.bl_tableScroll th {
  background: var(--bg);
  font-weight: 700;
  color: var(--navy);
}

/* スクロールできることを示すヒント。溢れている（is_scrollable）ときだけ出し、
 * 実際にスクロールした（is_scrolled）ら消える。表の上に半透明で重ねる。 */
.bl_tableScroll_hint {
  display: none;
}

.bl_tableWrap.is_scrollable .bl_tableScroll_hint {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(24, 59, 74, .72);
  color: #fff;
  font-size: 11px;
  letter-spacing: .06em;
  pointer-events: none;
  transition: opacity .4s ease;
}

.bl_tableWrap.is_scrolled .bl_tableScroll_hint {
  opacity: 0;
}

.bl_tableScroll_icon {
  width: 30px;
  height: 21px;
  fill: currentColor;
}

/* 生 HTML で直接書かれた裸の table（Markdown 表を経由しない場合の逃げ道）も
 * 画面から溢れないよう、table 自身にも保険の overflow を当てておく。 */
.bl_columnArticle_body > table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== 出典（bl_columnSources） ===== */
.bl_columnSources {
  margin-top: 56px;
  padding: 26px 28px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.bl_columnSources_title {
  margin: 0 0 14px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.bl_columnSources_list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  line-height: 1.9;
  color: #3a4d56;
}

.bl_columnSources_item a {
  color: var(--main-d);
  font-weight: 600;
}

.bl_columnSources_item + .bl_columnSources_item {
  margin-top: 10px;
}

.bl_columnSources_meta {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray);
  word-break: break-all;
}

/* ===== 関連コラム（bl_columnRelated） ===== */
.bl_columnRelated {
  margin-top: 40px;
}

.bl_columnRelated_title {
  margin: 0 0 14px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.bl_columnRelated_list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bl_columnRelated_link {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.7;
  transition: .18s;
}

.bl_columnRelated_link:hover {
  background: var(--bg-tint);
  color: var(--main-d);
}

/* ===== 記事内CTA（本文と読了後の間に置く小さめの相談導線） ===== */
.bl_columnCta {
  margin-top: 48px;
  padding: 30px 32px;
  border-radius: 16px;
  background: var(--bg-tint);
  text-align: center;
}

.bl_columnCta p {
  margin: 0 0 18px;
  font-size: 15.5px;
  color: var(--navy);
  font-weight: 600;
}

/* ===== レスポンシブ ===== */
@media (max-width: 880px) {
  .bl_columnCards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .bl_columnCards { grid-template-columns: 1fr; }
  .bl_columnSources,
  .bl_columnCta { padding: 22px 20px; }
}
