:root {
  /* Cocoonスキンのメインカラーを共通変数にマッピング */
  --color-main: var(--skin-grayish-site-main-thin, #1a73e8);
}

/* ==============================================
   Cocoon Child Theme - Custom CSS
   AI比較ブログ 収益最適化デザイン
   ============================================== */

/* ------------------------------------------
   1. 記事カード ホバーエフェクト
   ------------------------------------------ */
.a-wrap {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border-radius: 6px;
  overflow: hidden;
}
.a-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

/* サムネイル 16:9 固定 */
.entry-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.a-wrap:hover .entry-card-thumb img {
  transform: scale(1.04);
}

/* カードタイトル */
.entry-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  color: #222;
}

/* カテゴリラベル - 詳細度を上げてCocoonスキンを上書き */
.a-wrap .cat-label,
.eye-catch .cat-label,
.cat-label {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  background: var(--color-main, #1a73e8) !important;
  color: #fff !important;
  border: none !important;
}

/* ------------------------------------------
   2. 見出しスタイル
   ------------------------------------------ */
.entry-content h2 {
  border-left: 5px solid var(--color-main, #1a73e8);
  background: #f4f8ff;
  padding: 0.55em 0.9em;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 0 4px 4px 0;
  margin-top: 2em;
  margin-bottom: 0.8em;
}
.entry-content h3 {
  border-left: 3px solid var(--color-main, #1a73e8);
  padding: 0.3em 0.75em;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: #333;
}

/* ------------------------------------------
   3. サイドバー スティッキー
   ------------------------------------------ */
@media (min-width: 960px) {
  #sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }
}

/* ウィジェットタイトル */
.widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-main, #1a73e8);
  padding-bottom: 0.4em;
  margin-bottom: 0.8em;
  color: #444;
}

/* ------------------------------------------
   4. 広告ウィジェットエリア
   ------------------------------------------ */
.child-ad-widget {
  margin-bottom: 1.5em;
  text-align: center;
}
.child-ad-label {
  font-size: 0.68rem;
  color: #aaa;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.child-ad-label::before {
  content: "スポンサーリンク";
}

/* ------------------------------------------
   5. ピックアップバナー（ヘッダー下）
   ------------------------------------------ */
.pickup-banner {
  border-radius: 6px;
  overflow: hidden;
}
.pickup-banner .pickup-banner-image-wrap:hover {
  opacity: 0.88;
  transition: opacity 0.2s;
}

/* ------------------------------------------
   6. ボタン（アフィリCTA）
   ------------------------------------------ */
.btn,
.wp-block-button__link,
a.btn-wrap {
  display: inline-block;
  padding: 0.7em 1.8em;
  background: var(--color-main, #1a73e8);
  color: #fff !important;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover,
.wp-block-button__link:hover {
  background: #1558b0;
  transform: translateY(-2px);
}

/* ------------------------------------------
   7. レスポンシブ調整
   ------------------------------------------ */
@media (max-width: 767px) {
  .entry-card-title { font-size: 0.88rem; }
  .entry-content h2 { font-size: 1.08rem; }
  .entry-content h3 { font-size: 0.98rem; }
  #sidebar { position: static; }
}