@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.4
*/

/* ============================================
   AI Security Review - カスタムデザイン
   ダークブルー(#0a1628) + オレンジ(#ff6b35)
   ============================================ */

/* ----- カラー変数 ----- */
:root {
  --color-primary:   #0a1628;
  --color-accent:    #ff6b35;
  --color-accent2:   #0066cc;
  --color-bg:        #f5f7fa;
  --color-text:      #1a1a2e;
  --color-border:    #d0d9e8;
  --color-card-bg:   #ffffff;
  --radius:          8px;
  --shadow:          0 2px 12px rgba(10,22,40,0.10);
}

/* ----- フォント ----- */
body, .entry-content {
  font-family: "游ゴシック", "Yu Gothic", "Noto Sans JP", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ----- ヘッダー ----- */
#header {
  background: var(--color-primary) !important;
  border-bottom: 3px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#header .header-in {
  max-width: 1100px;
  margin: 0 auto;
}
#site-name-text, #site-name-text a {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: 0.02em;
}
#site-catch {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.85em;
}

/* ----- グローバルナビ ----- */
#navi {
  background: var(--color-primary) !important;
}
#navi .navi-in > ul > li > a {
  color: rgba(255,255,255,0.88) !important;
  font-size: 0.92em;
  font-weight: 600;
  padding: 12px 16px;
  transition: color 0.2s, background 0.2s;
}
#navi .navi-in > ul > li > a:hover,
#navi .navi-in > ul > li.current-menu-item > a {
  color: var(--color-accent) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* ----- サイドバー非表示（グローバル） ----- */
#sidebar {
  display: none !important;
}
#content {
  width: 100% !important;
  max-width: 860px;
  margin: 0 auto;
  float: none !important;
}
.content-in {
  display: block !important;
}

/* ----- カードグリッド（記事一覧） ----- */
.archive-body,
.home-body {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px 0;
}
.a-wrap {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--color-border);
}
.a-wrap:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10,22,40,0.15);
}
.eye-catch img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.entry-title a {
  color: var(--color-primary) !important;
  font-weight: 700;
  font-size: 0.97em;
  line-height: 1.5;
}
.entry-title a:hover {
  color: var(--color-accent2) !important;
}

/* ----- 比較表ストライプ ----- */
.wp-block-table table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93em;
  margin: 24px 0;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.wp-block-table thead tr,
.entry-content table thead tr {
  background: var(--color-primary) !important;
  color: #ffffff !important;
}
.wp-block-table thead th,
.entry-content table thead th {
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 14px;
  border: none;
}
.wp-block-table tbody tr:nth-child(odd),
.entry-content table tbody tr:nth-child(odd) {
  background: #f0f4fb;
}
.wp-block-table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even) {
  background: #ffffff;
}
.wp-block-table tbody td,
.entry-content table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.wp-block-table tbody tr:hover,
.entry-content table tbody tr:hover {
  background: #e8f0fc !important;
}

/* ----- CTAボタン ----- */
.wp-block-button__link,
.btn-wrap a,
.cta-btn {
  background: var(--color-accent) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  padding: 14px 28px !important;
  font-size: 1em !important;
  border: none !important;
  transition: background 0.2s, transform 0.1s !important;
  box-shadow: 0 3px 8px rgba(255,107,53,0.35) !important;
  text-decoration: none !important;
}
.wp-block-button__link:hover,
.btn-wrap a:hover {
  background: #e55a28 !important;
  transform: translateY(-1px) !important;
}

/* blockquote（CTAブロック） */
.wp-block-quote {
  border-left: 4px solid var(--color-accent) !important;
  background: #fff8f5;
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.wp-block-quote p {
  margin: 0;
  font-size: 0.97em;
}

/* ----- 見出しスタイル ----- */
.entry-content h2 {
  border-left: 5px solid var(--color-accent2);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 16px;
  background: linear-gradient(to right, #f0f6ff, transparent);
  color: var(--color-primary);
  font-size: 1.35em;
  margin: 40px 0 20px;
}
.entry-content h3 {
  border-left: 4px solid var(--color-accent);
  padding: 6px 14px;
  color: var(--color-primary);
  font-size: 1.15em;
  margin: 32px 0 16px;
}

/* ----- パンくず ----- */
.breadcrumb {
  background: var(--color-card-bg);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.82em;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}
.breadcrumb a {
  color: var(--color-accent2) !important;
}

/* ----- フッター ----- */
#footer {
  background: var(--color-primary) !important;
  color: rgba(255,255,255,0.8) !important;
  padding: 40px 0 20px;
  margin-top: 60px;
}
#footer a {
  color: rgba(255,255,255,0.7) !important;
}
#footer a:hover {
  color: var(--color-accent) !important;
}
.footer-widget-area {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 0 20px;
}
.footer-copyright {
  text-align: center;
  font-size: 0.82em;
  color: rgba(255,255,255,0.5) !important;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
}

/* ----- ヒーローセクション（トップページ用） ----- */
.top-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a3a6b 100%);
  color: #fff;
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.top-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,150,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,107,53,0.06) 0%, transparent 50%);
}
.top-hero h1 {
  font-size: 2.4em;
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
}
.top-hero p {
  font-size: 1.1em;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 auto 28px;
  position: relative;
}
.top-hero .hero-btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff !important;
  padding: 14px 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.05em;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
  transition: background 0.2s, transform 0.15s;
  position: relative;
}
.top-hero .hero-btn:hover {
  background: #e55a28;
  transform: translateY(-2px);
}

/* ----- カテゴリセクション ----- */
.top-category-section {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 20px;
}
.top-category-section h2 {
  font-size: 1.4em;
  color: var(--color-primary);
  border-left: 5px solid var(--color-accent2);
  padding-left: 14px;
  margin-bottom: 20px;
}
.top-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.top-card {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.2s;
}
.top-card:hover {
  transform: translateY(-3px);
}
.top-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.top-card-body {
  padding: 14px;
}
.top-card-body h3 {
  font-size: 0.95em;
  margin: 0 0 6px;
  border: none;
  padding: 0;
  color: var(--color-primary);
}
.top-card-body p {
  font-size: 0.85em;
  color: #666;
  margin: 0;
}

/* ----- レスポンシブ ----- */
@media screen and (max-width: 1023px) {
  .footer-widget-area {
    grid-template-columns: 1fr 1fr;
  }
  .top-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 834px) {
  .archive-body, .home-body {
    grid-template-columns: 1fr;
  }
  .footer-widget-area {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .top-cards {
    grid-template-columns: 1fr;
  }
  .top-hero h1 {
    font-size: 1.7em;
  }
  #navi .navi-in > ul > li > a {
    font-size: 0.85em;
    padding: 10px 10px;
  }
}

/* ============================================
   cmd_2458: フロントページUI強化
   ============================================ */

/* [1] フロントページ: ブログUI要素を非表示 */
.page-id-1850 .entry-title,
.page-id-1850 .sns-share,
.page-id-1850 .toc-title,
.page-id-1850 #toc,
.page-id-1850 .toc,
.page-id-1850 .post-date,
.page-id-1850 .date-tags,
.page-id-1850 .entry-date,
.page-id-1850 .post-categories,
.page-id-1850 .post-tags,
.page-id-1850 .sns-follow,
.page-id-1850 .sns-follow-message,
.page-id-1850 .related-entry-heading,
.page-id-1850 .related-entries,
.page-id-1850 .page-links,
.page-id-1850 .pager-links,
.page-id-1850 .breadcrumb,
.page-id-1850 .author-box,
.page-id-1850 #sidebar {
  display: none !important;
}
.page-id-1850 #content {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
}
.page-id-1850 .entry-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* [2] ヒーローセクション強化 */
.top-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2346 40%, #1a3a6b 100%) !important;
  color: #fff;
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.top-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,150,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,107,53,0.10) 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(0,100,200,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.top-hero h1 {
  font-size: clamp(1.8em, 4vw, 3em);
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  position: relative;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.top-hero p {
  font-size: clamp(1em, 2vw, 1.2em);
  opacity: 0.90;
  max-width: 640px;
  margin: 0 auto 36px;
  position: relative;
  line-height: 1.8;
}
.top-hero .hero-btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff !important;
  padding: 16px 44px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.1em;
  text-decoration: none !important;
  box-shadow: 0 6px 24px rgba(255,107,53,0.50);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  letter-spacing: 0.03em;
}
.top-hero .hero-btn:hover {
  background: #e55a28;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(255,107,53,0.55);
}

/* [3] カード画像 hover:scale + box-shadow */
.top-card {
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
}
.top-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 28px rgba(10,22,40,0.18);
}
.top-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
  transition: transform 0.3s;
}
.top-card:hover img {
  transform: scale(1.04);
}
.top-card a {
  display: block;
  text-decoration: none !important;
  color: inherit;
}

/* ===== JetBrains Mono for code & Technique IDs ===== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');

code, pre, .wp-block-code, kbd, samp, .attck-header-box span[style*="monospace"] {
  font-family: 'JetBrains Mono', 'Source Code Pro', 'Consolas', monospace !important;
}

/* ===== Dark Mode (prefers-color-scheme) ===== */
@media (prefers-color-scheme: dark) {
  body,
  #container,
  .main,
  .sidebar,
  .article,
  .content,
  #content,
  .wrap {
    background-color: #111827 !important;
    color: #e2e8f0 !important;
  }

  .entry-content,
  .article-body,
  .post-content,
  .main-content {
    color: #e2e8f0 !important;
  }

  a { color: #60a5fa !important; }
  a:hover { color: #93c5fd !important; }

  h1, h2, h3, h4, h5, h6,
  .entry-title,
  .article-title {
    color: #f1f5f9 !important;
  }

  .sidebar,
  .sidebar-widget,
  .widget {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
  }

  .header,
  #header,
  .site-header,
  .navi,
  #navi,
  .global-navi {
    background-color: #0f172a !important;
  }

  .footer,
  #footer,
  .site-footer {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
  }

  .card,
  .card-content,
  .post-card,
  .widget-entry-card,
  .related-entry-card,
  .blogcard,
  .popular-entry-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
  }

  code, pre, .wp-block-code {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
  }

  table, th, td {
    border-color: #334155 !important;
  }
  th {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
  }
  td {
    background-color: #111827 !important;
    color: #e2e8f0 !important;
  }

  blockquote {
    background-color: #1e293b !important;
    border-left-color: #3b82f6 !important;
    color: #cbd5e1 !important;
  }

  input, textarea, select {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
  }

  img { opacity: 0.9; }
}
