/*
Theme Name: Mirai
Description: 未来を描く看護師転職ブログのオリジナルテーマ。清潔感のあるティール基調のカードレイアウト。
Version: 1.0.0
Author: jj
Text Domain: mirai
*/

:root {
	--primary: #12808c;
	--primary-dark: #0b5e68;
	--primary-pale: #e3f2f3;
	--accent: #f47b8f;
	--accent-pale: #fdeef1;
	--bg: #f6fafa;
	--card: #ffffff;
	--text: #2b3a3d;
	--muted: #6b7f83;
	--line: #dbe7e8;
	--radius: 14px;
	--shadow: 0 2px 10px rgba(18, 128, 140, 0.08);
	--shadow-hover: 0 8px 24px rgba(18, 128, 140, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", YuGothic, Meiryo, sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.8;
	font-size: 16px;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
}
.site-brand { display: flex; flex-direction: column; line-height: 1.3; padding: 10px 0; }
.site-brand__title { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.site-brand__title .brand-mark { color: var(--accent); }
.site-brand__tagline { font-size: 11px; color: var(--muted); }

.global-nav ul { display: flex; gap: 4px; list-style: none; }
.global-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
}
.global-nav a:hover, .global-nav .current-menu-item a { background: var(--primary-pale); color: var(--primary-dark); }

.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--primary-dark);
	margin: 5px 0;
	transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(135deg, var(--primary-pale) 0%, #ffffff 55%, var(--accent-pale) 100%);
	border-bottom: 1px solid var(--line);
}
.hero__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 44px 20px;
}
.hero__text { flex: 1.2; }
.hero__catch {
	font-size: 30px;
	font-weight: 700;
	color: var(--primary-dark);
	line-height: 1.45;
	margin-bottom: 14px;
}
.hero__catch em { font-style: normal; color: var(--accent); }
.hero__lead { color: var(--muted); font-size: 15px; }
.hero__image { flex: 1; text-align: center; }
.hero__image img {
	max-height: 260px;
	width: auto;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section__title {
	font-size: 22px;
	font-weight: 700;
	color: var(--primary-dark);
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 22px;
}
.section__title::before {
	content: "";
	width: 6px;
	height: 26px;
	border-radius: 3px;
	background: linear-gradient(var(--primary), var(--accent));
}

/* ---------- Category tiles ---------- */
.cat-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	list-style: none;
}
.cat-tiles a {
	display: block;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 14px;
	text-align: center;
	box-shadow: var(--shadow);
	transition: 0.2s;
}
.cat-tiles a:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cat-tiles__icon { font-size: 30px; display: block; margin-bottom: 8px; }
.cat-tiles__name { font-weight: 700; color: var(--text); font-size: 15px; }
.cat-tiles__count { display: block; font-size: 12px; color: var(--muted); }

/* ---------- Post cards ---------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}
.post-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: 0.2s;
	display: flex;
	flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-card__thumb { position: relative; aspect-ratio: 16 / 9; background: var(--primary-pale); display: block; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__thumb .noimage {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	font-size: 40px; color: var(--primary);
}
.post-card__cat {
	position: absolute;
	left: 10px;
	top: 10px;
	background: var(--primary);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
}
.post-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__title { font-size: 15.5px; font-weight: 700; line-height: 1.55; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { font-size: 13px; color: var(--muted); line-height: 1.7; }
.post-card__date { margin-top: auto; font-size: 12px; color: var(--muted); }

/* 新着4本の2x2大きめカード */
.post-grid--featured { grid-template-columns: repeat(2, 1fr); }
.post-grid--featured .post-card__title { font-size: 18px; }
.post-grid--featured .post-card__excerpt { font-size: 14px; }

/* ---------- 過去記事リスト(画像左・テキスト右) ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-list-item {
	display: flex;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: 0.2s;
}
.post-list-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.post-list-item__thumb {
	position: relative;
	flex: 0 0 260px;
	aspect-ratio: 16 / 9;
	background: var(--primary-pale);
	display: block;
}
.post-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-item__thumb .noimage {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	font-size: 36px; color: var(--primary);
}
.post-list-item__body {
	flex: 1;
	min-width: 0;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.post-list-item__title { font-size: 16.5px; font-weight: 700; line-height: 1.55; }
.post-list-item__title a { color: var(--text); }
.post-list-item__title a:hover { color: var(--primary); }
.post-list-item__excerpt { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.post-list-item__date { margin-top: auto; font-size: 12px; color: var(--muted); }

/* ---------- Archive / breadcrumb ---------- */
.breadcrumb { font-size: 12.5px; color: var(--muted); padding: 14px 0 0; }
.breadcrumb a { color: var(--muted); text-decoration: underline; }
.archive-header { padding: 26px 0 0; }
.archive-header__title { font-size: 24px; color: var(--primary-dark); }
.archive-header__desc { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Single ---------- */
.single-main { padding: 20px 0 50px; }
.article {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 36px 44px;
	max-width: 820px;
	margin: 18px auto 0;
}
.article__cat {
	display: inline-block;
	background: var(--primary);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}
.article__title { font-size: 26px; line-height: 1.5; color: var(--text); margin-bottom: 10px; }
.article__meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.article__eyecatch { margin: 0 0 26px; }
.article__eyecatch img { border-radius: 10px; width: 100%; }

.article__content { font-size: 16px; }
.article__content > * + * { margin-top: 1.2em; }
.article__content h2 {
	background: var(--primary-pale);
	color: var(--primary-dark);
	font-size: 20px;
	padding: 12px 16px;
	border-radius: 8px;
	border-left: 6px solid var(--primary);
	margin-top: 2em;
	line-height: 1.5;
}
.article__content h3 {
	font-size: 17.5px;
	color: var(--primary-dark);
	border-bottom: 2px solid var(--primary-pale);
	padding-bottom: 6px;
	margin-top: 1.8em;
}
.article__content h4 { font-size: 16px; margin-top: 1.6em; }
.article__content ul, .article__content ol { padding-left: 1.6em; }
.article__content li + li { margin-top: 0.4em; }
.article__content blockquote {
	background: var(--accent-pale);
	border-left: 5px solid var(--accent);
	padding: 14px 18px;
	border-radius: 0 8px 8px 0;
	color: #5c4a4e;
	font-size: 15px;
}
.article__content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
}
.article__content th, .article__content td {
	border: 1px solid var(--line);
	padding: 10px 12px;
	text-align: left;
}
.article__content th { background: var(--primary-pale); color: var(--primary-dark); }
.article__content tr:nth-child(even) td { background: #fbfdfd; }
.article__content img { border-radius: 10px; }
.article__content a { text-decoration: underline; }

/* prev / next */
.post-nav {
	display: flex;
	gap: 14px;
	max-width: 820px;
	margin: 22px auto 0;
}
.post-nav__item {
	flex: 1;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 14px 16px;
	font-size: 13.5px;
	line-height: 1.5;
	box-shadow: var(--shadow);
}
.post-nav__item:hover { box-shadow: var(--shadow-hover); }
.post-nav__label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.post-nav__item.-next { text-align: right; }
.post-nav__item a { color: var(--text); font-weight: 600; }

/* related */
.related { max-width: 820px; margin: 40px auto 0; }
.related .post-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 34px 0 10px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 8px;
	border-radius: 10px;
	background: var(--card);
	border: 1px solid var(--line);
	color: var(--text);
	font-size: 14px;
}
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Search / 404 ---------- */
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form input[type="search"] {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	font-size: 15px;
	background: #fff;
}
.search-form button {
	background: var(--primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.search-form button:hover { background: var(--primary-dark); }
.notfound { text-align: center; padding: 70px 20px; }
.notfound h1 { color: var(--primary-dark); margin-bottom: 12px; }
.notfound p { color: var(--muted); margin-bottom: 24px; }
.notfound .search-form { margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--primary-dark);
	color: #d9ecee;
	margin-top: 50px;
}
.site-footer__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 30px;
	padding: 38px 20px 30px;
}
.site-footer__title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.site-footer__about { font-size: 13.5px; line-height: 1.9; }
.site-footer__nav-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.site-footer__nav ul { list-style: none; }
.site-footer__nav li { margin-bottom: 6px; }
.site-footer__nav a { color: #d9ecee; font-size: 13.5px; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; }
.copyright {
	text-align: center;
	font-size: 12px;
	padding: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.post-grid { grid-template-columns: repeat(2, 1fr); }
	.related .post-grid { grid-template-columns: 1fr; }
	.cat-tiles { grid-template-columns: repeat(2, 1fr); }
	.article { padding: 26px 22px; }
	.post-list-item__thumb { flex-basis: 200px; }
	.post-list-item__excerpt { display: none; }
}

@media (max-width: 640px) {
	.nav-toggle { display: block; }
	.global-nav {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}
	.global-nav.is-open { display: block; }
	.global-nav ul { flex-direction: column; padding: 10px 16px 16px; }
	.global-nav a { border-radius: 10px; }

	.hero__inner { flex-direction: column; padding: 30px 20px; gap: 20px; }
	.hero__catch { font-size: 23px; }
	.hero__image img { max-height: 200px; }

	.post-grid { grid-template-columns: 1fr; }
	.post-grid--featured { grid-template-columns: 1fr; }
	.post-list-item__thumb { flex-basis: 132px; aspect-ratio: 4 / 3; }
	.post-list-item__body { padding: 10px 14px; }
	.post-list-item__title { font-size: 14px; }
	.post-list-item__thumb .post-card__cat { display: none; }
	.section { padding: 32px 0; }
	.article__title { font-size: 21px; }
	.post-nav { flex-direction: column; }
	.site-footer__inner { grid-template-columns: 1fr; }
}
