/**
 * 開催情報一覧ブロック
 *
 * すべてのセレクタを .nst-programs 配下に閉じ込めています。テーマの
 * 見出し・リンク・リストのスタイルに引きずられないよう、冒頭でリセットしてから
 * 必要なものだけを指定し直す方針です。
 *
 * 色・余白は CSS 変数で公開しています。テーマ側では
 * .nst-programs { --nst-green: #005bbb; } のように変数を上書きするだけで
 * 調整できます。
 */

.nst-programs {
	--nst-green: #1f6b3a;
	--nst-green-dark: #17532c;
	--nst-blue: #1c5d99;
	--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-programs.nst-programs *,
.nst-programs.nst-programs *::before,
.nst-programs.nst-programs *::after {
	box-sizing: border-box;
}

.nst-programs.nst-programs h2,
.nst-programs.nst-programs h3,
.nst-programs.nst-programs p,
.nst-programs.nst-programs dl,
.nst-programs.nst-programs dt,
.nst-programs.nst-programs dd,
.nst-programs.nst-programs ul,
.nst-programs.nst-programs ol,
.nst-programs.nst-programs li,
.nst-programs.nst-programs figure,
.nst-programs.nst-programs article,
.nst-programs.nst-programs form {
	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-programs.nst-programs h2::before,
.nst-programs.nst-programs h2::after,
.nst-programs.nst-programs h3::before,
.nst-programs.nst-programs h3::after {
	content: none;
	display: none;
}

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

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

.nst-programs.nst-programs button,
.nst-programs.nst-programs select {
	margin: 0;
	font-family: inherit;
	line-height: inherit;
	text-transform: none;
	letter-spacing: normal;
}

/* ---------- 見出しの行 ---------- */
.nst-programs .nst-programs__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	padding: 22px 28px 18px;
}

.nst-programs.nst-programs h2.nst-programs__title {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-shadow: none;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: var(--nst-text);
}

/* ---------- 状態タブ（連結ボタン） ---------- */
.nst-programs .nst-programs__tabs {
	display: inline-flex;
	flex-wrap: wrap;
}

.nst-programs.nst-programs button.nst-programs__tab {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 0 -1px;
	border: 1px solid var(--nst-border-strong);
	border-radius: 0;
	background: var(--nst-surface);
	color: var(--nst-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	padding: 8px 18px;
	cursor: pointer;
	text-shadow: none;
	box-shadow: none;
	transition: background 0.12s, border-color 0.12s;
}

.nst-programs .nst-programs__tabs > :first-child.nst-programs__tab {
	margin-left: 0;
	border-top-left-radius: var(--nst-radius-sm);
	border-bottom-left-radius: var(--nst-radius-sm);
}

.nst-programs .nst-programs__tabs > :last-child.nst-programs__tab {
	border-top-right-radius: var(--nst-radius-sm);
	border-bottom-right-radius: var(--nst-radius-sm);
}

.nst-programs.nst-programs button.nst-programs__tab:hover {
	background: var(--nst-surface-alt);
	color: var(--nst-text);
}

.nst-programs.nst-programs button.nst-programs__tab[aria-selected="true"] {
	position: relative;
	z-index: 1;
	background: var(--nst-green);
	border-color: var(--nst-green);
	color: #fff;
	font-weight: 700;
}

.nst-programs.nst-programs button.nst-programs__tab.is-empty:not([aria-selected="true"]) {
	color: var(--nst-text-faint);
}

.nst-programs.nst-programs button.nst-programs__tab:focus-visible {
	outline: 2px solid var(--nst-blue);
	outline-offset: 2px;
	z-index: 2;
}

.nst-programs .nst-programs__tab-count {
	font-size: 13px;
	opacity: 0.8;
}

/* ---------- 説明文 ---------- */
.nst-programs .nst-programs__bar {
	padding: 0 28px;
}

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

/* ---------- 絞り込み ---------- */
.nst-programs form.nst-programs__filters {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	align-items: end;
	gap: 12px 20px;
	padding: 18px 28px 22px;
	border-bottom: 1px solid var(--nst-border);
}

.nst-programs .nst-filter {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nst-programs .nst-filter__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--nst-text);
	margin-bottom: 7px;
}

.nst-programs.nst-programs select.nst-filter__select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	max-width: none;
	min-height: 0;
	height: auto;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	padding: 11px 38px 11px 14px;
	border: 1px solid var(--nst-border-strong);
	border-radius: var(--nst-radius-sm);
	background-color: var(--nst-surface);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	color: var(--nst-text);
	box-shadow: none;
	text-shadow: none;
	cursor: pointer;
}

.nst-programs.nst-programs select.nst-filter__select:hover {
	border-color: #aeb5bd;
}

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

.nst-programs .nst-filter--actions {
	justify-content: flex-end;
	padding-bottom: 10px;
}

.nst-programs button.nst-programs__reset {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: none;
	padding: 0;
	font-size: 13px;
	font-weight: 400;
	color: var(--nst-text-muted);
	text-decoration: underline;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
}

.nst-programs button.nst-programs__reset:hover {
	color: var(--nst-text);
	background: none;
}

.nst-programs button.nst-filter__submit {
	appearance: none;
	-webkit-appearance: none;
	padding: 9px 18px;
	font-size: 14px;
	border: 1px solid var(--nst-green);
	background: var(--nst-green);
	color: #fff;
	border-radius: var(--nst-radius-sm);
	cursor: pointer;
}

/* ---------- 一覧 ---------- */
.nst-programs .nst-programs__list {
	display: block;
	transition: opacity 0.15s;
}

.nst-programs[aria-busy="true"] .nst-programs__list {
	opacity: 0.45;
}

/* ---------- カード ---------- */
.nst-programs article.nst-card {
	display: grid;
	grid-template-columns: 175px minmax(0, 1fr) 250px;
	border-bottom: 1px solid var(--nst-border);
	background: var(--nst-surface);
}

.nst-programs article.nst-card:last-child {
	border-bottom: 0;
}

/* 講座写真とステータスバッジ */
.nst-programs .nst-card__media {
	padding: 24px 0 24px 28px;
}

.nst-programs .nst-card__thumb {
	position: relative;
	z-index: 0;
}

.nst-programs .nst-card__photo {
	display: block;
	width: 100%;
	height: 100px;
	object-fit: cover;
	border-radius: var(--nst-radius-sm);
	margin: 0;
}

.nst-programs .nst-card__photo--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #dde5ee, #c9d6e4);
	color: #8496a8;
	font-size: 12px;
	line-height: 1.4;
}

.nst-programs .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-programs .nst-badge--ongoing { background: var(--nst-blue); }
.nst-programs .nst-badge--open { background: var(--nst-green); }
.nst-programs .nst-badge--few { background: var(--nst-accent); }
.nst-programs .nst-badge--full { background: #7c848c; }
.nst-programs .nst-badge--cancelled { background: var(--nst-danger); }
.nst-programs .nst-badge--ended { background: #9aa1a9; }

/* 中央：講座情報 */
.nst-programs .nst-card__body {
	padding: 22px 24px;
	min-width: 0;
}

.nst-programs .nst-card__course {
	margin: 0 0 2px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nst-link);
}

.nst-programs h3.nst-card__title {
	margin: 0 0 6px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--nst-text);
}

.nst-programs h3.nst-card__title a {
	color: var(--nst-text);
	background: none;
	text-decoration: none;
}

.nst-programs h3.nst-card__title a:hover {
	color: var(--nst-text);
	text-decoration: underline;
}

.nst-programs .nst-card__subtitle {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--nst-text-muted);
}

.nst-programs dl.nst-card__meta {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

.nst-programs .nst-card__row {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-top: 6px;
}

.nst-programs dt.nst-card__label {
	flex: 0 0 auto;
	width: 3.2em;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	color: var(--nst-text-muted);
}

.nst-programs dd.nst-card__value {
	margin: 0;
	min-width: 0;
	color: var(--nst-text);
}

.nst-programs .nst-card__date {
	font-weight: 700;
}

/* 日程：全日程を1日1行で並べる */
.nst-programs ul.nst-card__dates {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nst-programs .nst-card__date-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 14px;
	margin: 0;
}

.nst-programs .nst-card__date-item + .nst-card__date-item {
	margin-top: 2px;
}

.nst-programs .nst-card__date-item .nst-card__time {
	color: var(--nst-text);
}

.nst-programs .nst-card__sep {
	margin: 0 6px;
	color: var(--nst-text-faint);
}

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

.nst-programs a.nst-card__venue-link:hover {
	text-decoration: underline;
}

.nst-programs .nst-card__map-icon {
	display: inline-block;
	margin-left: 3px;
	vertical-align: -1px;
	line-height: 0;
}

.nst-programs .nst-card__organizer-label {
	margin-right: 5px;
	color: var(--nst-text-muted);
	font-size: 13px;
}

.nst-programs .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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

.nst-programs .nst-instructor-badge {
	display: inline-block;
	background: var(--nst-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 4px 7px;
	border-radius: var(--nst-radius-sm);
	margin-right: 6px;
	vertical-align: 1px;
}

/* 右：申込パネル */
.nst-programs .nst-card__aside {
	padding: 22px 28px 22px 24px;
	background: var(--nst-surface-alt);
	border-left: 1px solid var(--nst-border);
	display: flex;
	flex-direction: column;
}

/*
 * 申込パネル内の文字サイズは1箇所（--nst-aside-size）で決めています。
 * 「参加費」「金額」「定員」「申込締切」をすべて同じ大きさに揃えるためです。
 */
.nst-programs .nst-card__aside {
	--nst-aside-size: 13px;
}

.nst-programs .nst-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.nst-programs dl.nst-card__facts {
	margin: 0 0 14px;
	font-size: var(--nst-aside-size);
	line-height: 1.6;
}

.nst-programs .nst-card__fact {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 4px;
}

.nst-programs .nst-card__fact dt {
	margin: 0;
	color: var(--nst-text-muted);
	font-weight: 400;
}

.nst-programs .nst-card__fact dd {
	margin: 0;
	text-align: right;
	color: var(--nst-text);
}

.nst-programs .nst-card__fact dd.nst-card__deadline {
	color: var(--nst-danger);
	font-weight: 600;
}

.nst-programs .nst-card__fact--fee dd {
	white-space: nowrap;
}

.nst-programs .nst-card__fee-value {
	font-weight: 700;
	color: var(--nst-text);
}

.nst-programs .nst-card__fee-suffix {
	margin-left: 4px;
	font-weight: 400;
	color: var(--nst-text-muted);
}

.nst-programs.nst-programs a.nst-card__apply {
	display: block;
	margin-top: auto;
	padding: 12px 16px;
	background: var(--nst-green);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	border: 0;
	border-radius: var(--nst-radius-sm);
}

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

.nst-programs a.nst-card__apply:focus-visible {
	outline: 2px solid var(--nst-blue);
	outline-offset: 2px;
}

/* ---------- 0件 / ページング / 件数 ---------- */
.nst-programs .nst-programs__empty {
	margin: 0;
	padding: 56px 28px;
	text-align: center;
	color: var(--nst-text-muted);
}

.nst-programs .nst-programs__foot:not(:empty) {
	padding: 18px 28px 22px;
}

.nst-programs .nst-programs__pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}

.nst-programs .nst-programs__pagination a {
	min-width: 36px;
	padding: 7px 10px;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	color: var(--nst-text);
	border: 1px solid var(--nst-border-strong);
	background: var(--nst-surface);
	border-radius: var(--nst-radius-sm);
}

.nst-programs .nst-programs__pagination a[aria-current="page"] {
	background: var(--nst-green);
	border-color: var(--nst-green);
	color: #fff;
	font-weight: 700;
}

.nst-programs .nst-programs__count {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--nst-text-muted);
	text-align: center;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
	.nst-programs form.nst-programs__filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nst-programs article.nst-card {
		grid-template-columns: 140px minmax(0, 1fr);
	}

	.nst-programs .nst-card__aside {
		grid-column: 1 / -1;
		border-left: 0;
		border-top: 1px solid var(--nst-border);
		padding: 18px 28px;
	}

	.nst-programs.nst-programs a.nst-card__apply {
		margin-top: 4px;
	}
}

@media (max-width: 600px) {
	.nst-programs .nst-programs__header,
	.nst-programs .nst-programs__bar {
		padding-left: 18px;
		padding-right: 18px;
	}

	.nst-programs form.nst-programs__filters {
		grid-template-columns: 1fr;
		padding: 16px 18px 18px;
	}

	.nst-programs article.nst-card {
		grid-template-columns: 1fr;
	}

	.nst-programs .nst-card__media {
		padding: 18px 18px 0;
	}

	.nst-programs .nst-card__photo {
		height: 160px;
	}

	.nst-programs .nst-card__body {
		padding: 16px 18px;
	}

	.nst-programs .nst-card__aside {
		padding: 16px 18px;
	}

	.nst-programs h3.nst-card__title {
		font-size: 18px;
	}
}

/* エディタプレビューでは操作を封じる */
.nst-programs--editor-preview {
	pointer-events: none;
	user-select: none;
}
