/* Thinh Gallery Grid Styles */

.thinh-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 24px;
	padding: 20px 0;
}

.thinh-gallery-card {
	display: flex;
	flex-direction: column;
	height: 600px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.3s ease;
}

.thinh-gallery-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
	padding: 16px;
	border-bottom: 1px solid #e0e0e0;
	background: #fafafa;
}

.card-header h3 {
	margin: 0 0 8px 0;
	font-size: 18px;
	line-height: 1.3;
}

.card-header h3 a {
	color: #333;
	text-decoration: none;
	transition: color 0.2s ease;
}

.card-header h3 a:hover {
	color: #0073aa;
}

.card-description {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.card-body {
	flex: 1;
	overflow: hidden;
	padding: 16px;
	display: flex;
	align-items: stretch;
}

/* Gallery Layout: 25% Featured / 75% Masonry Split */
.gallery-layout {
	display: grid;
	grid-template-columns: 25% 75%;
	gap: 12px;
	width: 100%;
	height: 100%;
}

/* Featured Image Column (25%) */
.gallery-featured {
	display: flex;
	align-items: flex-start;
	width: 100%;
}

.gallery-featured a {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 4px;
}

.gallery-featured img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.gallery-featured a:hover img {
	transform: scale(1.05);
}

/* Masonry Grid Column (75%) - 2 Columns, 2 Rows */
.gallery-masonry {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-auto-rows: minmax(100px, auto);
	gap: 8px;
	overflow: hidden;
}

.gallery-masonry a {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: #f5f5f5;
}

.gallery-masonry img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.gallery-masonry a:hover img {
	transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
	.thinh-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}

	.thinh-gallery-card {
		height: 550px;
	}
}

@media (max-width: 768px) {
	.thinh-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 16px;
	}

	.thinh-gallery-card {
		height: auto;
		flex-direction: column;
	}

	.card-header {
		padding: 12px;
	}

	.card-body {
		padding: 12px;
		min-height: 300px;
	}

	.gallery-layout {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		gap: 12px;
		height: 100%;
	}

	.gallery-featured {
		min-height: 200px;
	}

	.gallery-masonry {
		grid-template-columns: repeat(3, 1fr);
		grid-auto-rows: 80px;
	}
}

@media (max-width: 480px) {
	.thinh-gallery-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.card-header {
		padding: 12px;
	}

	.card-header h3 {
		font-size: 16px;
	}

	.card-description {
		font-size: 12px;
		-webkit-line-clamp: 1;
	}

	.card-body {
		padding: 12px;
		min-height: 250px;
	}

	.gallery-masonry {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 70px;
	}
}

/* Link styles */
.thinh-gallery-card a {
	cursor: pointer;
}

/* Accessibility */
.gallery-featured a:focus,
.gallery-masonry a:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Print styles */
@media print {
	.thinh-gallery-card {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
