/*
Theme Name: 慶應陸上競技倶楽部
Description: 慶應義塾体育会競走部OBOG会（慶應陸上競技倶楽部）公式サイトのテーマ。
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Author: Sports IT Solution
Text Domain: keio-tfob
*/

/* ---------- 基本設定 ---------- */

:root {
	--navy: #001e62;
	--navy-deep: #00143f;
	--red: #c63527;
	--ink: #283041;
	--muted: #5b6475;
	--line: #d6dce7;
	--mist: #eef1f5;
	--white: #fff;

	--font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", Meiryo, sans-serif;
	--font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;

	--container: 1120px;
	--gutter: clamp(16px, 4vw, 32px);
	--measure: 42em;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.85;
	font-feature-settings: "palt" 0;
	overflow-wrap: anywhere;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--navy);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--red);
}

:focus-visible {
	outline: 3px solid var(--red);
	outline-offset: 2px;
}

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(46em + var(--gutter) * 2);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 8px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--navy);
	color: var(--white);
}

.skip-link:focus {
	top: 8px;
}

/* ---------- ヘッダー ---------- */

.site-header {
	position: relative;
	z-index: 10;
	background: var(--white);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 76px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--navy);
	text-decoration: none;
}

.brand:hover {
	color: var(--navy);
}

.brand__mark {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 4px;
}

.brand__text {
	display: grid;
	line-height: 1.3;
}

.brand__org {
	font-size: 0.75rem;
	color: var(--muted);
	letter-spacing: 0.04em;
}

.brand__name {
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	display: block;
	padding: 10px 14px;
	color: var(--ink);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.site-nav__list a:hover {
	color: var(--navy);
	border-bottom-color: var(--line);
}

.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current-menu-ancestor > a {
	color: var(--navy);
	border-bottom-color: var(--red);
}

/* 別サイトへのリンクだと分かるようにする */
.site-nav__list a[target="_blank"]::after,
.footer-links a[target="_blank"]::after {
	content: "";
	display: inline-block;
	width: 0.75em;
	height: 0.75em;
	margin-left: 0.35em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 1h4v4M11 1 5.5 6.5M9 7v4H1V3h4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M7 1h4v4M11 1 5.5 6.5M9 7v4H1V3h4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0.6;
}

.nav-toggle {
	display: none;
}

@media (max-width: 899px) {
	.js .nav-toggle {
		display: inline-grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-right: -10px;
		padding: 0;
		border: 0;
		border-radius: 4px;
		background: transparent;
		color: var(--navy);
		cursor: pointer;
	}

	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block;
		width: 22px;
		height: 2px;
		background: currentColor;
		transition: transform 0.2s ease;
	}

	.nav-toggle__bars {
		position: relative;
	}

	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.nav-toggle__bars::before {
		top: -7px;
	}

	.nav-toggle__bars::after {
		top: 7px;
	}

	.is-nav-open .nav-toggle__bars {
		background: transparent;
	}

	.is-nav-open .nav-toggle__bars::before {
		transform: translateY(7px) rotate(45deg);
	}

	.is-nav-open .nav-toggle__bars::after {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-header__inner {
		flex-wrap: wrap;
		gap: 0 12px;
		min-height: 64px;
		padding-block: 10px;
	}

	.brand {
		gap: 10px;
	}

	.brand__mark {
		width: 34px;
		height: 34px;
	}

	.brand__org {
		font-size: 0.6875rem;
		letter-spacing: 0;
	}

	.brand__name {
		font-size: 1.125rem;
	}

	/* スマホではヘッダーを上部に固定し、メニューはその下に紺の全画面パネルとして開く */
	.site-header {
		position: sticky;
		top: 0;
	}

	.site-nav {
		flex-basis: 100%;
	}

	.js .site-nav {
		position: fixed;
		inset: var(--header-h, 64px) 0 0;
		overflow-y: auto;
		padding: 8px var(--gutter) 40px;
		background: var(--navy);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
	}

	.js .is-nav-open .site-nav {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	/* 画面幅の切り替わりで勝手にフェードしないよう、アニメーションは最初の操作のあとから有効にする */
	.js .nav-ready .site-nav {
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	}

	.js .nav-ready.is-nav-open .site-nav {
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	.is-nav-open {
		overflow: hidden;
	}

	.site-nav__list {
		display: block;
	}

	.js .site-nav__list a {
		display: flex;
		align-items: center;
		padding: 18px 4px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
		color: var(--white);
		font-family: var(--font-display);
		font-size: 1.25rem;
		font-weight: 800;
		letter-spacing: 0.06em;
	}

	.js .site-nav__list a:hover {
		color: var(--white);
		border-bottom-color: rgba(255, 255, 255, 0.16);
	}

	.js .site-nav__list .current-menu-item > a,
	.js .site-nav__list .current_page_item > a,
	.js .site-nav__list .current-menu-ancestor > a {
		color: var(--white);
		border-bottom-color: rgba(255, 255, 255, 0.16);
	}

	/* 今いるページは、項目の左に塾旗の赤の印を付ける */
	.js .site-nav__list .current-menu-item > a::before,
	.js .site-nav__list .current_page_item > a::before {
		content: "";
		width: 4px;
		height: 1.1em;
		margin-right: 12px;
		background: var(--red);
	}

	.js .site-nav__list a[target="_blank"]::after {
		opacity: 0.7;
	}

}

/* ---------- トップのメインビジュアル ---------- */

/* 紺の面に縦書きのサイト名、塾旗の三色の線を挟んで写真 */
.hero {
	display: grid;
	grid-template-columns: minmax(340px, 38%) 14px 1fr;
	min-height: clamp(480px, 70vh, 620px);
	background: var(--navy);
	color: var(--white);
}

.hero__panel {
	display: flex;
	flex-direction: row-reverse;
	justify-content: space-between;
	align-items: stretch;
	gap: 32px;
	padding: 56px clamp(24px, 4vw, 56px);
}

/* 縦書きでは各行が右から左へ並ぶ。団体名が右、サイト名がその左 */
.hero__title {
	margin: 0;
	writing-mode: vertical-rl;
	font-family: var(--font-display);
	font-weight: 800;
	line-height: 1.25;
}

.hero__org,
.hero__name {
	display: block;
	white-space: nowrap;
}

/* 9文字が1列に収まるよう、画面の高さに合わせて大きさを決める */
.hero__name {
	font-size: clamp(2.25rem, 6.2vh, 3.25rem);
	letter-spacing: 0.12em;
}

.hero__org {
	margin-left: 0.9em;
	font-size: clamp(0.9375rem, 1.9vh, 1.0625rem);
	font-weight: 600;
	letter-spacing: 0.2em;
	opacity: 0.8;
	padding-top: 0.3em;
}

.hero__lead {
	align-self: flex-end;
	max-width: 15em;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 2;
	color: rgba(255, 255, 255, 0.86);
}

.hero__stripe {
	background: linear-gradient(90deg, var(--navy-deep) 0 35%, var(--red) 35% 65%, var(--navy-deep) 65%);
}

.hero__media {
	position: relative;
	overflow: hidden;
	background: var(--navy-deep);
}

.hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 78% 50%;
}

@media (max-width: 899px) {
	.hero {
		grid-template-columns: 1fr;
		grid-template-rows: auto 10px auto;
		min-height: 0;
	}

	.hero__media {
		grid-row: 1;
		aspect-ratio: 16 / 9;
	}

	.hero__stripe {
		grid-row: 2;
		background: linear-gradient(180deg, var(--navy-deep) 0 35%, var(--red) 35% 65%, var(--navy-deep) 65%);
	}

	.hero__panel {
		grid-row: 3;
		flex-direction: column;
		gap: 20px;
		padding-block: 32px 40px;
	}

	.hero__title {
		writing-mode: horizontal-tb;
	}

	.hero__org {
		margin: 0 0 6px;
		padding-top: 0;
		letter-spacing: 0.08em;
	}

	.hero__name {
		letter-spacing: 0.08em;
		font-size: clamp(2rem, 1.2rem + 3.5vw, 2.75rem);
	}

	.hero__lead {
		align-self: auto;
		max-width: var(--measure);
	}
}

/* ---------- トップの投稿一覧 ---------- */

/* 見出しを左、一覧を右に置く（下のお知らせ欄と同じ組み方） */
.home-topics {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 24px 48px;
	padding-block: clamp(48px, 7vw, 88px);
}

.home-topics__head {
	align-self: start;
}

.home-topics__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
	font-weight: 800;
	color: var(--navy);
	letter-spacing: 0.06em;
	line-height: 1.4;
}

.home-topics__desc {
	margin: 8px 0 0;
	font-size: 0.9375rem;
	color: var(--muted);
}

.home-topics__more {
	margin: 24px 0 0;
	font-weight: 600;
}

.home-topics__list .post-list {
	border-top: 2px solid var(--navy);
}

@media (min-width: 900px) {
	.home-topics__head {
		position: sticky;
		top: 32px;
	}
}

@media (max-width: 899px) {
	.home-topics {
		grid-template-columns: 1fr;
	}

	/* スマホでは一覧のあとに「すべて見る」を出す */
	.home-topics__head {
		display: contents;
	}

	.home-topics__title {
		order: 1;
	}

	.home-topics__desc {
		order: 2;
		margin-top: -16px;
	}

	.home-topics__list {
		order: 3;
	}

	.home-topics__more {
		order: 4;
		margin-top: 0;
		text-align: right;
	}
}

.post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-item {
	border-bottom: 1px solid var(--line);
}

.post-item__link {
	display: grid;
	gap: 2px;
	padding: 16px 4px;
	color: var(--ink);
	text-decoration: none;
}

.post-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	font-size: 0.8125rem;
	color: var(--muted);
}

.post-item__cat {
	padding: 0 8px;
	border: 1px solid var(--line);
	border-radius: 2px;
	font-size: 0.75rem;
	line-height: 1.7;
}

.post-item__new {
	color: var(--red);
	font-weight: 700;
	font-size: 0.75rem;
}

.post-item__title {
	font-weight: 600;
	line-height: 1.6;
}

.post-item__link:hover .post-item__title {
	color: var(--red);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* 幅に余裕がある一覧では、日付とタイトルを横に並べる */
@media (min-width: 640px) {
	.home-topics__list .post-item__link,
	.layout-with-sidebar__main .post-item__link {
		grid-template-columns: 13.5em 1fr;
		gap: 16px;
		align-items: baseline;
	}
}

.post-list-empty {
	color: var(--muted);
}

/* ---------- お知らせ欄 ---------- */

.callout {
	background: var(--mist);
	border-top: 1px solid var(--line);
}

.callout__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 16px 48px;
	align-items: start;
	padding-block: clamp(40px, 6vw, 72px);
}

.callout__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 800;
	color: var(--navy);
	line-height: 1.4;
}

.callout__body p {
	margin: 0 0 1em;
	max-width: var(--measure);
}

.callout__inner > p {
	grid-column: 2;
	margin: 0;
}

@media (max-width: 899px) {
	.callout__inner {
		grid-template-columns: 1fr;
	}

	.callout__inner > p {
		grid-column: 1;
	}
}

.button {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 4px;
	background: var(--red);
	color: var(--white);
	font-weight: 700;
	text-decoration: none;
}

.button:hover {
	background: #a82b1f;
	color: var(--white);
}

/* ---------- 下層ページの見出し ---------- */

.page-header {
	background: var(--mist);
	border-bottom: 1px solid var(--line);
	padding-block: 20px clamp(28px, 4vw, 44px);
}

.page-header__title {
	margin: 12px 0 0;
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem);
	font-weight: 800;
	color: var(--navy);
	letter-spacing: 0.04em;
	line-height: 1.45;
	max-width: 28em;
}

.page-header__title::after {
	content: "";
	display: block;
	width: 48px;
	height: 6px;
	margin-top: 16px;
	background: linear-gradient(180deg, var(--navy) 0 33%, var(--red) 33% 67%, var(--navy) 67%);
}

.page-header__desc {
	margin-top: 12px;
	color: var(--muted);
	font-size: 0.9375rem;
}

.page-header__desc p {
	margin: 0;
}

.page-header--post .page-header__title {
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
	content: "/";
	margin-left: 4px;
	color: var(--line);
}

.breadcrumbs a {
	color: var(--muted);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 16px 0 0;
	font-size: 0.875rem;
	color: var(--muted);
}

.entry-meta__cat {
	font-weight: 600;
}

/* ---------- 本文とサイドバーの配置 ---------- */

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: clamp(32px, 5vw, 64px);
	padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

@media (max-width: 899px) {
	.layout-with-sidebar {
		grid-template-columns: 1fr;
	}
}

.site-main > .container > .entry,
.page-body {
	padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

.container--narrow .entry-content {
	max-width: none;
}

/* ---------- 本文 ---------- */

.entry-content {
	max-width: var(--measure);
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content table,
.entry-content figure {
	margin-block: 0 1.4em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin: 2em 0 0.8em;
	color: var(--navy);
	line-height: 1.5;
}

.entry-content h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--navy);
}

.entry-content h3 {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 800;
}

.entry-content h4 {
	font-size: 1.125rem;
}

/* 本文中では h5 が小見出しとして多用されている */
.entry-content h5 {
	font-size: 1.0625rem;
	padding-left: 12px;
	border-left: 4px solid var(--red);
}

.entry-content h6 {
	font-size: 1rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}

.entry-content li + li {
	margin-top: 0.3em;
}

.entry-content blockquote {
	margin: 0 0 1.4em;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--line);
	color: var(--muted);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
	padding: 8px 12px;
	border: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--mist);
}

/* 結果表など（旧 TablePress の表）。見出し行は紺、区分の列（行見出し）は薄い色にする */
.entry-content .data-table thead th {
	background: var(--navy);
	border-color: var(--navy);
	color: var(--white);
	white-space: nowrap;
}

.entry-content .data-table tbody th {
	background: var(--mist);
	color: var(--navy);
	white-space: nowrap;
}

.entry-content .data-table td[rowspan],
.entry-content .data-table th[rowspan] {
	vertical-align: middle;
}

/* 列の多い表は、スマホでは横にスクロールさせる */
@media (max-width: 639px) {
	.entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

.entry-content iframe {
	display: block;
	border: 0;
}

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

@media (max-width: 639px) {
	.alignleft,
	.alignright {
		float: none;
		display: block;
		margin: 0 auto 1em;
	}
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	margin-top: 6px;
	font-size: 0.8125rem;
	color: var(--muted);
}

/* 旧テーマの頃から本文で使われているクラス */
.article-h1 {
	margin: 2em 0 0.8em;
	padding: 0.4em 1em;
	border-left: 8px solid var(--red);
	background: #dce3f3;
	color: var(--navy);
	font-weight: 700;
}

.article-p {
	padding: 0.8em 1.2em;
	border: 2px solid var(--ink);
}

.youtube {
	position: relative;
	max-width: 100%;
	padding-top: 56.25%;
}

.youtube iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.clear_both {
	clear: both;
}

/* ---------- ギャラリーと画像の拡大表示 ---------- */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
	margin-bottom: 1.4em;
}

.gallery-item {
	margin: 0;
}

.gallery-icon a {
	display: block;
	overflow: hidden;
	border-radius: 2px;
	background: var(--mist);
}

.gallery-icon img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: opacity 0.2s ease;
}

.gallery-icon a:hover img {
	opacity: 0.85;
}

.lightbox {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--white);
}

.lightbox::backdrop {
	background: rgba(0, 10, 32, 0.92);
}

.lightbox__figure {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 12px;
	height: 100%;
	margin: 0;
	padding: 56px 16px 24px;
	pointer-events: none;
}

.lightbox__img {
	max-width: 100%;
	max-height: calc(100dvh - 120px);
	object-fit: contain;
	pointer-events: auto;
}

.lightbox__count {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.75);
}

.lightbox__btn {
	position: fixed;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--white);
	cursor: pointer;
}

.lightbox__btn:hover {
	background: rgba(255, 255, 255, 0.24);
}

.lightbox__btn::before {
	content: "";
	width: 14px;
	height: 14px;
	border: solid currentColor;
	border-width: 2px 2px 0 0;
}

.lightbox__close {
	top: 12px;
	right: 12px;
}

.lightbox__close::before {
	width: 18px;
	height: 18px;
	border: 0;
	background:
		linear-gradient(45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
		linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.lightbox__prev {
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
}

.lightbox__prev::before {
	margin-left: 5px;
	transform: rotate(-135deg);
}

.lightbox__next {
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
}

.lightbox__next::before {
	margin-right: 5px;
	transform: rotate(45deg);
}

.lightbox.is-single .lightbox__prev,
.lightbox.is-single .lightbox__next {
	display: none;
}

/* ---------- 前後の投稿 ---------- */

.post-nav {
	margin-top: 56px;
	max-width: var(--measure);
}

.post-nav .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.post-nav .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-nav a {
	display: grid;
	gap: 2px;
	height: 100%;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--ink);
	text-decoration: none;
}

.post-nav a:hover {
	border-color: var(--navy);
}

.post-nav__label {
	font-size: 0.8125rem;
	color: var(--muted);
}

.post-nav__title {
	font-weight: 600;
	line-height: 1.6;
}

@media (max-width: 639px) {
	.post-nav .nav-links {
		grid-template-columns: 1fr;
	}

	.post-nav .nav-next {
		grid-column: 1;
	}
}

/* ---------- ページ送り ---------- */

.pagination {
	margin-top: 40px;
}

/* paginate_links は ul にも .page-numbers を付けるので、li の中の要素だけを対象にする */
.pagination ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pagination li > .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border-radius: 4px;
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
}

.pagination li > a.page-numbers:hover {
	background: var(--mist);
	color: var(--navy);
}

.pagination li > .current {
	background: var(--navy);
	color: var(--white);
}

.pagination li > .dots {
	min-width: 24px;
	padding: 0;
	color: var(--muted);
}

.pagination li > .prev,
.pagination li > .next {
	padding: 0 16px;
	border: 1px solid var(--line);
	color: var(--navy);
}

.pagination li:has(> .prev) {
	margin-right: 8px;
}

.pagination li:has(> .next) {
	margin-left: 8px;
}

/* スマホでは番号を1行目に、前へ・次へを2行目の左右に置く */
@media (max-width: 639px) {
	.pagination ul {
		justify-content: center;
	}

	.pagination li:has(> .prev),
	.pagination li:has(> .next) {
		display: flex;
		order: 1;
		flex: 1 1 40%;
		margin: 8px 0 0;
	}

	.pagination li:has(> .next) {
		display: flex;
		justify-content: flex-end;
	}
}

/* ---------- サイドバー ---------- */

.sidebar {
	font-size: 0.9375rem;
}

.widget + .widget {
	margin-top: 40px;
}

.widget__title {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--navy);
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--navy);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget_recent_entries li {
	border-bottom: 1px solid var(--line);
}

.widget_recent_entries a {
	display: block;
	padding: 10px 0;
	color: var(--ink);
	line-height: 1.6;
	text-decoration: none;
}

.widget_recent_entries a:hover {
	color: var(--red);
}

/* 旧テーマ時代のテキストウィジェットの固定幅を、サイドバーの幅に合わせる */
.sidebar .widget_text p {
	width: auto !important;
}

.sidebar .widget_text img {
	display: block;
	margin: 8px 0;
}

/* ---------- フッター ---------- */

.site-footer {
	background: var(--navy);
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.875rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 40px 28px;
}

.site-footer__brand {
	display: grid;
	margin: 0;
	line-height: 1.4;
}

.site-footer .brand__org {
	color: rgba(255, 255, 255, 0.7);
}

.site-footer .brand__name {
	color: var(--white);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links a {
	color: var(--white);
	margin: 0 !important;
}

.footer-links a:hover {
	color: var(--white);
	text-decoration: underline;
}

.footer-links p {
	margin: 0;
}

.site-footer__legal {
	padding-block: 16px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.6);
}

/* ---------- フォーム（Contact Form 7） ---------- */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #a9b2c3;
	border-radius: 4px;
	font: inherit;
	color: var(--ink);
	background: var(--white);
}

.wpcf7 input[type="submit"] {
	padding: 12px 32px;
	border: 0;
	border-radius: 4px;
	background: var(--red);
	color: var(--white);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.wpcf7 input[type="submit"]:hover {
	background: #a82b1f;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}
