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

/* アイキャッチとヒーローのサイドバー重なり修正 */
@media screen and (min-width: 1024px) {
  .single #main,
  .home #main { padding-right: 360px !important; }
}
/* 管理人ウィジェットのフォローボタンを非表示 */
.widget_author_box .profile-follows { display: none; }

/* ── ヒーローセクション ── */
.tgh-hero-root {
  padding: 36px 44px 32px !important;
  background: #eef2f8 !important;
  border-radius: 20px !important;
}
.tgh-hero-inner {
  display: flex !important;
  align-items: stretch;
  gap: 40px;
  max-width: 980px !important;
  margin: 0 auto !important;
}
.tgh-hero-text { flex: 1; min-width: 0; }
.tgh-hero-subtitle {
  color: #2563eb !important;
  font-size: 13px !important;
  font-weight: 500;
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px !important;
}
.tgh-hero-subtitle::before {
  content: '' !important;
  display: inline-block !important;
  width: 24px !important;
  height: 2px !important;
  background: #2563eb !important;
  flex-shrink: 0;
}
.tgh-hero-heading {
  font-size: 2.6rem !important;
  font-weight: 800 !important;
  color: #111 !important;
  line-height: 1.35 !important;
  margin: 0 0 20px !important;
}
.tgh-hero-desc {
  font-size: 15px !important;
  color: #555 !important;
  line-height: 1.85 !important;
  margin: 0 0 28px !important;
}
.tgh-hero-btns {
  display: flex !important;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.tgh-btn {
  display: inline-block !important;
  padding: 13px 30px !important;
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}
.tgh-btn:hover { opacity: .85; transform: translateY(-2px); }
.tgh-btn-primary { background: #2563eb !important; color: #fff !important; }
.tgh-btn-outline {
  background: transparent !important;
  color: #444 !important;
  border: 1.5px solid #ccc !important;
}
.tgh-stats { display: flex !important; gap: 36px; flex-wrap: wrap; }
.tgh-stat-num {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #111 !important;
  display: block !important;
  line-height: 1 !important;
}
.tgh-stat-label {
  font-size: 11px !important;
  color: #999 !important;
  display: block !important;
  margin-top: 5px !important;
}

/* ── 右サイドカード ── */
.tgh-hero-card {
  width: 420px !important;
  flex-shrink: 0;
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important;
  overflow: hidden !important;
}
.tgh-hero-card > a {
  text-decoration: none !important;
  color: inherit !important;
  display: block !important;
}
.tgh-hero-card-header {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
.tgh-hero-card-dot {
  width: 8px !important;
  height: 8px !important;
  background: #22c55e !important;
  border-radius: 50% !important;
  flex-shrink: 0;
  display: inline-block !important;
}
.tgh-hero-card-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #111 !important;
}
.tgh-hero-card > a { display: flex !important; flex-direction: column !important; height: 100% !important; }
.tgh-hero-card-img { width: 100% !important; flex: 1 !important; min-height: 180px !important; object-fit: cover !important; display: block !important; }
.tgh-hero-card-body { padding: 16px !important; }
.tgh-hero-card-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  color: #111 !important;
  margin: 0 0 8px !important;
}
.tgh-hero-card-date { font-size: 12px !important; color: #aaa !important; }

/* ── カテゴリーチップ ── */
.tgh-chips {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0;
}
.tgh-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 8px 18px !important;
  background: #f5f5f5 !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 50px !important;
  font-size: 13px !important;
  text-decoration: none !important;
  color: #333 !important;
  transition: background .15s;
}
.tgh-chip:hover { background: #e8efff !important; border-color: #c3d5ff !important; }
.tgh-chip .c { font-weight: 600; color: #666; margin-left: 2px; }

/* ── 準備バナー ── */
.tgh-prep-banner {
  background: linear-gradient(90deg, #2563eb, #06b6d4) !important;
  border-radius: 12px !important;
  padding: 28px 32px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;}
.tgh-prep-heading {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 0 6px !important;
}
.tgh-prep-sub {
  font-size: 13px !important;
  color: rgba(255,255,255,0.8) !important;
  margin: 0 !important;
}
.tgh-prep-btn {
  flex-shrink: 0;
  padding: 12px 28px !important;
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  border: 2px solid rgba(255,255,255,0.6) !important;
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s;
}
.tgh-prep-btn:hover { background: rgba(255,255,255,0.28) !important; }

/* ── レスポンシブ ── */
@media (max-width: 767px) {
  .tgh-hero-inner { flex-direction: column !important; gap: 28px !important; }
  .tgh-hero-card { width: 100% !important; }
  .tgh-hero-heading { font-size: 1.7rem !important; }
  .tgh-stats { gap: 20px !important; }
  .tgh-prep-banner { flex-direction: column !important; text-align: center; padding: 24px 20px !important; }
}
/* ── Pick Up ヘッダー ── */
.tgh-pickup-header { margin: 0 0 24px; }
.tgh-pickup-top {
  display: flex !important;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.tgh-pickup-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #2563eb !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 0 0 6px !important;
}
.tgh-pickup-label::before {
  content: '' !important;
  display: inline-block !important;
  width: 24px !important; height: 2px !important;
  background: #2563eb !important;
  flex-shrink: 0;
}
.tgh-pickup-heading {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: #111 !important;
  margin: 0 0 6px !important;
  line-height: 1.2 !important;
}
.tgh-pickup-sub {
  font-size: 13px !important;
  color: #888 !important;
  margin: 0 !important;
}
.tgh-pickup-all {
  flex-shrink: 0;
  font-size: 13px !important;
  color: #2563eb !important;
  text-decoration: none !important;
  border: 1.5px solid #2563eb !important;
  padding: 8px 20px !important;
  border-radius: 50px !important;
  white-space: nowrap;
  transition: background .15s;
}
.tgh-pickup-all:hover { background: #eff6ff !important; }
/* popular_entries widgetのタイトルを非表示 */
.widget_popular_entries .widget-index-top-title { display: none !important; }

/* 人気記事を3列グリッド・大カードに変更 */
@media screen and (min-width: 1024px) {
  .home .widget_popular_entries {
    width: calc(100% + 360px) !important;
  }
}
.home .widget_popular_entries .popular-entry-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}
.home .widget_popular_entries .popular-entry-card-link {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  text-decoration: none !important;
  padding: 0 !important;
}
.home .widget_popular_entries .popular-entry-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}
.home .widget_popular_entries .popular-entry-card-thumb {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.home .widget_popular_entries .popular-entry-card-thumb img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block !important;
}
.home .widget_popular_entries .widget-entry-card-content {
  margin-left: 0 !important;
  padding: 12px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}
.home .widget_popular_entries .card-title,
.home .widget_popular_entries .widget-entry-card-title {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: #111 !important;
  max-height: none !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}
.home .widget_popular_entries .widget-entry-card-pv { display: none !important; }
/* no-1（1位記事）を左1列・縦2行に大きく表示 */
.home .widget_popular_entries .popular-entry-card-link.no-1 {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  display: flex !important;
  flex-direction: column !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1 .popular-entry-card {
  flex: 1 !important;
  height: 100% !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1 .popular-entry-card-thumb {
  flex: 0 0 auto !important;
  overflow: hidden !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1 .popular-entry-card-thumb img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: unset !important;
  object-fit: contain !important;
  display: block !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1 .widget-entry-card-content {
  flex: 0 0 auto !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1 .card-title,
.home .widget_popular_entries .popular-entry-card-link.no-1 .widget-entry-card-title {
  font-size: 1.05rem !important;
  -webkit-line-clamp: 3 !important;
}
/* カードシャドウ・タイトル配置 */
.home .widget_popular_entries .popular-entry-card-link {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  transition: box-shadow 0.2s !important;
}
.home .widget_popular_entries .popular-entry-card-link:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14) !important;
}
.home .widget_popular_entries .card-title,
.home .widget_popular_entries .widget-entry-card-title {
  text-align: left !important;
}

/* サイドバーの上端を「いま読まれている人気記事」に揃える */
@media screen and (min-width: 1024px) {
  .home #sidebar { top: 913px !important; }
}

/* ヒーロー部分を右端まで広げる（サイドバー分の padding-right をキャンセル） */
@media screen and (min-width: 1024px) {
  .home .tgh-hero-root { margin-right: -360px !important; }
}
/* バナー・Pick Upヘッダーをサイドバー幅まで全幅展開 */
@media screen and (min-width: 1024px) {
  .home .tgh-prep-banner {
    margin-right: -360px !important;
    margin-bottom: 48px;
    max-width: none !important;
  }
  .home .tgh-pickup-header {
    margin-right: -360px !important;
    max-width: none !important;
  }
}
/* 新着記事リストを人気記事と同じ3列グリッドに揃える */
/* Cocoon が #list に設定する padding-right を解除してグリッド幅を確保 */
.home #list {
  padding-right: 0 !important;
}
.home #list.ect-entry-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  flex-direction: unset !important;
}
/* 「新着記事」::before 見出しを全幅ヘッダーとして表示 */
.home #list::before {
  grid-column: 1 / -1 !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #e5e7eb !important;
  margin-bottom: 8px !important;
  color: #1a1a2e !important;
}
.home #list .entry-card-wrap {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
}
.home #list .entry-card {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
}
/* Cocoon が .entry-card-content に設定する margin-left を解除 */
.home #list .entry-card-content {
  margin-left: 0 !important;
  padding: 12px 16px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
/* admin-pv（管理者向けPVカウンター）をコンパクト表示（管理人のみ） */
.home #list .admin-pv {
  display: block !important;
  font-size: 0.72rem !important;
  color: #666 !important;
  background: #f0f4ff !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  margin-top: 4px !important;
  line-height: 1.8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
.home #list .admin-pv span { display: inline !important; }
/* サムネイルを左側に固定幅で配置 */
.home #list .card-thumb,
.home #list .entry-card-thumb {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  flex-shrink: 0 !important;
  float: none !important;
  margin-right: 0 !important;
}
.home #list .card-thumb img,
.home #list .entry-card-thumb img {
  width: 100% !important;
  height: 130px !important;
  object-fit: cover !important;
  border-radius: 8px 0 0 8px !important;
  display: block !important;
}
@media (max-width: 767px) {
  .home #list.ect-entry-card {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}
/* ランキングバッジ（1〜5位） */
.home .widget_popular_entries .popular-entry-card-link.no-1,
.home .widget_popular_entries .popular-entry-card-link.no-2,
.home .widget_popular_entries .popular-entry-card-link.no-3,
.home .widget_popular_entries .popular-entry-card-link.no-4,
.home .widget_popular_entries .popular-entry-card-link.no-5 {
  position: relative !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1::before,
.home .widget_popular_entries .popular-entry-card-link.no-2::before,
.home .widget_popular_entries .popular-entry-card-link.no-3::before,
.home .widget_popular_entries .popular-entry-card-link.no-4::before,
.home .widget_popular_entries .popular-entry-card-link.no-5::before {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 10 !important;
  padding: 5px 12px !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  border-radius: 12px 0 12px 0 !important;
  letter-spacing: 0.05em !important;
  line-height: 1.4 !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-1::before {
  content: '1位' !important;
  background: #FFD700 !important;
  color: #7a5800 !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-2::before {
  content: '2位' !important;
  background: #B8B8B8 !important;
  color: #222 !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-3::before {
  content: '3位' !important;
  background: #CD7F32 !important;
  color: #fff !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-4::before {
  content: '4位' !important;
  background: #6c757d !important;
  color: #fff !important;
}
.home .widget_popular_entries .popular-entry-card-link.no-5::before {
  content: '5位' !important;
  background: #6c757d !important;
  color: #fff !important;
}