/* ========== CSS Variables ========== */
:root {
  --accent:    #2d6a4f;
  --accent-l:  #e8f4ee;
  --accent-m:  #52b788;
  --bg:        #faf9f6;
  --surf:      #ffffff;
  --text:      #1a1a1a;
  --text-s:    #555;
  --border:    #e0ddd6;
  --max-w:     800px;
  --font-head: 'M PLUS Rounded 1c', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;

  /* カテゴリ配色 */
  --th-bg:  #e8f4ee; --th-tx: #1a5c38; /* 食と健康 */
  --ta-bg:  #fef3dc; --ta-tx: #633806; /* 老化と長寿 */
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.5em; }

/* ========== Header ========== */
.site-header {
  background: var(--surf);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  display: flex; flex-direction: column; gap: 0;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.logo-main {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--accent);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.logo-sub {
  font-size: 10px;
  color: var(--text-s);
  letter-spacing: 0.04em;
}
.site-nav { display: flex; align-items: center; gap: 0; }
.nav-link {
  font-size: 14px;
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  font-weight: 500;
}
.nav-link:hover { background: var(--accent-l); color: var(--accent); text-decoration: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  background: var(--surf);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: block; }
.mobile-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex; flex-direction: column; gap: 0;
}
.mobile-nav-link {
  font-size: 15px;
  color: var(--text);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { color: var(--accent); text-decoration: none; }

/* ========== Layout ========== */
.main-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* ========== Category Tags ========== */
.cat-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 3px;
  letter-spacing: 0.03em;
  transition: opacity 0.15s;
}
.cat-tag:hover { opacity: 0.8; text-decoration: none; }
.cat-th { background: var(--th-bg); color: var(--th-tx); }
.cat-ta { background: var(--ta-bg); color: var(--ta-tx); }

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--accent) 0%, #1b4332 100%);
  color: #fff;
  padding: 3.5rem 2rem;
  text-align: center;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; }
.hero h1 {
  font-family: var(--font-head);
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.hero p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
}

/* ========== Section Titles ========== */
.section-title {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--accent);
  border-left: 4px solid var(--accent-m);
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}
.cat-lead { color: var(--text-s); font-size: 15px; margin-bottom: 1.5rem; }

/* ========== Article Card ========== */
.article-card {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none; color: inherit;
}
.article-card:hover {
  box-shadow: 0 4px 16px rgba(45,106,79,0.10);
  border-color: var(--accent-m);
  text-decoration: none;
}
.article-thumb {
  width: 120px; height: 80px;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.tp-th { background: linear-gradient(135deg, var(--accent-l), var(--accent-m) 120%); }
.tp-ta { background: linear-gradient(135deg, #fef3dc, #f4a261 120%); }

.article-info { flex: 1; min-width: 0; display: block; }
.article-meta {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.article-date { font-size: 12px; color: var(--text-s); }
.article-title {
  display: block;
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.article-excerpt { display: block; font-size: 13px; color: var(--text-s); line-height: 1.65; }

/* ========== Category Grid ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}
.cat-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column; gap: 0.4rem;
  text-decoration: none;
}
.cat-card:hover {
  box-shadow: 0 4px 16px rgba(45,106,79,0.10);
  border-color: var(--accent-m);
  text-decoration: none;
}
.cat-card-icon { font-size: 28px; margin-bottom: 0.25rem; }
.cat-card-name {
  font-family: var(--font-head);
  font-size: 17px; color: var(--accent);
}
.cat-card-desc { font-size: 13px; color: var(--text-s); line-height: 1.6; }
.cat-card-count { font-size: 12px; color: var(--text-s); margin-top: 0.25rem; }

/* ========== Ranking / Featured ========== */
.ranking-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { text-decoration: none; }
.ranking-item:hover .rank-title { color: var(--accent); }
.rank-num {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  color: var(--accent-m);
  min-width: 32px; text-align: center;
  line-height: 1;
  padding-top: 2px;
}
.rank-num.top { color: #c77d00; }
.rank-title {
  font-size: 14px; font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  transition: color 0.15s;
}

/* ========== Article Page ========== */
.article-eyecatch {
  width: 100%; height: 280px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.ec-th { background: linear-gradient(135deg, var(--accent-l) 0%, var(--accent-m) 100%); }
.ec-ta { background: linear-gradient(135deg, #fef3dc 0%, #f4a261 100%); }

.article-header { margin-bottom: 1.75rem; }
.article-header .article-meta { margin-bottom: 0.75rem; }
.article-page-title {
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.article-page-date { font-size: 13px; color: var(--text-s); }

.toc-box {
  display: block;
  background: var(--accent-l);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-title {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.toc-list { list-style: none; padding: 0; }
.toc-list li {
  font-size: 13px;
  padding: 0.2rem 0;
  color: var(--accent);
  border-bottom: 1px dashed rgba(45,106,79,0.2);
}
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before { content: "▸ "; font-size: 11px; }

.article-body h2 {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--text);
  border-bottom: 2px solid var(--accent-m);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem;
}
.article-body h3 {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--accent);
  border-left: 3px solid var(--accent-m);
  padding-left: 0.6rem;
  margin: 1.5rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.1rem; }
.article-body li { margin-bottom: 0.3rem; }
.article-body .lead {
  background: var(--accent-l);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 15px;
}
.article-body .summary-box {
  background: var(--accent-l);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.article-body .summary-box strong {
  font-family: var(--font-head);
  font-size: 15px; color: var(--accent);
  display: block; margin-bottom: 0.6rem;
}
.article-body .ref-note {
  font-size: 12px; color: var(--text-s);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 1.5rem;
  word-break: break-word;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 14px; color: var(--accent);
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 1.5rem;
  transition: background 0.15s;
}
.back-btn:hover { background: var(--accent-l); text-decoration: none; }

/* ========== Related ========== */
.related { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ========== Static Pages ========== */
.static-page h1 {
  font-family: var(--font-head);
  font-size: 26px; color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-m);
}
.static-page h2 {
  font-family: var(--font-head);
  font-size: 18px; color: var(--text);
  margin: 1.75rem 0 0.75rem;
  border-left: 3px solid var(--accent-m);
  padding-left: 0.6rem;
}
.static-page p { margin-bottom: 1rem; }
.static-page ul { margin-bottom: 1rem; }
.static-page li { margin-bottom: 0.3rem; }
.profile-box {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: var(--accent-l);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}
.profile-text h2 {
  font-family: var(--font-head);
  font-size: 17px; color: var(--accent);
  border: none; padding: 0; margin: 0 0 0.4rem;
}
.profile-text p { font-size: 14px; margin: 0; line-height: 1.7; }

/* ========== Contact Form ========== */
.contact-form { max-width: 560px; }
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 14px; font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.req { color: #c0392b; }
.contact-email { font-size: 19px; font-weight: 700; margin: 1.25rem 0 0.75rem; }
.contact-email a { color: var(--accent); }
.contact-note { font-size: 13px; color: var(--text-s); }
.form-input, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surf);
  color: var(--text);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-m);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}
.form-textarea { height: 140px; resize: vertical; }
.submit-btn {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-btn:hover { background: #1b4332; }

/* ========== Footer ========== */
.site-footer {
  background: #1b2e24;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 2rem 1.5rem;
  margin-top: 4rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-logo {
  font-family: var(--font-head);
  font-size: 16px;
  color: #fff;
  margin-bottom: 0.3rem;
}
.footer-sub { font-size: 11px; margin-bottom: 1.25rem; opacity: 0.6; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
}
.footer-link { font-size: 13px; color: rgba(255,255,255,0.7); }
.footer-link:hover { color: #fff; text-decoration: none; }
.footer-copy { font-size: 11px; opacity: 0.4; }

/* ========== Utils ========== */
.section-gap { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }

/* ========== Responsive ========== */
@media (max-width: 640px) {
  .header-inner { height: 56px; padding: 0 1rem; }
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav-inner { padding: 0.75rem 1rem; }
  .main-wrap { padding: 1.25rem 1rem 3rem; }
  .hero { padding: 2rem 1rem; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .cat-card { padding: 1rem; }
  .article-card { gap: 0.75rem; padding: 1rem; }
  .article-thumb { width: 80px; height: 60px; }
  .article-title { font-size: 14px; }
  .article-eyecatch { height: 180px; font-size: 40px; }
  .article-page-title { font-size: 20px; }
  .form-input, .form-textarea { font-size: 16px; }
  .logo-main { font-size: 15px; }
}
