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

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* ===========================================
   PC・スマホ表示制御クラス
   =========================================== */
/* PCのみ表示、スマホ（767px以下）は非表示 */
.pc-only {
    display: block !important;
}

@media screen and (max-width: 767px) {
    .pc-only {
        display: none !important;
    }
}

/* ===========================================
   関連記事エリアのスタイル（PC/タブレット用）
   ※PHP側でスマホでは出力しない設定になっています
   =========================================== */
.sp-optimized-related {
    margin-top: 30px;
    padding: 15px 10px;
    background: #fff;
    border-top: 1px solid #eee;
}

.related-headline {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.related-headline::before {
    content: "";
    width: 4px;
    height: 1.2em;
    background: #ff4757;
    margin-right: 8px;
    border-radius: 2px;
}

/* 6件表示用のグリッド（基本2列、768px以上で3列） */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-item a {
    text-decoration: none;
    display: block;
}

/* 画像の高さを統一 */
.related-thumb img {
    width: 100%;
    height: 110px !important;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* 関連記事タイトルの表示崩れ・切れを修正 */
.related-title {
    font-size: 0.9rem !important;
    line-height: 1.6 !important; /* 行間を1.5〜1.6に広げて余裕を持たせる */
    color: #333;
    margin: 8px 0 0 !important;
    padding: 0 0 0 10px !important;
    border-left: 4px solid #f39c12; /* オレンジの縦線を少し太く、長く */
    
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2行で制限 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* 高さをしっかり確保して2行目が隠れるのを防ぐ */
    min-height: 3.2em !important; 
    height: auto !important; 
    visibility: visible !important;
}

/* タイトルを包む要素の隠蔽設定を解除 */
.related-info {
    overflow: visible !important;
    height: auto !important;
}

/* ====================================
   エロタレスト関連のスタイル
   ==================================== */

/* エロタレスト用ラベル */
.inflow-label {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* エロタレストKOKエリア（念のため明示的に表示） */
.eroterest-inflow-area {
    display: block !important;
}

/* スマホ版テキストリンクの装飾（もし表示させる場合） */
.sp-text-link {
    line-height: 1.6;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    text-align: center;
}

@media screen and (max-width: 480px) {
    .sp-text-link a {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.85rem;
    }
}

/* ====================================
   動画誘導ボタンのスタイル
   ==================================== */

/* ボタン全体を囲むエリア */
.movie-btn-wrapper {
  margin: 40px 0; /* 上下の余白 */
  text-align: center;
}

/* --- 1つ目のボタン（メイン：オレンジ） --- */
a.nomadBtn4 {
  display: block;
  width: 100%;
  max-width: 500px; /* スマホで見やすくPCで広がりすぎない幅 */
  margin: 0 auto 15px auto; /* 下に15pxの隙間 */
  padding: 15px 10px;
  background: linear-gradient(to bottom, #ff9f00, #ff6f00); /* オレンジ */
  color: #ffffff !important; /* 文字色白 */
  font-weight: bold;
  text-decoration: none !important;
  font-size: 1.1em;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  border-bottom: 3px solid #d45d00; /* 立体感 */
}

a.nomadBtn4:hover {
  transform: translateY(2px); /* 押す動き */
  border-bottom: 1px solid #d45d00;
  box-shadow: 0 2px 3px rgba(0,0,0,0.1);
  opacity: 1; /* Cocoonの透過設定を打ち消し */
}

/* --- 2つ目のボタン（サブ：エロタレスト・青） --- */
a.eroterest-btn {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 12px 10px;
  background: #6c8cd4; /* 青色 */
  color: #ffffff !important;
  font-weight: bold;
  text-decoration: none !important;
  font-size: 0.9em; /* 少し小さく */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

a.eroterest-btn:hover {
  opacity: 0.8;
  transform: translateY(1px);
}

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

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

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