/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template: cocoon-master
Version: 1.1.7
*/

/**
 * style.css
 * Cocoon 子テーマ：サイト全体のカスタマイズ
 * ガチャ関連スタイルは gacha.css に分離済み
 */

/* ================================================
 * トップページ：記事カード装飾
 * ================================================ */
.home .entry-card-wrap,
.home .a-wrap,
.home .entry-card,
.home .ect-entry-card {
  border: 3px solid #33cc66 !important;
  background-color: #e8f5e9 !important;
}
.home .entry-card-wrap *,
.home .a-wrap *,
.home .entry-card *,
.home .entry-card-thumb,
.home .entry-card-thumb img,
.home .entry-card-content,
.home .entry-card-wrap > *,
.home .a-wrap > * {
  border-color: transparent !important;
}
.home .entry-card-thumb {
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  height: auto !important;
  overflow: visible !important;
}
.home .entry-card-thumb img {
  border: none !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
}
.home .entry-card-content { padding-top: 0 !important; }

/* ================================================
 * カテゴリー・アーカイブページ：記事カード装飾
 * ================================================ */
.category .entry-card-wrap,
.category .a-wrap,
.category .entry-card,
.category .ect-entry-card,
.archive .entry-card-wrap,
.archive .a-wrap,
.archive .entry-card,
.archive .ect-entry-card {
  border: 3px solid #33cc66 !important;
  background-color: #e8f5e9 !important;
}
.category .entry-card-wrap *,
.category .a-wrap *,
.category .entry-card *,
.category .entry-card-thumb,
.category .entry-card-thumb img,
.category .entry-card-content,
.category .entry-card-wrap > *,
.category .a-wrap > *,
.archive .entry-card-wrap *,
.archive .a-wrap *,
.archive .entry-card *,
.archive .entry-card-thumb,
.archive .entry-card-thumb img,
.archive .entry-card-content,
.archive .entry-card-wrap > *,
.archive .a-wrap > * {
  border-color: transparent !important;
}
.category .entry-card-thumb,
.archive .entry-card-thumb {
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  height: auto !important;
  overflow: visible !important;
}
.category .entry-card-thumb img,
.archive .entry-card-thumb img {
  border: none !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
}
.category .entry-card-content,
.archive .entry-card-content { padding-top: 0 !important; }

/* ================================================
 * トップページ：記事タイトル非表示
 * ================================================ */
.home .entry-card-title,
.home .entry-title,
.home .ect-entry-card-title,
.home .card-title,
.home .entry-card-wrap .entry-card-title,
.home .a-wrap .card-title,
.home .post-card .entry-title,
.home .widget-entry-cards .entry-card-title {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ================================================
 * カテゴリーラベル非表示（全ページ）
 * ================================================ */
.eye-catch .cat-link,
.eye-catch .category-label,
.eye-catch-wrap .cat-link,
.eye-catch-wrap .category-label,
.article-header .cat-link,
.article-header .category-label,
.entry-card-thumb .cat-link,
.entry-card-thumb .category-label,
.cat-label,
.category-link,
.entry-card .cat-link,
.entry-card .category-label,
a.cat-link,
span.cat-link,
.post-card .cat-link,
.widget-entry-cards .cat-link,
.ect-vertical-card .cat-link,
.a-wrap .cat-link,
.card .cat-link {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ================================================
 * 記事タイトル非表示（全ページ）
 * ================================================ */
.entry-title,
.article-title,
.single .entry-title,
.singular .entry-title,
.entry-header-in .entry-title,
.article-header .entry-title {
  display: none !important;
}

/* ================================================
 * カテゴリーページ：投稿なし・カテゴリータイトル非表示
 * ================================================ */
.posts-not-found { display: none; }
.archive-title   { display: none; }

/* ================================================
 * Cocoon テーマ：サイドバー・カテゴリーウィジェット
 * ================================================ */
.widget_categories ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.widget_categories ul li a {
  display: block !important;
  padding: 12px 16px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s !important;
  font-weight: 700 !important;
}
.widget_categories ul li a::before,
.sidebar .widget_categories ul li a::before { color: #fff !important; }
.widget_categories ul li ul li a::before {
  content: "\f4d8";
  color: #02b340;
  font-weight: 600;
  padding-right: 8px;
}
.widget_categories ul li a:hover { background: #adffd6 !important; color: #02b340; }
.sidebar h3,
.widget_categories .widget-entry-card-title {
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(transparent 60%, #90ee90 60%, #90ee90 85%, transparent 85%) !important;
  display: inline-block !important;
  padding: 2px 6px !important;
}
.cat-link,
.category-label,
.entry-card-meta .cat-link { font-weight: 700 !important; padding: 2px 4px !important; }
a[href*="category/"],
.category a { font-weight: 700; }

/* ================================================
 * グローバルナビゲーション：フォントサイズ統一
 * ================================================ */
.navi-in a,
.navi-in > ul > li > a,
.header-container .navi-in a,
.header-in .navi-in a,
#header .navi-in a,
.navi .navi-in a,
.navi-in .menu-item > a,
.navi-in .menu-item a,
.header .navi-in a {
  font-size: 14px !important;
  font-weight: 400 !important;
}
.mobile-menu-buttons a { font-size: 14px !important; font-weight: 400 !important; }
@media screen and (max-width: 1023px) {
  .navi-in a,
  .navi-in > ul > li > a,
  .mobile-menu-buttons a { font-size: 13px !important; }
}
@media screen and (max-width: 768px) {
  .navi-in a,
  .navi-in > ul > li > a,
  .mobile-menu-buttons a { font-size: 12px !important; }
}

/* ================================================
 * モバイルヘッダーボタンの非表示
 * ================================================ */
.mobile-header-menu-buttons { display: none !important; }

/* ================================================
 * PC（768px以上）：アイキャッチ画像を中央85%で表示
 * ================================================ */
@media screen and (min-width: 768px) {
  .mobile-menu-buttons,
  .mobile-header-menu-buttons,
  .header-container .mobile-menu-buttons { display: none !important; }
  body { padding-top: 0 !important; }
  .eye-catch {
    max-width: 85% !important;
    width: 85% !important;
    margin: 0 auto !important;
  }
  .eye-catch img,
  .entry-card-thumb img,
  .article-thumbnail img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
  .article-header .eye-catch-wrap,
  .article .eye-catch {
    width: 85% !important;
    max-width: 85% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  .eye-catch-wrap { margin-top: 0 !important; padding-top: 0 !important; }
  .article-header { margin-bottom: 20px !important; }
  .single .eye-catch,
  .singular .eye-catch { max-height: none !important; height: auto !important; overflow: visible !important; }
  .eye-catch img { max-height: none !important; height: auto !important; }
  .article-thumbnail,
  .article-thumbnail-wrap { width: 85% !important; max-width: 85% !important; margin: 0 auto !important; }
  .article-body-inner { max-width: 100% !important; }
}
@media screen and (min-width: 481px) and (max-width: 767px) {
  .eye-catch img { width: 100% !important; max-width: 100% !important; }
}

/* ================================================
 * スマホ（767px以下）：固定ヘッダー・モバイルメニュー
 * ================================================ */
@media screen and (max-width: 767px) {
  .mobile-menu-buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background-color: #98d98e !important;
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    height: 60px !important;
    z-index: 9999 !important;
  }
  .mobile-menu-buttons .home-menu-button,
  .mobile-menu-buttons .sidebar-menu-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  .mobile-menu-buttons .home-menu-button a,
  .mobile-menu-buttons .sidebar-menu-button a { display: none !important; visibility: hidden !important; }
  .mobile-menu-buttons::before {
    content: '';
    position: absolute !important;
    inset: 0 !important;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: #ffffff;
    z-index: 1 !important;
  }
  .mobile-menu-buttons .prev-menu-button,
  .mobile-menu-buttons .next-menu-button { display: none !important; }
  .mobile-menu-buttons .fa,
  .mobile-menu-buttons .fas,
  .mobile-menu-buttons a { color: #fff !important; }
  .header-container { position: fixed !important; inset: 0 0 auto 0 !important; z-index: 9999 !important; }
  .menu-button-in,
  .menu-button a,
  .mobile-menu-buttons .menu-button,
  .mobile-menu-buttons .menu-button a,
  .menu-button .fa,
  .menu-button .fas { display: none !important; visibility: hidden !important; opacity: 0 !important; }
}

/* ================================================
 * タップハイライト削除（ブルーフラッシュ対策）
 * ================================================ */
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}
a, button, input, select, textarea, label {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* テキスト入力は選択可能に戻す */
input[type="text"],
input[type="number"],
textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* ================================================
 * スマホ用 2段式カテゴリーナビゲーション
 * ================================================ */
.mobile-category-nav {
  display: none;
  background-color: #ffffff;
  margin: 60px 0 0;
  padding: 0;
  position: relative;
}
@media screen and (max-width: 834px) {
  .mobile-category-nav { display: block; }
}
.mcn-row {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}
.mcn-row::-webkit-scrollbar { display: none; }
.mcn-row ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: stretch;
  width: max-content; min-width: 100%;
}
.mcn-row li { flex: 0 0 auto; margin: 0; padding: 0; min-width: 80px; }
.mcn-row a {
  display: block; text-align: center;
  padding: 14px 20px; font-size: 15px; font-weight: 500;
  color: #333; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  transition: background 0.2s;
}
.mcn-row a:hover { background-color: #f5f5f5; }

/* 1段目：親カテゴリー */
.mcn-row-parent { border-bottom: none; }
.mcn-row-parent a { border-bottom: none; position: relative; }
.mcn-row-parent li.active a { color: #02b340; font-weight: 700; }
.mcn-row-parent li.active a::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 3px; background-color: #02b340;
}

/* 2段目：子カテゴリー */
.mcn-row-child { border-bottom: 2px solid #ff69b4; overflow-x: auto; overflow-y: hidden; min-height: 43px; }
.mcn-row-child a { font-size: 14px; padding: 10px 18px; color: #555; }
.mcn-row-child a:hover { background-color: #fafafa; }
.mcn-row-child li.active a { color: #02b340; font-weight: 700; position: relative; }
.mcn-row-child li.active a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px; background-color: #02b340;
}

/* スクロールインジケーター */
.mcn-row::before,
.mcn-row::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 18px;
  pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.3s;
}
.mcn-row::before { left: 0;  background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent); }
.mcn-row::after  { right: 0; background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent); }
.mcn-row.can-scroll-left::before  { opacity: 1; }
.mcn-row.can-scroll-right::after  { opacity: 1; }

/* 小型スマホ */
@media screen and (max-width: 480px) {
  .mobile-category-nav { margin-top: 55px; }
  .mcn-row-parent a { font-size: 15px; padding: 13px 17px; }
  .mcn-row-child a  { font-size: 13px; padding: 9px 15px; }
  .mcn-row li { min-width: 75px; }
}
@media screen and (max-width: 360px) {
  .mobile-category-nav { margin-top: 50px; }
  .mcn-row-parent a { font-size: 14px; padding: 12px 14px; }
  .mcn-row-child a  { font-size: 12px; padding: 8px 12px; }
  .mcn-row li { min-width: 68px; }
}

/* ================================================
 * 記事カード内アイキャッチ・ガチャ情報ボックス：幅100%に戻す
 * ================================================ */
.entry-card .eye-catch,
.entry-card-thumb .eye-catch,
.a-wrap .eye-catch {
  max-width: 100% !important;
  width: 100% !important;
  margin: 10px 0 !important;
}
.entry-card-content .gacha-home-info,
.entry-card-content {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 10px !important;
  margin-bottom: 3px !important;
  box-sizing: border-box !important;
}

/* ================================================
 * スマホ：ヘッダーとナビゲーションの間隔調整
 * ================================================ */
@media screen and (max-width: 767px) {
  .mobile-category-nav {
    margin-top: 68px !important;
  }
}