/*
Theme Name: 固定費見直し研究所
Theme URI: https://koteihi-lab.com
Author: Koteihi Lab
Description: 固定費見直し研究所 - 専門家との対話形式で学ぶ固定費見直しメディア
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: koteihi-theme
*/

/* =====================
   CSS Variables
   ===================== */
:root {
  --color-base: #FAFAF7;
  --color-navy: #1A2E4A;
  --color-navy-light: #243d62;
  --color-terracotta: #C4704F;
  --color-terracotta-dark: #a85c3d;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0ddd8;
  --color-bg-light: #f0ede8;
  --color-teacher-bg: #EDF2F8;
  --color-student-bg: #FDF5F2;

  --font-base: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-size-base: 17px;
  --font-size-sm: 14px;
  --font-size-lg: 19px;
  --font-size-xl: 22px;
  --font-size-h1: 32px;
  --font-size-h2: 26px;
  --font-size-h3: 21px;

  --line-height-base: 1.9;
  --letter-spacing: 0.02em;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(26, 46, 74, 0.08);
  --shadow-md: 0 4px 20px rgba(26, 46, 74, 0.12);

  --max-width: 1100px;
  --content-width: 720px;
  --sidebar-width: 300px;
}

/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing);
  color: var(--color-text);
  background-color: var(--color-base);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-navy);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--color-terracotta);
}

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

ul, ol {
  list-style: none;
}

/* =====================
   Layout
   ===================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  padding: 60px 0;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 60px;
  align-items: start;
}

.content-area.no-sidebar {
  grid-template-columns: 1fr;
  max-width: var(--content-width);
  margin: 0 auto;
}

/* =====================
   Header
   ===================== */
.site-header {
  background-color: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  white-space: nowrap;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.site-title span {
  display: none;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--color-white);
  border-bottom-color: var(--color-terracotta);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =====================
   Footer
   ===================== */
.site-footer {
  background-color: var(--color-navy);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand {
  margin-bottom: 32px;
}

.footer-brand .site-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 32px;
}

.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: var(--font-size-sm);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* =====================
   Typography
   ===================== */
.entry-title,
.page-title {
  font-size: var(--font-size-h1);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.5;
  margin-bottom: 24px;
}

h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-lg); }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--color-navy);
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.entry-content h2 {
  font-size: var(--font-size-h2);
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  border-radius: var(--radius-sm);
}

.entry-content h3 {
  font-size: var(--font-size-h3);
  border-left: 4px solid var(--color-terracotta);
  padding-left: 16px;
}

.entry-content p {
  margin-bottom: 24px;
}

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: 1.8em;
  margin-bottom: 24px;
}

.entry-content li {
  margin-bottom: 8px;
}

.entry-content strong {
  color: var(--color-navy);
  font-weight: 700;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-terracotta);
  padding: 16px 20px;
  margin: 32px 0;
  background: var(--color-bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}

/* =====================
   Article Cards
   ===================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  border-color: var(--color-navy);
  box-shadow: var(--shadow-sm);
}

/* Featured first card */
.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.post-card--featured .post-card-thumbnail {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 240px;
}

.post-card-thumb-link {
  display: block;
}

.post-card-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-light);
  position: relative;
  border-radius: var(--radius-sm);
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.post-card:hover .post-card-thumbnail img {
  transform: scale(1.05);
}

.post-card-no-img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: var(--color-bg-light);
}

/* 白い細枠フレーム */
.post-card-frame {
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

/* タイトルオーバーレイ（下部ダーク帯） */
.post-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.55) 60%, transparent 100%);
  z-index: 1;
}

.post-card-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-navy);
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.post-card-title-on-img {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.post-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-card--featured .post-card-body {
  padding: 28px 32px;
  justify-content: center;
  gap: 16px;
}

.post-card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.65;
  margin-bottom: 12px;
}

.post-card--featured .post-card-title-on-img {
  font-size: var(--font-size-h3);
}

.post-card--featured .post-card-overlay {
  padding: 32px 24px 20px;
}

.post-card-title a {
  color: inherit;
}

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

.post-card-meta {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: auto;
}

/* =====================
   Single Article
   ===================== */

/* アイキャッチヒーロー */
.eyecatch-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 36px;
}

.eyecatch-hero__img {
  position: absolute;
  inset: 0;
}

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

/* 黒幕オーバーレイ */
.eyecatch-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

/* 白い細枠フレーム */
.eyecatch-hero__frame {
  position: absolute;
  inset: 18px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 2px;
  pointer-events: none;
}

/* タイトルコンテンツ */
.eyecatch-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
}

.eyecatch-hero__cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.eyecatch-hero__cats .article-category-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  backdrop-filter: blur(4px);
}

.eyecatch-hero__title {
  font-size: clamp(24px, 3.8vw, 52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* 日付（ヒーロー下） */
.single-article-meta {
  display: flex;
  gap: 20px;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: 40px;
}

/* アイキャッチなし時のヘッダー */
.single-article-header--no-img {
  margin-bottom: 32px;
}

.single-article-header {
  margin-bottom: 48px;
}

.article-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.article-category-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-navy);
  padding: 4px 14px;
  border-radius: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-eyecatch {
  margin-bottom: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-eyecatch img {
  width: 100%;
  height: auto;
}

/* =====================
   Dialogue Format
   ===================== */
.dialogue-box {
  display: flex;
  gap: 20px;
  margin: 32px 0;
  padding: 20px 24px 20px 16px;
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.teacher-says {
  background-color: var(--color-teacher-bg);
  border-left: 4px solid var(--color-navy);
}

.student-says {
  background-color: var(--color-student-bg);
  border-right: 4px solid var(--color-terracotta);
  border-left: none;
  flex-direction: row-reverse;
  padding: 20px 16px 20px 24px;
}

.dialogue-avatar {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-navy);
  background: none;
  border-radius: 0;
  text-align: center;
  line-height: 1.3;
}

.dialogue-avatar::before {
  content: '';
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.06);
}

.teacher-says .dialogue-avatar {
  color: var(--color-navy);
}

.teacher-says .dialogue-avatar::before {
  background-image: url(images/manager_normal.jpg);
  background-color: #e8eef6;
}

.student-says .dialogue-avatar {
  color: var(--color-terracotta);
}

.student-says .dialogue-avatar::before {
  background-image: url(images/user_normal.jpg);
  background-color: #fef3ec;
}

.dialogue-content {
  flex: 1;
}

.dialogue-content p {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

.dialogue-content p + p {
  margin-top: 12px;
}

.dialogue-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.teacher-says .dialogue-label {
  color: var(--color-navy);
}

.student-says .dialogue-label {
  color: var(--color-terracotta);
  text-align: right;
}

/* =====================
   CTA Box
   ===================== */
.cta-box {
  background-color: #fef9e0;
  background-image: url(images/bg-yellow.jpg);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  border: 2px solid rgba(196, 112, 79, 0.2);
  padding: 40px 36px;
  text-align: center;
  margin: 48px 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(196, 112, 79, 0.12);
  pointer-events: none;
}

.cta-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  line-height: 1.5;
}

.cta-desc {
  font-size: var(--font-size-base);
  color: rgba(26, 46, 74, 0.75);
  margin-bottom: 28px;
  line-height: 1.7;
}

.cta-button {
  display: inline-block;
  background: var(--color-terracotta);
  color: var(--color-white);
  font-size: var(--font-size-base);
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 40px;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(196, 112, 79, 0.4);
}

.cta-button:hover {
  background: var(--color-terracotta-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 112, 79, 0.5);
}

/* =====================
   Related Articles
   ===================== */
.related-posts {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 2px solid var(--color-border);
}

.related-posts-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 28px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* =====================
   Sidebar
   ===================== */
.sidebar {
  position: sticky;
  top: 92px;
}

.widget {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 18px;
  background: var(--color-terracotta);
  border-radius: 3px;
}

.sidebar-profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid var(--color-navy);
}

.sidebar-profile-name {
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.sidebar-profile-title {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.sidebar-profile-bio {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.7;
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, #d4845f 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.sidebar-cta p {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.sidebar-cta a {
  display: block;
  background: var(--color-white);
  color: var(--color-terracotta);
  font-weight: 700;
  font-size: var(--font-size-sm);
  padding: 12px;
  border-radius: 30px;
  transition: opacity 0.2s;
}

.sidebar-cta a:hover {
  opacity: 0.85;
  color: var(--color-terracotta);
}

/* =====================
   Front Page
   ===================== */
.hero-section {
  background-color: #fffbf2;
  background-image: url(images/bg-paper.jpg);
  background-size: cover;
  background-position: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid rgba(196, 112, 79, 0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: rgba(196, 112, 79, 0.04);
  pointer-events: none;
}

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

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.45;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: normal;
  color: #f0a882;
}

.hero-desc {
  font-size: var(--font-size-base);
  color: rgba(26, 46, 74, 0.7);
  margin-bottom: 36px;
  line-height: 1.9;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-terracotta);
  color: var(--color-white);
  font-size: var(--font-size-base);
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta::after {
  content: '→';
}

.hero-cta:hover {
  background: var(--color-terracotta-dark);
  color: var(--color-white);
  transform: translateX(3px);
}

/* Features Section */
.features-section {
  padding: 72px 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.section-title {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 48px;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

.feature-item {
  display: flex;
  gap: 20px;
  padding: 36px 32px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.feature-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-terracotta);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.feature-body .feature-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.feature-body .feature-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.75;
}

/* Latest Articles Section */
.latest-articles {
  padding: 72px 0;
}

.latest-articles .section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.view-all-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.view-all-link:hover {
  color: var(--color-navy);
}

/* Expert Section */
.expert-section {
  padding: 80px 0;
  background: var(--color-white);
}

.expert-card {
  display: flex;
  gap: 48px;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-base);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.expert-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-navy);
  box-shadow: var(--shadow-sm);
}

.expert-photo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-image: url(images/manager_normal.jpg);
  background-size: cover;
  background-position: center top;
  background-color: #e8eef6;
  border: 4px solid var(--color-navy);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  overflow: hidden;
  font-size: 0;
}

.expert-name {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.expert-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: 16px;
  font-weight: 500;
}

.expert-bio {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.8;
}

/* =====================
   Archive / Category
   ===================== */
.archive-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--color-border);
}

.archive-title {
  font-size: var(--font-size-h1);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.archive-description {
  font-size: var(--font-size-base);
  color: var(--color-text-light);
}

/* =====================
   Pagination
   ===================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.pagination a {
  background: var(--color-white);
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}

.pagination a:hover {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.pagination .current {
  background: var(--color-navy);
  color: var(--color-white);
}

/* =====================
   404
   ===================== */
.error-404-section {
  text-align: center;
  padding: 100px 24px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.15;
}

.error-title {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 16px;
}

.error-desc {
  font-size: var(--font-size-base);
  color: var(--color-text-light);
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-block;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: var(--font-size-base);
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 40px;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--color-navy-light);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* =====================
   Breadcrumb
   ===================== */
.breadcrumb {
  padding: 14px 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--color-text-light);
}

.breadcrumb a:hover {
  color: var(--color-terracotta);
}

.breadcrumb span {
  margin: 0 6px;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 900px) {
  .content-area {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .post-card--featured {
    grid-template-columns: 1fr;
  }

  .post-card--featured .post-card-thumbnail {
    height: auto;
    min-height: unset;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .expert-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-base: 16px;
    --font-size-h1: 26px;
    --font-size-h2: 22px;
    --font-size-h3: 19px;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-navy);
    padding: 16px 24px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  .header-nav.open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 16px;
  }

  .hamburger {
    display: flex;
  }

  .hero-section {
    padding: 56px 0;
  }

  .hero-content {
    max-width: 100%;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .feature-item {
    padding: 24px 20px;
  }

  .site-main {
    padding: 40px 0;
  }

  .dialogue-box {
    padding: 16px;
    gap: 12px;
  }

  .dialogue-avatar {
    width: 60px;
    font-size: 10px;
  }

  .dialogue-avatar::before {
    width: 54px;
    height: 54px;
  }

  .cta-box {
    padding: 28px 20px;
  }

  .cta-button {
    padding: 14px 32px;
  }
}

@media (max-width: 480px) {
  .student-says {
    flex-direction: row;
  }
}

/* =====================
   よく読まれている記事（温かみセクション）
   ===================== */
.related-warm {
  background-color: #b5c84a;
  background-image: url(images/bg-matcha.jpg);
  background-size: cover;
  background-position: center;
  padding: 64px 0 72px;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

.related-warm__scribble {
  position: absolute;
  pointer-events: none;
}

.related-warm__scribble--left {
  left: 0;
  top: 0;
  width: 300px;
  opacity: 0.6;
}

.related-warm__scribble--right {
  right: 0;
  bottom: 0;
  width: 260px;
  opacity: 0.6;
}

.related-warm__title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.18em;
  margin-bottom: 40px;
}

.related-warm__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.related-warm__card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-warm__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.related-warm__thumb-link {
  display: block;
}

.related-warm__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f0e8;
}

.related-warm__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.related-warm__card:hover .related-warm__thumb img {
  transform: scale(1.04);
}

.related-warm__no-img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: #f5f0e8;
}

.related-warm__body {
  padding: 16px 18px 20px;
}

.related-warm__cats {
  margin-bottom: 8px;
}

.related-warm__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e87837;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.related-warm__card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  color: #333;
}

.related-warm__card-title a {
  color: inherit;
}

.related-warm__card-title a:hover {
  color: #9aad3a;
}

@media (max-width: 768px) {
  .related-warm__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .related-warm__title {
    font-size: 17px;
    letter-spacing: 0.1em;
  }
}

/* SNSシェアボタン */
.sns-share {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f5f5f2;
  border-radius: 8px;
  text-align: center;
}
.sns-share__label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
}
.sns-share__buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.sns-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.2s;
}
.sns-btn:hover { opacity: 0.85; color: #fff; }
.sns-btn--twitter  { background: #000; }
.sns-btn--facebook { background: #1877F2; }
.sns-btn--line     { background: #06C755; }

/* 目次（TOC） */
.toc-box {
  background: #f5f5f2;
  border: 2px solid var(--color-navy);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  display: inline-block;
  min-width: 280px;
  max-width: 100%;
}
.toc-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
}
.toc-list {
  margin: 0;
  padding-left: 1.5rem;
}
.toc-list li {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}
.toc-list a {
  color: var(--color-navy);
  text-decoration: none;
}
.toc-list a:hover {
  color: var(--color-terracotta);
  text-decoration: underline;
}
