/* 背景画像グリッド */
.background-grid {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	max-width: 1400px;
	margin: 0 auto;
	left: 50%;
	transform: translateX(-50%);
}

.background-grid .grid-item {
	width: 25%;
	padding-bottom: 25%;
	position: relative;
}

.background-grid img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 背景オーバーレイ */
.background-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0.1;
	opacity: 0.8;
	transition: background-color 0.1s ease;
	max-width: 1400px;
	margin: 0 auto;
	left: 50%;
	transform: translateX(-50%);
}

.margin-theme {
	background-color: #5782D3;
}

/* --------------------------------
    movieセクション
-------------------------------- */

.movie-title{
	-webkit-text-fill-color: #fff;
	text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

.movie-label {
	font-weight: bold;
	-webkit-text-fill-color: #fff;
	text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

/* ページコンテンツ */
.margin-wrapper {
	margin: 0 6.5vw;
	margin-top: 0;
	position: relative;
	z-index: 2;
}

.margin-title {
	padding: 50px 0 0;
	color: #fff;
}

.margin-title h1 {
	font-family: "Oswald", sans-serif;
	font-size: 70px;
	line-height: 90px;
}

.margin-title p {
	font-size: 12px;
	font-weight: bold;
}

.margin-content {
	background-color: #fff;
	border-radius: 10px;
	padding: 50px 60px;
	margin-top: 30px;
	margin-bottom: 60px;
	color: #111111;
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic Std W4", sans-serif;
	line-height: 1.8;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.margin-description {
	margin-bottom: 40px;
	font-size: 14px;
	letter-spacing: 0.05em;
	line-height: 2;
	color: #333;
}

.margin-description p {
	margin-bottom: 16px;
}

.margin-description p:last-child {
	margin-bottom: 0;
}

.margin-formula {
	margin-bottom: 40px;
	padding: 30px;
	background: #f0f4fa;
	border-radius: 10px;
	text-align: center;
}

.margin-formula h2 {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
}

.margin-formula .formula {
	font-size: 20px;
	font-weight: 700;
	color: #2a4a8a;
	line-height: 1.8;
}

.formula-sp {
	display: none;
}

.formula-label {
	font-size: 20px;
	font-weight: 700;
	color: #2a4a8a;
	margin-bottom: 4px;
}

.formula-fraction {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 4px;
}

.formula-numerator {
	font-size: 15px;
	font-weight: 700;
	color: #2a4a8a;
	padding: 0 12px 10px;
	border-bottom: 2.5px solid #2a4a8a;
}

.formula-denominator {
	font-size: 15px;
	font-weight: 700;
	color: #2a4a8a;
	padding-top: 10px;
}

.margin-data h2 {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 8px;
	padding-bottom: 12px;
	border-bottom: 2px solid #5782D3;
}

.margin-note {
	font-size: 13px;
	color: #666666;
	margin-bottom: 24px;
}

.margin-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 32px;
	font-size: 14px;
}

.margin-table th,
.margin-table td {
	padding: 14px 16px;
	border: 1px solid #d0d0d0;
	text-align: left;
	vertical-align: top;
}

.margin-table th {
	background: #eef3fb;
	font-weight: 700;
	width: 50%;
	color: #2a4a8a;
}

.margin-section {
	margin-bottom: 32px;
}

.margin-section h3 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 12px;
	padding-left: 12px;
	border-left: 3px solid #5782D3;
}

.margin-section p {
	font-size: 14px;
	margin-bottom: 8px;
}

.margin-section ul {
	padding-left: 24px;
	margin-bottom: 16px;
}

.margin-section li {
	font-size: 14px;
	list-style-type: disc;
	margin-bottom: 4px;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
	.background-grid .grid-item {
		width: 16.666%;
		padding-bottom: 16.666%;
	}

	.margin-title {
		padding-bottom: 50px;
	}

	.margin-title h1 {
		font-size: 120px;
		line-height: 150px;
	}

	.margin-title p {
		font-size: 18px;
	}

	.formula-pc {
		display: none;
	}

	.formula-sp {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}

	.formula-label {
		font-size: 22px;
	}

	.formula-numerator {
		font-size: 17px;
	}

	.formula-denominator {
		font-size: 17px;
	}

	.margin-content {
		padding: 40px 40px;
	}
}

@media screen and (min-width: 1024px) {
	.background-grid .grid-item {
		width: 12.5%;
		padding-bottom: 12.5%;
	}

	.margin-title {
		padding-bottom: 50px;
	}

	.margin-title h1 {
		font-size: 145px;
		line-height: 200px;
	}

	.margin-title p {
		font-size: 18px;
	}
}

.sp-only {
	display: none;
}

@media screen and (max-width: 768px) {
	.sp-only {
		display: inline;
	}

	.margin-content {
		padding: 30px 20px;
	}

	.formula-pc {
		display: none;
	}

	.formula-sp {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}

	.margin-data h2 {
		font-size: 17px;
	}

	.margin-table th,
	.margin-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	.margin-table th {
		border-bottom: none;
	}
}
