@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){
  /*必要ならばここにコードを書く*/
}
/***********************************/
/** ヘッダーメニュー スタイルの変更*/
/***********************************/
.navi-in>ul li {
line-height: 40px;
height: 40px;
position: relative;  /* サブメニューの基準位置を設定 */	
}
.navi-in a{
font-size:15px;
}
#navi .navi-in a:hover {
transform: none!important;
}
/* サブメニューの設定（斜め下に表示） */
.navi-in > ul .sub-menu {
    display: none;  /* 初期状態では非表示 */
    position: absolute;
    top: 40px;  /* 親メニューより下にずらす（調整可能） */
    left: 80%;  /* 右に少しずらす（斜め下に配置） */
    background: #fff;  /* 背景色を白 */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.26);
    min-width: 150px;  /* サブメニューの幅 */
    z-index: 1000; /* 他の要素に隠れないように */
}

/* サブメニューの表示設定 */
.navi-in > ul li:hover > .sub-menu {
    display: block;  /* ホバー時に表示 */
}
/* サブメニュー内のリンク調整 */
.navi-in > ul .sub-menu a {
    padding: 10px 15px;
    display: block;
    color: #333333 !important;  /* 文字色を黒系 */
    text-decoration: none;
}

/* サブメニューのホバー時 */
.navi-in > ul .sub-menu a:hover {
    background: #f0f0f0 !important;  /* ホバー時の背景を薄いグレー */
    color: #006600 !important;  /* ホバー時の文字色を濃い緑 */
}
/* より強い指定（ネストを深くする） */
#navi .navi-in ul .sub-menu {
    background: #ffffff !important;
}
div#header-container {
box-shadow: none;
}
div.item-label{
font-weight:bold;
}
/* モバイル対応 */
/* ========================================
   最新記事グリッド（ショートコード用）
   PC・タブレット・スマホ対応
======================================== */

/* PC表示（横3列） */
.latest-posts-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 20px;
}

/* 最新記事カード */
.latest-post-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  box-sizing: border-box;
}

/* カテゴリラベル */
.latest-post-item .post-category {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background: #0073aa; /* 青系 */
  display: inline-block;
  padding: 2px 6px;
  margin-bottom: 6px;
  border-radius: 3px;
}

/* 記事タイトル */
.latest-post-item h3 {
  font-size: 16px;
  margin: 8px 0;
}

/* 記事抜粋 */
.latest-post-item .post-excerpt {
  font-size: 14px;
  color: #555;
}

/* タブレット表示（横2列） */
@media (max-width: 1023px) {
  .latest-posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* スマホ表示（横1列） */
@media (max-width: 768px) {
  .latest-posts-grid {
    grid-template-columns: 1fr !important;
  }
}
/* 各学校別のトップページに最新投稿を表示 */
/* ========================================
   カテゴリページ用 最新記事グリッド
   PC・タブレット・スマホ対応
======================================== */

/* PC表示（横3列） */
.specific-category-posts-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 20px;
}

.specific-category-post-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  box-sizing: border-box;
}

/* 記事タイトル */
.specific-category-post-item h3 {
  font-size: 16px;
  margin: 8px 0;
}

/* 記事抜粋 */
.specific-category-post-item .post-excerpt {
  font-size: 14px;
  color: #555;
}

/* カテゴリページのタブレット表示（横2列） */
@media (max-width: 1023px) {
  .specific-category-posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* モバイル表示（横1列・最大6件表示） */
@media (max-width: 768px) {
  .specific-category-posts-grid {
    grid-template-columns: 1fr !important;
  }

  /* 7件目以降を非表示 */
  .specific-category-posts-grid .specific-category-post-item:nth-child(n+7) {
    display: none;
  }
}
/* すべて表示　*/
#show-all-posts {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  background-color: #0073aa;
  color: #fff;
  cursor: pointer;
}

#show-all-posts:hover {
  background-color: #005177;
}
/* PC: 3列（幅500pxを尊重するため中央寄せ） */
.school-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.school-grid .school-tile {
  width: 500px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}

/* スマホ: 1列 */
@media (max-width: 768px) {
  .school-grid {
    display: block;
  }

  .school-grid .school-tile {
    width: 100%;   /* モバイルでは画面幅に合わせる */
    max-width: 500px;
    margin: 0 auto 20px auto;
  }
}

/* 固定ページにサブメニューを表示する　*/
.school-submenu {
  margin: 10px 0 20px;
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  text-align: center; /* 横並び中央寄せ */
}
.school-submenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 0; /* gapはなくして縦線で区切る */
  flex-wrap: wrap; /* スマホで折り返し */
}
.school-submenu li {
  margin: 0;
  padding: 0 10px;
  border-right: 1px solid #ccc; /* 縦線を入れる */
}
.school-submenu li:last-child {
  border-right: none; /* 最後の項目には線を入れない */
}
.school-submenu a {
  text-decoration: none;
  color: #333;
}
.school-submenu li.active a {
  font-weight: bold;
  color: #0073aa;
}
.school-back-button a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.school-back-button a:hover {
    background-color: #005177;
}

/* ページ送り用 */
.school-posts-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:22px;
margin-top:25px;
}

.school-post-card{
position:relative;
border-radius:10px;
overflow:hidden;
background:#fff;
box-shadow:0 2px 6px rgba(0,0,0,0.08);
display:flex;
flex-direction:column;
}

.post-thumb{
display:block;
width:100%;
height:170px;
overflow:hidden;
}

.post-thumb img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

.post-content{
padding:12px;
flex-grow:1;
display:flex;
flex-direction:column;
}

.post-date{
font-size:13px;
color:#777;
margin-bottom:6px;
}

.post-title{
font-size:16px;
margin:0 0 6px 0;
line-height:1.4;
}

.post-title a{
text-decoration:none;
color:#222;
}

.post-title a:hover{
color:#0066cc;
}

.post-excerpt{
font-size:14px;
color:#555;
margin-top:auto;
}

.post-new{
position:absolute;
top:10px;
left:10px;
background:#e60023;
color:#fff;
font-size:11px;
padding:4px 6px;
border-radius:3px;
}

.school-pagination{
text-align:center;
margin-top:40px;
font-size:16px;
}

.school-pagination a,
.school-pagination span{
display:inline-block;
margin:0 8px;
text-decoration:none;
color:#333;
padding:6px 10px;
white-space:nowrap;   /* 改行防止 */
border:none;          /* テーマの枠を解除 */
background:none;      /* テーマのボタン背景解除 */
box-shadow:none;
}

.school-pagination .current{
background:#444;
color:#fff;
border-radius:4px;
}

.school-pagination a:hover{
text-decoration:underline;
}

@media (max-width:900px){

.school-posts-grid{
grid-template-columns:repeat(2,1fr);
}

}

@media (max-width:600px){

.school-posts-grid{
grid-template-columns:1fr;
}

.post-thumb{
height:160px;
}

}

.school-post-card .post-title{
font-size:17px;
font-weight:700;
border:none !important;
outline:none;
background:none;
padding:0;
margin:0 0 6px 0;
}

.school-post-card .post-title a{
border:none !important;
background:none;
padding:0;
}

.school-category-link{
text-align:center;
margin-top:25px;
}

.school-category-link a{
display:inline-block;
background:#333;
color:#fff;
padding:6px 12px;
border-radius:4px;
text-decoration:none;
font-size:14px;
}

.school-category-link a:hover{
background:#555;
}

