/* ============================================================
   宅食ガイド - WordPress風スタイルシート（白ベース・緑系）
   ============================================================ */

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

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

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, "Yu Gothic", sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  color: #333;
  background: #f7f7f7;
}

a { color: #2e7d32; text-decoration: none; }
a:hover { text-decoration: underline; color: #1b5e20; }

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

/* ── レイアウト ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   ヘッダー（WP風：白背景＋下ボーダー）
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 3px solid #2e7d32;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.header-branding {
  padding: 16px 0;
}

.header-branding .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #333;
  letter-spacing: -.5px;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: #2e7d32; }

.site-tagline {
  font-size: .75rem;
  color: #888;
  border-left: 2px solid #ddd;
  padding-left: 14px;
  line-height: 1.5;
}

.header-nav { background: #388e3c; }

.header-nav .container { display: flex; }

.site-nav ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  padding: 10px 18px;
  transition: background .15s;
}
.site-nav a:hover {
  background: #ff6f00;
  text-decoration: none;
}

/* 検索フォーム */
.header-search {
  margin-left: auto;
}

.header-search form {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 24px;
  overflow: hidden;
  transition: border-color .2s;
}

.header-search form:focus-within {
  border-color: #2e7d32;
  background: #fff;
}

.header-search input[type="search"] {
  border: none;
  background: transparent;
  padding: 7px 14px;
  font-size: .65rem;
  width: 200px;
  outline: none;
  color: #333;
  font-family: inherit;
}

.header-search button {
  border: none;
  background: transparent;
  padding: 7px 14px 7px 8px;
  cursor: pointer;
  color: #888;
  font-size: .8rem;
  transition: color .2s;
}

.header-search button:hover { color: #2e7d32; }

/* ============================================================
   メインレイアウト
   ============================================================ */
.content-wrapper {
  max-width: 1400px;
  margin: 28px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.main-content { min-width: 0; }

/* ============================================================
   ヒーローバナー（WP風：シンプルなグリーン帯）
   ============================================================ */
.index-hero {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 28px 0;
}

.index-hero .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.35;
  color: #333;
}

.hero-text p {
  font-size: .85rem;
  color: #777;
  margin: 0;
}

.hero-icon {
  font-size: 2.8rem;
  flex-shrink: 0;
}

/* ============================================================
   セクション見出し
   ============================================================ */
.section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  padding: 8px 14px;
  background: #fff;
  border-left: 4px solid #2e7d32;
  border-bottom: 1px solid #e5e5e5;
  margin: 0 0 16px;
}

/* ============================================================
   記事カード
   ============================================================ */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  display: flex;
  overflow: hidden;
  position: relative;
  transition: box-shadow .15s;
}
.article-card + .article-card { border-top: none; }
.article-card:first-child { border-radius: 4px 4px 0 0; }
.article-card:last-child  { border-radius: 0 0 4px 4px; }

.article-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  z-index: 1;
}

.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* サムネイル */
.card-thumb {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f0f0;
}
.card-thumb--noimg { background: #e8f5e9; }

.card-thumb img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.article-card:hover .card-thumb img { transform: scale(1.04); }

/* カード本文 */
.card-body {
  padding: 16px 20px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.category-label {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  background: #2e7d32;
  color: #fff;
  margin-bottom: 8px;
  align-self: flex-start;
}

.article-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.6;
  color: #222;
}

.article-card:hover h2 { color: #2e7d32; }

.article-card p {
  font-size: .85rem;
  color: #666;
  line-height: 1.7;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-date {
  font-size: .7rem;
  color: #aaa;
}

.card-readmore {
  font-size: .7rem;
  color: #2e7d32;
  margin-left: auto;
  font-weight: 600;
}

/* ============================================================
   サイドバー（WP風：白背景）
   ============================================================ */
.sidebar {
  min-width: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.widget {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.widget-title {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  background: #388e3c;
  padding: 10px 16px;
  margin: 0;
  border-left: 4px solid #ff6f00;
}

.widget-body { padding: 14px 16px; }

/* サイドバー記事リスト */
.sidebar-post-list { list-style: none; }

.sidebar-post-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #e5e5e5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sidebar-post-list li:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-post-list .spl-thumb {
  width: 60px;
  height: 45px;
  flex-shrink: 0;
  border-radius: 3px;
  object-fit: cover;
  background: #e8f5e9;
}

.sidebar-post-list .spl-info { flex: 1; min-width: 0; }

.sidebar-post-list a {
  font-size: .78rem;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-post-list a:hover { color: #2e7d32; text-decoration: none; }

.sidebar-post-list .spl-date {
  font-size: .65rem;
  color: #aaa;
  display: block;
  margin-top: 3px;
}

/* カテゴリウィジェット */
.category-list { list-style: none; }

.category-list li { border-bottom: 1px solid #f0f0f0; }
.category-list li:last-child { border-bottom: none; }

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 4px;
  font-size: .82rem;
  color: #444;
  transition: color .15s, padding-left .15s;
}
.category-list a:hover { color: #2e7d32; padding-left: 8px; text-decoration: none; }

.category-list .cat-icon { margin-right: 6px; }
.category-list .cat-count {
  font-size: .65rem;
  background: #f5f5f5;
  color: #777;
  padding: 1px 8px;
  border-radius: 20px;
  border: 1px solid #e5e5e5;
}

/* サイト紹介ウィジェット */
.about-widget { text-align: center; }
.about-widget .about-icon { font-size: 2.2rem; margin-bottom: 8px; }
.about-widget p { font-size: .78rem; color: #666; line-height: 1.7; }

/* ============================================================
   記事ページ
   ============================================================ */

/* パンくず */
.breadcrumb {
  font-size: .72rem;
  color: #aaa;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: #2e7d32; }
.breadcrumb .sep { color: #ccc; }

/* 記事ヘッダー */
.entry-header {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.entry-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.5;
  color: #222;
  margin-bottom: 14px;
  padding: 24px 28px 0;
}

/* 記事ヒーロー画像 */
.article-hero-image {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.article-hero-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
}

.entry-header-inner {
  padding: 20px 28px 24px;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .75rem;
  color: #aaa;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.entry-meta .meta-cat {
  background: #2e7d32;
  color: #fff;
  padding: 3px 10px;
  border-radius: 2px;
  font-weight: 700;
  font-size: .7rem;
}

/* ============================================================
   記事本文（WP風：白・広め・読みやすい）
   ============================================================ */
.article-body {
  max-width: 100%;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 36px 40px;
  font-size: 1rem;
  line-height: 2.0;
  color: #333;
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 52px 0 18px;
  padding: 12px 18px;
  background: #f1f8e9;
  border-left: 5px solid #2e7d32;
  border-bottom: 1px solid #c8e6c9;
  color: #333;
  line-height: 1.5;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 36px 0 12px;
  padding: 8px 14px;
  background: #f9f9f9;
  border-left: 3px solid #81c784;
  color: #333;
  line-height: 1.5;
}

.article-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 26px 0 10px;
  color: #333;
  border-bottom: 1px dashed #ddd;
  padding-bottom: 6px;
}

.article-body p { margin-bottom: 22px; }

.article-body ul,
.article-body ol {
  margin: 14px 0 22px 28px;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: #222; font-weight: 700; }

.article-body hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 36px 0;
}

.article-body small { color: #888; font-size: .8rem; }

/* ── テーブル ── */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  font-size: .95rem;
  overflow-x: auto;
  display: block;
}

.article-body table thead th {
  background: #388e3c;
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.article-body table tbody tr:nth-child(even) td { background: #fafafa; }
.article-body table tbody tr:hover td { background: #f1f8e9; }

.article-body table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: top;
}

/* ── info-box ── */
.info-box {
  border-radius: 4px;
  padding: 18px 22px;
  margin: 26px 0;
  font-size: 1rem;
}

.info-box strong:first-child {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.info-box.point {
  background: #f1f8e9;
  border: 1px solid #c8e6c9;
  border-left: 5px solid #2e7d32;
}
.info-box.point strong:first-child { color: #2e7d32; }

.info-box.caution {
  background: #fffbf0;
  border: 1px solid #fde8a0;
  border-left: 5px solid #ff6f00;
}
.info-box.caution strong:first-child { color: #e65100; }

.info-box.merit {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-left: 5px solid #43a047;
}
.info-box.merit strong:first-child { color: #2e7d32; }

/* ── ランキングカード ── */
.card-ranking-box {
  border-radius: 4px;
  padding: 20px 24px;
  margin: 24px 0;
  border: 1px solid #e5e5e5;
  border-top: 5px solid;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.card-ranking-box h3,
.card-ranking-box h4 {
  border: none !important;
  border-bottom: 1px solid #e5e5e5 !important;
  padding-bottom: 8px !important;
  margin-bottom: 14px !important;
  color: #333 !important;
  background: none !important;
}

.card-ranking-box.rank-1 { border-top-color: #d4a900; }
.card-ranking-box.rank-2 { border-top-color: #9e9e9e; }
.card-ranking-box.rank-3 { border-top-color: #c07838; }

.card-ranking-box table { box-shadow: none !important; border: 1px solid #e5e5e5; }
.card-ranking-box table thead th {
  background: #388e3c !important;
  color: #fff !important;
  font-size: .82rem !important;
  padding: 9px 14px !important;
}
.card-ranking-box table tbody td {
  font-size: .88rem;
  padding: 9px 14px !important;
}
.card-ranking-box table tbody td:first-child {
  font-weight: 600;
  background: #fafafa;
  white-space: nowrap;
}
.card-ranking-box table tbody tr:nth-child(even) td { background: #fafafa; }
.card-ranking-box table tbody tr:hover td { background: #f1f8e9; }

/* バッジ */
.rate-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 6px;
}

/* 記事内のh1除去 */
.article-body > h1:first-child { display: none; }

/* ============================================================
   フッター（WP風：ダークグレー）
   ============================================================ */
.site-footer {
  background: #1b5e20;
  margin-top: 48px;
}

.footer-widgets {
  padding: 36px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-widgets .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-widget h3 {
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.2);
  letter-spacing: .04em;
}

.footer-widget ul { list-style: none; }
.footer-widget li { margin-bottom: 6px; }

.footer-widget a {
  color: #a5d6a7;
  font-size: .78rem;
  transition: color .15s;
}
.footer-widget a:hover { color: #fff; text-decoration: none; }

.footer-widget p {
  color: #a5d6a7;
  font-size: .78rem;
  line-height: 1.8;
}

.footer-bottom {
  padding: 14px 0;
  background: #1a3c21;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p  { color: #81c784; font-size: .72rem; }
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom nav a { color: #81c784; font-size: .72rem; }
.footer-bottom nav a:hover { color: #fff; }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 860px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-widgets .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  html { font-size: 13px; }
  .header-branding { padding: 12px 0; }
  .site-logo { font-size: 1.2rem; }
  .site-tagline { display: none; }
  .site-nav a { font-size: .75rem; padding: 8px 12px; }

  .index-hero { padding: 20px 0; }
  .hero-text h1 { font-size: 1.2rem; }

  .content-wrapper { margin: 16px auto; }

  .card-thumb { width: 120px; }
  .card-thumb img { height: 95px; }

  .entry-header { padding: 18px 18px; }
  .entry-header h1 { font-size: 1.25rem; }
  .article-body { padding: 20px 18px; }
  .article-body h2 { font-size: 1.1rem; padding: 10px 14px; }
  .article-body h3 { font-size: 1rem; }

  .footer-widgets .container { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   関連記事セクション
   ============================================================ */
.related-articles {
  margin-top: 36px;
  padding: 24px 28px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

.related-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2e7d32;
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 8px;
  border-radius: 4px;
  transition: background .15s;
}

.related-item a:hover { background: #f1f8e9; }

.related-thumb {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.related-thumb--noimg {
  display: inline-block;
  background: #e8f5e9;
  border-radius: 3px;
}

.related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-title {
  font-size: .88rem;
  font-weight: 600;
  color: #2e7d32;
  line-height: 1.45;
}

.related-date {
  font-size: .72rem;
  color: #aaa;
}
