/* TAISEIロゴアニメーションセクション */
.taisei-logo-section {
	position: relative;
	width: 100%;
	height: 700px;
	background: #f5f5f5;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

/* 右肩上がりの太い曲線 */
.diagonal-curve {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	opacity: 0.3;
}

.diagonal-curve path {
	stroke-dasharray: 2000;
	stroke-dashoffset: 2000;
}

/* アニメーション開始時のみ実行 */
.taisei-logo-section.animate .diagonal-curve path {
	animation: drawCurve 4s ease-out 0.5s forwards;
}

@keyframes drawCurve {
	to {
		stroke-dashoffset: 0;
	}
}

.taisei-logo-animation {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translate(-30%, -50%);
	width: 800px;
	height: 800px;
	pointer-events: none;
	opacity: 0.8;
	z-index: 2;
}

/* コンテンツオーバーレイ */
.section-content {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
}

.text-content-left {
	flex: 0 0 450px;
	opacity: 0;
	transform: translateX(-50px);
}

/* スクロールでアニメーション開始 */
.taisei-logo-section.animate .text-content-left {
	animation: slideInFromLeft 0.8s ease-out 0.3s forwards;
}

.section-title {
	font-size: 56px;
	font-weight: 700;
	color: #000;
	line-height: 1.3;
	margin: 0 0 30px 0;
}

.section-subtitle {
	font-size: 20px;
	color: #000;
	line-height: 1.8;
	margin: 0;
}

.image-gallery {
	flex: 1;
	display: flex;
	gap: 30px;
	align-items: flex-start;
}

.image-item {
	flex: 1;
	min-width: 200px;
	text-align: center;
	opacity: 0;
	transform: translateX(-50px);
}

.image-item picture {
	display: block;
	width: 100%;
}

/* 不揃いな配置 */
.image-item:nth-child(1) {
	margin-top: 0;
}

.image-item:nth-child(2) {
	margin-top: 60px;
}

.image-item:nth-child(3) {
	margin-top: 30px;
}

/* スクロールでアニメーション開始 */
.taisei-logo-section.animate .image-item:nth-child(1) {
	animation: slideInFromLeft 0.8s ease-out 0.5s forwards;
}

.taisei-logo-section.animate .image-item:nth-child(2) {
	animation: slideInFromLeft 0.8s ease-out 0.7s forwards;
}

.taisei-logo-section.animate .image-item:nth-child(3) {
	animation: slideInFromLeft 0.8s ease-out 0.9s forwards;
}

@keyframes slideInFromLeft {
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.image-item img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	object-position: center;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
	margin-bottom: 15px;
	display: block;
}

.image-caption {
	font-size: 20px;
	font-weight: 600;
	color: #000;
	line-height: 1.6;
	margin: 0;
}

#taisei-logo-recruit {
	width: 100%;
	height: 100%;
}

#taisei-logo-recruit .logo-part-1 {
	fill: none;
	stroke: #1F6494;
	stroke-width: 3;
	stroke-dasharray: 2500;
	stroke-dashoffset: 2500;
	transform-origin: center;
}

#taisei-logo-recruit .logo-part-2 {
	fill: none;
	stroke: #1F6494;
	stroke-width: 3;
	stroke-dasharray: 3000;
	stroke-dashoffset: 3000;
	transform-origin: center;
}

/* アニメーション開始時のみ実行 */
.taisei-logo-section.animate #taisei-logo-recruit .logo-part-1 {
	animation: drawStroke 1.5s ease-out forwards,
			   fillColor 0.5s ease-in 1.5s forwards,
			   spinToTopLeft 1s ease-in-out 2s forwards;
}

.taisei-logo-section.animate #taisei-logo-recruit .logo-part-2 {
	animation: drawStroke 1.5s ease-out 0.2s forwards,
			   fillColor 0.5s ease-in 1.7s forwards,
			   spinToTopLeft 1s ease-in-out 2.2s forwards;
}

@keyframes drawStroke {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes fillColor {
	from {
		fill: none;
	}
	to {
		fill: #1F6494;
		stroke: #1F6494;
	}
}

@keyframes spinToTopLeft {
	0% {
		transform: translate(0, 0) rotate(0deg) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate(-350px, -350px) rotate(720deg) scale(1);
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.taisei-logo-section {
		height: auto;
		min-height: 600px;
		padding: 60px 0;
		justify-content: center;
	}
	
	.taisei-logo-animation {
		width: 500px;
		height: 500px;
		transform: translate(-40%, -50%);
	}
	
	.section-content {
		flex-direction: column;
		padding: 0;
		gap: 40px;
		align-items: center;
	}
	
	.text-content-left {
		flex: 1;
		text-align: center;
		padding: 0 20px;
	}
	
	.section-title {
		font-size: 48px;
		line-height: 1.4;
	}
	
	.section-subtitle {
		font-size: 20px;
		line-height: 1.8;
	}
	
	.image-gallery {
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		gap: 30px;
		padding: 0;
		align-items: center;
	}
	
	.image-item {
		width: calc(100% - 40px);
		max-width: 500px;
		min-width: auto;
		margin-top: 0 !important;
	}
	
	.image-item img {
		height: 250px;
		width: 100%;
	}
	
	@keyframes spinToTopLeft {
		0% {
			transform: translate(0, 0) rotate(0deg) scale(1);
			opacity: 1;
		}
		100% {
			transform: translate(-200px, -200px) rotate(720deg) scale(1);
			opacity: 1;
		}
	}
}
