/* ===========================
   CSS Variables
   =========================== */
:root {
  --primary:       #0d9488;
  --primary-dark:  #0f766e;
  --primary-light: #f0fdfa;
  --dark:          #111827;
  --text:          #374151;
  --muted:         #6b7280;
  --border:        #e5e7eb;
  --bg:            #f3f4f6;
  --white:         #ffffff;
  --footer-bg:     #1f2937;
  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --shadow-sm:     0 1px 6px rgba(0,0,0,0.06);
  --shadow:        0 4px 20px rgba(0,0,0,0.09);
  --shadow-hover:  0 12px 32px rgba(0,0,0,0.13);
  --transition:    0.25s ease;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   Layout
   =========================== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0 3.5rem;
}
.main-content { min-width: 0; }

/* ===========================
   Header
   =========================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.site-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.site-logo:hover { color: var(--primary-dark); }
.site-tagline { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ===========================
   Navigation
   =========================== */
.nav-list { display: flex; list-style: none; gap: 0.15rem; flex-wrap: wrap; }
.nav-list li a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-list li a:hover,
.nav-list li.current-menu-item a {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--dark); border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   Hero Banner
   =========================== */
.hero-banner {
  background: linear-gradient(135deg, #0d9488 0%, #065f46 100%);
  padding: 3rem 0;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-banner .container { position: relative; z-index: 1; }
.hero-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}
.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.65;
}

/* ===========================
   Archive Header
   =========================== */
.archive-header { padding: 1.5rem 0 0; }
.archive-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  padding-left: 0.85rem;
  border-left: 4px solid var(--primary);
}

/* ===========================
   Section Header
   =========================== */
.section-header {
  display: flex;
  align-items: center;
  margin: 2rem 0 1.25rem;
}
.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  padding: 0.25rem 0.85rem;
  border-left: 3px solid var(--primary);
  letter-spacing: 0.03em;
}

/* ===========================
   Featured Post（最初の記事）
   =========================== */
.featured-post {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  color: inherit;
}
.featured-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}
.featured-post-thumb {
  flex: 0 0 52%;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.featured-post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-post:hover .featured-post-thumb img { transform: scale(1.04); }

.featured-post-body {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}
.featured-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--primary);
  width: fit-content;
}
.featured-post-title {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.55;
  color: var(--dark);
}
.featured-post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}
.featured-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.featured-read-more {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

/* ===========================
   Posts Grid
   =========================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ===========================
   Post Card
   =========================== */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.post-card-link:hover { color: inherit; }

.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-no-image {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

.cat-label {
  position: absolute;
  top: 0.65rem; left: 0.65rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.cat-label--inline {
  position: static;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1rem;
  gap: 0.4rem;
}
.post-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-excerpt {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.post-card-arrow { color: var(--primary); font-size: 0.85rem; }

/* ===========================
   Single Post
   =========================== */
.single-post {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.single-cat { margin-bottom: 0.75rem; }
.single-cat .cat-label { position: static; display: inline-block; }
.single-title {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.5;
  color: var(--dark);
  margin-bottom: 0.75rem;
}
.single-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.single-eyecatch {
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.single-eyecatch img { width: 100%; border-radius: var(--radius-sm); }

/* ===========================
   Entry Content
   =========================== */
.entry-content { line-height: 1.9; color: var(--text); }

.entry-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 0.6rem 1rem;
  margin: 2.5rem 0 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2rem 0 0.85rem;
}
.entry-content h4 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.6rem; }
.entry-content p { margin-bottom: 1.4rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.entry-content li { margin-bottom: 0.4rem; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
}
.entry-content th {
  background: var(--primary);
  color: var(--white);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
.entry-content td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: #f9fafb; }

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
}
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content a:hover { color: var(--primary-dark); }
.entry-content img { border-radius: var(--radius-sm); margin: 1rem auto; }
.entry-content strong { font-weight: 700; color: var(--dark); }

/* 前後記事ナビ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--transition);
  font-size: 0.85rem;
}
.post-nav-item:hover { border-color: var(--primary); color: var(--primary); }
.post-nav-label { font-size: 0.72rem; color: var(--muted); }
.post-nav-title { font-weight: 700; }
.post-nav-next { text-align: right; }

/* ===========================
   Sidebar & Widgets
   =========================== */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

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

/* クラシック & ブロックウィジェット 両対応 */
.widget-title,
.widget_block h2,
.widget_block h3,
.widget_block .wp-block-search__label,
.widget_block .wp-block-heading,
.widget h2,
.widget h3 {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.1rem !important;
  margin: 0 0 0.85rem !important;
  display: block !important;
  border: none !important;
  border-radius: 0 !important;
}

.widget > *:not(.widget-title):not(h2):not(h3),
.widget_block > div { padding: 0 1.1rem 1.1rem; }

.widget ul { list-style: none; }
.widget ul li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); transition: color var(--transition); }
.widget ul li a:hover { color: var(--primary); }

/* 検索 */
.widget .search-form,
.widget .wp-block-search__inside-wrapper { display: flex; gap: 0.4rem; }
.widget .search-field,
.widget .wp-block-search__input {
  flex: 1;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}
.widget .search-submit,
.widget .wp-block-search__button {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.45rem 0.9rem !important;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}
.widget .search-submit:hover,
.widget .wp-block-search__button:hover { background: var(--primary-dark) !important; }

/* ===========================
   Pagination
   =========================== */
.pagination-wrap { margin-top: 2rem; }
.pagination-wrap .nav-links {
  display: flex; gap: 0.5rem;
  justify-content: center; flex-wrap: wrap;
}
.pagination-wrap .page-numbers {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  background: var(--white);
}
.pagination-wrap .page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.pagination-wrap .page-numbers.current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--footer-bg);
  color: #9ca3af;
  border-top: 3px solid var(--primary);
  margin-top: 3rem;
  padding: 2.5rem 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.75rem;
  display: block;
}
.footer-desc { font-size: 0.8rem; line-height: 1.9; }
.footer-links h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.footer-nav-list { list-style: none; }
.footer-nav-list li { padding: 0.3rem 0; }
.footer-nav-list li a {
  color: #9ca3af;
  font-size: 0.8rem;
  transition: color var(--transition);
}
.footer-nav-list li a:hover { color: var(--primary); }
.footer-bottom {
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-thumb { aspect-ratio: 16/9; }
}

@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .single-title { font-size: 1.3rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.15rem; }
  .hero-banner { padding: 2rem 0; }
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .primary-nav.open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list li a { padding: 0.6rem 0.5rem; }
  .single-post { padding: 1.25rem; }
}
