/* ===========================
   介護施設選びブログ - スタイルシート
   =========================== */

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

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

:root {
  --color-main:    #2d7a5f;
  --color-main-dark: #1e5c46;
  --color-main-light: #4a9d7e;
  --color-accent:  #f5ede0;
  --color-accent2: #e8d5be;
  --color-text:    #333333;
  --color-text-light: #666666;
  --color-bg:      #fafaf8;
  --color-white:   #ffffff;
  --color-border:  #e0d8d0;
  --font-main: 'Noto Sans JP', sans-serif;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.14);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-main);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-main-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: 1.5em;
}

/* === ヘッダー === */
.site-header {
  background: var(--color-main);
  color: var(--color-white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}

.site-logo span {
  font-size: 0.75rem;
  font-weight: 300;
  opacity: 0.85;
  display: block;
}

/* ハンバーガーメニュー（モバイル） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ナビ */
.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
}

.site-nav a {
  color: var(--color-white);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.site-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
}

/* === メインレイアウト === */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* === ヒーローバナー（トップのみ） === */
.hero {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  color: var(--color-white);
  padding: 50px 20px;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.7;
}

/* === カード（記事一覧） === */
.articles-grid {
  display: grid;
  gap: 24px;
}

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

.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-main);
  font-size: 3rem;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.card-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: var(--color-accent);
  color: var(--color-main-dark);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--color-text);
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--color-main);
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.btn-read {
  display: inline-block;
  background: var(--color-main);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  align-self: flex-start;
  transition: background 0.2s;
}

.btn-read:hover {
  background: var(--color-main-dark);
  color: var(--color-white);
}

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

.widget {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-header {
  background: var(--color-main);
  color: var(--color-white);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.widget-body {
  padding: 16px;
}

/* サイドバー：プロフィール */
.profile-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.profile-name {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.profile-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* サイドバー：カテゴリ */
.category-list {
  list-style: none;
  padding: 0;
}

.category-list li {
  border-bottom: 1px solid var(--color-border);
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  font-size: 0.9rem;
  color: var(--color-text);
}

.category-list a:hover {
  color: var(--color-main);
}

.category-count {
  background: var(--color-accent);
  color: var(--color-main-dark);
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 20px;
}

/* === AdSense・アフィリエイト共通 === */

/* ── AdSense 挿入ブロック ── */
.ad-block {
  background: #f9f9f7;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin: 28px 0;
  font-size: 0.78rem;
  color: #aaa;
}

/* ── Amazon アソシエイト商品ブロック ── */
.amazon-block {
  background: var(--color-accent);
  border-left: 4px solid var(--color-main);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 28px 0;
}

.amazon-block-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-main-dark);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.amazon-product {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.amazon-product:last-child {
  margin-bottom: 0;
}

.amazon-product-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  background: #f0f0f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.amazon-product-info {
  flex: 1;
}

.amazon-product-name {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}

.amazon-product-link {
  display: inline-block;
  background: #FF9900;
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.amazon-product-link:hover {
  background: #e68a00;
  color: var(--color-white);
}

/* === 記事ページ === */
.post-header {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  color: var(--color-white);
  padding: 40px 20px;
}

.post-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-header .tag {
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
  margin-bottom: 14px;
  display: inline-block;
}

.post-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
}

.post-meta {
  font-size: 0.82rem;
  opacity: 0.85;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 記事本文 */
.post-content {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  line-height: 1.9;
  font-size: 1rem;
}

.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-main-dark);
  border-left: 4px solid var(--color-main);
  padding-left: 12px;
  margin: 32px 0 16px;
}

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 24px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

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

.post-content ul,
.post-content ol {
  margin-bottom: 18px;
}

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

/* チェックリスト */
.checklist {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--color-bg);
  font-size: 0.95rem;
  transition: background 0.15s;
}

.checklist li:hover {
  background: var(--color-accent);
}

.checklist li::before {
  content: '✓';
  color: var(--color-main);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 表 */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--color-main);
  color: var(--color-white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
}

.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.post-content tr:nth-child(even) td {
  background: var(--color-accent);
}

/* ポイントボックス */
.point-box {
  background: var(--color-accent);
  border-left: 4px solid var(--color-main);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}

.point-box-title {
  font-weight: 700;
  color: var(--color-main-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* 注意ボックス */
.note-box {
  background: #fff8f0;
  border-left: 4px solid #e8873a;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}

.note-box-title {
  font-weight: 700;
  color: #c0622a;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* 記事フッター */
.post-footer {
  margin-top: 32px;
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-main);
  font-size: 0.9rem;
  font-weight: 500;
}

/* === フッター === */
.site-footer {
  background: var(--color-main-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

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

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

.footer-section h4 {
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.footer-section p,
.footer-section li {
  font-size: 0.83rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--color-white);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-bottom: 16px;
}

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

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

  .sidebar {
    order: 2;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-main-dark);
    padding: 12px 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .site-nav a {
    display: block;
    padding: 10px 12px;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .post-content {
    padding: 24px 18px;
  }

  .post-header h1 {
    font-size: 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
