@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){
  /*必要ならばここにコードを書く*/
}

/* ランキング全体枠 */
.custom-ranking-box {
  margin: 30px 0;
  padding: 20px;
  background-color: #fff; /* 背景色 */
  border: 1px solid #e3e3e3; /* 枠線 */
  border-radius: 8px; /* 角丸 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ランキングの全体タイトル */
.ranking-box-title {
  font-size: 1.15em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #333;
  color: #333;
}

/* リストの初期化 */
.ranking-box-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 各ランキングアイテム（全体タップ可） */
.ranking-box-item a {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  text-decoration: none !important;
  color: #333 !important;
  border-bottom: 1px dashed #eee;
  transition: background-color 0.3s;
}

.ranking-box-item:last-child a {
  border-bottom: none; /* 最後のアイテムの線は消す */
}

/* ホバー時の演出（PC） */
.ranking-box-item a:hover {
  background-color: #f9f9f9;
}

/* 順位バッジ */
.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  margin-right: 10px;
  flex-shrink: 0;
}

/* 順位ごとの色（金・銀・銅） */
.rank-1 .rank-badge { background-color: #e6b422; }
.rank-2 .rank-badge { background-color: #b4b4b4; }
.rank-3 .rank-badge { background-color: #a57e65; }

/* 写真（サムネイル）の枠 */
.rank-thumb {
  width: 85px;   /* スマホでの横幅 */
  height: 55px;  /* スマホでの縦幅 */
  margin-right: 12px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
  background-color: #eee;
}

/* 写真のトリミング */
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* テキストエリア（上下並びにする） */
.rank-text-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* 媒体名 */
.rank-media-name {
  font-size: 11px;
  color: #888; /* グレーで少し控えめに */
  font-weight: bold;
  margin-bottom: 2px;
}

/* 記事タイトル */
.rank-item-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: bold;
}

/* ホバー時にタイトルだけ色を変えたい場合 */
.ranking-box-item a:hover .rank-item-title {
  color: #1a73e8; /* お好みのカラーコードに変えてください */
}

/* --- PC表示での調整（画面幅768px以上） --- */
@media (min-width: 768px) {
  .custom-ranking-box {
    padding: 25px;
  }
  .rank-badge {
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin-right: 15px;
  }
  .rank-thumb {
    width: 120px;  /* PCでは写真を少し大きく */
    height: 75px;
    margin-right: 18px;
  }
  .rank-media-name {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .rank-item-title {
    font-size: 16px;
  }
}
