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

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

/* ===== グローバルナビ：洗練されたライン型デザイン ===== */
#navi,
.navi,
#navi .navi-in,
.navi-wrap,
.navi-wrap .navi-in,
.header-container .navi {
  background-color: transparent !important;
  background-image: none !important;
  background: transparent !important;
}

#navi .navi-in {
  border-top: 1px solid rgba(0, 71, 48, 0.15) !important;
  border-bottom: 1px solid rgba(0, 71, 48, 0.15) !important;
}

#navi .navi-in a,
#navi .navi-in li,
#navi .navi-in > ul > li,
#navi .navi-in > ul > li > a,
.navi-in > .menu-header > li > a,
#navi .navi-in > .menu-header > li > a {
  background-color: transparent !important;
  background: transparent !important;
  color: #004730 !important;
  font-size: 13px !important;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 12px 18px !important;
  transition: color 0.25s ease, background-color 0.25s ease;
  position: relative;
  border: none !important;
}

#navi .navi-in a:hover,
#navi .navi-in > ul > li:hover > a {
  color: #2a8c68 !important;
  background-color: rgba(0, 71, 48, 0.04) !important;
}

#navi .navi-in > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #2a8c68;
  transition: width 0.3s ease, left 0.3s ease;
}

#navi .navi-in > ul > li:hover > a::after,
#navi .navi-in > ul > li > a:hover::after {
  width: 100%;
  left: 0;
}

#navi .navi-in .sub-menu {
  background: #fff !important;
  border: 1px solid rgba(0, 71, 48, 0.1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#navi .navi-in .sub-menu a {
  font-size: 12.5px !important;
  color: #333 !important;
}

#navi .navi-in .sub-menu a:hover {
  color: #004730 !important;
  background-color: rgba(0, 71, 48, 0.05) !important;
}

.header-container,
.header-container-in {
  background: #fff;
}

/* ===== セクションタイトル（トップページ h2） ===== */
.entry-content h2.section-title,
.entry-content h2.has-text-align-center {
  font-size: 1.4rem !important;
  font-weight: 700;
  color: #004730;
  letter-spacing: 0.08em;
  margin-top: 3rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: none;
  background: none;
}

/* ===== コラム ブログカード コンパクト化 ===== */
.entry-content .blogcard,
.entry-content .internal-blogcard {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.8rem !important;
  font-size: 0.9em;
}

.entry-content .blogcard-title,
.entry-content .internal-blogcard-title {
  font-size: 14px !important;
  line-height: 1.5;
}

.entry-content .blogcard-snippet,
.entry-content .internal-blogcard-snippet {
  font-size: 12px !important;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
}

.entry-content .blogcard-thumbnail,
.entry-content .internal-blogcard-thumbnail {
  max-width: 140px;
}

/* ===== アクセス数カウンター非表示 ===== */
.admin-pv,
.pv-count,
.date-views-count {
  display: none !important;
}

/* ===== PC レイアウト改善 ===== */
@media (min-width: 1024px) {
  /* テキストコンテンツの幅を制限して可読性を確保 */
  .front-top-page .entry-content > p,
  .front-top-page .entry-content > h2,
  .front-top-page .entry-content > hr,
  .front-top-page .entry-content > .wp-block-separator,
  .front-top-page .entry-content > .wp-block-embed {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ヒーロー（カバーブロック）は全幅のまま */
  .front-top-page .entry-content > .wp-block-cover {
    max-width: none;
  }

  /* 募集プロジェクトのカードをグリッド表示 */
  .front-top-page .new-entry-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  .front-top-page .new-entry-card {
    width: 100% !important;
  }

  .front-top-page .new-entry-card-link {
    display: flex;
    flex-direction: column;
  }

  /* Cocoonの新着リストブロック全体も幅制限 */
  .front-top-page .entry-content > .wp-block-cocoon-blocks-new-list {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* スケジュール表も幅制限 */
  .front-top-page .entry-content > .wp-block-html {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* CTA・フォームセクション */
  .front-top-page .entry-content > .wp-block-contact-form-7-contact-form-selector,
  .front-top-page .entry-content > div:not(.wp-block-cover) {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* コラムのブログカードを2列に */
  .front-top-page .entry-content .blogcard-wrap {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 記事本文も幅制限（個別記事ページ） */
  .article .entry-content > p,
  .article .entry-content > h2,
  .article .entry-content > h3,
  .article .entry-content > ul,
  .article .entry-content > ol,
  .article .entry-content > blockquote,
  .article .entry-content > .wp-block-image {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
}
