/* ============================================================
 * 採用サイトブログ (CPT: rs-blog) 専用スタイル
 * デザイン: docs/design-recruitment-lp.md（採用サイトLPデザインシステム）準拠
 *   Primary #1A2A3A / Accent #C30D23（採用LPの行動色） / BG Alt #F5F7FA / Text #262626
 *   見出し: Noto Sans JP / 本文: メイリオ
 * 作成: 2026-07-30（single-rs-blog.php / archive-rs-blog.php から生成）
 * ============================================================ */

.rs-blog {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 25px 80px;
  color: #262626;
  font-family: "メイリオ", Verdana, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* --- パンくず --- */
.rs-blog-breadcrumb { margin-bottom: 24px; font-size: 13px; }
.rs-blog-breadcrumb ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.rs-blog-breadcrumb li { color: #666; }
.rs-blog-breadcrumb li + li::before { content: "\203A"; margin: 0 8px; color: #C3C4C7; }
.rs-blog-breadcrumb a { color: #C30D23; text-decoration: none; }
.rs-blog-breadcrumb a:hover { text-decoration: underline; }

/* --- 記事ヘッダー --- */
.rs-blog-article-head { margin-bottom: 32px; }
.rs-blog-meta { font-size: 14px; color: #666; margin-bottom: 8px; }
.rs-blog-updated { margin-left: 12px; }
.rs-blog-title {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 32px;
  line-height: 1.3;
  color: #1A2A3A;
  border-bottom: 3px solid #C30D23;
  padding-bottom: 16px;
}

/* --- 記事本文 --- */
.rs-article-body { margin-bottom: 48px; }
.rs-article-body h2 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.3;
  color: #1A2A3A;
  background: #F5F7FA;
  border-left: 6px solid #C30D23;
  padding: 12px 16px;
  margin: 48px 0 24px;
}
.rs-article-body h3 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.4;
  color: #1A2A3A;
  border-bottom: 2px solid #C3C4C7;
  padding-bottom: 8px;
  margin: 40px 0 16px;
}
.rs-article-body h4 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #1A2A3A;
  margin: 32px 0 12px;
}
.rs-article-body p { margin: 0 0 1.2em; line-height: 1.8; }
.rs-article-body a { color: #C30D23; }
.rs-article-body strong { color: #1A2A3A; }
.rs-article-body ul, .rs-article-body ol { margin: 0 0 1.5em; padding-left: 1.6em; }
.rs-article-body li { margin-bottom: 0.5em; }
.rs-article-body img { max-width: 100%; height: auto; margin: 0 0 1.5em; }
.rs-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 15px;
}
.rs-article-body th, .rs-article-body td { border: 1px solid #C3C4C7; padding: 10px 12px; text-align: left; }
.rs-article-body th { background: #1A2A3A; color: #FFFFFF; font-weight: 700; }
.rs-article-body tr:nth-child(even) td { background: #F5F7FA; }
.rs-article-body blockquote {
  border-left: 4px solid #C3C4C7;
  background: #F5F7FA;
  margin: 0 0 1.5em;
  padding: 16px 20px;
  color: #555;
}
/* FAQ (<details>) */
.rs-article-body details {
  border: 1px solid #C3C4C7;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #FFFFFF;
}
.rs-article-body summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: #1A2A3A;
  font-family: "Noto Sans JP", sans-serif;
}
.rs-article-body details[open] summary { border-bottom: 1px solid #F5F7FA; }
.rs-article-body details > *:not(summary) { padding: 0 16px; }
.rs-article-body details p:last-child { padding-bottom: 14px; }

/* --- LPへの上りCTA --- */
.rs-blog-cta {
  background: #1A2A3A;
  color: #FFFFFF;
  text-align: center;
  padding: 40px 24px;
  margin-bottom: 48px;
}
.rs-blog-cta-lead {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 8px;
  color: #FFFFFF;
}
.rs-blog-cta-name { font-size: 14px; color: #FFFFFF; opacity: 0.85; margin-bottom: 20px; }
.rs-blog-cta-btn {
  display: inline-block;
  background: #FFFFFF;
  border: 2px solid #1A2A3A;
  color: #1A2A3A;
  font-weight: bold;
  font-size: 15px;
  padding: 12px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.rs-blog-cta-btn:hover { background: #C30D23; border-color: #C30D23; color: #FFFFFF; }

/* --- 前後記事ナビ --- */
.rs-blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 24px;
}
.rs-blog-nav a { color: #C30D23; text-decoration: none; }
.rs-blog-nav a:hover { text-decoration: underline; }
.rs-blog-nav-prev, .rs-blog-nav-next { flex: 1; }
.rs-blog-nav-next { text-align: right; }
.rs-blog-nav-list { flex: 0 0 auto; }
.rs-blog-nav-list a {
  display: inline-block;
  border: 1px solid #C30D23;
  border-radius: 4px;
  padding: 8px 20px;
}

/* --- 一覧（アーカイブ） --- */
.rs-blog-archive-head { text-align: center; margin-bottom: 40px; }
.rs-blog-archive-head .en {
  display: block;
  font-size: 13px;
  color: #C30D23;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.rs-blog-archive-head h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 36px;
  color: #1A2A3A;
  line-height: 1.3;
}
.rs-blog-bar {
  display: block;
  width: 60px;
  height: 4px;
  background: #C30D23;
  margin: 16px auto;
}
.rs-blog-archive-lead { font-size: 15px; color: #555; }

.rs-blog-cards { list-style: none; margin: 0 0 40px; padding: 0; }
.rs-blog-card { margin-bottom: 20px; }
.rs-blog-card a {
  display: block;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 24px;
  text-decoration: none;
  color: #262626;
  transition: box-shadow 0.2s, transform 0.2s;
}
.rs-blog-card a:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); transform: translateY(-2px); }
.rs-blog-card-date { font-size: 13px; color: #666; margin-bottom: 6px; }
.rs-blog-card-title {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: #1A2A3A;
  margin-bottom: 8px;
}
.rs-blog-card-excerpt { font-size: 14px; line-height: 1.7; color: #555; margin-bottom: 10px; }
.rs-blog-card-more { font-size: 14px; font-weight: bold; color: #C30D23; }

.rs-blog-pagination { text-align: center; margin-bottom: 48px; }
.rs-blog-pagination .nav-links { display: inline-flex; gap: 6px; }
.rs-blog-pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  padding: 8px 10px;
  border: 1px solid #C3C4C7;
  border-radius: 4px;
  color: #1A2A3A;
  text-decoration: none;
  font-size: 14px;
}
.rs-blog-pagination .page-numbers.current { background: #1A2A3A; color: #FFFFFF; border-color: #1A2A3A; }
.rs-blog-pagination a.page-numbers:hover { border-color: #C30D23; color: #C30D23; }

.rs-blog-empty { text-align: center; color: #555; padding: 40px 0; }

/* --- レスポンシブ (<768px) --- */
@media screen and (max-width: 767px) {
  .rs-blog { padding: 32px 20px 60px; }
  .rs-blog-title { font-size: 24px; }
  .rs-article-body h2 { font-size: 21px; }
  .rs-article-body h3 { font-size: 18px; }
  .rs-blog-archive-head h1 { font-size: 28px; }
  .rs-blog-nav { flex-direction: column; align-items: stretch; text-align: center; }
  .rs-blog-nav-next { text-align: center; }
  .rs-blog-cta-lead { font-size: 17px; }
  .rs-blog-cta-btn { padding: 12px 20px; }
}

/* --- ヒーロー（二層: 文字なし画像＋CSSオーバーレイH1 / docs/hero-image-spec.md） --- */
/* ECヒーロー配色: 覆いオフブラック #262626 / タグ ベージュ #F0F7FF / 文字 白（design-ec-lp.md 準拠） */
.rs-hero { position: relative; margin: 0 0 16px; }
.rs-hero-img { display: block; width: 100%; height: auto; border-radius: 4px; }
.rs-hero::before {
  content: ""; position: absolute; inset: 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(0,10,2,.92) 0%, rgba(0,10,2,.72) 42%, rgba(0,10,2,0) 70%);
}
.rs-hero-cap {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(16px, 4vw, 48px); max-width: 60%;
}
.rs-hero-tag {
  align-self: flex-start;
  font-family: "Noto Sans JP", sans-serif; font-weight: 700;
  font-size: 12px; letter-spacing: .08em; color: #F0F7FF;
  border: 1px solid rgba(233,223,205,.55); border-radius: 3px;
  padding: 2px 10px; margin-bottom: 12px;
}
.rs-hero-title {
  font-family: "Noto Sans JP", sans-serif; font-weight: 900;
  font-size: clamp(20px, 3.2vw, 36px); line-height: 1.3;
  color: #FFFFFF; margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.rs-blog-article > .rs-blog-meta { margin: 0 0 28px; }

@media screen and (max-width: 767px) {
  /* モバイルはオーバーレイをやめ、画像の下にタイトルを通常表示（重なり回避・可読性優先） */
  .rs-hero::before { display: none; }
  .rs-hero-cap { position: static; max-width: 100%; padding: 14px 2px 0; }
  .rs-hero-tag { color: #C30D23; border-color: rgba(195,13,35,.5); }
  .rs-hero-title { color: #262626; text-shadow: none; font-size: 22px; }
}

/* --- ブログはAEO LP配下: コーポレート共通ヘッダー/固定メニューを隠しLP専用トップバー(.lp-topbar)に揃える --- */
.single-recruit-site-blog .header_cmn,
.single-recruit-site-blog .fixed_menu_sp,
.single-recruit-site-blog .float-button__wrap,
.post-type-archive-recruit-site-blog .header_cmn,
.post-type-archive-recruit-site-blog .fixed_menu_sp,
.post-type-archive-recruit-site-blog .float-button__wrap { display: none !important; }
.single-recruit-site-blog .wrap,
.post-type-archive-recruit-site-blog .wrap { padding-top: 0 !important; }

/* --- コーポレート共通フッターを隠し、ブログ最小フッターに差し替え --- */
.single-recruit-site-blog #footer.footer_cmn,
.post-type-archive-recruit-site-blog #footer.footer_cmn { display: none !important; }
.rs-blog-footer { background: #0b1f3a; color: #fff; text-align: center; padding: 32px 20px; font-size: 13px; }
.rs-blog-footer-name { color: #fff; margin: 0 0 12px; font-weight: 700; }
.rs-blog-footer-links { margin: 0 0 12px; }
.rs-blog-footer-links a { color: #F0F7FF; text-decoration: none; margin: 0 12px; }
.rs-blog-footer-links a:hover { text-decoration: underline; }
.rs-blog-footer-copy { margin: 0; color: rgba(255,255,255,.6); font-size: 12px; }

/* --- コードブロック（実物のコード/設定/JSON-LDを見せる: docs/article-depth-rules.md） --- */
.rs-article-body pre {
  background: #1A2A3A; color: #E6EDF3; border-radius: 6px;
  padding: 16px 18px; margin: 0 0 1.5em; overflow-x: auto;
  font-size: 13px; line-height: 1.6;
}
.rs-article-body pre code {
  font-family: Consolas, Menlo, 'Liberation Mono', monospace;
  white-space: pre; color: inherit; background: none; padding: 0;
}
.rs-article-body code {
  background: #F5F7FA; color: #1A2A3A; padding: 1px 6px; border-radius: 3px;
  font-size: 13px; font-family: Consolas, Menlo, monospace;
}

/* 共通テーマの #content{margin-top:140px}（固定ヘッダー用オフセット）を打ち消す。
   ブログはコーポレート固定ヘッダーを隠しLP専用stickyトップバーに置換済みのため不要 */
.single-recruit-site-blog #content.rs-blog,
.post-type-archive-recruit-site-blog #content.rs-blog { margin-top: 0 !important; }

/* ============================================================
   採用サイトブログのLP風トップバー（2026-07-29）
   テンプレ(single/archive-rs-blog.php)が .lp-topbar 系を使うが、
   その定義は aeo-lp.css 側にある。EC は LP CSS が別体系なので
   **ここに自己完結で持たせる**（aeo-lp.css を読み込ませない）。
   aeo-lp.css は var(--c-main)/var(--c-dark) を使うが EC には定義が無いため実値で書く。
   ============================================================ */
.lp-topbar {
  background: #fff; border-bottom: 1px solid #E0E0E0; padding: 0;
  position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.lp-topbar-in {
  width: 100%; box-sizing: border-box; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px;
}
.lp-topbar-left { display: flex; align-items: center; gap: 16px; height: 100%; }
.lp-topbar-logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.lp-topbar-logo img { height: 48px; width: auto; display: block; }
.lp-topbar-texts { display: flex; flex-direction: column; gap: 3px; }
.lp-topbar-company { font-size: 13px; font-weight: 400; color: #6b6b6b; letter-spacing: .02em; }
.lp-topbar-tagline { font-size: 20px; font-weight: 700; color: #262626; line-height: 1.3; }
.lp-topbar-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  background: #C30D23; color: #fff; font-size: 14px; font-weight: 700;
  padding: 12px 28px 10px; border-radius: 100px; text-decoration: none;
  transition: opacity .2s; white-space: nowrap;
}
.lp-topbar-btn:hover { opacity: .85; }
@media screen and (max-width: 640px) {
  .lp-topbar-in { height: 56px; gap: 12px; padding: 0 16px; }
  .lp-topbar-logo img { height: 36px; }
  .lp-topbar-company { font-size: 11px; }
  .lp-topbar-tagline { font-size: 14px; }
  .lp-topbar-btn { font-size: 12px; padding: 10px 16px; }
}
/* ============================================================
   採用サイトブログ一覧をカード型グリッドに（2026-07-29）
   既存の .rs-blog-cards / .rs-blog-card の定義を後勝ちで上書きする。
   アイキャッチが無い記事でも崩れないよう、画像枠は任意扱い。
   ============================================================ */
.rs-blog-cards {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.rs-blog-card { margin-bottom: 0; }
.rs-blog-card a {
  display: flex; flex-direction: column; height: 100%;
  background: #FFFFFF; border: 1px solid #E4DED2; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 0; overflow: hidden;
  text-decoration: none; color: #262626;
  transition: box-shadow .2s, transform .2s;
}
.rs-blog-card a:hover { box-shadow: 0 8px 20px rgba(0,0,0,.12); transform: translateY(-3px); }
.rs-blog-card-thumb { display: block; }
.rs-blog-card-thumb img {
  display: block; width: 100%; height: auto; aspect-ratio: 1408 / 768; object-fit: cover;
}
.rs-blog-card-body {
  display: flex; flex-direction: column; flex: 1 1 auto; padding: 20px;
}
.rs-blog-card-date { font-size: 13px; color: #6b6b6b; margin-bottom: 8px; }
.rs-blog-card-title {
  font-size: 17px; font-weight: 700; line-height: 1.55; color: #262626; margin: 0 0 10px;
}
.rs-blog-card-excerpt {
  font-size: 14px; line-height: 1.8; color: #555; margin: 0 0 16px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.rs-blog-card-more { margin-top: auto; font-size: 14px; font-weight: 700; color: #C30D23; }

@media screen and (max-width: 1024px) {
  .rs-blog-cards { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media screen and (max-width: 640px) {
  .rs-blog-cards { grid-template-columns: 1fr; gap: 18px; }
  .rs-blog-card-body { padding: 16px; }
  .rs-blog-card-title { font-size: 16px; }
}
/* ============================================================
   焼き込みヒーロー（2026-07-29 中村決定）
   画像に文字が入っているので、CSSオーバーレイは使わない。
   H1は画像の下に本物のテキストとして置く（know-how と同じ形）。
   ============================================================ */
.rs-hero--baked::before { display: none; }   /* 覆いを消す（画像をそのまま見せる） */
.rs-hero--baked { margin: 0 0 20px; }
.rs-article-title {
  font-family: "Noto Sans JP", sans-serif; font-weight: 900;
  font-size: clamp(22px, 3vw, 32px); line-height: 1.45;
  color: #262626; margin: 0 0 20px;
}
@media screen and (max-width: 640px) {
  .rs-article-title { font-size: 20px; }
}
/* ============================================================
   旧LP CSS の #content{margin:0}（IDセレクタ）に勝つための中央寄せ。
   .rs-blog の margin:0 auto は特異性で負けるため、ID＋クラスで指定する。
   2026-07-30 実機で本文が左端に寄っていたのを是正。
   ============================================================ */
#content.rs-blog { margin-left: auto; margin-right: auto; }

/* ============================================================
   ページネーションの文字が枠の上端に貼り付く問題（2026-07-30 中村指摘）。
   旧テーマCSSが .page-numbers に height:45px を当てており、
   14pxの文字が45pxの内容領域の上端に置かれていた（実測 45+padding16+border2=63px）。
   高さ指定を外し、flexで上下左右中央に揃える。
   nav-links の align-items も指定する（既定の stretch で枠が伸びるのを止める）。
   ※ flex アイテム化すると既定の flex-shrink:1 で縮み、「« 前へ」が3行に折り返した。
     nowrap と flex-shrink:0 で1行に固定する。
   ============================================================ */
.rs-blog-pagination .nav-links { align-items: center; }
.rs-blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  height: auto; min-height: 40px; box-sizing: border-box;
  white-space: nowrap; flex-shrink: 0; padding: 8px 14px;
}

/* ============================================================
   ページネーションの枠を旧テーマCSSから取り戻す（2026-07-30）
   style.css の .page-numbers に width:47px / height:45px / display:flex が当たっている。
   高さ固定 → 文字が枠の上端に貼り付く。幅固定 → 「次へ »」が枠外へはみ出す。
   両方 auto にして min-width/min-height で下限だけ残し、flexで上下左右中央に揃える。
   flexアイテム化すると既定の flex-shrink:1 で縮み「« 前へ」が折り返すため、
   nowrap と flex-shrink:0 で1行に固定する。
   ============================================================ */
.rs-blog-pagination .nav-links { align-items: center; flex-wrap: wrap; }
.rs-blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 40px; height: auto; min-height: 40px;
  box-sizing: border-box; white-space: nowrap; flex-shrink: 0; padding: 8px 14px;
}
.rs-blog-pagination .page-numbers.dots { min-width: 20px; padding: 8px 4px; box-shadow: none; border: none; }
