@charset "utf-8";

/* [초기화] 박스 모델 설정 */
#kboard-custom-ovilab-list * {
	box-sizing: border-box;
}

#kboard-custom-ovilab-list a {
	text-decoration: none;
	color: inherit;
	box-shadow: none;
}

/* 1. 상단 헤더 스타일 */
#kboard-custom-ovilab-list .kboard-list-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
}

#kboard-custom-ovilab-list .kboard-total-count {
	font-size: 14px;
	color: #666;
}

#kboard-custom-ovilab-list .kboard-sort select {
	border: 1px solid #ddd;
	padding: 5px;
	border-radius: 4px;
}

/* 카테고리 스타일 (기본 KBoard 스타일 상속하되 간격 조정) */
#kboard-custom-ovilab-list .kboard-category-section {
	margin-bottom: 20px;
}

/* 2. [핵심] 인스타그램 그리드 레이아웃 */
#kboard-custom-ovilab-list .kboard-insta-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	/* PC: 한 줄에 4개 */
	gap: 20px;
	/* 사진 사이 간격 */
	margin-bottom: 40px;
}

/* 카드 아이템 */
#kboard-custom-ovilab-list .kboard-insta-item {
	position: relative;
	cursor: pointer;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#kboard-custom-ovilab-list .kboard-insta-item:hover {
	transform: translateY(-5px);
	/* 마우스 올리면 살짝 위로 */
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

/* 썸네일 (1:1 정사각형 유지) */
#kboard-custom-ovilab-list .kboard-insta-thumbnail {
	position: relative;
	width: 100%;
	padding-bottom: 100%;
	/* 정사각형 비율 강제 */
	background-color: #f4f4f4;
}

#kboard-custom-ovilab-list .kboard-insta-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* 이미지가 꽉 차게 */
	transition: transform 0.3s ease;
}

/* 이미지가 없을 때 */
#kboard-custom-ovilab-list .no-image-box {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 14px;
	background-color: #f9f9f9;
}

/* 오버레이 (마우스 호버 시 정보 표시) */
#kboard-custom-ovilab-list .kboard-insta-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	/* 반투명 검은 배경 */
	opacity: 0;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

#kboard-custom-ovilab-list .kboard-insta-item:hover .kboard-insta-overlay {
	opacity: 1;
	/* 마우스 올리면 보임 */
}

/* 오버레이 내부 텍스트 */
#kboard-custom-ovilab-list .overlay-content {
	padding: 15px;
	color: #fff;
	width: 100%;
}

#kboard-custom-ovilab-list .insta-title {
	font-weight: bold;
	font-size: 16px;
	margin-bottom: 10px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	/* 한 줄 말줄임 */
}

#kboard-custom-ovilab-list .insta-meta {
	font-size: 13px;
	margin-bottom: 5px;
	opacity: 0.9;
}

#kboard-custom-ovilab-list .insta-meta span {
	margin: 0 5px;
}

#kboard-custom-ovilab-list .insta-author {
	font-size: 12px;
	opacity: 0.7;
	margin-top: 10px;
}

/* 데이터 없음 메시지 */
#kboard-custom-ovilab-list .kboard-no-data {
	padding: 50px 0;
	text-align: center;
	color: #999;
	border: 1px dashed #ddd;
	margin-bottom: 20px;
}

/* 3. 하단 섹션 (페이징, 버튼, 검색) */
#kboard-custom-ovilab-list .kboard-footer-section {
	text-align: center;
	position: relative;
}

/* 페이징 */
#kboard-custom-ovilab-list .kboard-pagination {
	margin-bottom: 20px;
	display: inline-block;
}

#kboard-custom-ovilab-list .kboard-pagination-pages li {
	display: inline-block;
	margin: 0 2px;
}

#kboard-custom-ovilab-list .kboard-pagination-pages li a {
	display: block;
	padding: 6px 12px;
	border: 1px solid #eee;
	border-radius: 4px;
	background: #fff;
	color: #666;
	transition: 0.3s;
}

#kboard-custom-ovilab-list .kboard-pagination-pages li.active a,
#kboard-custom-ovilab-list .kboard-pagination-pages li:hover a {
	background: #333;
	color: #fff;
	border-color: #333;
}

/* 글쓰기 버튼 */
#kboard-custom-ovilab-list .kboard-control {
	text-align: right;
	margin-bottom: 15px;
}

.kboard-default-button-small {
	padding: 5px 15px;
	border: 1px solid #333;
	background: #333;
	color: #fff !important;
	border-radius: 4px;
	font-size: 13px;
	transition: 0.3s;
	cursor: pointer;
}

.kboard-default-button-small:hover {
	background: #555;
	border-color: #555;
}

/* 검색창 */
#kboard-custom-ovilab-list .kboard-search {
	display: inline-block;
}

#kboard-custom-ovilab-list .kboard-search select,
#kboard-custom-ovilab-list .kboard-search input {
	height: 32px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	vertical-align: middle;
}

#kboard-custom-ovilab-list .kboard-search button {
	height: 32px;
	padding: 0 15px;
	background: #666;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	vertical-align: middle;
}

/* Powered by */
#kboard-custom-ovilab-list .kboard-default-poweredby {
	font-size: 11px;
	color: #ccc;
	margin-top: 10px;
	text-align: left;
}

/* 4. [반응형] 모바일 설정 (767px 이하) */
@media screen and (max-width: 767px) {

	/* 모바일에서는 2열로 변경 */
	#kboard-custom-ovilab-list .kboard-insta-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	/* 헤더 정렬 변경 */
	#kboard-custom-ovilab-list .kboard-list-header {
		flex-direction: column;
		align-items: flex-start;
	}

	#kboard-custom-ovilab-list .kboard-sort {
		margin-top: 10px;
		width: 100%;
		text-align: right;
	}

	/* 검색창 너비 조정 */
	#kboard-custom-ovilab-list .kboard-search input {
		width: 120px;
	}
}