/*
Theme Name: Shiwa Education
Theme URI: https://www.office.shiwacho.ed.jp/
Description: 紫波町教育委員会のための、情報を探しやすく整理した公式サイト向け子テーマです。
Author: Shiwa Town Board of Education
Template: twentytwentyfive
Version: 0.2.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: shiwa-education
*/

:root {
	--shiwa-ink: #332b3a;
	--shiwa-muted: #716778;
	--shiwa-teal: #76558f;
	--shiwa-teal-dark: #56366f;
	--shiwa-blue: #9675aa;
	--shiwa-gold: #a35f88;
	--shiwa-paper: #ffffff;
	--shiwa-wash: #f7f4f8;
	--shiwa-sand: #f3eef5;
	--shiwa-line: #e1d8e6;
	--shiwa-shadow: 0 14px 38px rgba(51, 43, 58, 0.1);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--shiwa-wash);
	color: var(--shiwa-ink);
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		"Yu Gothic UI",
		"Yu Gothic",
		"Meiryo",
		sans-serif;
	font-size: 16px;
	line-height: 1.8;
	margin: 0;
}

a {
	color: var(--shiwa-teal-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--shiwa-blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--shiwa-gold);
	outline-offset: 3px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--shiwa-paper);
	clip: auto !important;
	clip-path: none;
	color: var(--shiwa-ink);
	display: block;
	font-size: 1rem;
	font-weight: 700;
	height: auto;
	left: 1rem;
	padding: 0.75rem 1rem;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

.shiwa-site-header {
	background: var(--shiwa-paper);
	border-top: 6px solid var(--shiwa-teal);
	box-shadow: 0 3px 18px rgba(51, 43, 58, 0.07);
	position: relative;
	z-index: 10;
}

.shiwa-utility {
	border-bottom: 1px solid var(--shiwa-line);
	color: var(--shiwa-muted);
	font-size: 0.82rem;
}

.shiwa-utility__inner,
.shiwa-brand-row {
	margin-inline: auto;
	max-width: 1180px;
	padding-inline: 24px;
}

.shiwa-utility__inner {
	align-items: center;
	display: flex;
	justify-content: flex-end;
	min-height: 38px;
}

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

.shiwa-brand-row {
	align-items: center;
	display: flex;
	gap: 32px;
	justify-content: space-between;
	min-height: 106px;
}

.shiwa-brand {
	align-items: center;
	display: flex;
	gap: 16px;
	min-width: 0;
}

.shiwa-brand__text {
	min-width: 0;
}

.shiwa-brand__eyebrow {
	color: var(--shiwa-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	line-height: 1.3;
	margin: 0 0 5px;
	text-transform: uppercase;
}

.shiwa-brand .wp-block-site-title {
	font-size: clamp(1.35rem, 2.4vw, 2rem);
	font-weight: 750;
	letter-spacing: 0.035em;
	line-height: 1.35;
	margin: 0;
	white-space: nowrap;
}

.shiwa-brand .wp-block-site-title a {
	color: var(--shiwa-ink);
	text-decoration: none;
}

.shiwa-primary-nav {
	font-size: 0.95rem;
	font-weight: 700;
}

.shiwa-primary-nav .wp-block-navigation-item__content {
	color: var(--shiwa-ink);
	padding-block: 12px;
	text-decoration: none;
}

.shiwa-primary-nav .wp-block-navigation-item__content:hover {
	color: var(--shiwa-teal-dark);
}

.shiwa-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--shiwa-paper);
	color: var(--shiwa-ink);
	padding: 28px;
}

.shiwa-front-main {
	margin-block: 0;
}

.shiwa-front-main > * {
	margin-block-start: 0;
}

.shiwa-random-hero {
	background: #e8e0ec;
	margin: 0;
	max-height: 288px;
	overflow: hidden;
	position: relative;
}

.shiwa-random-hero img {
	aspect-ratio: 1000 / 288;
	display: block;
	height: auto;
	max-height: 288px;
	object-fit: cover;
	width: 100%;
}

.shiwa-random-hero::after {
	background: linear-gradient(90deg, rgba(86, 54, 111, 0.17), transparent 52%, rgba(150, 117, 170, 0.11));
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.shiwa-front-intro {
	background: var(--shiwa-paper);
	border-bottom: 1px solid var(--shiwa-line);
	padding-block: clamp(34px, 5vw, 64px);
}

.shiwa-front-intro__inner,
.shiwa-section,
.shiwa-related {
	margin-inline: auto;
	max-width: 1180px;
	padding-inline: 24px;
}

.shiwa-front-label {
	color: var(--shiwa-teal-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.shiwa-front-heading {
	font-size: clamp(1.55rem, 3.1vw, 2.45rem);
	letter-spacing: 0.02em;
	line-height: 1.35;
	margin: 0;
}

.shiwa-front-description {
	color: var(--shiwa-muted);
	font-size: 1rem;
	margin: 12px 0 0;
	max-width: 46rem;
}

.shiwa-site-search {
	background: var(--shiwa-sand);
	border: 1px solid var(--shiwa-line);
	border-radius: 14px;
	margin-block-start: 28px;
	max-width: 46rem;
	padding: 18px;
}

.shiwa-site-search .wp-block-search__label {
	color: var(--shiwa-ink);
	display: block;
	font-size: 0.9rem;
	font-weight: 750;
	margin-bottom: 7px;
}

.shiwa-site-search .wp-block-search__inside-wrapper {
	background: var(--shiwa-paper);
	border: 2px solid var(--shiwa-teal-dark);
	border-radius: 8px;
	overflow: hidden;
	padding: 0;
}

.shiwa-site-search .wp-block-search__input {
	border: 0;
	font-size: 1rem;
	min-height: 52px;
	padding: 10px 14px;
}

.shiwa-site-search .wp-block-search__button {
	background: var(--shiwa-teal-dark);
	border: 0;
	border-radius: 0;
	color: #fff;
	font-weight: 750;
	margin: 0;
	min-width: 92px;
	padding: 10px 18px;
}

.shiwa-site-search .wp-block-search__button:hover {
	background: var(--shiwa-teal);
}

.shiwa-section {
	padding-block: clamp(54px, 7vw, 84px);
}

.shiwa-section--white {
	background: var(--shiwa-paper);
	max-width: none;
	padding-inline: max(24px, calc((100% - 1132px) / 2));
}

.shiwa-section-heading {
	font-size: clamp(1.4rem, 2.5vw, 2rem);
	letter-spacing: 0.025em;
	line-height: 1.4;
	margin: 0;
}

.shiwa-section-heading::before {
	background: var(--shiwa-gold);
	border-radius: 999px;
	content: "";
	display: inline-block;
	height: 0.28em;
	margin-right: 0.55em;
	vertical-align: 0.13em;
	width: 0.95em;
}

.shiwa-section-lead {
	color: var(--shiwa-muted);
	margin: 8px 0 28px;
}

.shiwa-task-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
}

.shiwa-task-grid li {
	margin: 0;
}

.shiwa-task-grid a {
	align-items: center;
	background: var(--shiwa-paper);
	border: 1px solid var(--shiwa-line);
	border-left: 5px solid var(--shiwa-teal);
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(51, 43, 58, 0.05);
	color: var(--shiwa-ink);
	display: flex;
	font-size: 1.06rem;
	font-weight: 750;
	gap: 12px;
	justify-content: space-between;
	min-height: 82px;
	padding: 18px 18px 18px 20px;
	text-decoration: none;
	transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.shiwa-task-grid a::after {
	color: var(--shiwa-teal-dark);
	content: "→";
	font-size: 1.3rem;
	font-weight: 500;
}

.shiwa-task-grid a:hover {
	border-left-color: var(--shiwa-gold);
	box-shadow: var(--shiwa-shadow);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.shiwa-task-grid a {
		transition: none;
	}

	.shiwa-task-grid a:hover {
		transform: none;
	}
}

.shiwa-news-query {
	margin-block-start: 26px;
}

.shiwa-news-query .wp-block-post-template {
	border-top: 1px solid var(--shiwa-line);
	margin: 0;
	padding: 0;
}

.shiwa-news-query .wp-block-post {
	border-bottom: 1px solid var(--shiwa-line);
	margin: 0;
	padding: 18px 4px;
}

.shiwa-news-row {
	align-items: baseline;
	display: grid;
	gap: 16px;
	grid-template-columns: 9.5rem minmax(0, 1fr);
}

.shiwa-news-row .wp-block-post-date {
	color: var(--shiwa-muted);
	font-size: 0.88rem;
	font-variant-numeric: tabular-nums;
}

.shiwa-news-row .wp-block-post-title {
	font-size: 1.03rem;
	font-weight: 700;
	line-height: 1.65;
	margin: 0;
}

.shiwa-news-row .wp-block-post-title a {
	color: var(--shiwa-ink);
}

.shiwa-more-link {
	margin-block-start: 24px;
	text-align: right;
}

.shiwa-more-link a {
	align-items: center;
	display: inline-flex;
	font-weight: 750;
	gap: 0.45em;
}

.shiwa-related-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-block-start: 30px;
}

.shiwa-related-card {
	background: var(--shiwa-paper);
	border: 1px solid var(--shiwa-line);
	border-radius: 14px;
	box-shadow: 0 7px 24px rgba(51, 43, 58, 0.065);
	padding: clamp(22px, 3vw, 32px);
}

.shiwa-related-card h3 {
	border-bottom: 2px solid var(--shiwa-teal);
	font-size: 1.15rem;
	margin: 0 0 16px;
	padding-bottom: 10px;
}

.shiwa-link-list {
	display: grid;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.shiwa-link-list li {
	border-bottom: 1px dotted #bac9c6;
	margin: 0;
}

.shiwa-link-list li:last-child {
	border-bottom: 0;
}

.shiwa-link-list a {
	color: var(--shiwa-ink);
	display: block;
	padding: 9px 2px;
	text-decoration: none;
}

.shiwa-link-list a::before {
	color: var(--shiwa-teal);
	content: "›";
	font-size: 1.25em;
	font-weight: 800;
	margin-right: 0.45em;
}

.shiwa-link-list a:hover {
	color: var(--shiwa-teal-dark);
	text-decoration: underline;
}

.shiwa-content-main {
	background: var(--shiwa-paper);
	border-radius: 14px;
	box-shadow: var(--shiwa-shadow);
	margin-block: clamp(38px, 6vw, 72px);
	padding: clamp(24px, 5vw, 64px);
}

.shiwa-content-main .wp-block-post-title,
.shiwa-archive-title {
	font-size: clamp(1.65rem, 3.2vw, 2.5rem);
	line-height: 1.4;
	margin-block-start: 0;
}

.shiwa-content-main .wp-block-post-content {
	font-size: 1rem;
}

.shiwa-post-meta {
	color: var(--shiwa-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.88rem;
	gap: 12px;
	margin-bottom: 28px;
}

.shiwa-archive-list {
	margin-top: 28px;
}

.shiwa-archive-list .wp-block-post {
	border-bottom: 1px solid var(--shiwa-line);
	padding-block: 22px;
}

.shiwa-archive-list .wp-block-post-title {
	font-size: 1.2rem;
	margin-block: 0 7px;
}

.shiwa-site-footer {
	background: var(--shiwa-ink);
	color: #f2f7f6;
	margin-block-start: 0;
}

.shiwa-footer__inner {
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
	margin-inline: auto;
	max-width: 1180px;
	padding: 48px 24px 30px;
}

.shiwa-footer__title {
	font-size: 1.2rem;
	font-weight: 750;
	margin: 0 0 8px;
}

.shiwa-footer__text {
	color: #c7d4d2;
	font-size: 0.9rem;
	margin: 0;
}

.shiwa-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

.shiwa-footer__links a {
	color: #fff;
	font-size: 0.9rem;
}

.shiwa-copyright {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	color: #c7d4d2;
	font-size: 0.78rem;
	margin: 0;
	padding: 18px 24px;
	text-align: center;
}

@media (max-width: 900px) {
	.shiwa-brand-row {
		gap: 18px;
		min-height: 90px;
	}

	.shiwa-primary-nav .wp-block-navigation__container {
		gap: 14px;
	}

	.shiwa-task-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.shiwa-related-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 680px) {
	.shiwa-utility__inner,
	.shiwa-brand-row,
	.shiwa-front-intro__inner,
	.shiwa-section,
	.shiwa-related {
		padding-inline: 18px;
	}

	.shiwa-utility__inner {
		justify-content: center;
	}

	.shiwa-brand {
		gap: 12px;
	}

	.shiwa-brand__eyebrow {
		display: none;
	}

	.shiwa-brand .wp-block-site-title {
		font-size: 1.28rem;
		white-space: normal;
	}

	.shiwa-random-hero img {
		aspect-ratio: 2.25 / 1;
		min-height: 150px;
		object-position: center;
	}

	.shiwa-site-search {
		padding: 12px;
	}

	.shiwa-site-search .wp-block-search__inside-wrapper {
		align-items: stretch;
		display: flex;
	}

	.shiwa-site-search .wp-block-search__button {
		min-width: 76px;
		padding-inline: 12px;
	}

	.shiwa-task-grid {
		grid-template-columns: 1fr;
	}

	.shiwa-task-grid a {
		min-height: 68px;
	}

	.shiwa-news-row {
		gap: 4px;
		grid-template-columns: 1fr;
	}

	.shiwa-footer__inner {
		grid-template-columns: 1fr;
		padding-inline: 18px;
	}

	.shiwa-footer__links {
		justify-content: flex-start;
	}

}
