/**
 * 開催情報 詳細ページ
 *
 * すべてのセレクタを .nst-detail 配下に閉じ込めています。テーマの
 * 見出し・リンク・リストのスタイルに引きずられないよう、冒頭でリセットしてから
 * 必要なものだけを指定し直す方針です。
 *
 * 色・余白は CSS 変数で公開しています。レイアウト固有のものは
 * .nst-detail--sidebar のようなモディファイアに閉じています。
 */

.nst-detail {
	--nst-green: #1f6b3a;
	--nst-green-dark: #17532c;
	--nst-navy: #1d3f73;
	--nst-link: #2265a8;
	--nst-text: #1f2328;
	--nst-text-muted: #6b7280;
	--nst-text-faint: #9aa1a9;
	--nst-border: #e3e6ea;
	--nst-border-strong: #cfd4da;
	--nst-surface: #fff;
	--nst-surface-alt: #f7f8f9;
	--nst-danger: #c0392b;
	--nst-accent: #d98014;
	--nst-sat: #1c6fd0;
	--nst-sun: #d03a3a;
	--nst-radius: 8px;
	--nst-radius-sm: 4px;

	max-width: 1100px;
	margin: 0 auto;
	padding: 0;
	color: var(--nst-text);
	font-size: 15px;
	line-height: 1.7;
	text-align: left;
	background: var(--nst-surface);
	border: 1px solid var(--nst-border);
	border-radius: var(--nst-radius);
	overflow: hidden;
}

/* ---------- テーマの影響を打ち消すリセット ---------- */
.nst-detail.nst-detail *,
.nst-detail.nst-detail *::before,
.nst-detail.nst-detail *::after {
	box-sizing: border-box;
}

.nst-detail.nst-detail h1,
.nst-detail.nst-detail h2,
.nst-detail.nst-detail h3,
.nst-detail.nst-detail p,
.nst-detail.nst-detail dl,
.nst-detail.nst-detail dt,
.nst-detail.nst-detail dd,
.nst-detail.nst-detail ul,
.nst-detail.nst-detail ol,
.nst-detail.nst-detail li,
.nst-detail.nst-detail figure,
.nst-detail.nst-detail section,
.nst-detail.nst-detail nav {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	font-style: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-align: inherit;
	text-transform: none;
	list-style: none;
}

/* テーマが見出しに付ける装飾（下線バーなど）を消す */
.nst-detail.nst-detail h1::before,
.nst-detail.nst-detail h1::after,
.nst-detail.nst-detail h2::before,
.nst-detail.nst-detail h2::after,
.nst-detail.nst-detail h3::before,
.nst-detail.nst-detail h3::after {
	content: none;
	display: none;
}

.nst-detail.nst-detail a {
	color: inherit;
	text-decoration: none;
	background: none;
	border: 0;
	box-shadow: none;
}

.nst-detail.nst-detail img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* ---------- パンくず ---------- */
.nst-detail nav.nst-detail__breadcrumb {
	padding: 16px 28px;
	border-bottom: 1px solid var(--nst-border);
	font-size: 13px;
	line-height: 1.6;
}

.nst-detail .nst-detail__breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.nst-detail .nst-detail__breadcrumb li {
	margin: 0;
	color: var(--nst-text-muted);
}

.nst-detail .nst-detail__breadcrumb li + li::before {
	content: "\203A";
	display: inline;
	margin-right: 8px;
	color: var(--nst-text-faint);
}

.nst-detail .nst-detail__breadcrumb a {
	color: var(--nst-link);
	text-decoration: none;
}

.nst-detail .nst-detail__breadcrumb a:hover {
	text-decoration: underline;
}

/* ---------- 本文の枠 ---------- */
.nst-detail .nst-detail__main {
	padding: 28px;
	min-width: 0;
}

.nst-detail--table > .nst-detail__header,
.nst-detail--stacked > .nst-detail__header,
.nst-detail--table > .nst-detail__hero,
.nst-detail--stacked > .nst-detail__hero,
.nst-detail--table > .nst-detail__section,
.nst-detail--stacked > .nst-detail__section {
	margin-left: 28px;
	margin-right: 28px;
}

.nst-detail--table > .nst-detail__header,
.nst-detail--stacked > .nst-detail__header {
	margin-top: 28px;
}

/* ---------- ヘッダ ---------- */
.nst-detail .nst-detail__header {
	margin-bottom: 20px;
}

/* バッジとタイトルを同じ行に並べる */
.nst-detail .nst-detail__headline {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.nst-detail .nst-detail__badges {
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
}

.nst-detail .nst-detail__course {
	font-size: 13px;
	color: var(--nst-text-muted);
}

.nst-detail h1.nst-detail__title {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.01em;
	color: var(--nst-text);
}

.nst-detail .nst-detail__subtitle {
	margin: 10px 0 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--nst-text-muted);
}

.nst-detail .nst-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 5px 10px;
	border-radius: var(--nst-radius-sm);
	color: #fff;
	white-space: nowrap;
}

.nst-detail .nst-badge--ongoing { background: var(--nst-navy); }
.nst-detail .nst-badge--open { background: var(--nst-green); }
.nst-detail .nst-badge--few { background: var(--nst-accent); }
.nst-detail .nst-badge--full { background: #7c848c; }
.nst-detail .nst-badge--cancelled { background: var(--nst-danger); }
.nst-detail .nst-badge--ended { background: #9aa1a9; }

/* ---------- メイン写真 ---------- */
.nst-detail figure.nst-detail__hero {
	margin: 0 0 32px;
	border-radius: var(--nst-radius);
	overflow: hidden;
}

/* 比率は指定せず、幅だけ枠に合わせる（上下が切れないように） */
.nst-detail .nst-detail__hero img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: fill;
}

.nst-detail .nst-detail__hero-empty {
	display: flex;
	width: 100%;
	min-height: 240px;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #dde5ee, #c9d6e4);
	color: #8496a8;
	font-size: 13px;
}

/* ---------- セクション ---------- */
.nst-detail .nst-detail__section {
	margin-bottom: 32px;
}

.nst-detail h2.nst-detail__section-title {
	margin: 0 0 4px;
	padding: 0 0 10px;
	background: none;
	border: 0;
	border-bottom: 2px solid var(--nst-green);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--nst-text);
}

/* ---------- 開催概要の行 ---------- */
.nst-detail dl.nst-detail__rows {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
}

.nst-detail.nst-detail .nst-detail__row {
	display: grid;
	grid-template-columns: 100px minmax(0, 1fr);
	gap: 8px 24px;
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid var(--nst-border);
}

.nst-detail .nst-detail__row:last-child {
	border-bottom: 0;
}

.nst-detail.nst-detail dt.nst-detail__row-label {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.7;
	color: var(--nst-text-muted);
}

.nst-detail.nst-detail dd.nst-detail__row-value {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	min-width: 0;
	line-height: 1.7;
	color: var(--nst-text);
}

/* 日程 */
.nst-detail ul.nst-detail__schedule {
	margin: 0;
	padding: 0;
}

.nst-detail .nst-detail__schedule-item {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
}

.nst-detail .nst-detail__schedule-item + .nst-detail__schedule-item {
	margin-top: 8px;
}

.nst-detail .nst-detail__schedule-date {
	font-weight: 700;
	min-width: 8.5em;
}

.nst-detail .nst-detail__schedule-time {
	min-width: 7.5em;
}

.nst-detail .nst-detail__schedule-day {
	padding: 2px 9px;
	border-radius: var(--nst-radius-sm);
	background: #eef2f6;
	color: #55606b;
	font-size: 12px;
	line-height: 1.6;
}

.nst-detail .nst-detail__schedule-note {
	color: var(--nst-text-muted);
	font-size: 13px;
}

.nst-detail .is-sat { color: var(--nst-sat); }
.nst-detail .is-sun { color: var(--nst-sun); }

/* 会場 */
.nst-detail .nst-detail__venue-name {
	margin: 0;
}

.nst-detail .nst-detail__venue-address,
.nst-detail .nst-detail__venue-access,
.nst-detail .nst-detail__venue-map {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--nst-text-muted);
}

.nst-detail .nst-detail__venue-map a {
	color: var(--nst-link);
	text-decoration: underline;
}

/* 申込締切 */
.nst-detail .nst-detail__deadline-closed {
	display: inline-block;
	margin-left: 10px;
	padding: 2px 10px;
	border-radius: var(--nst-radius-sm);
	background: #fdecec;
	color: var(--nst-danger);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}

/* 受講料 */
.nst-detail .nst-detail__fee {
	font-size: 18px;
	font-weight: 700;
}

.nst-detail .nst-detail__fee-note {
	margin-left: 6px;
	font-size: 14px;
	color: var(--nst-text-muted);
}

/* ---------- 講師 ---------- */
.nst-detail .nst-instructor {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding-top: 18px;
}

.nst-detail .nst-instructor__photo {
	flex: 0 0 auto;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	overflow: hidden;
	background: #dde5ee;
}

.nst-detail .nst-instructor__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nst-detail .nst-instructor__photo-empty {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	color: #8496a8;
	font-size: 11px;
}

.nst-detail .nst-instructor__body {
	flex: 1 1 auto;
	min-width: 0;
}

.nst-detail .nst-instructor__name {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0 0 6px;
}

.nst-detail .nst-instructor__fullname {
	font-size: 17px;
	font-weight: 700;
}

.nst-detail .nst-instructor__tagline {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--nst-text-muted);
}

.nst-detail .nst-instructor__youtube {
	margin: 6px 0 0;
	font-size: 14px;
}

.nst-detail .nst-instructor__youtube a {
	color: var(--nst-link);
	text-decoration: underline;
}

.nst-detail .nst-instructor-badge {
	display: inline-block;
	background: var(--nst-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 4px 8px;
	border-radius: var(--nst-radius-sm);
}

/* ---------- 本文 ---------- */
.nst-detail .nst-detail__description {
	padding-top: 16px;
	font-size: 15px;
	line-height: 1.8;
}

.nst-detail .nst-detail__description p {
	margin: 0 0 12px;
}

.nst-detail .nst-detail__description ul,
.nst-detail .nst-detail__description ol {
	margin: 0 0 12px;
	padding-left: 1.4em;
	list-style: disc;
}

.nst-detail .nst-detail__description ol {
	list-style: decimal;
}

.nst-detail .nst-detail__description li {
	margin-bottom: 6px;
	list-style: inherit;
}

.nst-detail .nst-detail__description a {
	color: var(--nst-link);
	text-decoration: underline;
}

.nst-detail .nst-detail__description strong {
	font-weight: 700;
}

/* ---------- 申込カード ---------- */
.nst-detail .nst-entry-box {
	background: var(--nst-surface-alt);
	border: 1px solid var(--nst-border);
	border-radius: var(--nst-radius);
	padding: 22px;
}

.nst-detail .nst-entry-box__fee-label {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nst-text-muted);
}

.nst-detail .nst-entry-box__fee {
	margin: 4px 0 18px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--nst-text);
}

.nst-detail dl.nst-entry-box__facts {
	margin: 0 0 20px;
	padding-top: 16px;
	border-top: 1px solid var(--nst-border-strong);
	font-size: 14px;
	line-height: 1.6;
}

.nst-detail .nst-entry-box__fact {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
}

.nst-detail .nst-entry-box__fact dt {
	margin: 0;
	color: var(--nst-text-muted);
	font-weight: 400;
	flex: 0 0 auto;
}

.nst-detail .nst-entry-box__fact dd {
	margin: 0;
	text-align: right;
	min-width: 0;
	color: var(--nst-text);
}

.nst-detail .nst-entry-box__fact dd.is-alert {
	color: var(--nst-danger);
	font-weight: 700;
}

.nst-detail .nst-entry-box__note {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--nst-text-muted);
}

.nst-detail a.nst-button {
	display: block;
	padding: 14px 16px;
	border-radius: var(--nst-radius-sm);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	border: 0;
}

.nst-detail a.nst-button + a.nst-button {
	margin-top: 10px;
}

.nst-detail a.nst-button--primary {
	background: var(--nst-green);
	color: #fff;
}

.nst-detail a.nst-button--primary:hover {
	background: var(--nst-green-dark);
	color: #fff;
	text-decoration: none;
}

.nst-detail a.nst-button--outline {
	background: var(--nst-surface);
	border: 1px solid var(--nst-border-strong);
	color: var(--nst-link);
}

.nst-detail a.nst-button--outline:hover {
	background: #f0f3f6;
	color: var(--nst-link);
	text-decoration: none;
}

.nst-detail a.nst-button:focus-visible {
	outline: 2px solid var(--nst-navy);
	outline-offset: 2px;
}

/* ---------- 申込フォーム ---------- */
.nst-detail .nst-detail__form {
	padding: 0 28px 28px;
}

.nst-detail .nst-entry-form {
	padding-top: 24px;
	border-top: 1px solid var(--nst-border);
}

.nst-detail .nst-entry-unavailable {
	margin: 0;
	padding: 14px 16px;
	background: #f0f2f4;
	border-radius: var(--nst-radius-sm);
	color: var(--nst-text-muted);
	font-size: 14px;
	line-height: 1.6;
	text-align: center;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
	.nst-detail .nst-detail__columns {
		grid-template-columns: 1fr;
	}

	.nst-detail .nst-detail__aside {
		position: static;
		padding: 0 28px 28px;
	}
}

@media (max-width: 600px) {
	.nst-detail nav.nst-detail__breadcrumb,
	.nst-detail .nst-detail__main {
		padding-left: 18px;
		padding-right: 18px;
	}

	.nst-detail .nst-detail__aside,
	.nst-detail .nst-detail__form {
		padding-left: 18px;
		padding-right: 18px;
	}

	.nst-detail--table > .nst-detail__header,
	.nst-detail--stacked > .nst-detail__header,
	.nst-detail--table > .nst-detail__hero,
	.nst-detail--stacked > .nst-detail__hero,
	.nst-detail--table > .nst-detail__section,
	.nst-detail--stacked > .nst-detail__section {
		margin-left: 18px;
		margin-right: 18px;
	}

	.nst-detail h1.nst-detail__title {
		font-size: 23px;
	}

	.nst-detail .nst-detail__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.nst-detail .nst-instructor {
		gap: 14px;
	}

	.nst-detail .nst-instructor__photo {
		width: 64px;
		height: 64px;
	}
}

/* ---------------------------------------------------------------------
 * Contact Form 7 の申込フォーム
 *
 * CF7 とテーマが出すマークアップ（dl / dt / dd と p の入れ子）に合わせて
 * 整えています。項目名は入力欄と同じ line-height を持たせることで、
 * 高さの中央に揃えています。
 * ------------------------------------------------------------------ */

.nst-detail .nst-entry-form {
	--nst-input-height: 46px;
}

.nst-detail .nst-entry-form .wpcf7 {
	margin: 40px 20px;
}

.nst-detail .nst-entry-form form {
	margin: 0;
}

.nst-detail .nst-entry-form .screen-reader-response {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---- 項目の並び ---- */
.nst-detail.nst-detail .nst-entry-form dl {
	margin: 0 0 22px;
	padding: 0;
	overflow: hidden;
	font-size: 15px;
	color: var(--nst-text-muted);
}

.nst-detail.nst-detail .nst-entry-form dt {
	float: left;
	clear: left;
	width: 190px;
	margin: 0 0 14px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	/* 入力欄の高さと同じ行送りにして、上下中央に見えるようにする */
	line-height: var(--nst-input-height);
	color: var(--nst-text);
}

.nst-detail.nst-detail .nst-entry-form dt p {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.nst-detail.nst-detail .nst-entry-form dd {
	margin: 0 0 14px 206px;
	padding: 0;
}

.nst-detail.nst-detail .nst-entry-form dd p {
	margin: 0;
	padding: 0;
	line-height: 1.5;
}

.nst-detail .nst-entry-form .wpcf7-form-control-wrap {
	display: block;
}

/* ---- 入力欄 ---- */
.nst-detail.nst-detail .nst-entry-form input[type="text"],
.nst-detail.nst-detail .nst-entry-form input[type="email"],
.nst-detail.nst-detail .nst-entry-form input[type="tel"],
.nst-detail.nst-detail .nst-entry-form input[type="url"],
.nst-detail.nst-detail .nst-entry-form input[type="number"],
.nst-detail.nst-detail .nst-entry-form input[type="date"],
.nst-detail.nst-detail .nst-entry-form select,
.nst-detail.nst-detail .nst-entry-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	height: var(--nst-input-height);
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--nst-border-strong);
	border-radius: var(--nst-radius-sm);
	background: var(--nst-surface);
	color: var(--nst-text);
	font-family: inherit;
	font-size: 15px;
	line-height: calc(var(--nst-input-height) - 2px);
	box-shadow: none;
}

.nst-detail.nst-detail .nst-entry-form textarea {
	height: auto;
	min-height: 150px;
	padding: 12px 14px;
	line-height: 1.7;
	resize: vertical;
}

.nst-detail.nst-detail .nst-entry-form input:focus,
.nst-detail.nst-detail .nst-entry-form select:focus,
.nst-detail.nst-detail .nst-entry-form textarea:focus {
	border-color: var(--nst-green);
	outline: 2px solid transparent;
	box-shadow: 0 0 0 3px rgba(31, 107, 58, 0.15);
}

/* ---- 送信・リセット（同じ行に並べる） ---- */
.nst-detail .nst-entry-form .submitBtn {
	margin-top: 4px;
}

.nst-detail.nst-detail .nst-entry-form .submitBtn p {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.nst-detail.nst-detail .nst-entry-form input.wpcf7-submit {
	display: inline-block;
	width: auto;
	min-width: 220px;
	margin: 0;
	padding: 13px 30px;
	border: 0;
	border-radius: var(--nst-radius-sm);
	background: var(--nst-green);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
}

.nst-detail.nst-detail .nst-entry-form input.wpcf7-submit:hover {
	background: var(--nst-green-dark);
}

.nst-detail.nst-detail .nst-entry-form input[type="reset"],
.nst-detail.nst-detail .nst-entry-form input[type="button"] {
	display: inline-block;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 13px 24px;
	border: 1px solid var(--nst-border-strong);
	border-radius: var(--nst-radius-sm);
	background: var(--nst-surface);
	color: var(--nst-text-muted);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	box-shadow: none;
	cursor: pointer;
}

.nst-detail.nst-detail .nst-entry-form input[type="reset"]:hover {
	background: #f0f3f6;
	color: var(--nst-text);
}

.nst-detail .nst-entry-form .wpcf7-spinner {
	margin: 0;
}

/* ---- 検証メッセージ ---- */
.nst-detail.nst-detail .nst-entry-form .wpcf7-not-valid-tip {
	margin-top: 5px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--nst-danger);
}

.nst-detail.nst-detail .nst-entry-form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border-radius: var(--nst-radius-sm);
	font-size: 14px;
	line-height: 1.7;
}

.nst-detail .nst-entry-form .wpcf7-not-valid {
	border-color: var(--nst-danger);
}

@media (max-width: 700px) {
	.nst-detail.nst-detail .nst-entry-form dt {
		float: none;
		width: auto;
		margin-bottom: 6px;
		line-height: 1.6;
	}

	.nst-detail.nst-detail .nst-entry-form dd {
		margin-left: 0;
	}

	.nst-detail.nst-detail .nst-entry-form input.wpcf7-submit {
		min-width: 0;
		flex: 1 1 auto;
	}
}
