/* 반드시 CLAUDE.md의 절대원칙을 읽고 따를 것, 하나의 클래스/모듈은 하나의 책임만 가져야 함 (SRP 원칙), 하나의 파일에 코드줄은 최대 500~600줄 내에서 생성하여야 하며 최대 코드줄이 넘어가지 않도록 작성, 만약 코드가 길어지면 분할해서 코드작업을 완성하여야 함 */
/* 커뮤니티 섹션 스타일 */

/* =========================================== */
/* 커뮤니티 섹션 (community) */
/* =========================================== */
.community-section {
	padding: 100px 0 60px 0;
	background: #FFFFFF;
}

.community-container {
	max-width: 1400px; /* location-intro-container와 동일 */
	margin: 0 auto;
	padding: 0 20px;
}

/* 제목 영역 */
.community-header {
	text-align: center;
	margin-bottom: 60px;
}

.community-subtitle {
	font-size: 48px;
	color: #00529F;
	margin-bottom: -10px;
	font-weight: 600;
	line-height: 1;
}

.community-title {
	font-size: 48px;
	color: #000000;
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1.3;
	margin-top: 0;
}

/* UP! UP! UP! 강조 효과 - 순차적 애니메이션 */
.community-title .up-1,
.community-title .up-2,
.community-title .up-3 {
	display: inline-block;
	opacity: 0;
	transform: scale(0.3) rotateY(90deg);
	transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 애니메이션 활성화 시 */
.community-title.animate .up-1,
.community-title.animate .up-2,
.community-title.animate .up-3 {
	opacity: 1;
	transform: scale(1) rotateY(0deg);
}

/* 순차적 딜레이 */
.community-title.animate .up-1 {
	transition-delay: 0.2s;
}

.community-title.animate .up-2 {
	transition-delay: 0.5s;
}

.community-title.animate .up-3 {
	transition-delay: 0.8s;
}

/* 크기 및 색상 */
.community-title .up-1 {
	font-size: 1em; /* 기본 크기 */
}

.community-title .up-2 {
	font-size: 1.5em; /* 1.5배 */
	color: #00529F;
}

.community-title .up-3 {
	font-size: 2em; /* 2배 */
	color: #D4AF37;
}

/* 강조 펄스 애니메이션 */
@keyframes upBounce {
	0%, 100% {
		transform: scale(1) rotateY(0deg);
	}
	25% {
		transform: scale(1.15) rotateY(-5deg);
	}
	50% {
		transform: scale(1.05) rotateY(5deg);
	}
	75% {
		transform: scale(1.1) rotateY(-3deg);
	}
}

/* 애니메이션 활성화 시 각 글자에 펄스 효과 */
.community-title.animate .up-1 {
	animation: upBounce 0.8s ease 0.2s;
}

.community-title.animate .up-2 {
	animation: upBounce 0.8s ease 0.5s;
}

.community-title.animate .up-3 {
	animation: upBounce 0.8s ease 0.8s;
}

/* 모바일 전용 줄바꿈 - 데스크탑에서는 숨김 */
.mobile-br {
	display: none;
}

/* 이미지 영역 */
.community-image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 40px;
	/* 양방향 스크롤 애니메이션 초기 상태 */
	opacity: 0;
	transform: translateX(-100px);
	transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-image {
	width: 80%;
	max-width: 80%;
	height: auto;
	display: block;
	position: relative;
	margin: 0 auto;
}

/* 양방향 스크롤 애니메이션 - 위에서 내려올 때 (나타남) */
.community-image-wrapper.scroll-down.visible {
	opacity: 1;
	transform: translateX(0);
}

/* 양방향 스크롤 애니메이션 - 아래에서 올라올 때 (나타남) */
.community-image-wrapper.scroll-up.visible {
	opacity: 1;
	transform: translateX(0);
}

/* RotateIn 효과 애니메이션 (Animate.css 스타일) */
@keyframes rotateIn {
	0% {
		transform: rotate(-200deg);
		opacity: 0;
	}
	100% {
		transform: rotate(0);
		opacity: 1;
	}
}

/* RotateIn 효과 활성화 */
.community-image-wrapper.rotate-active .community-image {
	animation: rotateIn 1s ease-in-out 1;
	transform-origin: center;
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
	.community-section {
		padding: 60px 0 40px 0;
	}

	.community-container {
		padding: 0 15px;
	}

	.community-header {
		margin-bottom: 40px;
	}

	.community-subtitle {
		font-size: 28px;
		margin-bottom: -10px;
		line-height: 1;
	}

	.community-title {
		font-size: 28px;
		margin-top: 0;
	}

	/* 모바일에서 줄바꿈 표시 */
	.mobile-br {
		display: block;
	}

	.community-title .up-1 {
		font-size: 1em; /* 28px */
	}

	.community-title .up-2 {
		font-size: 1.5em; /* 42px */
	}

	.community-title .up-3 {
		font-size: 2em; /* 56px */
	}

	/* 모바일에서 이미지 좌우 여백 0, 가로 100%, 하단 여백 0 */
	.community-image-wrapper {
		margin-left: -15px;
		margin-right: -15px;
		margin-bottom: 0;
		width: calc(100% + 30px);
	}

	.community-image {
		width: 100%;
		max-width: 100%;
		border-radius: 0; /* 모바일에서 둥근 모서리 제거 */
	}

	.community-notice {
		margin-top: 30px;
		padding: 15px;
	}

	.community-notice li {
		font-size: 13px;
	}
}

/* 태블릿 반응형 (769px ~ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
	.community-section {
		padding: 80px 0 50px 0;
	}

	.community-subtitle {
		font-size: 20px;
	}

	.community-title {
		font-size: 40px;
	}
}
