/* ===== 服サブスク研究所 カスタムスタイル ===== */

/* フォント */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ===== カラー設計
   背景:  #f7f7f7（薄グレー）/ #ffffff（白）
   テキスト: #1a1a1a（チャコール）/ #555（中間グレー）
   ボーダー: #e0e0e0（薄グレー）
   アクセント（ボタンのみ）: #c8102e（赤）
===== */

/* ===== CSS変数 ===== */
:root,
body {
  --theme: #f7f7f7 !important;
  --entry: #ffffff !important;
  --primary: #1a1a1a !important;
  --secondary: #888888 !important;
  --tertiary: #f0f0f0 !important;
  --content: #333333 !important;
  --code-bg: #f5f5f5 !important;
  --border: #e0e0e0 !important;

  background-color: #f7f7f7 !important;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif !important;
  color: #1a1a1a !important;
}

/* ===== ヘッダー ===== */
header,
.header,
#header {
  background: #ffffff !important;
  border-bottom: 1px solid #e0e0e0 !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06) !important;
}

.nav {
  background: #ffffff !important;
}

/* ロゴ */
.logo a,
.logo span,
a.logo {
  color: #1a1a1a !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  letter-spacing: 0.02em !important;
}

/* ナビゲーション */
#menu a,
.menu a,
nav a {
  color: #333333 !important;
  font-weight: 500 !important;
  transition: color 0.15s !important;
}

#menu a:hover,
.menu a:hover,
nav a:hover {
  color: #c8102e !important;
}

/* ===== ヒーロー（トップページ） ===== */
.home-info {
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 2.5rem 2rem !important;
  margin-bottom: 2rem !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05) !important;
  text-align: center;
}

.home-info h1,
.home-info .entry-content h1 {
  color: #1a1a1a !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  margin-bottom: 1rem !important;
  text-decoration: none !important;
}

.home-info h1 a {
  color: #1a1a1a !important;
  text-decoration: none !important;
}

.home-info p,
.home-info .entry-content p {
  font-size: 1rem !important;
  color: #555 !important;
  line-height: 1.8 !important;
}

/* ===== 記事カード ===== */
.post-entry {
  background: #ffffff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 12px !important;
  padding: 1.4rem 1.6rem !important;
  margin-bottom: 1.2rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
}

.post-entry:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
  border-color: #c8102e !important;
}

/* ピン留め記事 */
.first-entry {
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px !important;
}

/* カード内タイトル */
.entry-header h2,
.post-entry h2 {
  font-size: 1.0rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  line-height: 1.65 !important;
  margin-bottom: 0.5rem !important;
  border-left: 3px solid #e0e0e0 !important;
  padding-left: 0.65rem !important;
  transition: color 0.15s, border-color 0.15s !important;
}

.post-entry:hover .entry-header h2,
.post-entry:hover h2 {
  color: #c8102e !important;
  border-left-color: #c8102e !important;
}

/* 日付・読了時間 */
.post-meta,
.entry-footer,
.post-meta span,
span.post-meta {
  color: #aaa !important;
  font-size: 0.8rem !important;
}

/* サマリー */
.entry-content p,
.entry-summary p {
  color: #666 !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
}

/* ヒントラベル非表示 */
.entry-hint-parent .entry-hint {
  display: none !important;
}

/* ヒーロー下部の空フッター非表示 */
.home-info .entry-footer {
  display: none !important;
}

/* ===== 記事ページ ===== */
.post-header {
  padding: 2.5rem 1.5rem 0 !important;
  margin-bottom: 2rem !important;
}

.post-footer {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.paginav {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.post-header .breadcrumbs {
  margin-bottom: 1.2rem !important;
  display: block !important;
}

.post-title,
h1.post-title {
  color: #1a1a1a !important;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  padding-bottom: 1rem !important;
  border-bottom: 2px solid #e0e0e0 !important;
  margin-top: 0 !important;
  margin-bottom: 1.2rem !important;
}

.post-header .post-meta {
  margin-top: 0.6rem !important;
  margin-bottom: 0 !important;
}

/* 記事本文 h2 */
article .post-content h2,
.post-content h2 {
  color: #1a1a1a !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  border-left: 4px solid #c8102e !important;
  padding-left: 0.8rem !important;
  margin-top: 2.2rem !important;
  margin-bottom: 1rem !important;
  background: transparent !important;
}

/* 記事本文 h3 */
article .post-content h3,
.post-content h3 {
  color: #333333 !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #e0e0e0 !important;
  padding-bottom: 0.3rem !important;
  margin-top: 1.5rem !important;
}

/* ===== テーブル ===== */
/* border-collapse:collapse では overflow:hidden+border-radius が効かないため separate に変更 */
article .post-content table,
.post-content table {
  width: -webkit-fit-content !important;
  width: fit-content !important;
  max-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  display: block !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 1.5rem 0 !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  border: 1px solid #e8e8e8 !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07) !important;
}

article .post-content th,
.post-content th {
  background: #1a1a1a !important;
  color: #ffffff !important;
  padding: 0.7rem 1rem !important;
  font-weight: 600 !important;
  text-align: left !important;
  border-right: 1px solid #333333 !important;
  white-space: nowrap !important;
}

article .post-content th:last-child,
.post-content th:last-child {
  border-right: none !important;
}

/* 角丸：ヘッダー左上・右上 */
article .post-content thead th:first-child,
.post-content thead th:first-child {
  border-radius: 7px 0 0 0 !important;
}

article .post-content thead th:last-child,
.post-content thead th:last-child {
  border-radius: 0 7px 0 0 !important;
}

article .post-content td,
.post-content td {
  padding: 0.6rem 1rem !important;
  border-bottom: 1px solid #e8e8e8 !important;
  border-right: 1px solid #e8e8e8 !important;
  color: #333333 !important;
  background: #ffffff !important;
}

article .post-content td:last-child,
.post-content td:last-child {
  border-right: none !important;
}

article .post-content tr:last-child td,
.post-content tr:last-child td {
  border-bottom: none !important;
}

/* 角丸：最終行左下・右下 */
article .post-content tbody tr:last-child td:first-child,
.post-content tbody tr:last-child td:first-child {
  border-radius: 0 0 0 7px !important;
}

article .post-content tbody tr:last-child td:last-child,
.post-content tbody tr:last-child td:last-child {
  border-radius: 0 0 7px 0 !important;
}

article .post-content tr:nth-child(even) td,
.post-content tr:nth-child(even) td {
  background: #f7f7f7 !important;
}

/* ===== 引用（口コミ） ===== */
article .post-content blockquote,
.post-content blockquote {
  background: #f7f7f7 !important;
  border-left: 4px solid #e0e0e0 !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 1rem 1.2rem !important;
  margin: 1rem 0 !important;
  color: #555 !important;
  font-style: normal !important;
}

/* ===== リスト ===== */
article .post-content ul li::marker,
.post-content ul li::marker {
  color: #999 !important;
}

/* ===== 水平線 ===== */
article .post-content hr,
.post-content hr {
  border: none !important;
  border-top: 1px solid #e8e8e8 !important;
  margin: 2rem 0 !important;
}

/* ===== リンク（本文内） ===== */
article .post-content a,
.post-content a {
  color: #1a1a1a !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  font-weight: 500 !important;
  transition: color 0.15s !important;
}

article .post-content a:hover,
.post-content a:hover {
  color: #c8102e !important;
}

/* ===== アフィリエイトCTAボタン（赤で目立たせる） ===== */
article .post-content p a[href*="a8.net"],
article .post-content p a[href*="afi-b.com"],
article .post-content p a[href*="moshimo.com"],
.post-content p a[href*="a8.net"],
.post-content p a[href*="afi-b.com"],
.post-content p a[href*="moshimo.com"] {
  display: inline-block !important;
  background: #c8102e !important;
  color: #ffffff !important;
  padding: 0.75rem 1.8rem !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  margin: 0.5rem 0 !important;
  letter-spacing: 0.03em !important;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.28) !important;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s !important;
}

article .post-content p a[href*="a8.net"]:hover,
article .post-content p a[href*="afi-b.com"]:hover,
article .post-content p a[href*="moshimo.com"]:hover,
.post-content p a[href*="a8.net"]:hover,
.post-content p a[href*="afi-b.com"]:hover,
.post-content p a[href*="moshimo.com"]:hover {
  background: #a50d26 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.38) !important;
  color: #ffffff !important;
}

/* ===== ページネーション ===== */
.pagination .page-link,
.paginator a {
  color: #333333 !important;
  border-color: #e0e0e0 !important;
}

.pagination .page-link:hover,
.paginator a:hover {
  background: #f0f0f0 !important;
  color: #c8102e !important;
}

/* ===== タグ ===== */
.post-tags a,
.terms-tags li a {
  background: #f5f5f5 !important;
  color: #555 !important;
  border-radius: 4px !important;
  padding: 0.2rem 0.8rem !important;
  font-size: 0.8rem !important;
  text-decoration: none !important;
  border: 1px solid #e0e0e0 !important;
  font-weight: 500 !important;
  transition: background 0.15s, color 0.15s !important;
}

.post-tags a:hover,
.terms-tags li a:hover {
  background: #c8102e !important;
  color: #ffffff !important;
  border-color: #c8102e !important;
}

/* ===== パンくず ===== */
.breadcrumbs,
.breadcrumbs a {
  color: #aaa !important;
  font-size: 0.8rem !important;
}

.breadcrumbs a:hover {
  color: #c8102e !important;
}

/* ===== 目次 ===== */
#TableOfContents,
.toc {
  background: #f7f7f7 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 1rem 1.5rem !important;
  margin-bottom: 2rem !important;
}

.toc-label,
#TableOfContents > ul::before {
  font-weight: 700 !important;
  color: #1a1a1a !important;
}

#TableOfContents a {
  color: #333 !important;
  text-decoration: none !important;
}

#TableOfContents a:hover {
  color: #c8102e !important;
}

/* ===== フッター ===== */
footer,
.footer {
  border-top: 1px solid #e0e0e0 !important;
  background: #ffffff !important;
  color: #aaa !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  padding: 2rem 0 !important;
}

footer a,
.footer a {
  color: #555 !important;
}

footer a:hover,
.footer a:hover {
  color: #c8102e !important;
}

/* ===== コードブロック ===== */
.post-content code {
  background: #f5f5f5 !important;
  color: #333 !important;
  border-radius: 4px !important;
  padding: 0.1rem 0.4rem !important;
  border: 1px solid #e8e8e8 !important;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .post-title,
  h1.post-title {
    font-size: 1.3rem !important;
  }

  .home-info {
    padding: 1.5rem 1rem !important;
  }

  article .post-content h2,
  .post-content h2 {
    font-size: 1.1rem !important;
  }
}

/* ===== PRバッジ ===== */
.pr-notice {
  display: inline-block;
  font-size: 0.72rem;
  color: #888;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 1.2rem;
}

/* ========================================
   トップページ カスタムレイアウト
   ======================================== */

/* ----- 共通：セクションタイトル ----- */
.home-section-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 0 1.25rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid #c8102e !important;
  display: inline-block !important;
}

/* ----- ヒーローセクション ----- */
.home-hero {
  background: #fdf8f3;
  border-radius: 12px;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

.home-hero__eyebrow {
  font-size: 0.8rem;
  color: #c8102e;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.home-hero__title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0 0 1rem;
}

.home-hero__desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin: 0 0 1.75rem;
}

.home-hero__cta {
  display: inline-block;
  background: #c8102e;
  color: #ffffff !important;
  padding: 0.85rem 2.2rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.28);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.03em;
}

.home-hero__cta:hover {
  background: #a50d26 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.38);
  color: #ffffff !important;
}

/* ----- おすすめ記事カード ----- */
.home-featured {
  margin-bottom: 3rem;
}

.home-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feat-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.feat-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0ebe4;
}

.feat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feat-card__img--noimg {
  background: linear-gradient(135deg, #f0ebe4 0%, #e8e2d9 100%);
}

.feat-card__body {
  padding: 1rem;
  flex: 1;
}

.feat-card__title {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 0 0.5rem !important;
  line-height: 1.5 !important;
}

.feat-card__summary {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.6;
  margin: 0;
}

/* ----- 悩み別クイックナビ ----- */
.home-quicknav {
  margin-bottom: 3rem;
}

.home-quicknav__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.qnav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7f5f2;
  border: 1px solid #e8e2d9;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.qnav-card:hover {
  background: #fff4f4;
  border-color: #c8102e;
  transform: translateY(-1px);
}

.qnav-card__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
}

.qnav-card:hover .qnav-card__label {
  color: #c8102e;
}

.qnav-card__arrow {
  font-size: 0.85rem;
  color: #bbb;
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: color 0.15s, transform 0.15s;
}

.qnav-card:hover .qnav-card__arrow {
  color: #c8102e;
  transform: translateX(3px);
}

/* ----- 全記事一覧（2カラム） ----- */
.home-allposts {
  margin-bottom: 2rem;
}

.home-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ----- レスポンシブ（トップページ） ----- */
@media (max-width: 900px) {
  .home-featured__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 2rem 1.25rem;
  }

  .home-hero__title {
    font-size: 1.5rem;
  }

  .home-hero__br {
    display: none;
  }

  .home-featured__grid {
    grid-template-columns: 1fr;
  }

  .home-quicknav__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-posts-grid {
    grid-template-columns: 1fr;
  }
}
