/* ===== リセット & 基本 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #5b8a6f;
  --primary-dark: #3d6b54;
  --primary-light: #e0ede6;
  --accent:    #e8956d;
  --accent-light: #fdf0e8;
  --dark:      #333333;
  --gray:      #666666;
  --light:     #f7f5f2;
  --white:     #ffffff;
  --border:    #d0e4d8;
  --shadow:    0 4px 16px rgba(91, 138, 111, 0.12);
  --radius:    12px;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', 'Noto Sans JP', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.8;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== ヘッダー ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: .03em;
}

.site-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.site-logo:hover { text-decoration: none; opacity: .88; }

.main-nav { display: flex; gap: 4px; }

.main-nav a {
  color: var(--gray);
  padding: 8px 13px;
  border-radius: 20px;
  font-size: .83rem;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.main-nav a:hover {
  background: var(--primary-light);
  text-decoration: none;
  color: var(--primary-dark);
}

/* ===== ヒーローバナー ===== */
.hero {
  background-image: url('../images/care-illustration.png');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 80px 20px;
  text-align: center;
  border-bottom: 2px solid var(--border);
}

/* 文字が読みやすいよう半透明の白いオーバーレイ */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-icon {
  display: none;
}

.hero h1 {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.35;
}

.hero h1 span { color: var(--primary-dark); }

.hero p {
  font-size: 1rem;
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto 28px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
}

/* ===== カテゴリ帯 ===== */
.category-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px;
}

.category-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .88rem;
  transition: transform .2s, box-shadow .2s;
  text-align: center;
}

.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.cat-card .cat-icon { font-size: 1.8rem; }

.cat-facility   { background: #e8f2ec; color: #3d6b54; }
.cat-cost       { background: #fdf0e8; color: #c0603a; }
.cat-insurance  { background: #e8eef8; color: #3a5a9c; }
.cat-homecare   { background: #fef6e0; color: #9c6e1a; }

/* ===== メインレイアウト ===== */
.main-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

/* ===== 記事カード ===== */
.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--primary), transparent);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(91,138,111,.2);
  text-decoration: none;
}

.card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-thumb.facility  { background: linear-gradient(135deg, #e8f2ec, #c9e3d1); }
.card-thumb.cost      { background: linear-gradient(135deg, #fdf0e8, #f8d9c0); }
.card-thumb.insurance { background: linear-gradient(135deg, #e8eef8, #c8d6ef); }
.card-thumb.homecare  { background: linear-gradient(135deg, #fef6e0, #f7e4ab); }

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.card-category {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.cat-label-facility   { background: #e8f2ec; color: #3d6b54; }
.cat-label-cost       { background: #fdf0e8; color: #c0603a; }
.cat-label-insurance  { background: #e8eef8; color: #3a5a9c; }
.cat-label-homecare   { background: #fef6e0; color: #9c6e1a; }

.card-body h3 {
  font-size: .97rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.5;
}

.card-body p {
  font-size: .84rem;
  color: var(--gray);
  flex: 1;
}

.card-meta {
  margin-top: 12px;
  font-size: .76rem;
  color: #aaa;
}

/* ===== サイドバー ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* アフィリエイトバナーエリア */
.affiliate-box {
  background: linear-gradient(135deg, var(--primary-light), #fdf0e8);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: background .2s;
  display: block;
}

.affiliate-box:hover { background: linear-gradient(135deg, #c9e3d1, #f8d9c0); text-decoration: none; }

.affiliate-box .af-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.affiliate-box .af-title { font-weight: 800; color: var(--dark); font-size: .97rem; margin-bottom: 4px; }
.affiliate-box .af-desc { font-size: .8rem; color: var(--gray); }

.affiliate-btn {
  display: block;
  margin-top: 12px;
  background: var(--accent);
  color: var(--white);
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  transition: background .2s;
}

.affiliate-btn:hover { background: #d07858; text-decoration: none; color: var(--white); }

/* ランキングリスト */
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.rank-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .87rem;
}

.rank-num {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 900;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-num.gold   { background: #c9952a; color: var(--white); }
.rank-num.silver { background: #8a8a8a; color: var(--white); }
.rank-num.bronze { background: #9e6b3a; color: var(--white); }

.rank-list a { color: var(--dark); font-weight: 600; line-height: 1.45; }
.rank-list a:hover { color: var(--primary); }

/* プロフィールウィジェット */
.profile-box { text-align: center; }
.profile-icon { font-size: 3.5rem; display: block; margin-bottom: 10px; }
.profile-name { font-weight: 900; font-size: 1rem; margin-bottom: 4px; color: var(--primary-dark); }
.profile-tag  { font-size: .77rem; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.profile-bio  { font-size: .84rem; color: var(--gray); text-align: left; line-height: 1.7; }

/* ===== 記事ページ ===== */
.post-header {
  background: linear-gradient(135deg, #e8f2ec 0%, #fdf0e8 100%);
  padding: 50px 20px 40px;
  text-align: center;
  border-bottom: 2px solid var(--border);
}

.post-category-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.post-header h1 {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.4;
  max-width: 720px;
  margin: 0 auto 14px;
  color: var(--dark);
}

.post-meta {
  font-size: .84rem;
  color: var(--gray);
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.post-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.post-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  border: 1px solid var(--border);
}

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin: 36px 0 14px;
  padding: 10px 16px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--dark);
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.post-content p { margin-bottom: 14px; }

.post-content ul, .post-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.post-content li { margin-bottom: 6px; }

/* コールアウトボックス */
.callout {
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout-icon { font-size: 1.4rem; flex-shrink: 0; }
.callout-body { flex: 1; font-size: .93rem; }
.callout-body strong { display: block; margin-bottom: 4px; }

.callout.tip  { background: #e8f2ec; border-left: 4px solid var(--primary); }
.callout.warn { background: #fdf0e8; border-left: 4px solid var(--accent); }
.callout.info { background: #e8eef8; border-left: 4px solid #5a7dbd; }

/* 料金テーブル */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .9rem;
}

.price-table th {
  background: var(--primary);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
}

.price-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.price-table tr:nth-child(even) td { background: var(--light); }
.price-table tr:hover td { background: var(--primary-light); }

/* インライン・アフィリエイトバナー（記事内） */
.in-article-affiliate {
  background: linear-gradient(135deg, var(--accent-light), #fdf0e8);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.in-article-affiliate .af-img { font-size: 2.8rem; flex-shrink: 0; }
.in-article-affiliate .af-content { flex: 1; }
.in-article-affiliate .af-label { font-size: .74rem; color: var(--gray); margin-bottom: 2px; }
.in-article-affiliate .af-title { font-weight: 800; font-size: .97rem; margin-bottom: 4px; color: var(--dark); }
.in-article-affiliate .af-desc { font-size: .84rem; color: var(--gray); }

.in-article-affiliate .af-btn {
  background: var(--accent);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .87rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  transition: background .2s;
}

.in-article-affiliate .af-btn:hover { background: #d07858; text-decoration: none; color: var(--white); }

/* ===== フッター ===== */
.site-footer {
  background: #2a3d32;
  color: rgba(255,255,255,.75);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-brand p { font-size: .84rem; line-height: 1.75; }

.footer-nav h4 { color: var(--white); font-size: .93rem; margin-bottom: 12px; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-nav a  { font-size: .84rem; color: rgba(255,255,255,.6); }
.footer-nav a:hover { color: #a8d8b8; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 16px;
  font-size: .78rem;
  text-align: center;
  color: rgba(255,255,255,.4);
}

/* ===== パンくず ===== */
.breadcrumb {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 20px;
  font-size: .81rem;
  color: var(--gray);
  display: flex;
  gap: 6px;
  align-items: center;
}

.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: #bbb; }

/* ===== ページネーション ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination a, .pagination span {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}

.pagination a { background: var(--white); box-shadow: var(--shadow); color: var(--dark); border: 1px solid var(--border); }
.pagination a:hover { background: var(--primary); color: var(--white); text-decoration: none; border-color: var(--primary); }
.pagination span { background: var(--primary); color: var(--white); }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .main-wrap, .post-wrap { grid-template-columns: 1fr; }
  .category-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 1.5rem; }
  .article-grid { grid-template-columns: 1fr; }
  .category-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .in-article-affiliate { flex-direction: column; text-align: center; }
  .post-content { padding: 20px; }
  .post-header h1 { font-size: 1.4rem; }
}

/* カードサムネイル・カテゴリアイコンの猫イラスト画像 */
.card-thumb { padding: 0; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card .cat-icon img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
