/* ============================================================
   業界特化メディア デザインテンプレート（専門メディア路線）
   元: OSUSHI STUDIO デザインリニューアル v1（sites/27_osushi-studio/design/）
   各サイトでは #C62828 等のプレースホルダーを実際の色に置換して使う。
   適用方法: wp-content/themes/cocoon-child-master/media-engine-design.css
             として配置し、media-engine-seo.phpのローダーが自動読込する。

   デザイントークン（サイトごとに差し替え）:
     プライマリ: #C62828 / 濃プライマリ（フッター）: #8E0000
     アクセント（控えめに）: #333333
     本文: #1c1c1c / 背景: #f6f4ef / 罫線: #e3ded2
     見出し: 明朝（Shippori Mincho）/ 本文: Hiragino（現状維持）
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;600;700&display=swap');

:root {
  --me-primary: #C62828;
  --me-primary-dark: #8E0000;
  --me-accent: #333333;
  --me-text: #1c1c1c;
  --me-bg: #f6f4ef;
  --me-line: #e3ded2;
  --me-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* ---------- 全体 ---------- */
body {
  background: var(--me-bg);
  color: var(--me-text);
}
a { color: var(--me-primary); }
a:hover { color: var(--me-accent); }

/* ---------- ヘッダー: 白地 + プライマリの帯で「媒体」の顔に ---------- */
.header-container {
  background: #fff;
  border-bottom: 3px solid var(--me-primary);
}
.site-name-text {
  font-family: var(--me-serif);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--me-text);
}
.tagline {
  font-family: var(--me-serif);
  color: var(--me-primary);
  letter-spacing: 0.2em;
  font-size: 12px;
}

/* グローバルナビ */
#navi { background: #fff; border-bottom: 1px solid var(--me-line); }
.navi-in > ul li { border: none; }
.navi-in a {
  font-family: var(--me-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--me-text);
}
.navi-in a:hover {
  background: transparent;
  color: var(--me-accent);
  box-shadow: inset 0 -2px 0 var(--me-accent);
}

/* ---------- FVヒーロー（index-topウィジェット / hero-widget.html） ---------- */
.me-hero {
  background: linear-gradient(180deg, #fff 0%, var(--me-bg) 100%);
  border: 1px solid var(--me-line);
  border-top: 3px solid var(--me-primary);
  padding: 3em 2em 2.2em;
  margin-bottom: 2em;
  text-align: center;
}
.me-hero-en {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--me-accent);
  margin-bottom: 0.8em;
}
.me-hero-title {
  font-family: var(--me-serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  color: var(--me-text);
  line-height: 1.6;
  margin: 0 0 0.7em;
  padding: 0 0 0.7em;
  border: none;
  position: relative;
}
.me-hero-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 3em;
  height: 2px;
  background: var(--me-accent);
}
.me-hero-lead {
  color: #6b675e;
  font-size: 14px;
  line-height: 2;
  margin-bottom: 1.6em;
}
.me-hero-topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.me-hero-topics a {
  display: block;
  font-family: var(--me-serif);
  font-size: 14px;
  letter-spacing: 0.05em;
  border: 1px solid var(--me-line);
  background: var(--me-bg);
  color: var(--me-text);
  padding: 0.8em 0.5em;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.me-hero-topics a:hover {
  border-color: var(--me-primary);
  color: var(--me-primary);
  background: #fff;
}
.paged .me-hero { display: none; }

/* ---------- パンくず ---------- */
.breadcrumb { color: #8a8578; font-size: 12px; }
.breadcrumb a { color: #8a8578; }

/* ---------- 記事一覧カード: タイル2列 + 細罫で雑誌の目次風に ---------- */
.main { background: transparent; border: none; }
.ect-entry-card .a-wrap,
.ect-tile-card .a-wrap,
.rect-entry-card .a-wrap {
  background: #fff;
  border: 1px solid var(--me-line);
  border-radius: 2px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ect-entry-card .a-wrap:hover,
.ect-tile-card .a-wrap:hover,
.rect-entry-card .a-wrap:hover {
  background: #fff;
  border-color: var(--me-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(20, 52, 79, .08);
}
.ect-tile-card .entry-card-content { padding: 0.9em 1.1em 1.1em; }
.entry-card-title {
  font-family: var(--me-serif);
  font-weight: 600;
  line-height: 1.5;
  color: var(--me-text);
}
.entry-card-snippet { color: #6b675e; font-size: 13px; }
.entry-card-meta .post-date { color: #8a8578; }
.cat-label {
  background: #fff;
  border: 1px solid var(--me-primary);
  color: var(--me-primary);
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- 記事ページ ---------- */
.article {
  background: #fff;
  border: 1px solid var(--me-line);
  border-radius: 2px;
  padding: 2em 2.2em;
}
.entry-title,
.article h1 {
  font-family: var(--me-serif);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

/* H2: プライマリの下罫 + アクセントの短い下線（雑誌の柱見出し） */
.article h2 {
  font-family: var(--me-serif);
  font-weight: 600;
  background: transparent;
  color: var(--me-text);
  padding: 0 0 .45em;
  border: none;
  border-bottom: 2px solid var(--me-primary);
  position: relative;
  border-radius: 0;
}
.article h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 3em;
  height: 2px;
  background: var(--me-accent);
}

/* H3: プライマリの左罫 */
.article h3 {
  font-family: var(--me-serif);
  font-weight: 600;
  border: none;
  border-left: 4px solid var(--me-primary);
  padding: .2em 0 .2em .6em;
  border-radius: 0;
}
.article h4 {
  font-family: var(--me-serif);
  border: none;
  border-bottom: 1px dashed var(--me-line);
  padding-bottom: .3em;
}

/* 本文の可読性 */
.entry-content { line-height: 1.95; }
.entry-content p { margin-bottom: 1.6em; }

/* テーブル: プライマリヘッダー + ゼブラ */
.entry-content table { border: 1px solid var(--me-line); }
.entry-content th {
  background: var(--me-primary);
  color: #fff;
  border: 1px solid var(--me-primary);
  font-weight: 600;
}
.entry-content td { border: 1px solid var(--me-line); }
.entry-content tr:nth-of-type(even) td { background: var(--me-bg); }

/* 引用 */
.entry-content blockquote {
  background: var(--me-bg);
  border-left: 4px solid var(--me-primary);
  color: #4a463d;
}

/* 目次（Cocoon標準 .toc / mu-plugin .me-toc 両対応） */
.toc, .me-toc {
  background: var(--me-bg);
  border: 1px solid var(--me-line);
  border-radius: 2px;
  padding: 1.2em 1.6em;
}
.toc-title, .me-toc-title {
  font-family: var(--me-serif);
  font-weight: 600;
  color: var(--me-primary);
  letter-spacing: 0.2em;
}
.toc a, .me-toc a { color: var(--me-text); }
.toc a:hover, .me-toc a:hover { color: var(--me-accent); }

/* 関連記事セクション（me-related）とハブリンク */
.me-related h2 { margin-top: 2.5em; }
.me-hub-link a {
  display: inline-block;
  font-family: var(--me-serif);
  border: 1px solid var(--me-primary);
  color: var(--me-primary);
  padding: .5em 1.2em;
  text-decoration: none;
}
.me-hub-link a:hover { background: var(--me-primary); color: #fff; }

/* ---------- 注目記事枠（media-engine-seo.phpが出力） ---------- */
.me-featured-articles h2 {
  font-family: var(--me-serif);
  font-weight: 700;
  border: none !important;
  border-left: 4px solid var(--me-primary) !important;
  padding: .2em 0 .2em .6em !important;
}
.me-featured-articles a {
  border-color: var(--me-line) !important;
}
.me-featured-articles a:hover {
  border-color: var(--me-primary) !important;
}

/* ---------- サイドバー ---------- */
.sidebar { background: transparent; }
.sidebar h3, .sidebar .widget > h3 {
  font-family: var(--me-serif);
  background: transparent;
  color: var(--me-text);
  border: none;
  border-bottom: 2px solid var(--me-primary);
  padding: 0 0 .4em;
  letter-spacing: 0.1em;
}
.sidebar .widget {
  background: #fff;
  border: 1px solid var(--me-line);
  border-radius: 2px;
  padding: 1.2em;
  margin-bottom: 1.5em;
}

/* サイドバー: トピック一覧（sidebar-topics.html） */
.me-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.me-topic-list li {
  border-bottom: 1px dashed var(--me-line);
}
.me-topic-list li:last-child { border-bottom: none; }
.me-topic-list a {
  display: block;
  font-family: var(--me-serif);
  font-size: 14px;
  color: var(--me-text);
  padding: 0.7em 0.2em;
  text-decoration: none;
}
.me-topic-list a::before {
  content: "▸";
  color: var(--me-accent);
  margin-right: 0.5em;
}
.me-topic-list a:hover { color: var(--me-primary); }

/* サイドバー: 編集部ボックス（sidebar-editorial.html） */
.me-editor-box .me-editor-name {
  font-family: var(--me-serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--me-text);
  margin-bottom: 0.5em;
}
.me-editor-box .me-editor-desc {
  font-size: 13px;
  line-height: 1.9;
  color: #6b675e;
  margin-bottom: 1em;
}
.me-editor-box .me-editor-link a {
  display: inline-block;
  font-family: var(--me-serif);
  font-size: 13px;
  border: 1px solid var(--me-primary);
  color: var(--me-primary);
  padding: 0.5em 1em;
  text-decoration: none;
}
.me-editor-box .me-editor-link a:hover { background: var(--me-primary); color: #fff; }

/* サイドバー: 検索フォーム */
.sidebar .search-box input[type="text"],
.sidebar .wp-block-search__input,
.sidebar input.search-edit {
  border: 1px solid var(--me-line);
  background: #fff;
  border-radius: 2px;
}

/* ---------- フッター: 濃プライマリで締める ---------- */
.footer {
  background: var(--me-primary-dark);
  color: #d5dbe2;
}
.footer a { color: #d5dbe2; }
.footer a:hover { color: #fff; }
.footer-bottom { background: var(--me-primary-dark); }

/* ---------- モバイル調整 ---------- */
@media screen and (max-width: 834px) {
  .article { padding: 1.2em 1em; }
  .site-name-text { font-size: 22px; }
  .me-hero { padding: 1.6em 1em 1.4em; }
  .me-hero-title { font-size: 20px; }
  .me-hero-lead br { display: none; }
  .me-hero-topics { grid-template-columns: repeat(2, 1fr); }
}
