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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/* =====================================
   今日のフィリピン野良ワンコ
===================================== */

/* ヘッダー付近の固定ボタン */
.daily-dog-trigger {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 9998;

  display: flex;
  align-items: center;
  gap: 7px;

  padding: 10px 16px;
  border: 0;
  border-radius: 999px;

  background: #fff7db;
  color: #4a3a24;

  font-size: 14px;
  font-weight: 700;
  line-height: 1;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.daily-dog-trigger:hover {
  background: #ffefb6;
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
}

.daily-dog-trigger-icon {
  font-size: 19px;
}

.daily-dog-trigger-text {
  white-space: nowrap;
}

/* ポップアップ背景 */
.daily-dog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(20, 20, 20, 0.62);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

/* 表示中 */
.daily-dog-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ポップアップ本体 */
.daily-dog-modal {
  position: relative;
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;

  padding: 30px;
  border-radius: 24px;

  background: #ffffff;
  color: #333;

  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);

  transform: translateY(18px) scale(0.97);
  transition: transform 0.25s ease;
}

.daily-dog-overlay.is-open .daily-dog-modal {
  transform: translateY(0) scale(1);
}

/* 閉じるボタン */
.daily-dog-close {
  position: absolute;
  top: 11px;
  right: 14px;

  width: 38px;
  height: 38px;

  padding: 0;
  border: 0;
  border-radius: 50%;

  background: #f3f3f3;
  color: #555;

  font-size: 27px;
  line-height: 36px;
  cursor: pointer;
}

.daily-dog-close:hover {
  background: #e8e8e8;
}

/* 英字ラベル */
.daily-dog-label {
  margin: 0 0 7px;

  color: #b47b23;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

/* 見出し */
.daily-dog-modal h2 {
  margin: 0 35px 20px;

  color: #3c342a;
  font-size: 23px;
  line-height: 1.45;
}

/* 写真 */
.daily-dog-image-link {
  display: block;
  overflow: hidden;

  margin-bottom: 17px;
  border-radius: 18px;

  background: #f5f5f5;
}

.daily-dog-image {
  display: block;

  width: 100%;
  height: min(360px, 48vh);

  margin: 0;
  object-fit: cover;

  transition: transform 0.3s ease;
}

.daily-dog-image-link:hover .daily-dog-image {
  transform: scale(1.02);
}

/* 写真がない場合 */
.daily-dog-no-image {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 260px;
  background: #fff5d8;

  font-size: 72px;
}

/* 投稿タイトル */
.daily-dog-post-title {
  margin: 0 0 10px;

  color: #3c342a;
  font-size: 18px;
  line-height: 1.55;
}

/* 説明文 */
.daily-dog-excerpt {
  margin: 0 auto 22px;

  color: #666;
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}

/* ボタンエリア */
.daily-dog-buttons {
  display: grid;
  gap: 10px;
}

/* 共通ボタン */
.daily-dog-button {
  display: block;

  padding: 13px 18px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.daily-dog-button:hover {
  opacity: 0.84;
  transform: translateY(-1px);
}

/* メインボタン */
.daily-dog-button-main {
  background: #e59a2f;
  color: #fff !important;
}

/* 過去投稿ボタン */
.daily-dog-button-sub {
  border: 1px solid #d9c8aa;
  background: #fffaf0;
  color: #594a36 !important;
}

/* ポップアップ表示時のスクロール停止 */
body.daily-dog-modal-open {
  overflow: hidden;
}

/* スマホ */
@media screen and (max-width: 768px) {

  .daily-dog-trigger {
    top: auto;
    right: 14px;
    bottom: 18px;

    padding: 11px 15px;
  }

  .daily-dog-trigger-text {
    font-size: 13px;
  }

  .daily-dog-modal {
    padding: 27px 18px 22px;
    border-radius: 20px;
  }

  .daily-dog-modal h2 {
    margin-right: 30px;
    margin-left: 30px;
    font-size: 20px;
  }

  .daily-dog-image {
    height: min(340px, 45vh);
  }
}

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

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

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

/* =====================================
   ホーム：新着記事カード修正版
===================================== */

/* 一覧全体を強制的に3列グリッドにする */
.home .wp-block-latest-posts {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;

  margin: 0 !important;
  padding: 0 !important;
}

/* Cocoon・WordPress側の幅指定を解除 */
.home .wp-block-latest-posts li {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;

  display: flex !important;
  flex-direction: column;

  margin: 0 !important;
  padding: 0 0 18px !important;

  overflow: hidden;
  border: 1px solid #e7ecef;
  border-radius: 14px;
  background: #fff;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home .wp-block-latest-posts li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* 画像エリア */
.home .wp-block-latest-posts__featured-image {
  width: 100% !important;
  margin: 0 0 14px !important;
}

.home .wp-block-latest-posts__featured-image a {
  display: block;
  width: 100%;
}

/* 画像サイズをカード幅いっぱいに */
.home .wp-block-latest-posts__featured-image img {
  display: block;

  width: 100% !important;
  height: 190px !important;
  max-width: none !important;

  margin: 0 !important;
  object-fit: cover;
  border-radius: 0 !important;
}

/* タイトル */
.home .wp-block-latest-posts li > a {
  display: -webkit-box !important;
  overflow: hidden;

  min-height: 3.4em;
  margin: 0 !important;
  padding: 0 16px;

  color: #2f3438 !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  text-decoration: none !important;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home .wp-block-latest-posts li > a:hover {
  color: #e86f51 !important;
}

/* タブレット：2列 */
@media screen and (max-width: 834px) {
  .home .wp-block-latest-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* スマホ：1列 */
@media screen and (max-width: 480px) {
  .home .wp-block-latest-posts {
    grid-template-columns: 1fr !important;
  }

  .home .wp-block-latest-posts__featured-image img {
    height: 220px !important;
  }
}