@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/* ============================================
   環境資格ナビ カスタムデザイン v4.0
   参考: saruwakakun.com, env.go.jp, shikakutimes.jp
   Smashing Magazine, careergarden.jp
============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ---- CSS変数（デザイントークン）---- */
:root {
  --blue-900: #0a2e5c;
  --blue-800: #0d3b6e;
  --blue-700: #1565c0;
  --blue-500: #2196f3;
  --blue-100: #e3f0ff;
  --blue-50:  #f0f7ff;
  --accent:   #f5a623;
  --accent-dk:#e8920a;
  --text:     #1a1a2e;
  --text-sub: #555;
  --text-muted: #888;
  --bg:       #f5f7fb;
  --white:    #ffffff;
  --border:   #e0e8f0;
  --shadow-sm: 0 1px 6px rgba(13,59,110,0.09);
  --shadow-md: 0 4px 16px rgba(13,59,110,0.13);
  --shadow-lg: 0 8px 28px rgba(13,59,110,0.18);
  --radius:   10px;
  --radius-sm: 6px;
}

/* ---- ベースフォント ---- */
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', Meiryo, sans-serif !important;
  color: var(--text) !important;
  background: var(--bg) !important;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   ヘッダー（深海ブルーグラデーション）
============================================ */
#header {
  background: linear-gradient(135deg, #071d40 0%, #0d3b6e 40%, #1565c0 80%, #0288d1 100%) !important;
  box-shadow: 0 3px 16px rgba(0,0,0,0.3) !important;
  position: relative;
}

/* トップアクセントライン */
#header::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #fdd47c 100%);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

#header .header-in {
  padding: 14px 0 10px;
}

/* サイトタイトル（Cocoon: #site-name / 汎用: #site-title） */
#site-name,
#site-name a,
#site-title,
#site-title a,
.site-name,
.site-name a,
.header-site-name,
#header .logo,
#header .logo a,
#header h1,
#header h1 a,
#header h2,
#header h2 a,
.header-container .site-name a,
.header-container #site-name a {
  color: #ffffff !important;
  font-size: 1.65rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45) !important;
  text-decoration: none !important;
}

/* ヘッダー内の全テキストを白に（安全網） */
#header,
#header *:not(input):not(button) {
  color: #ffffff;
}
#header a {
  color: #ffffff !important;
  text-decoration: none !important;
}
#header a:hover {
  color: rgba(255,255,255,0.85) !important;
}

/* サイト説明文 */
#site-description,
.site-description,
.tagline,
.header-description,
#site-name + *,
.sub-title {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.06em;
  margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ============================================
   グローバルナビ
============================================ */
#navi .navi-in > ul > li > a,
#navi ul li a,
.navi-in ul li a,
nav ul li a,
#header-menu li a {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 10px 14px !important;
  transition: background 0.2s, color 0.2s;
  border-radius: var(--radius-sm);
}
#navi .navi-in > ul > li > a:hover,
#navi ul li a:hover,
.navi-in ul li a:hover {
  background: rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}
#navi .navi-in > ul > li.current-menu-item > a,
#navi ul li.current-menu-item a {
  background: rgba(255,255,255,0.22) !important;
  color: #ffffff !important;
}

/* ============================================
   メインコンテンツ背景
============================================ */
#main-wrap,
#container {
  background: var(--bg) !important;
}

/* ============================================
   記事カード（トップ・カテゴリーページ）
============================================ */
.entry-card-wrap {
  background: var(--white) !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  border: 1px solid var(--border) !important;
}
.entry-card-wrap:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--blue-100) !important;
}

/* サムネイル */
.entry-card-thumb img {
  transition: transform 0.4s ease !important;
}
.entry-card-wrap:hover .entry-card-thumb img {
  transform: scale(1.05) !important;
}

/* カードタイトル */
.entry-card-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-card-content {
  padding: 14px 16px 16px !important;
}

.entry-card-snippet {
  font-size: 0.82rem !important;
  color: var(--text-sub) !important;
  line-height: 1.6 !important;
}

/* カテゴリーラベル */
.cat-label {
  background: var(--blue-700) !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  letter-spacing: 0.02em;
}

/* ============================================
   記事本文エリア
============================================ */
.article {
  background: var(--white) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 36px 40px !important;
}

@media (max-width: 768px) {
  .article {
    padding: 20px 18px !important;
  }
}

.entry-content {
  font-size: 1rem !important;
  line-height: 1.95 !important;
  color: var(--text) !important;
}

.entry-content p {
  margin-bottom: 1.5em !important;
}

/* リンク */
.entry-content a {
  color: var(--blue-700) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.entry-content a:hover {
  color: var(--blue-900) !important;
}

/* 強調 */
.entry-content strong,
.entry-content b {
  color: var(--blue-900) !important;
  font-weight: 700 !important;
}

/* ============================================
   記事内見出し H2（フルグラデーション帯）
   saruwakakun.com スタイル
============================================ */
.entry-content h2 {
  background: linear-gradient(135deg, #0a2e5c 0%, #1565c0 70%, #0288d1 100%) !important;
  color: #fff !important;
  padding: 14px 22px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  margin: 42px 0 20px !important;
  border: none !important;
  border-left: none !important;
  box-shadow: 0 3px 12px rgba(13,59,110,0.25) !important;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

/* ============================================
   記事内見出し H3（左ボーダー＋薄背景）
============================================ */
.entry-content h3 {
  background: var(--blue-50) !important;
  color: var(--blue-900) !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  border-left: 5px solid var(--blue-700) !important;
  padding: 9px 14px !important;
  margin: 30px 0 14px !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  line-height: 1.5;
}

/* ============================================
   記事内見出し H4
============================================ */
.entry-content h4 {
  color: var(--blue-700) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--blue-100) !important;
  padding-bottom: 6px !important;
  margin: 24px 0 12px !important;
}

/* ============================================
   テーブル（プロ仕様の比較表デザイン）
   jemai.or.jp + smashingmagazine.com 参考
============================================ */
.entry-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.9rem !important;
  margin: 2rem 0 !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(13,59,110,0.10) !important;
}

/* テーブルヘッダー */
.entry-content th {
  background: #0d3b6e !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  text-align: left !important;
  letter-spacing: 0.03em !important;
  border: none !important;
}

/* テーブルデータセル */
.entry-content td {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--blue-100) !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  color: var(--text) !important;
  vertical-align: top !important;
  line-height: 1.6 !important;
}

/* ゼブラストライプ */
.entry-content tr:nth-child(even) td {
  background: #f6f9ff !important;
}
.entry-content tr:nth-child(odd) td {
  background: var(--white) !important;
}

/* ホバー効果 */
.entry-content tbody tr:hover td {
  background: var(--blue-100) !important;
  transition: background 0.15s;
}

/* 最終行の下ボーダーを除去 */
.entry-content tr:last-child td {
  border-bottom: none !important;
}

/* テーブルラッパー（スクロール対応） */
.table-scroll-wrap,
.entry-content .scrollable-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

/* ============================================
   リスト
============================================ */
.entry-content ul li,
.entry-content ol li {
  line-height: 1.8 !important;
  margin-bottom: 0.4em !important;
}

/* ============================================
   引用
============================================ */
.entry-content blockquote {
  border-left: 4px solid var(--blue-500) !important;
  margin: 1.8rem 0 !important;
  padding: 0.6rem 0 0.6rem 1.4rem !important;
  color: var(--text-sub) !important;
  font-style: italic;
  font-size: 0.97rem;
  background: var(--blue-50) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* ============================================
   画像
============================================ */
.entry-content figure {
  margin: 2rem 0 !important;
}
.entry-content figure img {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10) !important;
}
.entry-content figcaption {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  text-align: center;
  margin-top: 6px;
}

/* アイキャッチ画像 */
.eyecatch img,
.entry-top-meta .eyecatch img {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ============================================
   サイドバー（モダンカードスタイル）
============================================ */
.widget {
  background: var(--white) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 20px !important;
  margin-bottom: 22px !important;
  border: 1px solid var(--border) !important;
}

/* ウィジェットタイトル */
.widget-title {
  background: linear-gradient(90deg, var(--blue-800), var(--blue-700)) !important;
  color: #fff !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: var(--radius-sm) !important;
  margin: -20px -20px 16px !important;
  letter-spacing: 0.04em !important;
  border-left: none !important;
}

/* サイドバーリンク */
.widget a {
  color: var(--text) !important;
  transition: color 0.2s;
}
.widget a:hover {
  color: var(--blue-700) !important;
}

/* 最近の投稿 */
.widget ul li {
  padding: 7px 0 !important;
  border-bottom: 1px dotted var(--border) !important;
  font-size: 0.85rem;
  line-height: 1.5;
}
.widget ul li:last-child {
  border-bottom: none !important;
}

/* カテゴリー */
.widget_categories ul li a,
.widget_archive ul li a {
  font-size: 0.85rem !important;
}

/* ============================================
   パンくずリスト
============================================ */
#breadcrumb {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  padding: 8px 0 !important;
}
#breadcrumb a {
  color: var(--blue-700) !important;
}

/* ============================================
   ページネーション
============================================ */
.pagination .page-numbers {
  border-radius: 6px !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  transition: background 0.2s, color 0.2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--blue-700) !important;
  color: #fff !important;
  border-color: var(--blue-700) !important;
}

/* ============================================
   フッター
============================================ */
#footer {
  background: linear-gradient(135deg, #071d40 0%, #0d3b6e 60%, #1a4a8e 100%) !important;
  color: rgba(255,255,255,0.82) !important;
  border-top: 4px solid var(--accent) !important;
}
#footer a {
  color: rgba(255,255,255,0.75) !important;
}
#footer a:hover {
  color: rgba(255,255,255,1) !important;
}
#footer .footer-widget-area .widget {
  background: rgba(255,255,255,0.07) !important;
  border: none !important;
  box-shadow: none !important;
}
#footer .footer-widget-area .widget-title {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255,255,255,0.95) !important;
}
#copyright {
  background: rgba(0,0,0,0.25) !important;
  color: rgba(255,255,255,0.6) !important;
  font-size: 0.8rem !important;
  padding: 12px 0 !important;
}

/* ============================================
   TOC（目次）
============================================ */
#toc_container,
.toc_wrap {
  background: var(--blue-50) !important;
  border: 1px solid var(--blue-100) !important;
  border-radius: var(--radius-sm) !important;
  padding: 16px 20px !important;
}
#toc_container .toc_title,
.toc_wrap .toc-title {
  color: var(--blue-900) !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
}
#toc_container li,
.toc_wrap li {
  font-size: 0.87rem !important;
  line-height: 1.5 !important;
}
#toc_container a,
.toc_wrap a {
  color: var(--blue-700) !important;
}

/* ============================================
   関連記事
============================================ */
.related-entry-card-wrap {
  border-radius: var(--radius-sm) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.related-entry-card-wrap:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ============================================
   投稿メタ情報（日付・カテゴリ）
============================================ */
.entry-header-meta,
.post-meta {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

/* ============================================
   モバイル最適化
============================================ */
@media (max-width: 768px) {
  #site-title a {
    font-size: 1.3rem !important;
  }
  .entry-content h2 {
    font-size: 1.1rem !important;
    padding: 12px 16px !important;
    margin: 32px 0 16px !important;
  }
  .entry-content h3 {
    font-size: 1rem !important;
    padding: 8px 12px !important;
  }
  .entry-content table {
    font-size: 0.82rem !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .entry-content th,
  .entry-content td {
    padding: 9px 12px !important;
    white-space: nowrap;
  }
  .article {
    padding: 20px 16px !important;
    border-radius: 8px !important;
  }
}

/* ============================================
   アニメーション（ページロード時）
============================================ */
.entry-card-wrap {
  animation: fadeInUp 0.4s ease both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   スクロールバー（Webkit）
============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--blue-700);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--blue-900);
}

/* ============================================
   印刷用スタイル
============================================ */
@media print {
  #header, #footer, .sidebar, #navi { display: none !important; }
  .article { box-shadow: none !important; padding: 0 !important; }
}
