/* =========================================================
   ZGIS Theme main.css
   構成: tokens → base → layout → components → pages → utilities
   命名: BEMライト(l- レイアウト / c- コンポーネント / p- ページ / u- ユーティリティ)
   ========================================================= */

/* ---------- tokens ---------- */
:root {
	--c-primary: #1B5E8C;
	--c-primary-dark: #0F3A57;
	--c-secondary: #3E9B6E;
	--c-accent: #E8833A;
	--c-accent-dark: #C96A26;
	--c-bg: #F7F9FA;
	--c-surface: #FFFFFF;
	--c-text: #24313A;
	--c-text-sub: #5E6E78;
	--c-line: #DDE5EA;
	--radius-s: 8px;
	--radius-m: 12px;
	--radius-l: 20px;
	--shadow-card: 0 2px 12px rgba(15, 58, 87, 0.08);
	--shadow-card-hover: 0 6px 20px rgba(15, 58, 87, 0.14);
	--font-sans: "Noto Sans JP", "Inter", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
	--maxw: 1120px;
	--maxw-narrow: 760px;
}

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

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

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.8;
	color: var(--c-text);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }

h1, h2, h3, h4 { line-height: 1.4; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: clamp(26px, 4vw, 32px); }
h2 { font-size: clamp(22px, 3.2vw, 26px); }
h3 { font-size: clamp(17px, 2.4vw, 20px); }
p { margin: 0 0 1em; }

:focus-visible {
	outline: 3px solid var(--c-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- layout ---------- */
.l-container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}
.l-container--narrow { max-width: var(--maxw-narrow); }

.l-main { min-height: 60vh; }

/* header */
.l-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--c-line);
}
.l-header__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
}
.l-header__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--c-text);
	font-weight: 700;
}
.l-header__mark { flex: none; }
.l-header__site-name { font-size: 15px; line-height: 1.3; }
.l-header__site-npo {
	display: block;
	font-size: 11px;
	color: var(--c-text-sub);
	font-weight: 500;
}

.l-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: none;
	border: none;
	cursor: pointer;
}
.l-header__toggle-bar {
	display: block;
	height: 2px;
	background: var(--c-primary-dark);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}
.l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(2) { opacity: 0; }
.l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.l-nav { display: flex; align-items: center; gap: 20px; }
.l-nav__list {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.l-nav__list a {
	display: block;
	padding: 8px 12px;
	text-decoration: none;
	color: var(--c-text);
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-s);
}
.l-nav__list a:hover { background: var(--c-bg); color: var(--c-primary); }
.l-nav__actions { display: flex; align-items: center; gap: 10px; }

.l-header__account { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.l-header__account-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
	font-weight: 600;
}
.l-header__logout { font-size: 12px; color: var(--c-text-sub); }

@media (max-width: 1023px) {
	.l-header__toggle { display: flex; }
	.l-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--c-surface);
		border-bottom: 1px solid var(--c-line);
		box-shadow: var(--shadow-card);
		padding: 16px 20px 20px;
		flex-direction: column;
		align-items: stretch;
	}
	.l-nav.is-open { display: flex; }
	.l-nav__list { flex-direction: column; }
	.l-nav__list a { padding: 12px; font-size: 15px; }
	.l-nav__actions { flex-direction: column; align-items: stretch; margin-top: 12px; }
	.l-nav__actions .c-btn { text-align: center; }
}

/* page header */
.l-page-header {
	background: linear-gradient(120deg, var(--c-primary-dark), var(--c-primary));
	color: #fff;
	padding: 44px 0 40px;
	margin-bottom: 28px;
}
.l-page-header__title { margin: 0; color: #fff; }
.l-page-header__subtitle { margin: 6px 0 0; opacity: 0.85; font-size: 14px; }

/* footer */
.l-footer {
	margin-top: 72px;
	background: var(--c-primary-dark);
	color: #cfdde8;
}
.l-footer__inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 32px;
	padding-top: 48px;
	padding-bottom: 40px;
}
.l-footer__name { color: #fff; font-weight: 700; margin-bottom: 8px; }
.l-footer__desc { font-size: 13px; }
.l-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px 24px;
}
.l-footer__list a { color: #cfdde8; text-decoration: none; font-size: 14px; }
.l-footer__list a:hover { color: #fff; text-decoration: underline; }
.l-footer__copy {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	text-align: center;
	padding: 16px 20px;
	font-size: 12px;
}
@media (max-width: 599px) {
	.l-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- components ---------- */

/* buttons */
.c-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	line-height: 1.4;
}
.c-btn--primary { background: var(--c-primary); color: #fff; }
.c-btn--primary:hover { background: var(--c-primary-dark); color: #fff; }
.c-btn--accent { background: var(--c-accent); color: #fff; }
.c-btn--accent:hover { background: var(--c-accent-dark); color: #fff; }
.c-btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.c-btn--outline:hover { background: var(--c-primary); color: #fff; }
.c-btn--ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.c-btn--ghost:hover { background: rgba(255, 255, 255, 0.25); color: #fff; }
.zgis-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--c-primary);
	color: #fff;
	border: none;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.zgis-btn:hover { background: var(--c-primary-dark); }

/* badge */
.c-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 999px;
}
.c-badge--members { background: #e4eef5; color: var(--c-primary-dark); }

/* card grid */
.c-card-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}
@media (min-width: 600px) {
	.c-card-grid--3, .c-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.c-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.c-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* post card */
.c-card {
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}
.c-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.c-card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.c-card__thumb { aspect-ratio: 3 / 2; background: #e8eef2; }
.c-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	color: #b3c4cf;
}
.c-card__body { padding: 16px 18px 20px; }
.c-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
	color: var(--c-text-sub);
	margin-bottom: 6px;
}
.c-card__cat {
	background: #e8f3ed;
	color: var(--c-secondary);
	font-weight: 700;
	font-size: 11px;
	padding: 2px 10px;
	border-radius: 999px;
}
.c-card__title { font-size: 16px; margin: 0 0 8px; }
.c-card__excerpt { font-size: 13px; color: var(--c-text-sub); margin: 0; }
.c-card__excerpt--locked { color: var(--c-primary-dark); }

/* company card */
.c-co-card {
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}
.c-co-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.c-co-card__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	color: inherit;
	text-decoration: none;
}
.c-co-card__logo {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: var(--radius-s);
	background: var(--c-bg);
	overflow: hidden;
	display: grid;
	place-items: center;
}
.c-co-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.c-co-card__logo-fallback {
	font-size: 24px;
	font-weight: 700;
	color: var(--c-primary);
}
.c-co-card__name { font-size: 15px; margin: 0 0 4px; }
.c-co-card__place {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--c-text-sub);
	margin: 0;
}

/* breadcrumb */
.c-breadcrumb { font-size: 12px; margin: 16px 0 24px; }
.c-breadcrumb__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	color: var(--c-text-sub);
}
.c-breadcrumb__item + .c-breadcrumb__item::before { content: "›"; margin: 0 6px; }
.c-breadcrumb__item a { color: var(--c-text-sub); }

/* category tabs */
.c-cat-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
}
.c-cat-tabs__item {
	padding: 7px 18px;
	border-radius: 999px;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	color: var(--c-text);
}
.c-cat-tabs__item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.c-cat-tabs__item.is-active {
	background: var(--c-primary);
	border-color: var(--c-primary);
	color: #fff;
}

/* pagination */
.c-pagination { margin: 40px 0; }
.c-pagination__list {
	list-style: none;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}
.c-pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	text-align: center;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius-s);
	text-decoration: none;
	font-size: 14px;
	color: var(--c-text);
}
.c-pagination .page-numbers.current {
	background: var(--c-primary);
	border-color: var(--c-primary);
	color: #fff;
}
.c-pagination a.page-numbers:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* search form */
.c-searchform {
	display: flex;
	gap: 10px;
	margin: 0 0 32px;
	max-width: 480px;
}
.c-searchform input[type="search"] {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-s);
	font-size: 14px;
	font-family: inherit;
}

/* directory search */
.zgis-dir-search {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr auto;
	gap: 12px;
	align-items: end;
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	padding: 20px;
	margin-bottom: 28px;
}
.zgis-dir-search__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--c-text-sub);
	margin-bottom: 4px;
}
.zgis-dir-search input,
.zgis-dir-search select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-s);
	font-size: 14px;
	font-family: inherit;
	background: #fff;
}
.zgis-dir-search__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.zgis-dir-search__reset { font-size: 12px; white-space: nowrap; }
@media (max-width: 1023px) {
	.zgis-dir-search { grid-template-columns: 1fr 1fr; }
	.zgis-dir-search__row:first-child { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
	.zgis-dir-search { grid-template-columns: 1fr; }
}
.p-dir-count { font-size: 13px; color: var(--c-text-sub); margin-bottom: 16px; }

/* forms (mypage / login) */
.zgis-mypage__section {
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	padding: 28px;
	margin-bottom: 24px;
}
.zgis-mypage__section h2 {
	font-size: 18px;
	border-left: 4px solid var(--c-secondary);
	padding-left: 10px;
}
.zgis-mypage input[type="text"],
.zgis-mypage input[type="email"],
.zgis-mypage input[type="password"],
.zgis-login input[type="text"],
.zgis-login input[type="password"] {
	width: 100%;
	max-width: 420px;
	padding: 10px 14px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-s);
	font-size: 15px;
	font-family: inherit;
}
.zgis-login {
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	padding: 32px;
	max-width: 480px;
	margin: 0 auto 40px;
}
.zgis-login .login-remember { margin: 12px 0; font-size: 13px; }
.zgis-login .button-primary,
.zgis-login input[type="submit"] {
	background: var(--c-primary);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 11px 28px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.zgis-login__lost { font-size: 12px; margin-top: 14px; }
.zgis-form-error {
	background: #fdeeea;
	color: #a1381f;
	padding: 10px 14px;
	border-radius: var(--radius-s);
	font-size: 13px;
}
.zgis-form-success {
	background: #e8f3ed;
	color: #22664a;
	padding: 10px 14px;
	border-radius: var(--radius-s);
	font-size: 13px;
}

/* ---------- pages ---------- */

/* hero */
.p-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: var(--c-primary-dark);
}
.p-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.p-hero__inner {
	position: relative;
	padding-top: clamp(64px, 10vw, 120px);
	padding-bottom: clamp(64px, 10vw, 120px);
	max-width: var(--maxw);
}
.p-hero__lead {
	color: #9fd6bd;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-bottom: 12px;
	font-size: 14px;
}
.p-hero__title {
	color: #fff;
	font-size: clamp(30px, 5.4vw, 46px);
	margin-bottom: 18px;
}
.p-hero__text { max-width: 560px; font-size: 15px; opacity: 0.92; margin-bottom: 28px; }
.p-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* sections */
.p-section { padding: clamp(48px, 7vw, 80px) 0 0; }
.p-section--tint {
	margin-top: clamp(48px, 7vw, 80px);
	padding-bottom: clamp(48px, 7vw, 80px);
	background: #eef3f6;
}
.p-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}
.p-section__title {
	margin: 0;
	position: relative;
	padding-bottom: 10px;
}
.p-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
}
.p-section__more {
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

/* features */
.p-features {
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}
@media (min-width: 600px) { .p-features { grid-template-columns: repeat(3, 1fr); } }
.p-features__item {
	background: var(--c-surface);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-card);
	padding: 28px 24px;
}
.p-features__icon {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #e4eef5, #e8f3ed);
	color: var(--c-primary);
	margin-bottom: 16px;
}
.p-features__title { font-size: 17px; }
.p-features__desc { font-size: 13px; color: var(--c-text-sub); margin: 0; }

/* CTA band */
.p-cta {
	margin-top: 72px;
	background: linear-gradient(120deg, var(--c-primary-dark), var(--c-primary) 60%, #2b7a55);
	color: #fff;
}
.p-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 48px;
	padding-bottom: 48px;
}
.p-cta__title { color: #fff; margin-bottom: 6px; }
.p-cta__desc { margin: 0; opacity: 0.9; font-size: 14px; }
.p-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* article */
.p-article__header { padding-top: 8px; }
.p-article__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
	color: var(--c-text-sub);
	margin-bottom: 10px;
}
.p-article__title { margin-bottom: 8px; }
.p-article__author { font-size: 13px; color: var(--c-text-sub); margin-bottom: 24px; }
.p-article__thumb img { border-radius: var(--radius-m); }
.p-article__toc {
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius-m);
	padding: 18px 22px;
	margin: 24px 0;
	font-size: 14px;
}
.p-article__toc-title { font-weight: 700; margin-bottom: 8px; }
.p-article__toc-list { margin: 0; padding-left: 20px; }
.p-article__content { margin-bottom: 40px; }
.p-article__content h2 {
	border-left: 4px solid var(--c-secondary);
	padding-left: 12px;
	margin-top: 1.8em;
}
.p-article__content img { border-radius: var(--radius-s); }
.p-article__content blockquote {
	border-left: 4px solid var(--c-line);
	margin: 1.2em 0;
	padding: 0.2em 0 0.2em 1.2em;
	color: var(--c-text-sub);
}
.p-article__content table {
	border-collapse: collapse;
	width: 100%;
}
.p-article__content th,
.p-article__content td {
	border: 1px solid var(--c-line);
	padding: 8px 12px;
	font-size: 14px;
}
.p-article__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 32px;
	padding: 0;
}
.p-article__tags a {
	display: inline-block;
	font-size: 12px;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	padding: 4px 12px;
	text-decoration: none;
}
.p-article__nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
	padding: 16px 0;
	margin-bottom: 40px;
	font-size: 13px;
}
.p-article__related { margin-bottom: 24px; }

/* company single */
.p-company__logo {
	width: 160px;
	margin-bottom: 24px;
	background: var(--c-surface);
	border-radius: var(--radius-m);
	padding: 12px;
	box-shadow: var(--shadow-card);
}
.p-company__table {
	width: 100%;
	border-collapse: collapse;
	background: var(--c-surface);
	border-radius: var(--radius-m);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	margin-bottom: 32px;
	font-size: 14px;
}
.p-company__table th,
.p-company__table td {
	text-align: left;
	padding: 14px 18px;
	border-bottom: 1px solid var(--c-line);
	vertical-align: top;
}
.p-company__table th {
	width: 130px;
	background: #eef3f6;
	font-weight: 700;
	white-space: nowrap;
}
.p-company__content { margin-bottom: 32px; }

/* page */
.p-page__content { margin-bottom: 48px; }
.p-page__content h2 {
	border-left: 4px solid var(--c-secondary);
	padding-left: 12px;
	margin-top: 1.8em;
}

.p-404 { text-align: center; padding: 24px 0 48px; }
.p-404 .c-searchform { margin: 24px auto 0; }

/* ---------- utilities ---------- */
.u-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--c-primary-dark);
	color: #fff;
	padding: 10px 18px;
	z-index: 1000;
	border-radius: 0 0 var(--radius-s) 0;
}
.u-skip-link:focus { left: 0; color: #fff; }
.u-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* WPコアブロックの微調整 */
.wp-block-image img { border-radius: var(--radius-s); }
.wp-block-button__link { border-radius: 999px; }
.alignwide { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
