@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){
  /*必要ならばここにコードを書く*/
.logo-header img {
 width: 220px;
}
}

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

/* =========================================================
   1. 全体レイアウト
   ========================================================= */

main.main {
  padding-bottom: 3px;
}

.sidebar .widget {
  margin-bottom: 2px;
}

@media screen and (max-width: 834px) {
  main.main,
  div.sidebar {
    padding: 3px 16px;
  }
}


/* =========================================================
   2. 一覧カード・アーカイブ
   ========================================================= */

/* 縦型カードのタイトルを非表示 */
.related-entry-card-title,
.entry-card-title {
  display: none;
}

/* カード本文を非表示 */
.entry-card-content {
  display: none;
}

/* 縦型カード下余白調整 */
.ect-vertical-card .entry-card-wrap {
  margin-bottom: -25px;
}

/* 3列カード下余白 */
.ect-3-columns .entry-card-wrap {
  padding-bottom: 0;
}

/* カテゴリアーカイブのフォルダアイコンを非表示 */
.archive.category #archive-title .fa-folder-open::before {
  content: none;
}

/* Cocoon インデックス・タグ・カテゴリ・新着一覧を3:4 */
.entry-card-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

/* 通常画像 */
.entry-card-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動画アイコンプラグインでラップされた画像 */
.entry-card-thumb .kx-video-thumb-wrap {
  width: 100%;
  height: 100%;
}

.entry-card-thumb .kx-video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動画投稿ではfigure側の疑似アイコンを消す */
.entry-card-thumb:has(.kx-video-thumb-wrap)::before,
.entry-card-thumb:has(.kx-video-thumb-wrap)::after {
  content: none !important;
  display: none !important;
}

/* 極小画面では2列 */
@media screen and (max-width: 356px) {
  .ect-vertical-card {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
  }

  .ect-vertical-card .entry-card-wrap {
    width: 49.5% !important;
  }
}


/* =========================================================
   3. トップページ 人気記事
   ========================================================= */

.home .popular-entry-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media screen and (max-width: 834px) {
  .home .popular-entry-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   4. 投稿ページ
   ========================================================= */

.single .entry-title {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}


/* =========================================================
   5. 固定ページの日付非表示
   ========================================================= */

.post-15677 .date-tags,
.post-18431 .date-tags,
.privacy-policy .date-tags,
.aboutus .date-tags {
  display: none;
}


/* =========================================================
   6. コメントフォーム
   ========================================================= */

.comment-form-email,
.comment-form-url,
.comment-notes {
  display: none;
}


/* =========================================================
   7. 検索フォーム
   ========================================================= */

/* 検索窓 */
.search-box {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.search-box .search-edit {
  border-radius: 30px;
  font-size: 14px;
}

/* 検索ボタン */
[type="submit"].search-submit {
  top: 0;
  right: 0;
  height: 100%;
  padding: 8px 15px;
  background: #d98030;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 0 50px 50px 0;
  transition: 0.3s;
}


/* =========================================================
   8. タグ・カテゴリリンク
   ========================================================= */

.tag-link {
  background-color: #fff;
  color: #000;
  border: 0 solid #000;
  margin-right: 5px;
  padding: 2px;
  font-size: 18px;
}

.cat-link {
  color: var(--cocoon-white-color);
  margin-right: 5px;
  padding: 2px 6px;
  font-size: 18px;
}

/* 記事内タグアイコンを「#」へ */
.entry-tags a::before {
  content: "#";
  margin-right: 3px;
}

.entry-tags .fa-tag,
.widget_tag_cloud .fa-tag {
  display: none;
}


/* =========================================================
   9. タグクラウド
   ========================================================= */

.widget_tag_cloud .widget-title {
  display: none;
}

.tagcloud {
  margin-left: 20px;
}

.tagcloud a {
  background: #fffafa;
  border: 1px solid #ccc;
  border-radius: 20px;
  color: #000;
  padding: 1px 7px;
  text-decoration: none;
  font-size: 16px;
  margin: 5px;

  display: flex;
  flex: 0 1 auto;
  justify-content: space-between;
}

.tagcloud a:hover {
  background: #72c7e6;
  border-color: #72c7e6;
  color: #fff;
  transition: 0.5s;
}


/* =========================================================
   10. 最近の投稿ウィジェット
   ========================================================= */

.widget_recent_entries {
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.widget_recent_entries ul {
  list-style-type: none;
  padding-left: 0;
  line-height: 1.2;
}

.widget_recent_entries li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
}

.widget_recent_entries li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #0073aa;
}

.widget_recent_entries a {
  letter-spacing: -0.2px;
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: all 0.3s ease;
}

.widget_recent_entries a:hover {
  color: #0073aa;
  transform: translateX(2px);
}

.widget_recent_entries .post-date {
  display: block;
  font-size: 0.8em;
  color: #6c757d;
  margin-top: 2px;
}


/* =========================================================
   11. ページネーション
   ========================================================= */

.pagination-next-link {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pagination-next-link:hover {
  background-color: #d98030;
  color: #fff;
}

.page-numbers {
  color: #000;
  border: 1px solid #000;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination .current {
  background-color: #d98030;
  color: #fff;
  border: none;
}

.page-numbers.dots {
  opacity: 1;
  background: none;
}

.pagination a:hover {
  background-color: #d98030;
  color: #fff;
  border: none;
}

/* 前へ・次へを非表示 */
a.prev,
a.next {
  display: none;
}

@media screen and (max-width: 480px) {
  .page-numbers {
    width: 48px;
    height: 48px;
    line-height: 48px;
  }
}


/* =========================================================
   12. 「前のページに戻る」ボタン
   ========================================================= */

.back-button {
  padding: 8px 16px;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.back-button:hover {
  background: #0052a3;
}

/* ウィジェット内 */
.widget div[style*="text-align: right"] {
  margin-top: -50px;
}

.widget .back-button {
  margin-top: -20px;
  padding: 6px 12px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 3px;
  transition: background 0.3s;
}

.widget .back-button:hover {
  background: #2980b9;
}


/* =========================================================
   13. 動画
   ========================================================= */

/* PCだけ動画ブロックを細くする */
@media screen and (min-width: 769px) {
  .wp-block-video {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .wp-block-video video {
    width: 100%;
    height: auto;
  }
}


/* =========================================================
   14. PCナビゲーション
   ========================================================= */

@media screen and (min-width: 1024px) {
  #navi .navi-in > ul li:hover > ul > li {
    height: 44px !important;
  }

  #navi .sub-menu a {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  #navi .sub-menu .item-label {
    line-height: 1.2 !important;
  }
}


/* =========================================================
   15. モバイルナビ・検索
   ========================================================= */

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

  /* 開いた検索フォーム */
  .search-box {
    position: fixed !important;
    top: 12vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 420px) !important;
    z-index: 999999 !important;
  }

  /* メニュー固定ラベル */
  .menu-label-static {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #000;
    color: #fff !important;
    padding: 8px 12px;
  }

  /* 子メニュー */
  .menu-drawer .sub-menu > li {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .menu-drawer .sub-menu > li > a {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
  }

  /* 検索ボタンのタップ領域をフッターボタン内だけに固定 */
  .mobile-footer-menu-buttons .search-menu-button {
    position: relative !important;
    overflow: hidden !important;
  }

  .mobile-footer-menu-buttons #search-menu-open {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  /* 閉じている検索フォームはタップを受けない */
  #search-menu-input:not(:checked) ~ #search-menu-content {
    pointer-events: none !important;
  }

  #search-menu-input:checked ~ #search-menu-content {
    pointer-events: auto !important;
  }
}

.kx-eroline-label {
  display: inline-block;
  margin-left: 6px;
  font-size: 16px;
  font-weight: bold;
  vertical-align: middle;
  white-space: nowrap;
}

/* タグページ説明文の最下部余白を消す */
.tag-page-content.entry-content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* モバイル：フッターメニューを縦並び */
@media screen and (max-width: 834px) {
  #navi-footer .menu-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #navi-footer .menu-footer li {
    width: 100%;
    text-align: center;
  }
}

/* モバイル：注意書きとフッターの間隔調整 */
@media screen and (max-width: 834px) {
  .footer-widgets-mobile {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .footer-bottom {
    margin-top: 0;
    padding-top: 15px;
  }

  .footer-widgets-mobile .widget:last-child,
  .footer-widgets-mobile p:last-child {
    margin-bottom: 0;
  }
}

/* WordPress動画ブロック：縦動画の全画面時の上下切れを防止 */
.wp-block-video [poster] {
    object-fit: contain;
}
