@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){
  /*必要ならばここにコードを書く*/
}

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

/* ===== ヘッダー用ナビゲーションスタイル ===== */
.header-nav-dropdown {
  position: relative;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  margin: 0;
  padding: 0;
  z-index: 1000;
}

/* ハンバーガーメニューのトグル（非表示のチェックボックス） */
.nav-toggle {
  display: none;
}

/* ハンバーガーアイコンのスタイル */
.nav-toggle-label {
  display: none; /* デスクトップでは非表示 */
  width: 32px;
  height: 24px;
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle-label span {
  display: block;
  width: 100%;
  height: 3px;
  background: #333;
  margin: 5px 0;
  border-radius: 3px;
}

.header-nav-dropdown .nav-main {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.header-nav-dropdown .nav-main > li {
  position: relative;
  margin: 0;
  padding: 0;
}

.header-nav-dropdown .nav-main > li > a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

/* アイコンとテキストの間隔 */
.menu-icon {
  margin-right: 6px;
}

/* サブメニュー（デスクトップ） */
.header-nav-dropdown .nav-main > li .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* デスクトップでのホバー表示およびフォーカス表示 */
.header-nav-dropdown .nav-main > li:hover .sub-menu,
.header-nav-dropdown .nav-main > li:focus-within .sub-menu {
  display: block;
}

.header-nav-dropdown .sub-menu li a {
  display: block;
  padding: 8px 20px;
  color: #333;
  white-space: nowrap;
  text-decoration: none;
}

.header-nav-dropdown .sub-menu li a:hover {
  background: #f7f7f7;
}

/* モバイルレイアウト: 834px以下ではメニューを折りたたんで表示 */
@media screen and (max-width: 834px) {
  /* ハンバーガーアイコンを表示 */
  .nav-toggle-label {
    display: block;
  }
  /* nav-main を縦方向に非表示（折りたたみ） */
  .header-nav-dropdown .nav-main {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
  }
  /* チェックボックスがオンの時にメニューを表示 */
  .nav-toggle:checked + .nav-toggle-label + .nav-main {
    display: flex;
  }
  /* 各項目を100%幅に */
  .header-nav-dropdown .nav-main > li {
    flex: 0 0 100%;
    border-bottom: 1px solid #f0f0f0;
  }
  .header-nav-dropdown .nav-main > li > a {
    padding: 14px 16px;
  }
  /* サブメニューをモバイル用に調整 */
  .header-nav-dropdown .nav-main > li .sub-menu {
    position: static;
    border: none;
    box-shadow: none;
    display: none;
  }
  /* .active クラスが付いたメニュー項目のサブメニューを表示 */
  .header-nav-dropdown .nav-main > li.active .sub-menu {
    display: block;
  }
  .header-nav-dropdown .nav-main > li .sub-menu li a {
    padding: 10px 24px;
    border-bottom: 1px solid #f5f5f5;
  }
}

/* 極小画面用: 480px以下ではフォントサイズを調整 */
@media screen and (max-width: 480px) {
  .header-nav-dropdown .nav-main > li > a {
    font-size: 0.9rem;
  }
}
/* カテゴリーカードレイアウト */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.post-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card .thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 16px;
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: #333;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}

.readmore {
  font-size: 0.85rem;
  color: #e60073;
  font-weight: 600;
}

.pagination {
  margin: 40px auto;
  text-align: center;
}
.pagination a, .pagination span {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 12px;
  background: #f7f7f7;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
}
.pagination a:hover {
  background: #e60073;
  color: #fff;
}
