/*
Theme Name: Aging Care Clear
Description: 軽量・SEO対応・読みやすさ重視の、エイジングケア情報サイト向けクラシックテーマ。プラグイン不要で動作します。
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: agingcare-clear
*/

:root {
	--c-bg: #fff;
	--c-text: #1d2b36;
	--c-muted: #5b6b78;
	--c-accent: #1a6fa8;
	--c-accent-dark: #14587f;
	--c-tint: #eef6fb;
	--c-line: #dce7ee;
	--radius: 6px;
	--w-content: 44rem;
	--w-wide: 64rem;
	--font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font: 400 16px/1.9 var(--font);
	overflow-wrap: break-word;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--c-accent); text-underline-offset: .2em; }
a:hover { color: var(--c-accent-dark); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link {
	position: absolute; left: -999px; top: 0;
	background: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.container { width: min(100% - 2rem, var(--w-content)); margin-inline: auto; }
.container--wide { width: min(100% - 2rem, var(--w-wide)); margin-inline: auto; }

/* ヘッダー */
.site-header { border-top: 3px solid var(--c-accent); border-bottom: 1px solid var(--c-line); }
.site-header__inner {
	width: min(100% - 2rem, var(--w-wide));
	margin-inline: auto;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: .5rem 1.5rem; padding-block: .75rem;
}
.site-title { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.site-title a { color: var(--c-text); text-decoration: none; }
.site-desc { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--c-muted); }

.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
	width: 100%; min-width: 0; max-width: 16rem;
	padding: .45rem .75rem;
	font: inherit; font-size: .9375rem; line-height: 1.5;
	border: 1px solid var(--c-line); border-radius: var(--radius);
}
.search-form button {
	padding: .45rem 1rem; font: inherit; font-size: .9375rem; line-height: 1.5;
	color: #fff; background: var(--c-accent);
	border: 1px solid var(--c-accent); border-radius: var(--radius); cursor: pointer;
}
.search-form button:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); }

.site-nav { border-top: 1px solid var(--c-line); }
.site-nav ul {
	width: min(100% - 2rem, var(--w-wide));
	margin: 0 auto; padding: 0; list-style: none;
	display: flex; gap: .25rem; overflow-x: auto; white-space: nowrap;
}
.site-nav a {
	display: block; padding: .6rem .9rem;
	color: var(--c-text); text-decoration: none; font-size: .9375rem; line-height: 1.6;
	border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.site-nav .current-menu-item > a,
.site-nav .current-cat > a { color: var(--c-accent); border-bottom-color: var(--c-accent); font-weight: 700; }

.site-main { padding-block: 1.5rem 3rem; }

/* セクション・一覧 */
.section { margin-block: 2.5rem; }
.section:first-child { margin-top: 0; }
.section__title {
	margin: 0 0 1rem; padding-bottom: .5rem;
	font-size: 1.25rem; line-height: 1.5;
	border-bottom: 2px solid var(--c-line);
}
.section__more { margin: 1.25rem 0 0; text-align: center; }

.concerns {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: .75rem;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}
.concerns a {
	display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
	padding: .7rem 1rem; line-height: 1.6;
	background: var(--c-tint); border: 1px solid var(--c-line); border-radius: var(--radius);
	color: var(--c-text); text-decoration: none; font-weight: 700;
}
.concerns a:hover { border-color: var(--c-accent); color: var(--c-accent); }
.concerns small { font-weight: 400; font-size: .75rem; color: var(--c-muted); }

.cards {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.card { height: 100%; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.card__link { display: block; height: 100%; color: inherit; text-decoration: none; }
.card__thumb { aspect-ratio: 16 / 9; background: var(--c-tint); }
.card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: .85rem 1rem 1rem; }
.card__cat { display: block; margin-bottom: .15rem; font-size: .75rem; line-height: 1.6; color: var(--c-accent); }
.card__title { margin: 0 0 .3rem; font-size: 1rem; line-height: 1.6; font-weight: 700; }
.card__link:hover .card__title { color: var(--c-accent); }
.card__meta { margin: 0; font-size: .75rem; line-height: 1.6; color: var(--c-muted); }

.archive-header { margin-bottom: 1.5rem; }
.archive-title { margin: .5rem 0; font-size: 1.5rem; line-height: 1.5; }
.archive-description { color: var(--c-muted); font-size: .9375rem; }

.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.page-numbers {
	min-width: 2.5rem; padding: .35rem .8rem; text-align: center; text-decoration: none;
	color: var(--c-text); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.page-numbers.current { color: #fff; background: var(--c-accent); border-color: var(--c-accent); }
a.page-numbers:hover { border-color: var(--c-accent); }

/* パンくず */
.breadcrumb ol {
	display: flex; flex-wrap: wrap; list-style: none;
	margin: 0 0 1rem; padding: 0;
	font-size: .8125rem; line-height: 1.7; color: var(--c-muted);
}
.breadcrumb li + li::before { content: "›"; margin: 0 .5em; }
.breadcrumb a { color: var(--c-muted); }

/* 記事 */
.entry-title { margin: .5rem 0 .75rem; font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.5; }
.entry-meta { margin: 0; font-size: .8125rem; line-height: 1.8; color: var(--c-muted); }
.entry-meta > * { margin-right: 1em; }
.entry-thumb {
	display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
	margin-block: 1.25rem; border-radius: var(--radius);
}

.entry-content { font-size: 1.0625rem; line-height: 1.95; }
.entry-content h2 {
	margin: 3rem 0 1.25rem; padding: .6rem .9rem;
	font-size: 1.375rem; line-height: 1.5;
	background: var(--c-tint); border-left: 5px solid var(--c-accent);
	border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content h3 {
	margin: 2.25rem 0 1rem; padding-bottom: .35rem;
	font-size: 1.1875rem; line-height: 1.55; border-bottom: 2px solid var(--c-line);
}
.entry-content h4 { margin: 1.75rem 0 .75rem; font-size: 1.0625rem; line-height: 1.6; }
.entry-content :where(h2, h3, h4) { scroll-margin-top: 1rem; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; padding-left: 1.5em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote {
	margin: 1.5em 0; padding: .75em 1.25em;
	border-left: 4px solid var(--c-line); color: var(--c-muted);
}
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.5em; }
.entry-content th, .entry-content td { padding: .6em .8em; border: 1px solid var(--c-line); text-align: left; }
.entry-content th { background: var(--c-tint); }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .875rem; color: var(--c-muted); text-align: center; }

.toc { margin: 1.5rem 0 2rem; border: 1px solid var(--c-line); border-radius: var(--radius); }
.toc summary { padding: .75rem 1rem; font-weight: 700; cursor: pointer; }
.toc ol { margin: 0; padding: 0 1rem 1rem 2.25rem; }
.toc ol ol { padding: .25rem 0 0 1.25rem; list-style: disc; }
.toc li { margin: .25rem 0; line-height: 1.7; }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { color: var(--c-accent); text-decoration: underline; }

.box {
	margin: 2rem 0; padding: 1rem 1.25rem;
	background: var(--c-tint); border: 1px solid var(--c-line); border-radius: var(--radius);
	font-size: .9375rem; line-height: 1.8;
}
.box > :last-child { margin-bottom: 0; }
.box__title { margin: 0 0 .5em; font-weight: 700; }
.box--note { background: #fff; border-left: 4px solid var(--c-accent); }
.box--pr { background: #f6f8fa; color: var(--c-muted); font-size: .875rem; }

.entry-footer { margin-top: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: .8125rem; }
.tags a {
	display: block; padding: .15rem .7rem; text-decoration: none;
	color: var(--c-text); border: 1px solid var(--c-line); border-radius: 999px;
}
.tags a:hover { border-color: var(--c-accent); color: var(--c-accent); }

.post-navigation .nav-links { display: grid; gap: .75rem; margin-top: 2rem; }
.post-navigation a {
	display: block; padding: .75rem 1rem; font-size: .9375rem; line-height: 1.6;
	color: var(--c-text); text-decoration: none; border: 1px solid var(--c-line); border-radius: var(--radius);
}
.post-navigation a:hover { border-color: var(--c-accent); }
@media (min-width: 40rem) {
	.post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
	.post-navigation .nav-next { text-align: right; grid-column: 2; }
}

/* フッター */
.site-footer { padding-block: 2rem; background: var(--c-tint); border-top: 1px solid var(--c-line); font-size: .875rem; color: var(--c-muted); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.site-footer a { color: var(--c-muted); }
.site-footer p { margin: 0 0 .5rem; line-height: 1.8; }

@media (max-width: 40rem) {
	.search-form { width: 100%; }
	.search-form input[type="search"] { max-width: none; flex: 1; }
}

/* 記事ページのレイアウト(サイドバーの広告があるときだけ2カラム) */
.layout { width: min(100% - 2rem, var(--w-content)); margin-inline: auto; }
.layout__side { display: none; }
@media (min-width: 64rem) {
	.layout--with-sidebar {
		width: min(100% - 2rem, 66rem);
		display: grid;
		grid-template-columns: minmax(0, var(--w-content)) 300px;
		gap: 2.5rem;
		justify-content: center;
	}
	.layout--with-sidebar .layout__side { display: block; }
}

/* 広告枠(高さをあらかじめ確保して、広告の読み込みでページがズレないようにする) */
.ad { margin: 2rem 0; min-height: 250px; text-align: center; }
.ad::before { content: "広告"; display: block; margin-bottom: .25rem; font-size: .6875rem; line-height: 1.6; color: var(--c-muted); }
.ad ins { display: block; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.layout__side .ad { margin: 0; }
.ad--placeholder {
	display: flex; align-items: center; justify-content: center;
	padding: 1rem; font-size: .875rem; color: var(--c-muted);
	background: var(--c-tint); border: 1px dashed var(--c-muted); border-radius: var(--radius);
}
.ad--placeholder::before { content: none; }
