/*動画用モーダルとリスト設定*/
/* モーダルの背景（オーバーレイ） */
.modal {
	display: none; /* 初期状態では非表示 */
	position: fixed; /* 画面に固定 */
	z-index: 1000; /* 他の要素より手前に表示 */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto; /* コンテンツが画面より大きい場合にスクロール可能に */
	background-color: rgba(0,0,0,0.8); /* 半透明の黒 */
}

/* モーダルが開いている状態 */
.modal.is-active {
	display: flex; /* Flexboxで中央配置を容易に */
	justify-content: center;
	align-items: center;
}

/* モーダルの内容エリア */
.modal-content {
	background-color: #fefefe;
	padding: 20px;
	border-radius: 8px;
	position: relative;
	/* モーダルの最大幅を設定*/
	max-width: 700px;
	width: 100%;
	max-height: 90%;
	overflow: hidden;
	padding-top: 40px;
}

/* 閉じるボタンのスタイル */
.modal-close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	position: absolute;
	/* ★修正：位置を少し下に調整★ */
	top: 5px; 
	right: 15px;
	text-decoration: none;
	z-index: 1010;
}

.modal-close:hover,
.modal-close:focus {
	color: #EE1D23;
	text-decoration: none;
	cursor: pointer;
}

/* 動画の埋め込みコンテナ（レスポンシブ対応用） */
.video-container {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 のアスペクト比 (9/16 * 100%) */
	height: 0;
	overflow: hidden;
	width: 100%;
	/* モーダルコンテンツの幅を動画に合わせて調整 */
	min-width: 300px; /* スマホ最小幅 */
	max-width: 700px; /* PC最大幅 */
}

.video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* タブボタンのコンテナ */
.tab-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center; /* ボタンを中央に配置 */
	gap: 10px; /* ボタン間のスペース */
	padding: 10px 0;
	margin-top: 15px;
}

/* タブボタンの基本スタイル */
.tab-button {
	background-color: #E9E9E9; /* 非アクティブ時の背景色 */
	padding: 10px 20px; /* パディングを調整 */
	cursor: pointer;
	font-size: 16px; /* フォントサイズを少し小さく */
	font-weight: normal;
	color: black;
	border-radius: 20px; /* **角丸にする** */
	transition: all 0.2s;
	white-space: nowrap;
	text-align: center;
	line-height: 1; /* 行の高さを調整 */
}

/* アクティブなタブボタンのスタイル */
.tab-button.is-active {
	color: #ffffff;
	background-color: #EE1D23;
	font-weight: bold;
}

.tab-button:hover:not(.is-active) {
	color: #ffffff;
	background-color: #EE1D23; /* ホバー時の背景色 */
}

/*サムネイル設定*/
.video-shadow {
	border: 1px solid #999999;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 
				0 10px 10px -5px rgba(0, 0, 0, 0.4);
}
.video-thumbnail {
	max-width: 405.5px;
	width: 100%;
	margin: 0 auto;
}

/* 1081px以上の場合に列を分ける設定 */
@media (min-width: 1081px) {
	/* .grid を付けることで優先順位を上げます */
	.grid.custom-grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
	.grid.custom-grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* 1080px以下でサムネイルを中央寄せ・幅調整する場合 */
@media (max-width: 1080px) {
	.video-thumbnail {
		max-width: 767px; 
	}
}