/*
Theme Name: はじめての事業承継
Theme URI: https://hajimete-jigyoshokei.site
Description: 事業承継・M&A情報サイト「はじめての事業承継」のオリジナルテーマ
Author: はじめての事業承継
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hajimete-jigyoshokei
*/

/* ============ CSS VARIABLES ============ */
:root {
  --navy-deep: #1a2744;
  --navy: #2c3e6b;
  --navy-light: #3d5a99;
  --navy-pale: #e8edf5;
  --navy-ghost: #f4f6fb;
  --accent-warm: #e8923e;
  --accent-warm-light: #fdf0e0;
  --text-primary: #2c3140;
  --text-secondary: #5a6275;
  --text-light: #8a90a0;
  --white: #ffffff;
  --border: #e2e6ef;
  --shadow-sm: 0 2px 8px rgba(26, 39, 68, 0.06);
  --shadow-md: 0 4px 20px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 8px 40px rgba(26, 39, 68, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  color: var(--text-primary);
  background: var(--navy-ghost);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

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

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

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy-deep);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 2px 8px rgba(44, 62, 107, 0.3);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span { color: var(--accent-warm); }

/* Navigation */
.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.main-nav a:hover { color: var(--navy); }

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-warm);
  transition: width 0.3s;
  border-radius: 2px;
}

.main-nav a:hover::after { width: 100%; }

/* Header Search */
.header-search {
  position: relative;
}

.header-search input {
  width: 220px;
  padding: 8px 16px 8px 38px;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, width 0.3s;
  background: var(--navy-ghost);
}

.header-search input:focus {
  border-color: var(--navy-light);
  width: 280px;
  background: var(--white);
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 16px;
  height: 16px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy-deep);
}

.menu-toggle svg { width: 24px; height: 24px; }

/* ============ HERO ============ */
.hero-section {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 40%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 146, 62, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(61, 90, 153, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
}

.hero-section h1 {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero-section h1 .highlight { color: var(--accent-warm); }

.hero-section .hero-desc {
  font-size: 16px;
  line-height: 2;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 36px;
  font-weight: 300;
}

.hero-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.hero-search input[type="search"] {
  width: 100%;
  padding: 16px 56px 16px 24px;
  border: none;
  border-radius: 32px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
}

.hero-search input[type="search"]::placeholder { color: var(--text-light); }

.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--navy);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hero-search button:hover { background: var(--navy-light); }

/* ============ CONCEPT ============ */
.concept-section {
  max-width: 1140px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.concept-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 48px;
}

.concept-icon {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  background: var(--accent-warm-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.concept-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy-deep);
}

.concept-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
}

/* ============ SECTIONS COMMON ============ */
.home-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px;
}

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

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 28px;
  background: linear-gradient(180deg, var(--accent-warm) 0%, var(--navy-light) 100%);
  border-radius: 4px;
}

.section-more {
  font-size: 14px;
  color: var(--navy-light);
  text-decoration: none;
  font-weight: 500;
}

.section-more:hover { color: var(--navy); }

/* ============ PICKUP CARDS ============ */
.pickup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pickup-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  text-decoration: none;
  color: inherit;
}

.pickup-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pickup-thumb {
  width: 200px;
  min-height: 140px;
  flex-shrink: 0;
  background: var(--navy-pale);
  overflow: hidden;
}

.pickup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pickup-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #e8edf5 0%, #d4ddef 100%);
}

.pickup-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pickup-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-light);
  background: var(--navy-pale);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: fit-content;
}

.pickup-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pickup-meta {
  font-size: 12px;
  color: var(--text-light);
}

/* ============ CATEGORY CARDS ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--accent-warm) 100%);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.category-card:hover::after { transform: scaleX(1); }

.category-emoji {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.category-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.category-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}

.category-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--navy-light);
  font-weight: 500;
}

/* ============ LATEST ARTICLES ============ */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.latest-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.latest-date {
  flex-shrink: 0;
  text-align: center;
  width: 56px;
}

.latest-date-month {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-warm);
  text-transform: uppercase;
}

.latest-date-day {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy-deep);
  line-height: 1.2;
}

.latest-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

.latest-body { flex: 1; }

.latest-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-light);
  background: var(--navy-pale);
  padding: 2px 10px;
  border-radius: 4px;
}

.latest-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 6px;
  line-height: 1.6;
}

/* ============ CTA ============ */
.cta-section {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  padding: 64px 24px;
  text-align: center;
  color: var(--white);
  margin-top: 24px;
}

.cta-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 15px;
  opacity: 0.8;
  margin-bottom: 28px;
  font-weight: 300;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-warm);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 32px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(232, 146, 62, 0.4);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 146, 62, 0.5);
  color: var(--white);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-links h4 {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s;
}

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

.footer-copy {
  text-align: center;
  font-size: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ SINGLE POST ============ */
.single-content {
  max-width: 780px;
  margin: 48px auto;
  padding: 0 24px;
}

.single-content .entry-header {
  margin-bottom: 32px;
}

.single-content .entry-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--navy-deep);
  line-height: 1.5;
  margin-bottom: 16px;
}

.single-content .entry-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.single-content .entry-body {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.single-content .entry-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-deep);
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--navy-pale);
  position: relative;
}

.single-content .entry-body h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--accent-warm);
  border-radius: 3px;
}

.single-content .entry-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
  padding-left: 16px;
  border-left: 4px solid var(--accent-warm);
}

.single-content .entry-body p {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.single-content .entry-body ul,
.single-content .entry-body ol {
  margin: 16px 0 24px 20px;
  line-height: 2;
}

.single-content .entry-body blockquote {
  background: var(--navy-ghost);
  border-left: 4px solid var(--navy-light);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.single-content .entry-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.single-content .entry-body th {
  background: var(--navy-deep);
  color: var(--white);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.single-content .entry-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.single-content .entry-body tr:nth-child(even) td {
  background: var(--navy-ghost);
}

/* ============ SIDEBAR ============ */
.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.sidebar h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy-pale);
}

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

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a {
  background: var(--white);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

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

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

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-inner { height: 60px; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .menu-toggle { display: block; }

  .main-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    gap: 12px;
  }

  .hero-section { padding: 56px 20px 70px; }
  .hero-section h1 { font-size: 26px; }

  .concept-card {
    flex-direction: column;
    padding: 32px 28px;
    gap: 20px;
    text-align: center;
  }

  .concept-icon {
    width: 72px;
    height: 72px;
    font-size: 32px;
    margin: 0 auto;
  }

  .pickup-grid { grid-template-columns: 1fr; }
  .pickup-thumb { width: 120px; min-height: 100px; }

  .category-grid { grid-template-columns: 1fr 1fr; }

  .single-content .entry-body { padding: 24px 20px; }
  .single-content .entry-title { font-size: 22px; }

  .footer-inner { flex-direction: column; gap: 32px; }
}
