@charset "UTF-8";

#pageContainer{
	width: 100%;
	text-align: center;
	padding-top: 20px;
	font-size: 18px;
}

#pageContainer img{
	width: 20px;
	height: 20px;
}

#pageContainer p {
	font-size: 18px;
}

/* 
.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}
 */
.portfolio-grid {
	display: grid;
	/* grid-template-columns: repeat(2, 1fr); */ 
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 15px; /* 모바일은 간격을 조금 좁게 (선택사항) */
	margin-bottom: 40px;
}
@media (min-width: 1024px) {
	.portfolio-grid {
		/* 화면을 4등분(1fr 1fr 1fr 1fr) 하여 꽉 채움 */
		grid-template-columns: repeat(4, 1fr);
		gap: 20px; /* PC는 간격을 넓게 */
	}
}


.card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
	transition: transform 0.2s;
	display: flex;
	flex-direction: column;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	/* aspect-ratio: 3 / 4; */
	object-fit: cover;
	background-color: #eee;
	cursor: zoom-in;
}

.card-content {
	padding: 15px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.card-title {
	margin-top: 0;
	
	font-size: 18px;
	font-weight: bold;
	margin: 0 0 8px 0;
	color: #222;
	
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.card-user {
	font-size: 17px;
	color: #666;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.card-review {
	font-size: 16px;
	color: #555;
	line-height: 1.4;
	background-color: #f9f9f9;
	padding: 10px;
	border-radius: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 5em;
}

.card-like-info {
	font-size: 17px;
	color: #888;
	font-weight: 600;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
}

.like-icon {
	/* color: #ff6b6b; */
	color: #868e96;
	font-size: 20px;
	margin-right: 4px;
	margin-top: 1px;
	
	transition: color 0.3s ease, transform 0.2s ease;
	display: inline-block;
}

.like-icon.liked {
	color: #ff6b6b; 
	transform: scale(1); /* 커질 때 살짝 1.2배 확대 */
}

.page-btn {
	border: none;
	background: white;
	color: #333;
	padding: 8px 12px;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	transition: background 0.2s;
}

.page-btn:hover {
    background: #e0e0e0;
}

.page-btn.active {
    background: #007bff;
    color: white;
    font-weight: bold;
}

.img-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	/* padding-top: 50px; */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	/* overflow: auto; */
	background-color: rgba(0, 0, 0, 0.9);
	
	/* 내용물 중앙 정렬 */
	justify-content: center;
	align-items: center;
	/* display: none; */
	
	flex-direction: column;
	justify-content: center;
	align-items: center;
	
	padding-bottom: 50px;
	box-sizing: border-box;
}

.modal-content {
	margin: auto;
	display: block;
	
	width: auto;
	height: auto;
	object-fit: contain;
	
	max-width: 50vw;
	max-height: 60vh;
	
	border-radius: 5px;
	box-shadow: 0 0 20px rgba(255,255,255,0.2);
	animation: zoomIn 0.3s;
}

.modal-caption {
	margin-top: 10px;
	width: 80%;
	max-width: 700px;
	color: #fff;
	text-align: center;
	/* font-size: 1rem; */
	font-size: 16px;
	line-height: 1.6;

	max-height: 30vh;
	overflow-y: auto;
	padding-right: 10px;
}

.modal-caption::-webkit-scrollbar {
	width: 6px; /* 스크롤바 너비 (얇게) */
}

.modal-caption::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1); /* 스크롤바 뒷배경 (투명한 회색) */
	border-radius: 3px;
}

.modal-caption::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.4); /* 스크롤바 막대 색상 (반투명 흰색) */
	border-radius: 3px;
}

.modal-caption::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.8); /* 마우스 올리면 진하게 */
}

@media (max-width: 768px) {
	.img-modal {
		padding-bottom: 30px; 
	}
	.modal-content {
		max-width: 90vw; /* 모바일은 이미지를 더 크게 */
		max-height: 50vh; 
	}
	.modal-caption {
		width: 90%;
		font-size: 16px;
		max-height: 35vh;
		margin-top: 15px;
	}
}

.close-btn {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: 0.3s;
	z-index: 1001;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {transform:scale(0.7); opacity:0} 
    to {transform:scale(1); opacity:1}
}


#loading-overlay {
	display: none; /* [중요] 기본 숨김 */
	position: fixed; /* 화면 전체 고정 */
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.7); /* 반투명 흰색 배경 */
	z-index: 9998; /* 매우 높게 */
}

.loading-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 50px;
	height: 50px;
	margin-top: -25px; /* (height/2) */
	margin-left: -25px; /* (width/2) */
	border: 5px solid #f3f3f3; /* 회색 트랙 */
	border-top: 5px solid #3498db; /* 파란색 스피너 */
	border-radius: 50%;
	animation: spin 1s linear infinite; /* 1초마다 360도 회전 */
	z-index: 9999;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
