/**
 * 補助金ページ スタイルシート - 田舎暮らし革命カラー版
 * メインカラー: ピンク (#F07070)
 * サブカラー: グリーン (#3D8B52)
 */

/* ========================================
   カラー変数
======================================== */
:root {
    --pink:        #F07070;
    --pink-dark:   #D45555;
    --pink-light:  #FDF0F0;
    --pink-mid:    #FAD7D7;
    --green:       #3D8B52;
    --green-dark:  #2A5C35;
    --green-light: #EBF5EE;
    --green-mid:   #C2DEC9;
    --text:        #2D2D2D;
    --text-sub:    #666;
    --bg:          #FAF8F6;
    --white:       #FFFFFF;
    --border:      #EEE;
    --shadow:      rgba(240, 112, 112, 0.10);
}

/* ========================================
   共通スタイル
======================================== */
.subsidy-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

/* バッジ */
.subsidy-type-badge {
    display: inline-block;
    background: var(--pink);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.subsidy-type-badge.large {
    font-size: 13px;
    padding: 5px 16px;
}

/* 都道府県タグ */
.subsidy-pref-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: bold;
    background: var(--green-light);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--green-mid);
}

/* ========================================
   アーカイブページ（一覧）
======================================== */
.subsidy-archive-page {
    padding: 40px 0 80px;
    background: var(--bg);
    min-height: 60vh;
}

/* ページヘッダー */
.subsidy-page-header {
    position: relative;
    text-align: center;
    padding: 56px 24px 52px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #D45555 0%, #F07070 50%, #F5A0A0 100%);
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
}

/* 装飾：背景の丸 */
.subsidy-page-header::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.subsidy-page-header::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.subsidy-page-title {
    position: relative;
    font-size: 30px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* タイトル装飾ライン */
.subsidy-page-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
    margin: 10px auto 0;
}

.subsidy-page-desc {
    position: relative;
    font-size: 15px;
    opacity: 0.92;
    margin: 14px 0 0;
    line-height: 1.8;
}

/* フィルターフォーム */
.subsidy-filter-wrap {
    background: var(--white);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px var(--shadow);
    border: 1px solid #F5E0E0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item:first-child,
.filter-item:nth-child(2) {
    flex: 1;
    min-width: 180px;
}

.filter-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-sub);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.filter-select {
    padding: 10px 14px;
    border: 1.5px solid #EDD8D8;
    border-radius: 10px;
    font-size: 14px;
    background: #FFFAFA;
    color: var(--text);
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(240,112,112,0.12);
    background: var(--white);
}

.filter-buttons {
    flex-direction: row;
    gap: 10px;
}

.filter-btn-submit {
    padding: 10px 26px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(240,112,112,0.3);
    letter-spacing: 0.04em;
}

.filter-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(240,112,112,0.4);
}

.filter-btn-reset {
    padding: 10px 16px;
    background: var(--white);
    color: var(--text-sub);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-btn-reset:hover {
    background: #F9F9F9;
    border-color: #CCC;
    text-decoration: none;
    color: var(--text);
}

/* 件数表示 */
.subsidy-result-count {
    margin-bottom: 20px;
    color: var(--text-sub);
    font-size: 14px;
}

.subsidy-result-count p {
    margin: 0;
}

.subsidy-result-count strong {
    color: var(--pink-dark);
}

/* カードグリッド */
.subsidy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .subsidy-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .subsidy-grid { grid-template-columns: 1fr; }
}

/* カード */
.subsidy-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 3px 12px var(--shadow);
    border: 1px solid #F5EAEA;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    overflow: hidden;
}

/* カード上部アクセントライン */
.subsidy-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--pink) 0%, var(--pink-dark) 100%);
}

.subsidy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(240,112,112,0.18);
    border-color: var(--pink-mid);
}

.subsidy-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px 20px 16px;
    text-decoration: none;
    color: inherit;
}

.subsidy-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.subsidy-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.subsidy-card-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.55;
}

.subsidy-card-body {
    flex: 1;
    margin-bottom: 12px;
}

/* 補助金額ブロック */
.subsidy-amount {
    background: var(--pink-light);
    border-left: 3px solid var(--pink);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 12px;
}

.amount-label {
    font-size: 10px;
    color: var(--pink-dark);
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    letter-spacing: 0.05em;
}

.amount-value {
    font-size: 17px;
    font-weight: bold;
    color: var(--pink-dark);
}

/* カードメタ情報 */
.subsidy-card-meta {
    margin: 0;
}

.meta-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 5px;
    line-height: 1.45;
}

.meta-row dt {
    min-width: 56px;
    font-weight: bold;
    color: #999;
    flex-shrink: 0;
}

.meta-row dd { margin: 0; }

/* カードフッター */
.subsidy-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F5EAEA;
    padding-top: 12px;
    margin-top: auto;
}

.card-detail-btn {
    font-size: 13px;
    font-weight: bold;
    color: var(--pink);
}

.card-updated {
    font-size: 10px;
    color: #BBB;
}

/* ページネーション */
.subsidy-pagination {
    text-align: center;
    margin: 20px 0 40px;
}

.subsidy-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1.5px solid #EDD8D8;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-sub);
    font-size: 14px;
    transition: all 0.2s;
}

.subsidy-pagination .page-numbers:hover,
.subsidy-pagination .page-numbers.current {
    background: var(--pink);
    color: #fff;
    border-color: var(--pink);
    box-shadow: 0 3px 10px rgba(240,112,112,0.3);
}

/* SEOテキスト */
.subsidy-seo-text {
    background: var(--white);
    border-radius: 14px;
    padding: 30px 34px;
    margin-top: 24px;
    border: 1px solid #F0E8E8;
}

.subsidy-seo-text h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text);
    padding-left: 12px;
    border-left: 3px solid var(--pink);
}

.subsidy-seo-text p {
    color: var(--text-sub);
    line-height: 1.85;
    margin-bottom: 10px;
    font-size: 14px;
}

/* ========================================
   シングルページ（詳細）
======================================== */
.subsidy-single-page {
    padding: 30px 0 70px;
    background: var(--bg);
    min-height: 60vh;
}

/* パンくずリスト */
.subsidy-breadcrumb { margin-bottom: 20px; }

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    color: #AAA;
}

.breadcrumb-list li:not(:last-child)::after {
    content: ' ›';
    margin-left: 4px;
}

.breadcrumb-list a {
    color: var(--pink);
    text-decoration: none;
}

.breadcrumb-list a:hover { text-decoration: underline; }

/* レイアウト */
.subsidy-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .subsidy-single-layout { grid-template-columns: 1fr; }
    .subsidy-single-sidebar { order: -1; }
}

/* メインコンテンツ */
.subsidy-single-main {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid #F5EAEA;
}

@media (max-width: 600px) {
    .subsidy-single-main { padding: 22px 18px; }
}

/* ヘッダー */
.subsidy-single-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F5EAEA;
}

.subsidy-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.subsidy-single-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
    line-height: 1.55;
    margin: 0 0 14px;
}

@media (max-width: 600px) {
    .subsidy-single-title { font-size: 19px; }
}

.subsidy-last-update {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #AAA;
    margin: 0;
    background: #F9F9F9;
    padding: 4px 10px;
    border-radius: 20px;
}

/* 補助金額ハイライト */
.subsidy-amount-highlight {
    position: relative;
    background: linear-gradient(135deg, var(--pink-light) 0%, #FDE8E8 100%);
    border: 1.5px solid var(--pink-mid);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
    overflow: hidden;
}

/* 装飾ドット */
.subsidy-amount-highlight::before {
    content: '¥';
    position: absolute;
    right: 16px;
    top: 8px;
    font-size: 80px;
    font-weight: bold;
    color: rgba(240,112,112,0.06);
    line-height: 1;
}

.amount-highlight-label {
    font-size: 12px;
    color: var(--pink-dark);
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.amount-highlight-value {
    font-size: 34px;
    font-weight: bold;
    color: var(--pink-dark);
    text-shadow: 0 2px 8px rgba(212,85,85,0.15);
}

/* セクションタイトル */
.section-title {
    position: relative;
    font-size: 18px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 18px;
    padding: 0 0 12px 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 4px;
    width: 4px;
    background: linear-gradient(180deg, var(--pink) 0%, var(--pink-dark) 100%);
    border-radius: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--pink-mid) 0%, transparent 60%);
}

/* 詳細テーブル */
.subsidy-detail-section { margin-bottom: 32px; }

.subsidy-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.subsidy-detail-table th,
.subsidy-detail-table td {
    padding: 14px 16px;
    border: 1px solid #F0E8E8;
    line-height: 1.65;
    text-align: left;
    vertical-align: top;
}

.subsidy-detail-table th {
    width: 150px;
    background: var(--pink-light);
    font-weight: bold;
    color: var(--pink-dark);
    white-space: nowrap;
}

.table-icon { margin-right: 5px; }

@media (max-width: 600px) {
    .subsidy-detail-table,
    .subsidy-detail-table tbody,
    .subsidy-detail-table tr,
    .subsidy-detail-table th,
    .subsidy-detail-table td {
        display: block;
        width: 100%;
    }
    .subsidy-detail-table th { border-bottom: none; padding-bottom: 5px; }
}

/* 備考 */
.subsidy-note-section { margin-bottom: 32px; }

.subsidy-note-content {
    background: #FFFDF0;
    border: 1px solid #F5E88A;
    border-left: 3px solid #F0C030;
    border-radius: 8px;
    padding: 18px 20px;
    color: var(--text-sub);
    line-height: 1.85;
    font-size: 14px;
}

/* CTAボックス */
.subsidy-cta-box {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
    border-radius: 16px;
    padding: 32px 30px;
    text-align: center;
    margin-bottom: 32px;
    overflow: hidden;
}

.subsidy-cta-box::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}

.cta-title {
    position: relative;
    font-size: 19px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: 0.03em;
	font-family:"Noto Sans JP", sans-serif !important;
}

.cta-desc {
    position: relative;
    font-size: 13px;
    opacity: 0.88;
    margin: 0 0 22px;
    color: #fff;
}

.cta-btn {
	font-family:"Noto Sans JP", sans-serif !important;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--white);
    color: var(--green-dark);
    font-size: 15px;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(0,0,0,0.2);
    text-decoration: none;
    color: var(--green-dark);
    background: #F5FFF8;
}

.cta-note {
    position: relative;
    font-size: 11px;
    opacity: 0.75;
    margin: 14px 0 0;
    color: #fff;
}

/* ナビゲーション */
.subsidy-single-nav {
	font-family:"Noto Sans JP", sans-serif !important;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid #F5EAEA;
}

.nav-back-btn,
.nav-pref-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: bold;
}

.nav-back-btn {
    background: var(--white);
    color: var(--text-sub);
    border: 1.5px solid var(--border);
}

.nav-back-btn:hover {
    background: #F9F9F9;
    border-color: #CCC;
    text-decoration: none;
    color: var(--text);
}

.nav-pref-btn {
    background: var(--pink-light);
    color: var(--pink-dark);
    border: 1.5px solid var(--pink-mid);
}

.nav-pref-btn:hover {
    background: var(--pink-mid);
    text-decoration: none;
    color: var(--pink-dark);
}

/* ========================================
   サイドバー
======================================== */
.subsidy-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 3px 14px var(--shadow);
    border: 1px solid #F5EAEA;
}

.sidebar-card-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pink-mid);
    position: relative;
}

/* タイトル装飾ドット */
.sidebar-card-title::before {
    content: '●';
    color: var(--pink);
    font-size: 8px;
    margin-right: 6px;
    vertical-align: middle;
}

.sidebar-summary { margin: 0 0 16px; }

.summary-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid #FBF0F0;
}

.summary-row:last-child { border-bottom: none; }

.summary-row dt {
    font-size: 11px;
    color: #AAA;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.summary-row dd {
    margin: 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.summary-amount {
    font-size: 18px !important;
    font-weight: bold;
    color: var(--pink-dark) !important;
}

.sidebar-official-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(240,112,112,0.3);
    letter-spacing: 0.03em;
	font-family:"Noto Sans JP", sans-serif !important;
}

.sidebar-official-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(240,112,112,0.4);
    color: #fff;
    text-decoration: none;
}

.sidebar-related-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.sidebar-related-list li {
    padding: 8px 0;
    border-bottom: 1px solid #FBF0F0;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.sidebar-related-list li::before {
    content: '›';
    color: var(--pink);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
}

.sidebar-related-list li:last-child { border-bottom: none; }

.sidebar-related-list a {
    color: var(--text);
    text-decoration: none;
    line-height: 1.5;
}

.sidebar-related-list a:hover { color: var(--pink-dark); }

.sidebar-more-link {
    font-size: 12px;
    color: var(--pink);
    text-decoration: none;
    font-weight: bold;
}

.sidebar-more-link:hover { text-decoration: underline; }

/* ========================================
   タクソノミーページ専用（taxonomy-subsidy_area.php）
======================================== */

/* ← 全国の補助金を見る ボタン */
.filter-btn-all {
    display: inline-block;
    padding: 10px 16px;
    background: var(--green-light);
    color: var(--green-dark);
    border: 1.5px solid var(--green-mid);
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-btn-all:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    text-decoration: none;
}

/* ヘッダー内：子エリアリンク群 */
.area-child-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    position: relative;
}
.area-label {
    font-size: 12px;
    color: rgba(255,255,255,.8);
    white-space: nowrap;
}
.area-term-link {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}
.area-term-link:hover {
    background: rgba(255,255,255,.35);
    color: #fff;
    text-decoration: none;
}
.term-count { opacity: .8; font-size: 11px; }

/* 関連エリアリンク（ページ下部） */
.subsidy-related-areas {
    background: var(--white);
    border-radius: 14px;
    padding: 24px 28px;
    margin: 0 0 24px;
    box-shadow: 0 3px 12px var(--shadow);
    border: 1px solid #F5EAEA;
}
.related-areas-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--green-dark);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green-light);
}
.related-areas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
	font-family:"Noto Sans JP", sans-serif !important;
}
.related-area-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid var(--green-mid);
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}
.related-area-link:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    text-decoration: none;
}
.related-area-count {
    background: rgba(255,255,255,.5);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: normal;
}

/* 注意書き */
.sidebar-notice {
    background: #FFFDF0;
    border: 1px solid #F5E88A;
}

.sidebar-notice .sidebar-card-title {
    border-bottom-color: #F0C030;
    color: var(--text);
}

.sidebar-notice .sidebar-card-title::before {
    content: '⚠️';
    font-size: 13px;
    margin-right: 5px;
}

.sidebar-notice p {
    font-size: 12px;
    color: #7A6000;
    line-height: 1.75;
    margin: 0;
}
