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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
@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){
  /*必要ならばここにコードを書く*/
}

/* ===== 助成金ナビ カスタムスタイル ===== */
:root {
  --green:#1D9E75;--green-d:#085041;--green-l:#E1F5EE;--green-m:#5DCAA5;
  --amber:#EF9F27;--amber-l:#FAEEDA;
  --bg:#F7F5F0;--white:#FFFFFF;--text:#2C2C2A;--muted:#888780;--border:rgba(0,0,0,.08);
  --radius:10px;
}

/* タイトル非表示 */
.entry-title { display: none !important; }

/* ヒーロー */
.grant-hero{background:linear-gradient(135deg,#085041 0%,#0D6B52 60%,#1D9E75 100%);color:#fff;padding:48px 24px 56px;text-align:center;}
.grant-hero-badge{display:inline-block;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2);padding:4px 14px;border-radius:20px;font-size:12px;margin-bottom:16px;}
.grant-hero h1{font-size:clamp(20px,3.5vw,32px);font-weight:900;line-height:1.3;margin-bottom:12px;}
.grant-hero h1 span{color:#7EECC8;}
.grant-hero p{font-size:14px;opacity:.85;max-width:480px;margin:0 auto 24px;}

/* 検索フォーム */
.grant-search-form{
  background:#fff;
  border-radius:40px;
  padding:6px 6px 6px 20px;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  max-width:520px;
  margin:0 auto 20px;
  box-shadow:0 4px 24px rgba(0,0,0,.15);
  height:auto !important;
  min-height:unset !important;
  max-height:unset !important;
  overflow:visible !important;
}
.grant-search-form input[type="text"]{
  flex:1 !important;
  min-width:0 !important;
  width:auto !important;
  height:36px !important;
  padding:0 8px !important;
  border:none !important;
  outline:none !important;
  background:transparent !important;
  font-size:14px !important;
  box-shadow:none !important;
  display:inline-block !important;
  position:static !important;
  margin:0 !important;
  line-height:36px !important;
}
.grant-search-form button{
  background:#1D9E75;
  color:#fff;
  border:none;
  border-radius:30px;
  padding:8px 20px;
  font-size:13px;
  font-weight:500;
  cursor:pointer;
  flex-shrink:0 !important;
  width:auto !important;
  position:static !important;
  top:auto !important;
}

/* ヒーロータグ */
.grant-hero-tags{display:flex !important;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:16px;}
.hero-tag{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);padding:4px 12px;border-radius:20px;font-size:12px;color:#fff;text-decoration:none;}
.hero-tag:hover,.hero-tag.active{background:rgba(255,255,255,.25);color:#fff;}

/* フィルターバー */
.grant-filter-bar{background:#fff;border-bottom:1px solid rgba(0,0,0,.08);padding:12px 24px;display:flex;gap:8px;flex-wrap:wrap !important;align-items:center;}
.filter-label{font-size:12px;color:#888780;}
.filter-btn{padding:5px 14px;border-radius:20px;border:1px solid rgba(0,0,0,.08);background:#fff;font-size:12px;cursor:pointer;color:#2C2C2A;text-decoration:none;transition:all .15s;white-space:nowrap !important;}
.filter-btn:hover,.filter-btn.active{background:#1D9E75;color:#fff;border-color:#1D9E75;}
.ninsho-btn{background:#FEF3E8;border-color:#EF9F27;color:#633806;}
.ninsho-btn.active{background:#EF9F27;color:#fff;border-color:#EF9F27;}

/* メインレイアウト */
.grant-app{background:#F7F5F0;min-height:100vh;}
.grant-main{max-width:1100px;margin:0 auto;padding:28px 24px;display:grid;grid-template-columns:1fr 280px;gap:24px;}
@media(max-width:768px){.grant-main{grid-template-columns:1fr;}.grant-sidebar{display:none;}}

/* 統計 */
.grant-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px;}
.stat-card{background:#fff;border-radius:10px;padding:16px;border:1px solid rgba(0,0,0,.08);text-align:center;}
.stat-num{font-size:24px;font-weight:900;color:#1D9E75;}
.stat-label{font-size:11px;color:#888780;margin-top:2px;}
.section-title{font-size:13px;font-weight:700;color:#085041;margin-bottom:14px;display:flex;align-items:center;gap:6px;}
.section-title::before{content:'';width:3px;height:14px;background:#1D9E75;border-radius:2px;display:inline-block;}

/* カード */
.grant-list{display:flex;flex-direction:column;gap:12px;}
.grant-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:18px 20px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start;transition:all .15s;}
.grant-card:hover{border-color:#5DCAA5;box-shadow:0 2px 12px rgba(29,158,117,.1);transform:translateY(-1px);}
.grant-card.urgent{border-left:3px solid #EF9F27;}
.grant-name a{font-size:14px;font-weight:700;color:#2C2C2A;text-decoration:none;line-height:1.4;}
.grant-name a:hover{color:#1D9E75;}
.grant-org{font-size:12px;color:#888780;margin:4px 0 8px;}
.grant-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px;}
.tag{padding:2px 10px;border-radius:10px;font-size:11px;font-weight:500;}
.tag-green{background:#E1F5EE;color:#085041;}
.tag-amber{background:#FAEEDA;color:#633806;}
.grant-meta{font-size:12px;color:#888780;display:flex;gap:14px;flex-wrap:wrap;}
.grant-card-right{text-align:right;flex-shrink:0;}
.grant-amount{font-size:15px;font-weight:700;color:#085041;}
.grant-amount-sub{font-size:11px;color:#888780;}
.deadline-badge{display:inline-block;margin-top:6px;padding:3px 10px;border-radius:10px;font-size:11px;font-weight:500;}
.deadline-urgent{background:#FDE8E0;color:#A0320E;}
.deadline-normal{background:#E1F5EE;color:#085041;}
.ninsho-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:8px;font-size:11px;background:#E1F5EE;color:#085041;margin-top:4px;}
.no-results{padding:40px;text-align:center;color:#888780;background:#fff;border-radius:10px;}

/* サイドバー */
.grant-sidebar{display:flex;flex-direction:column;gap:16px;}
.sidebar-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:18px;}
.sidebar-title{font-size:13px;font-weight:700;color:#085041;margin-bottom:12px;display:flex;align-items:center;gap:6px;}
.sidebar-title::before{content:'';width:3px;height:13px;background:#1D9E75;border-radius:2px;}
.deadline-item{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border-radius:6px;background:#F7F5F0;margin-bottom:6px;}
.deadline-item.soon{background:#FEF3E8;}
.deadline-dot{width:8px;height:8px;border-radius:50%;background:#1D9E75;flex-shrink:0;margin-top:5px;}
.deadline-dot.soon{background:#EF9F27;}
.deadline-name a{font-size:12px;color:#2C2C2A;text-decoration:none;line-height:1.4;}
.deadline-date{font-size:11px;color:#888780;margin-top:2px;}
.cta-card{background:#085041 !important;border-color:#085041 !important;}
.cta-title{color:#fff;font-size:13px;font-weight:700;margin-bottom:8px;}
.cta-text{color:rgba(255,255,255,.8);font-size:12px;line-height:1.6;margin-bottom:12px;}
.cta-btn{display:block;background:#fff;color:#085041;text-align:center;padding:8px;border-radius:6px;font-size:13px;font-weight:700;text-decoration:none;}

/* ページネーション */
.page-numbers{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;border:1px solid rgba(0,0,0,.08);background:#fff;font-size:13px;color:#2C2C2A;text-decoration:none;margin:2px;}
.page-numbers.current{background:#1D9E75;color:#fff;border-color:#1D9E75;}
.wp-pagenavi,.page-numbers{text-align:center;margin-top:24px;}

.grant-meta span {
  font-family: 'Noto Sans JP', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
}

/* 詳細ページのサイドバー非表示 */
.single-grant .sidebar { display: none !important; }
.single-grant .content-area { width: 100% !important; max-width: 100% !important; }
.single-grant #main { width: 100% !important; }

/* ===== スマホ対応 ===== */
@media screen and (max-width: 640px) {
  /* ヒーロー */
  .grant-hero { padding: 32px 16px 40px; }
  .grant-hero h1 { font-size: 20px; }
  .grant-hero p { font-size: 13px; }
  .grant-hero-tags { gap: 6px; }
  .hero-tag { font-size: 11px; padding: 3px 10px; }

  /* 検索フォーム */
  .grant-search-form { margin: 0 0 16px; }

  /* フィルターバー */
  .grant-filter-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 16px !important;
    gap: 6px !important;
  }
  .filter-btn { flex-shrink: 0 !important; font-size: 11px !important; padding: 4px 12px !important; }

  /* メインコンテンツ */
  .grant-main { padding: 16px !important; }

  /* 統計 */
  .grant-stats { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .stat-card { padding: 10px 8px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 10px; }

  /* カード */
  .grant-card { padding: 14px; gap: 8px; }
  .grant-name a { font-size: 13px; }
  .grant-org { font-size: 11px; }
  .grant-amount { font-size: 14px; }
  .grant-amount-sub { font-size: 10px; }
  .deadline-badge { font-size: 10px; padding: 2px 8px; }
  .grant-meta { font-size: 11px; gap: 8px; }
}