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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}

/* ===== 人気記事ランキング（WP Popular Posts / #wk-pop-card） ===== */
/* データがまだないときはカードごと非表示 */
#wk-pop-card:has(.wpp-no-data) { display: none; }

#wk-pop-card .wpp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: wakarank;
}
#wk-pop-card .wpp-list li {
  counter-increment: wakarank;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(59, 35, 20, 0.10);
}
#wk-pop-card .wpp-list li:last-child { border-bottom: none; }
#wk-pop-card .wpp-list li::before {
  content: counter(wakarank);
  position: absolute;
  top: 6px;
  left: 2px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #3B2314;
  background: #D9D9D9;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  z-index: 2;
}
#wk-pop-card .wpp-list li:nth-child(1)::before { background: linear-gradient(135deg, #F7DC8A, #D4A11E); }
#wk-pop-card .wpp-list li:nth-child(2)::before { background: linear-gradient(135deg, #EAEAEA, #B4B4B4); }
#wk-pop-card .wpp-list li:nth-child(3)::before { background: linear-gradient(135deg, #E6B084, #B06A34); color: #fff; }
#wk-pop-card .wpp-thumbnail {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0;
  flex: 0 0 75px;
  display: block;
}
#wk-pop-card .wpp-post-title {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #3B2314;
  text-decoration: none;
}
#wk-pop-card .wpp-post-title:hover { text-decoration: underline; }
#wk-pop-card .wpp-excerpt,
#wk-pop-card .wpp-meta,
#wk-pop-card .post-stats { display: none; }

/* ===== トップページの人気記事ランキング（#wk-pop-home） ===== */
#wk-pop-home:has(.wpp-no-data) { display: none; }
#wk-pop-home { margin-bottom: 38px; }
#wk-pop-home .wpp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: wakarankh;
}
#wk-pop-home .wpp-list li {
  counter-increment: wakarankh;
  position: relative;
  background: #fff;
  border: 1px solid rgba(59, 35, 20, 0.10);
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
#wk-pop-home .wpp-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 35, 20, 0.12);
}
#wk-pop-home .wpp-list li::before {
  content: counter(wakarankh);
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #3B2314;
  background: #D9D9D9;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  z-index: 2;
}
#wk-pop-home .wpp-list li:nth-child(1)::before { background: linear-gradient(135deg, #F7DC8A, #D4A11E); }
#wk-pop-home .wpp-list li:nth-child(2)::before { background: linear-gradient(135deg, #EAEAEA, #B4B4B4); }
#wk-pop-home .wpp-list li:nth-child(3)::before { background: linear-gradient(135deg, #E6B084, #B06A34); color: #fff; }
#wk-pop-home .wpp-thumbnail {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}
#wk-pop-home .wpp-post-title {
  display: block;
  padding: 10px 12px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  color: #3B2314;
  text-decoration: none;
}
#wk-pop-home .wpp-post-title:hover { text-decoration: underline; }
#wk-pop-home .wpp-excerpt,
#wk-pop-home .wpp-meta,
#wk-pop-home .post-stats { display: none; }
@media (max-width: 768px) {
  #wk-pop-home .wpp-list { grid-template-columns: 1fr; }
  #wk-pop-home .wpp-thumbnail { height: 160px; }
}
