@charset "UTF-8";

:root {
	--ta-green: #008238;
	--ta-lime: #a8e063;
	--ta-light-bg: #f7f7f7;
	--ta-orange: #f39800;
}

body {
	margin: 0;
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
	color: #333;
	line-height: 1.8;
	background-color: #fff;
}

.inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
	z-index: 2;
}

/* --- ヘッダー：ロゴの左寄せ修正 --- */
.site-header {
	padding: 24px 0;
	background: #fff;
	position: relative;
	z-index: 10;
	border-bottom: 1px solid #eee;
}

.logo img {
	height: 32px;
	width: auto;
	display: block;
	margin-left: 0;
	margin-right: 0;
}

/* --- 講座紹介セクション (hd-page) --- */
.hd-page {
	position: relative;
	background: linear-gradient(135deg, var(--ta-green) 0%, var(--ta-lime) 100%);
	background-image:
		repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.05) 20%, transparent 20%, transparent 40%),
		linear-gradient(135deg, var(--ta-green) 0%, var(--ta-lime) 100%);
	color: #fff;
	padding: 60px 0 160px;
	/* 文字下の背景を広く確保 */
	overflow: hidden;
}

.hd-page::after {
	content: "";
	position: absolute;
	bottom: -70px;
	left: 50%;
	width: 150%;
	height: 150px;
	background-color: #fff;
	border-radius: 50% 50% 0 0;
	transform: translateX(-50%);
	z-index: 1;
}

.hd-page__title--parent {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 8px;
	line-height: 1.2;
}

.hd-page__title--self {
	font-size: clamp(32px, 5vw, 48px);
	margin: 0;
	font-weight: 800;
	text-shadow: none;
	line-height: 1.2;
	letter-spacing: 0.05em;
}

.content-main {
	padding-top: 40px;
}

/* --- 見出しスタイル7 --- */
.is-style-hd-style7 {
	background-color: #3C9522 !important;
	color: #ffffff !important;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	text-align: center;
	padding: 15px 20px;
	margin: 0 0 40px;
	font-weight: 700;
	line-height: 1.25;
	font-size: clamp(18px, 3.5vw, 24px);
	box-sizing: border-box;
	display: block;
}

.intro-description {
	text-align: left;
	margin: 40px 0 60px;
	font-size: 1rem;
	line-height: 1.9;
}

/* 2. 見出しスタイルの明示的な定義 */
/* trial_new.cssにある定義を補強し、HTMLの構造に合わせます */
h2.wp-block-heading.is-style-hd-style7 {
	background-color: #3C9522 !important;
	color: #ffffff !important;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	text-align: center;
	padding: 15px 20px;
	margin: 0 0 40px;
	font-weight: 700;
	line-height: 1.25;
	font-size: clamp(18px, 3.5vw, 24px);
	display: block;
}

/* --- 教材グリッド --- */
.textbook-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
	margin-bottom: 80px;
}

.textbook-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.textbook-img {
	width: 100%;
	max-width: 260px;
	/* A5/B5共通の比率「1 : 1.414」に固定 */
	aspect-ratio: 1 / 1.414;

	margin: 0 auto 25px;
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.textbook-img img {
	width: 100%;
	height: 100%;
	/* 左右の余白を消すための重要設定：
       coverにすることで、数ピクセルの余白の差を無視して枠を埋め尽くします
    */
	object-fit: cover;

	box-shadow: none !important;
	margin-bottom: 0 !important;
}

.textbook-detail h3 {
	display: block;
	text-align: center;
	color: var(--ta-green);
	margin-bottom: 15px;
	font-size: 1.25rem;
	line-height: 1.6;
}

.textbook-detail p {
	text-align: left;
	font-size: 0.95rem;
	margin-bottom: 25px;
}

.btn-retail {
	display: inline-block;
	background: var(--ta-orange);
	color: #fff;
	padding: 12px 40px;
	text-decoration: none;
	border-radius: 30px;
	font-weight: bold;
	transition: 0.3s;
}

.label-category {
	display: inline-block;
	vertical-align: middle;
	font-size: 0.75rem;
	font-weight: bold;
	line-height: 1;
	padding: 3px 6px;
	margin-right: 8px;
	color: #fff;
	border-radius: 2px;
	white-space: nowrap;
}

.label-daisotsu {
	background-color: #00a0e9;
}

.label-kosotsu {
	background-color: #9b7cb6;
}

/* 準備中専用のスタイル */
.btn-retail.is-preparing {
	background-color: #ccc;
	/* グレーアウト */
	cursor: not-allowed;
	/* マウスカーソルを禁止マークに */
	pointer-events: none;
	/* クリックイベントを完全に無効化 */
	opacity: 0.7;
}

/* --- テーブルのモダンデザイン --- */
table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 20px 0 40px;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
}

table th,
table td {
	padding: 15px 20px;
	border-bottom: 1px solid #eee;
}

table th {
	background-color: #f8fbf9;
	color: var(--ta-green);
	font-weight: bold;
	text-align: left;
	width: 30%;
	vertical-align: middle;
}

table tr:last-child th,
table tr:last-child td {
	border-bottom: none;
}

/* 共通：インラインブロック化と余白の設定 */
table td a,
table td span.upcoming {
	display: inline-block;
	padding: 5px 10px;
	/* ここを共通にすることで頭位置が揃います */
	border-radius: 4px;
	line-height: 1.5;
	/* 行高を揃えるとさらに安定します */
	vertical-align: middle;
}

/* 公開中（リンク）の固有スタイル */
table td a {
	color: #0070cc;
	text-decoration: none;
	transition: 0.2s;
}

table td a:hover {
	background-color: #e6f2ff;
	text-decoration: underline;
}

/* 配信予定（テキスト）の固有スタイル */
table td span.upcoming {
	color: #333;
}

/* 1. 画像の下に余白を追加（テーブルやカウントダウンとの間隔） */
main img {
	margin-bottom: 60px;
	/* 他のセクションの間隔と合わせた設定 */
}

/* 2. 見出しスタイルの明示的な定義 */
/* trial_new.cssにある定義を補強し、HTMLの構造に合わせます */
h2.wp-block-heading.is-style-hd-style7 {
	background-color: #3C9522 !important;
	color: #ffffff !important;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	text-align: center;
	padding: 15px 20px;
	margin: 0 0 40px;
	font-weight: 700;
	line-height: 1.25;
	font-size: clamp(18px, 3.5vw, 24px);
	display: block;
}

@media (max-width: 768px) {

	/* テーブルをブロック要素に変更して縦並びにする */
	table,
	tbody,
	tr,
	th,
	td {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}

	table {
		border: none;
		/* 外枠を消してスッキリさせる */
	}

	tr {
		margin-bottom: 20px;
		/* 特集ごとの隙間 */
		border: 1px solid #ddd;
		border-radius: 8px;
		overflow: hidden;
		background: #fff;
	}

	th {
		background-color: var(--ta-green) !important;
		/* スマホではヘッダー色を濃くして区切りを明確に */
		color: #fff !important;
		padding: 10px 15px;
		font-size: 0.9rem;
	}

	th br {
		display: none;
		/* スマホでは改行を消して一行に */
	}

	td {
		padding: 10px;
	}

	/* リンクをボタンのように大きくしてタップしやすくする */
	table td a {
		display: block;
		width: 100%;
		margin-bottom: 8px;
		padding: 12px 10px;
		background: #f9f9f9;
		border: 1px solid #eee;
		border-radius: 5px;
		font-size: 0.9rem;
		line-height: 1.4;
	}

	table td a:last-child {
		margin-bottom: 0;
	}

	/* 「①」「②」などの数字付きリンクの先頭を揃える */
	table td br {
		display: none;
		/* 余計な改行を消す */
	}
}

/* --- 正誤情報のリンクボタン --- */
.seigo-links {
	list-style: none;
	padding: 0;
	display: flex;
	gap: 20px;
	margin: 40px 0;
	flex-wrap: wrap;
}

.seigo-links li {
	flex: 1;
	min-width: 280px;
}

.seigo-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 2px solid #eee;
	color: #444;
	text-decoration: none;
	padding: 15px 20px;
	border-radius: 8px;
	font-weight: bold;
	transition: 0.3s;
	text-align: center;
}

.seigo-links a:hover {
	background: var(--ta-green);
	color: #fff;
	border-color: var(--ta-green);
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 130, 56, 0.2);
}

/* アーカイブリンクのコンテナ */
.archive-links {
	display: grid;
	/* グリッドレイアウトを採用 */
	grid-template-columns: 1fr;
	/* スマホでは1列 */
	gap: 10px;
	/* ボタン同士の隙間 */
	margin: 20px 0 40px 0;
}

/* ボタンの共通スタイル */
.archive-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 15px;
	text-decoration: none;
	color: #555;
	background: #f8f9fa;
	/* 薄いグレーの背景 */
	border: 1px solid #ddd;
	/* 軽い枠線 */
	border-radius: 5px;
	font-size: 0.9rem;
	transition: all 0.2s;
}

/* ホバー・タップ時の反応 */
.archive-links a:hover {
	background-color: #e9ecef;
	border-color: #ccc;
}

/* 【重要】PC表示（画面幅が600px以上）の設定 */
@media (min-width: 600px) {
	.archive-links {
		display: flex;
		/* gridからflexに変更 */
		flex-wrap: wrap;
		/* 折り返しを許可 */
		justify-content: center;
		/* ★これが「完全中央寄せ」のキモです */
		gap: 15px;
		/* ボタン同士の隙間 */
		margin: 20px auto 40px auto;
		/* 上下に余白、左右は自動で中央 */
		width: 100%;
		/* 親要素の幅いっぱいに広げる */
	}

	.archive-links a {
		/* 3つ並んだ時に均等になるよう幅を調整 */
		/* (100% - 隙間15px * 2) / 3 = 約31.3% */
		flex: 0 1 calc(31% - 10px);

		/* ボタンが小さくなりすぎないための最低幅 */
		min-width: 200px;

		/* ボタンが大きくなりすぎないための最大幅（お好みで） */
		max-width: 300px;
	}
}

/* メニューに戻るボタンだけ少し色を変えて区別（任意） */
.btn-back {
	background-color: #eee !important;
	font-weight: bold;
}

.archive-section-title {
	text-align: center;
	/* ボタンが中央寄せならタイトルも中央に */
	font-size: 1.1rem;
	font-weight: bold;
	margin-bottom: 15px;
	/* ボタンとの隙間 */
	color: #333;
}

.archive-intro {
	text-align: center;
	font-size: 0.95rem;
	margin-bottom: 20px;
	color: #666;
	line-height: 1.6;
}

/* --- フッター --- */
.site-footer {
	background-color: #d9e4df;
	color: #333;
	text-align: center;
	padding: 40px 0;
}

.footer-logo img {
	height: 32px;
	width: auto;
	margin-bottom: 20px;
}

.footer__copyright {
	font-size: 12px;
	color: #666;
}

/* --- 上に戻るボタン --- */
.page-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100;
}

.page-top__link {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 50px;
	background-color: rgba(0, 130, 56, 0.7);
	border-radius: 50%;
	transition: 0.3s;
}

.arrow-up {
	display: block;
	width: 12px;
	height: 12px;
	border-top: 3px solid #fff;
	border-left: 3px solid #fff;
	transform: rotate(45deg);
	margin-top: 5px;
}

/* --- レスポンシブ設定 --- */
@media (max-width: 900px) {
	.site-header {
		padding: 16px 0;
	}

	.logo img,
	.footer-logo img {
		height: 26px;
	}

	.hd-page {
		padding: 40px 0 80px;
	}

	.hd-page::after {
		height: 80px;
		bottom: -40px;
	}

	.hd-page__title--parent {
		font-size: 14px;
	}

	.hd-page__title--self {
		font-size: 28px;
	}

	.textbook-grid {
		grid-template-columns: 1fr;
	}
}

@media print {

	/* 1. ボタンとフッターの間の余白を確保 */
	.content-main::after {
		content: "";
		display: block;
		height: 50px;
	}

	/* 2. もしボタンが途中で切れるのを防ぎたい場合はこれも追加 */
	.textbook-card {
		break-inside: avoid;
	}
}

.mark {
	text-decoration: none;
	/* 下線を消すとよりアプリっぽくなります */
}

.mark::before {
	content: "▶";
	color: inherit;
	/* テキストと色を合わせる */
	font-size: 0.75em;
	/* 控えめなサイズに */
	margin-right: 0.5em;
	/* 詰まりすぎないように余白を確保 */
	display: inline-block;
	transform: translateY(-1px);
	/* 1pxだけ上に持ち上げて中心を合わせる */
}

.mark:hover {
	text-decoration: underline;
	/* ホバー時のみ下線を出す */
	opacity: 0.8;
}

.highlight {
	background: linear-gradient(transparent 60%, #ffff00 60%);
	/* 下半分に薄い黄色 */
	font-weight: bold;
}