@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Template:   cocoon-master
Version:    1.0.6
*/

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

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

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

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

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

/* --- 広告エリア --- */
.after-content-ad-area {
    margin: 2em 0;
    padding: 1em 0;
    text-align: center;
}

.after-content-ad-widget {
    margin-bottom: 1em;
}

.after-content-ad-widget:last-child {
    margin-bottom: 0;
}

.after-content-ad-title {
    display: none;
}

/* --- 関連記事コンテナ --- */
.related-in-content {
    margin: 2em 0 0;
    padding: 1.5em 0 0;
    border-top: 2px solid #e0e0e0;
}

/* 見出し */
.related-in-content-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 1em;
    padding: 0;
}

/* 記事リスト（PC: 2列、モバイル: 1列） */
.related-in-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 24px;
    margin: 0;
    padding: 0;
}

/* 各記事アイテム */
.related-in-content-item {
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* 記事リンク */
.related-in-content-link {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 0;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.related-in-content-link:hover {
    opacity: 0.75;
}

/* サムネイル */
.related-in-content-thumb {
    display: block;
    width: 160px;
    height: 90px;
    overflow: hidden;
    background-color: #eee;
    flex-shrink: 0;
}

.related-in-content-thumb img {
    display: block;
    width: 160px;
    height: 90px;
    margin: 0;
    padding: 0;
    object-fit: cover;
    border-radius: 0;
}

/* サムネイルなし時のフォールバック */
.related-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 90px;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    border-radius: 0;
    font-size: 0.7em;
    color: #999;
}

/* テキスト部分 */
.related-in-content-body {
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* 記事タイトル */
#main .related-in-content-item-title {
    display: -webkit-box;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    background: none;
    overflow: hidden;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    color: inherit;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;
}

/* モバイル対応 */
@media (max-width: 767px) {
    .related-in-content-grid {
        grid-template-columns: 1fr;
        row-gap: 22px;
    }

    .related-in-content-link {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    .related-in-content-thumb,
    .related-in-content-thumb img,
    .related-no-thumb {
        width: 130px;
        height: 73px;
    }

    #main .related-in-content-item-title {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
        -webkit-line-clamp: unset;
        -webkit-box-orient: initial;
        font-size: 15px;
        line-height: 1.45;
        font-weight: 500;
    }
}

/* --- 記事末尾プロモーションエリア --- */
.after-content-promo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 1.5em 0;
}

.promo-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.promo-item a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.promo-abema a {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.promo-ranking a {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    color: #333;
}

.promo-icon {
    font-size: 1em;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.promo-abema .promo-icon {
    background: rgba(255, 255, 255, 0.15);
}

.promo-ranking .promo-icon {
    background: #fff3cd;
    color: #d4a017;
}

.promo-text {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.promo-label {
    display: inline-block;
    font-size: 0.55em;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.promo-main {
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1.3;
}

.promo-sub {
    font-size: 0.72em;
    opacity: 0.6;
}

.promo-arrow {
    font-size: 0.9em;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.15s, transform 0.15s;
}

.promo-item a:hover .promo-arrow {
    opacity: 1;
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .promo-item a {
        padding: 8px 12px;
    }

    .promo-text {
        flex-direction: column;
        gap: 0;
    }
}

/* 記事一覧カードのタイトルを省略せず全文表示 */
.entry-card-content .entry-card-title,
.entry-card-content h2.card-title,
.entry-card-title {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    text-overflow: clip;
    white-space: normal;
}

/* =========================================
   トップページ カテゴリー別2カラム
========================================= */

.wn-front-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 42px;
  margin: 50px 0 30px;
}

.wn-front-category {
  min-width: 0;
}

/* カテゴリー見出し */
.wn-front-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.wn-front-category-title::before,
.wn-front-category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #bbb;
}

.wn-front-category-title a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* 記事一覧 */
.wn-front-category-posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wn-front-category-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  align-items: start;

  color: inherit;
  text-decoration: none;
}

.wn-front-category-card:hover {
  opacity: 0.8;
}

/* サムネイル */
.wn-front-category-thumb {
  width: 100px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.wn-front-category-thumb img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

/* 記事タイトル */
.wn-front-category-card-title {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

/* もっと見る */
.wn-front-category-more {
  margin-top: 16px;
  text-align: center;
}

.wn-front-category-more a {
  display: inline-block;
  min-width: 95px;
  padding: 6px 18px;

  border: 1px solid #bbb;
  border-radius: 999px;

  color: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}

.wn-front-category-more a:hover {
  background: #f5f5f5;
}

/* =========================================
   スマートフォン
========================================= */

@media screen and (max-width: 768px) {

  .wn-front-category-grid {
    grid-template-columns: 1fr;
    row-gap: 36px;
    margin-top: 40px;
  }

  .wn-front-category-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .wn-front-category-card-title {
    font-size: 13px;
  }

}