/*
Theme Name: 石巻地区復興応援隊
Description: 石巻地区復興応援隊（石巻スポーツ振興サポートセンター）のサイト用テーマ。旧 PrivateBusiness テーマをベースにした、軽量・レスポンシブ・静的書き出し向けの構成。
Version: 1.0.0
Requires PHP: 7.4
Author: mahoro
Text Domain: ouentai
License: GNU General Public License v2 or later
*/

:root {
	--c-primary: #0b4fb3;
	--c-primary-dark: #083a85;
	--c-accent: #e8502b;
	--c-text: #1f2933;
	--c-muted: #66737f;
	--c-line: #dfe5ec;
	--c-bg: #f4f7fa;
	--c-card: #fff;
	--cat-town: #0b7a75;
	--cat-kasetu: #b4531a;
	--cat-kids: #2f8f3a;
	--cat-bappa: #6a3fb5;
	--cat-other: #66737f;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(15, 30, 50, .06), 0 4px 14px rgba(15, 30, 50, .06);
	--font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .6em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 14px; background: #fff; }

/* ---------- ヘッダー ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--c-text); line-height: 1.3; padding: 8px 0; }
.brand:hover { color: var(--c-text); }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; color: var(--c-primary); }
.brand-tag { font-size: .72rem; color: var(--c-muted); }

.nav-toggle {
	display: none; width: 44px; height: 44px; border: 0; border-radius: 8px;
	background: transparent; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
	content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--c-text); transition: transform .2s, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
	display: block; padding: 8px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600;
	color: var(--c-text); text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--c-bg); }
.site-nav a[aria-current] { background: var(--c-primary); color: #fff; }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); padding: 8px 16px 14px;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-nav a { border-radius: 8px; padding: 12px; white-space: normal; }
}

/* ---------- ヒーロー ---------- */
.hero { background-size: cover; background-position: center 40%; }
.hero-shade {
	padding: clamp(48px, 9vw, 110px) 0;
	background: linear-gradient(100deg, rgba(8, 40, 95, .82) 0%, rgba(8, 40, 95, .45) 60%, rgba(8, 40, 95, .15) 100%);
	color: #fff;
}
.hero-kicker { margin: 0 0 .4em; font-size: .9rem; letter-spacing: .12em; opacity: .9; }
.hero-title { margin: 0 0 .4em; font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: .03em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero-lead { margin: 0; font-size: clamp(.95rem, 2.2vw, 1.1rem); max-width: 34em; }

/* ---------- メイン ---------- */
.main { padding: 40px 0 64px; }
.section-title {
	font-size: 1.4rem; margin-bottom: 20px; padding-left: 12px;
	border-left: 5px solid var(--c-accent);
}
.archive-head { margin-bottom: 24px; }
.archive-kicker { margin: 0; font-size: .8rem; letter-spacing: .1em; color: var(--c-muted); }
.archive-title { margin: 0; font-size: clamp(1.4rem, 3.5vw, 2rem); }

/* ---------- カード ---------- */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
	display: flex; flex-direction: column; background: var(--c-card); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,30,50,.08), 0 10px 24px rgba(15,30,50,.12); }
.card-thumb { display: block; aspect-ratio: 16 / 10; background: var(--c-line); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--c-primary), #5b8fd8); }
.thumb-ph.cat-town { background: linear-gradient(135deg, var(--cat-town), #5fb8b3); }
.thumb-ph.cat-kasetu { background: linear-gradient(135deg, var(--cat-kasetu), #e0a06b); }
.thumb-ph.cat-kids { background: linear-gradient(135deg, var(--cat-kids), #86cd8e); }
.thumb-ph.cat-bappa { background: linear-gradient(135deg, var(--cat-bappa), #aa8be0); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .8rem; color: var(--c-muted); margin-bottom: 8px; }
.card-title { font-size: 1.05rem; margin: 0 0 8px; }
.card-title a { color: var(--c-text); text-decoration: none; }
.card-title a:hover { color: var(--c-primary); text-decoration: underline; }
.card-excerpt { margin: 0; font-size: .88rem; color: var(--c-muted); line-height: 1.7; }

.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.badge {
	display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700;
	color: #fff; text-decoration: none; background: var(--cat-other); line-height: 1.7;
}
.badge:hover { color: #fff; opacity: .85; }
.cat-town.badge, .dot.cat-town { background: var(--cat-town); }
.cat-kasetu.badge, .dot.cat-kasetu { background: var(--cat-kasetu); }
.cat-kids.badge, .dot.cat-kids { background: var(--cat-kids); }
.cat-bappa.badge, .dot.cat-bappa { background: var(--cat-bappa); }

/* ---------- ページ送り ---------- */
.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers {
	min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 8px; background: #fff;
	border: 1px solid var(--c-line); text-decoration: none; font-weight: 600; color: var(--c-text);
}
a.page-numbers:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.page-numbers.dots { background: transparent; border-color: transparent; }

/* ---------- 記事 ---------- */
.single-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .single-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.single { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 44px); }
.single-title { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin: 6px 0 24px; padding-bottom: 16px; border-bottom: 3px solid var(--c-primary); }

.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 .7em; }
.entry-content h3 { font-size: 1.25rem; padding-left: 10px; border-left: 4px solid var(--c-primary); }
.entry-content h4 { font-size: 1.1rem; }
.entry-content img { border-radius: 6px; }
.entry-content a img { transition: opacity .2s; }
.entry-content a:hover img { opacity: .85; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.entry-content .embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.4em; }
.entry-content .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
@media (max-width: 600px) {
	.entry-content .alignleft, .entry-content .alignright { float: none; display: block; margin: 0 auto 1em; }
}

.post-nav { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-line); }
.post-nav a {
	display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--c-line);
	border-radius: 8px; text-decoration: none; color: var(--c-text); font-size: .9rem; line-height: 1.5;
}
.post-nav a:hover { border-color: var(--c-primary); }
.post-nav small { color: var(--c-muted); }
.post-nav-next { text-align: right; grid-column: 2; }
.post-nav-prev { grid-column: 1; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next, .post-nav-prev { grid-column: 1; text-align: left; } }

/* ---------- サイドバー ---------- */
.widget { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 20px; }
.widget-title { font-size: 1rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--c-line); }
.widget-cats li a { display: flex; align-items: center; gap: 8px; padding: 7px 0; text-decoration: none; color: var(--c-text); font-size: .92rem; border-bottom: 1px dotted var(--c-line); }
.widget-cats li:last-child a { border-bottom: 0; }
.widget-cats a:hover { color: var(--c-primary); }
.widget-cats em { margin-left: auto; font-style: normal; font-size: .78rem; color: var(--c-muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat-other); flex: none; }
.widget-recent li { padding: 8px 0; border-bottom: 1px dotted var(--c-line); line-height: 1.5; }
.widget-recent li:last-child { border-bottom: 0; }
.widget-recent a { font-size: .9rem; text-decoration: none; color: var(--c-text); display: block; }
.widget-recent a:hover { color: var(--c-primary); text-decoration: underline; }
.widget-recent time { font-size: .75rem; color: var(--c-muted); }

/* ---------- フッター ---------- */
.site-footer { background: #0e2342; color: #c9d4e4; padding: 32px 0; font-size: .88rem; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 16px; }
.footer-cats a, .copyright a { color: #fff; text-decoration: none; }
.footer-cats a:hover, .copyright a:hover { text-decoration: underline; }
.copyright { margin: 0; }

.button { display: inline-block; padding: 10px 22px; background: var(--c-primary); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 700; }
.button:hover { background: var(--c-primary-dark); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .sidebar, .post-nav, .site-footer, .nav-toggle { display: none; }
	.single { box-shadow: none; padding: 0; }
}

@media (max-width: 600px) {
	.card-thumb { aspect-ratio: 16 / 9; }
}

.site-nav a.nav-ext { border: 1px solid var(--c-line); }
.parent-org { margin: 0 0 8px; }
.parent-org a { color: #fff; }

/* ---------- 活動終了のお知らせ ---------- */
.site-notice { background: #fff4e0; color: #5a3a10; border-bottom: 1px solid rgba(0, 0, 0, .08); border-left: 8px solid var(--c-accent); font-size: .88rem; line-height: 1.75; }
.site-notice p { margin: 0; padding: 10px 0; }
.site-notice a { color: inherit; font-weight: 700; }
@media print { .site-notice { display: block; } }
