/* ========================================
   ニュースアーカイブページ - news-archive.css
   サイドバー絞り込み機能のスタイル
   ※カードUIはcontent.cssの既存スタイルを使用
   ======================================== */

/* ========================================
   PC版レイアウト (768px以上)
   ======================================== */

/* 2カラムコンテナ */
.news-archive-container {
	display: flex;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* 左サイドバー (250px固定幅) */
.news-sidebar {
	width: 250px;
	flex-shrink: 0;
}

/* モーダルヘッダー (PC版では非表示) */
.news-modal-header {
	display: none;
}

.news-sidebar-inner {
	position: sticky;
	top: 20px;
}

/* キーワード検索ボックス */
.news-search-box {
	margin-bottom: 20px;
}

.news-search-input-wrapper {
	position: relative;
	width: 100%;
}

.news-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #E7141A;
	pointer-events: none;
}

.news-keyword-input {
	width: 100%;
	padding: 14px 18px 14px 40px;
	border: 2px solid #E7141A;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	box-sizing: border-box;
}

.news-keyword-input::placeholder {
	color: #999;
	font-weight: 400;
}

.news-keyword-input:focus {
	outline: none;
	border-color: #c82333;
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* カテゴリーフィルターセクション */
.news-filter-section {
	margin-bottom: 20px;
}

h3.news-filter-title {
	font-size: 16px;
	font-weight: 700;
	color: #E7141A;
	letter-spacing: 0.64px;
	line-height: 1.4;
	margin: 0;
	padding: 17px 15px;
}

h3.news-filter-title:after {
	content: none !important;
	display: none !important;
}

.news-category-list {
	display: flex;
	flex-direction: column;
}

/* チェックボックス */
.news-filter-checkbox {
	display: flex;
	padding: 10px 24px;
	align-items: center;
	gap: 8px;
	align-self: stretch;
	margin-bottom: 0;
	cursor: pointer;
	box-sizing: border-box;
	border-top: 1px solid #E7141A;
}

.news-filter-checkbox:last-child {
	border-bottom: 1px solid #E7141A;
}

.news-filter-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	margin: 0;
	border: 1px solid #E7141A;
	flex-shrink: 0;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: #ffffff;
	border-radius: 2px;
	position: relative;
}

.news-filter-checkbox input[type="checkbox"]:checked {
	background: #E7141A;
	border-color: #E7141A;
}

.news-filter-checkbox input[type="checkbox"]:checked::after {
	content: '\2713';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 12px;
	font-weight: bold;
	line-height: 1;
}

.news-filter-checkbox span {
	cursor: pointer;
	color: #E7141A;
	font-family: 'Noto Sans JP', sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.64px;
}

.news-category-count {
	color: #999;
	font-size: 14px;
}

/* 検索ボタン */
.news-filter-buttons {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 0;
	align-items: center;
}

.news-btn-clear {
	padding: 18px 14px;
	background: #ffffff;
	color: #E7141A;
	border: 1px solid #E7141A;
	border-radius: 25px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.16px;
	cursor: pointer;
	transition: background 0.3s;
	box-sizing: border-box;
	margin-bottom: 0 !important;
	white-space: nowrap;
}

.news-btn-clear:hover {
	background: #f8f9fa;
}

.news-btn-search {
	width: 260px;
	padding: 14px 20px;
	background: #E7141A;
	color: #ffffff;
	border: none;
	border-radius: 9999px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 2.24px;
	cursor: pointer;
	transition: background 0.3s;
	box-sizing: border-box;
	margin-bottom: 0 !important;
}

.news-btn-search:hover {
	background: #c82333;
}

/* 右メインエリア */
.news-main {
	flex: 1;
	min-width: 0;
}

/* カードリストの上書き（content.cssのmax-widthを解除） */
.news-main .news-card-list {
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

/* スマホ版絞り込みボタン (PC版では非表示) */
.news-mobile-filter-button {
	display: none;
}

/* 結果件数表示 */
.news-result-count {
	margin-bottom: 20px;
}

.news-result-count p {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	color: #4A4A4A;
}

/* 結果0件 */
.news-no-results {
	padding: 60px 20px;
	text-align: center;
	font-size: 1.1rem;
	color: #6c757d;
}

/* モーダルオーバーレイ (PC版では非表示) */
.news-filter-modal-overlay {
	display: none;
}

/* モーダル閉じるボタン (PC版では非表示) */
.news-modal-close-button {
	display: none;
}

/* ========================================
   スマホ版レイアウト (767px以下)
   ======================================== */

@media (max-width: 767px) {
	/* コンテナ */
	.news-archive-container {
		flex-direction: column;
		padding: 0 24px;
		gap: 0;
	}

	/* サイドバーをモーダルに変更 */
	.news-sidebar {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: 100%;
		background: #fff;
		z-index: 1000;
		transform: translateY(100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		pointer-events: none;
	}

	/* モーダルが開いているとき */
	.news-sidebar.is-open {
		transform: translateY(0);
		pointer-events: auto;
	}

	/* モーダルヘッダー (スマホ版で表示) */
	.news-modal-header {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		position: relative;
		padding: 60px 24px 12px;
		border-bottom: 1px solid #ebebeb;
		background: #fff;
		flex-shrink: 0;
		z-index: 10;
	}

	.news-modal-close-button {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		left: 17px;
		top: 20px;
		width: 28px;
		height: 28px;
		background: none;
		border: none;
		cursor: pointer;
		padding: 0;
		color: #e7141a;
		margin-bottom: 0 !important;
	}

	.news-modal-close-button svg {
		width: 20px;
		height: 20px;
	}

	h2.news-modal-title {
		font-size: 18px;
		font-weight: 700;
		color: #c8102e;
		letter-spacing: 1.8px;
		line-height: 1;
		margin: 0;
		text-align: center;
	}

	h2.news-modal-title:after {
		content: none !important;
		display: none !important;
	}

	.news-modal-count {
		font-size: 16px;
		font-weight: 400;
		color: #b5b5b5;
		letter-spacing: 0.64px;
		line-height: 1.4;
		padding-top: 8px;
	}

	.news-sidebar-inner {
		position: static;
		padding: 28px 24px 0;
		display: flex;
		flex-direction: column;
		gap: 14px;
		overflow-y: auto;
		flex: 1;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 100px;
	}

	/* キーワード検索ボックス (スマホ版) */
	.news-search-box {
		margin-bottom: 0;
	}

	.news-keyword-input {
		padding: 14px 18px 14px 48px;
		border: 1px solid #E7141A;
	}

	.news-keyword-input::placeholder {
		color: #ccc;
	}

	/* カテゴリーフィルターセクション (スマホ版) */
	.news-filter-section {
		margin-bottom: 0;
	}

	h3.news-filter-title {
		font-size: 14px;
		padding: 10px 12px;
		margin-bottom: 0;
	}

	.news-filter-checkbox {
		padding: 10px 0;
		font-size: 0.85rem;
		margin-bottom: 0;
	}

	/* モーダルオーバーレイ */
	.news-filter-modal-overlay {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease-out;
	}

	.news-filter-modal-overlay.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	/* スマホ版絞り込みボタン */
	.news-mobile-filter-button {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0;
		width: 100%;
		padding: 14px 20px;
		margin-bottom: 20px !important;
		background: #e7141a;
		color: #ffffff;
		border: none;
		border-radius: 9999px;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.4;
		letter-spacing: 2.24px;
		text-align: center;
		cursor: pointer;
		min-height: 44px;
		box-sizing: border-box;
		transition: background 0.3s;
	}

	.news-mobile-filter-button:active,
	.news-mobile-filter-button:hover {
		background: #c82333;
	}

	/* メインエリア */
	.news-main {
		width: 100%;
	}

	/* 結果件数 */
	.news-result-count {
		padding: 10px 15px;
		margin-bottom: 15px;
	}

	.news-result-count p {
		font-size: 0.9rem;
	}

	/* 検索ボタン（モーダルフッター固定） */
	.news-filter-buttons {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		margin: 0;
		padding: 20px 24px;
		gap: 8px;
		background: #fff;
		border-top: 1px solid #ebebeb;
		z-index: 11;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
	}

	.news-btn-clear {
		padding: 18px 14px;
		font-size: 16px;
		font-weight: 500;
		min-height: 44px;
		flex-shrink: 0;
	}

	.news-btn-search {
		padding: 14px 20px;
		font-size: 16px;
		font-weight: 700;
		letter-spacing: 2.24px;
		min-height: 44px;
		flex: 1;
		width: auto;
	}
}

/* ========================================
   タブレット用調整 (768px - 1024px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
	.news-sidebar {
		width: 220px;
	}

	.news-archive-container {
		gap: 30px;
		padding: 0 24px;
	}
}
