/*
Theme Name: FixHub Child
Template: twentytwentyfive
Version: 1.0
*/

/* ── ベース ── */
body {
  background: #fff !important;
  color: #111827 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', sans-serif !important;
}
.wp-site-blocks { padding: 0 !important; }
.wp-block-template-part { margin: 0 !important; padding: 0 !important; }
.wp-block-post-featured-image { display: none; }

/* ── FSEのデフォルト余白リセット ── */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
  margin-left: unset !important;
  margin-right: unset !important;
  padding-left: unset !important;
  padding-right: unset !important;
}

/* ── ヘッダー・フッターブロック余白リセット ── */
.wp-block-template-part .wp-block-html {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}
.wp-block-template-part .wp-block-html > * {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ── コンテンツエリア全体を制御 ── */
.wp-block-post-content {
  max-width: 52rem !important;
  margin: 0 auto !important;
  padding: 0 1.25rem 3rem !important;
  font-size: 1rem !important;
  line-height: 1.85 !important;
  color: #374151 !important;
}

/* ── mainの上余白 ── */
main.wp-block-group,
.wp-block-group[style*="margin-top"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ── 記事タイトル ── */
.wp-block-post-title {
  max-width: 52rem !important;
  margin: 2rem auto 0.5rem !important;
  padding: 0 1.25rem !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  line-height: 1.4 !important;
}

/* ── 著者・カテゴリ行 ── */
.wp-block-post-author,
.wp-block-post-terms {
  max-width: 52rem !important;
  margin: 0 auto 1.5rem !important;
  padding: 0 1.25rem !important;
  font-size: 0.8rem !important;
  color: #6b7280 !important;
}
.wp-block-post-terms a { color: #1d4ed8 !important; }

/* ── 本文テキスト ── */
.wp-block-post-content p { margin-bottom: 1.1rem !important; }
.wp-block-post-content a { color: #1d4ed8 !important; }
.wp-block-post-content ul,
.wp-block-post-content ol {
  padding-left: 1.5rem !important;
  margin-bottom: 1.1rem !important;
}
.wp-block-post-content li { margin-bottom: 0.4rem !important; }

/* ── 見出し ── */
.wp-block-post-content h2 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  border-left: 4px solid #1d4ed8 !important;
  padding-left: 0.75rem !important;
  margin: 2.5rem 0 1rem !important;
}
.wp-block-post-content h3 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1e3a5f !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding-bottom: 0.3rem !important;
  margin: 2rem 0 0.75rem !important;
}
.wp-block-post-content h4 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin: 1.5rem 0 0.5rem !important;
}

/* ── テーブル ── */
.wp-block-post-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.875rem !important;
  margin: 1.5rem 0 !important;
  display: table !important;
}
.wp-block-post-content th {
  background: #1e3a5f !important;
  color: #fff !important;
  padding: 0.6rem 0.85rem !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
}
.wp-block-post-content td {
  padding: 0.55rem 0.85rem !important;
  border-bottom: 1px solid #e5e7eb !important;
  vertical-align: top !important;
}
.wp-block-post-content tr:nth-child(even) td { background: #f9fafb !important; }

/* ── コールアウトボックス ── */
.fh-box {
  padding: 0.9rem 1.1rem !important;
  border-radius: 0.5rem !important;
  margin: 1.5rem 0 !important;
  border-left: 4px solid !important;
  box-sizing: border-box !important;
}
.fh-box.info    { background: #eff6ff !important; border-color: #1d4ed8 !important; }
.fh-box.warning { background: #fffbeb !important; border-color: #d97706 !important; }
.fh-box.danger  { background: #fef2f2 !important; border-color: #dc2626 !important; }
.fh-box.tip     { background: #f0fdf4 !important; border-color: #16a34a !important; }
.fh-box .fh-box-title {
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  margin: 0 0 0.35rem !important;
}
.fh-box.info    .fh-box-title { color: #1e40af !important; }
.fh-box.warning .fh-box-title { color: #92400e !important; }
.fh-box.danger  .fh-box-title { color: #991b1b !important; }
.fh-box.tip     .fh-box-title { color: #166534 !important; }
.fh-box p { margin: 0 !important; font-size: 0.875rem !important; line-height: 1.6 !important; }

/* ── CTAバナー ── */
.fh-cta {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #fff;
  padding: 1.5rem !important;
  border-radius: 0.75rem;
  text-align: center;
  margin: 2rem 0;
}
.fh-cta p { color: #bfdbfe !important; font-size: 0.875rem !important; margin-bottom: 0.75rem !important; }
.fh-cta a {
  display: inline-block;
  background: #fff;
  color: #1d4ed8 !important;
  font-weight: 700;
  padding: 0.6rem 1.75rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
  font-size: 0.9rem;
}
.fh-cta a:hover { background: #eff6ff; }
.fh-cta-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }

/* ── ステップリスト ── */
.fh-steps { list-style: none !important; padding-left: 0 !important; counter-reset: step; }
.fh-steps li {
  counter-increment: step;
  padding: 0.8rem 1rem 0.8rem 3.25rem !important;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 0.65rem !important;
  background: #fff;
}
.fh-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #1d4ed8;
  color: #fff;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ── バッジ ── */
.fh-cost   { display:inline-block; background:#fef3c7; color:#92400e; border:1px solid #fcd34d; border-radius:0.25rem; padding:0.1rem 0.45rem; font-size:0.75rem; font-weight:700; }
.fh-urgent { display:inline-block; background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; border-radius:0.25rem; padding:0.1rem 0.45rem; font-size:0.75rem; font-weight:700; }
.fh-ok     { display:inline-block; background:#d1fae5; color:#065f46; border:1px solid #6ee7b7; border-radius:0.25rem; padding:0.1rem 0.45rem; font-size:0.75rem; font-weight:700; }

/* ── フッターグリッド（5列 / レスポンシブ） ── */
.fh-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  font-size: 0.875rem;
}
@media (min-width: 768px) {
  .fh-footer-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ── アーカイブページ ── */
.fh-archive-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.fh-archive-heading.wp-block-heading {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: none !important;
}
.fh-archive-desc {
  color: #6b7280 !important;
  margin-bottom: 2rem !important;
}

/* ── 投稿カードグリッド ── */
.wp-block-post-template.is-flex-container {
  display: grid !important;
  grid-template-columns: repeat(1, 1fr) !important;
  gap: 1.25rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (min-width: 600px) {
  .wp-block-post-template.is-flex-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (min-width: 900px) {
  .wp-block-post-template.is-flex-container {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
.fh-post-card {
  border: 1px solid #e5e7eb !important;
  border-radius: 0.75rem !important;
  padding: 1.25rem !important;
  transition: box-shadow 0.15s, border-color 0.15s !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
}
.fh-post-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
}
.fh-card-cat .wp-block-post-terms__item,
.fh-card-cat a {
  display: inline-block !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  padding: 0.15rem 0.5rem !important;
  border-radius: 0.25rem !important;
  text-decoration: none !important;
  margin-bottom: 0.6rem !important;
}
.fh-card-title.wp-block-post-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  line-height: 1.5 !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  max-width: none !important;
}
.fh-card-title a { color: #111827 !important; text-decoration: none !important; }
.fh-card-title a:hover { color: #1d4ed8 !important; }
.fh-card-date.wp-block-post-date {
  font-size: 0.75rem !important;
  color: #9ca3af !important;
  margin: 0 0 0.5rem !important;
}
.fh-card-excerpt .wp-block-post-excerpt__excerpt {
  font-size: 0.8rem !important;
  color: #6b7280 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}
.fh-card-excerpt .wp-block-post-excerpt__more-text { display: none !important; }

/* ── ページネーション ── */
.fh-pagination {
  margin-top: 2.5rem !important;
  display: flex !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  flex-wrap: wrap !important;
}
.fh-pagination .wp-block-query-pagination-numbers a,
.fh-pagination .wp-block-query-pagination-numbers span,
.fh-pagination .wp-block-query-pagination-previous a,
.fh-pagination .wp-block-query-pagination-next a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  color: #374151 !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
}
.fh-pagination .wp-block-query-pagination-numbers .current {
  background: #1d4ed8 !important;
  color: #fff !important;
  border-color: #1d4ed8 !important;
}
.fh-pagination a:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

/* ── レスポンシブ ── */
@media (max-width: 640px) {
  .wp-block-post-content { padding: 0 1rem 2rem !important; }
  .wp-block-post-title { padding: 0 1rem !important; font-size: 1.35rem !important; }
  .wp-block-post-content table { font-size: 0.8rem !important; }
  .wp-block-post-content th, .wp-block-post-content td { padding: 0.45rem 0.6rem !important; }
  .fh-archive-main { padding: 1.5rem 1rem 3rem !important; }
}

/* ── WPグリッドアイテム幅リセット ── */
.wp-block-post-template.is-flex-container > li {
  width: auto !important;
  min-width: 0 !important;
}
.wp-block-post-template.is-flex-container > li > .fh-post-card {
  height: 100% !important;
}

/* ── アーカイブ内部コンテナリセット ── */
.fh-archive-main > .wp-block-group__inner-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── アーカイブ余白調整・日付非表示 ── */
.fh-card-date.wp-block-post-date { display: none !important; }

.fh-archive-main {
  padding: 2rem 1.25rem 3.5rem !important;
}
.fh-archive-heading.wp-block-heading {
  margin: 0 0 0.4rem !important;
}
.fh-archive-desc {
  margin-bottom: 1.5rem !important;
}
.wp-block-query { margin: 0 !important; }
.fh-post-card {
  padding: 1rem 1.25rem !important;
  gap: 0.4rem !important;
}
.fh-card-cat .wp-block-post-terms__item,
.fh-card-cat a {
  margin-bottom: 0.4rem !important;
}
.fh-card-title.wp-block-post-title {
  margin: 0 0 0.4rem !important;
}

/* ── 記事ページ（single）メインレイアウト ── */
.fh-single-main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.fh-single-main > .wp-block-group__inner-container {
  padding: 0 !important;
  margin: 0 !important;
}
.fh-single-title.wp-block-post-title {
  max-width: none !important;
  margin: 0 0 1.5rem !important;
  padding: 0 !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #111827 !important;
}

/* ── 投稿ナビゲーション ── */
.fh-post-nav-wrap {
  border-top: 1px solid #e5e7eb !important;
  padding: 1.25rem 0 !important;
  margin: 2rem 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 1rem !important;
}
.fh-nav-prev.wp-block-post-navigation-link,
.fh-nav-next.wp-block-post-navigation-link {
  font-size: 0.8rem !important;
  max-width: 48% !important;
}
.fh-nav-prev a,
.fh-nav-next a {
  color: #1d4ed8 !important;
  text-decoration: none !important;
  line-height: 1.5 !important;
}
.fh-nav-prev a:hover,
.fh-nav-next a:hover { text-decoration: underline !important; }
.fh-nav-next.wp-block-post-navigation-link { text-align: right !important; margin-left: auto !important; }

/* ── 関連記事 ── */
.fh-more-posts-section {
  border-top: 1px solid #e5e7eb !important;
  padding-top: 2rem !important;
  margin-top: 0.5rem !important;
}
.fh-more-posts-section > .wp-block-group__inner-container {
  padding: 0 !important;
  margin: 0 !important;
}
.fh-more-posts-heading.wp-block-heading {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin: 0 0 1.25rem !important;
  padding: 0 !important;
  border: none !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* ── レスポンシブ（single） ── */
@media (max-width: 640px) {
  .fh-single-main { padding: 1.5rem 1rem 3rem !important; }
  .fh-single-title.wp-block-post-title { font-size: 1.35rem !important; }
  .fh-post-nav-wrap { flex-direction: column !important; }
  .fh-nav-prev.wp-block-post-navigation-link,
  .fh-nav-next.wp-block-post-navigation-link { max-width: 100% !important; }
}

/* ── main のパディング上書き（main.wp-block-group の 0 打ち消し） ── */
main.fh-single-main {
  padding-top: 2.5rem !important;
}
main.fh-archive-main {
  padding-top: 2.5rem !important;
}
@media (max-width: 640px) {
  main.fh-single-main  { padding-top: 1.75rem !important; }
  main.fh-archive-main { padding-top: 1.75rem !important; }
}

/* ── パンくずリスト ── */
.fh-breadcrumb {
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
}
.fh-breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  color: #9ca3af;
}
.fh-breadcrumb-item a {
  color: #6b7280;
  text-decoration: none;
}
.fh-breadcrumb-item a:hover { color: #1d4ed8; text-decoration: underline; }
.fh-breadcrumb-item.current span { color: #9ca3af; }
.fh-breadcrumb-sep { margin: 0 0.15rem; color: #d1d5db; font-size: 0.85rem; }
