/**
 * Frontend styles for STH 3D Renders
 *
 * @package STH_3D_Renders
 */

.sth-3d-renders-container {
	margin: 20px 0;
}

.sth-3d-render-item {
	margin-bottom: 20px;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

.sth-3d-render-item img {
	max-width: 100%;
	height: auto;
	display: block;
}

.sth-3d-render-title {
	font-size: 1.2em;
	font-weight: bold;
	margin-bottom: 10px;
}

.sth-3d-render-description {
	line-height: 1.6;
	color: #666;
}

/* Photo Gallery Styles */
.page-gallery {
	padding: 40px 0;
}

.page-gallery .row {
	transition: opacity 0.3s ease;
}

.page-gallery .pagination {
	transition: opacity 0.3s ease;
}

.page-gallery .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}

.page-gallery .row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.page-gallery .row > div {
	padding: 0 15px;
	margin-bottom: 30px;
}

/* Grid columns */
.col-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.col-lg-4 {
	flex: 0 0 50%;
	max-width: 50%;
}

@media (min-width: 992px) {
	.col-lg-4 {
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}
}

/* Gallery item styles */
.page-gallery figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	background: #f5f5f5;
	min-height: 200px;
}

.page-gallery figure:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Loading skeleton animation */
.page-gallery figure::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s infinite;
	z-index: 1;
}

.page-gallery figure.image-loaded::before {
	display: none;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.page-gallery figure img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease, opacity 0.4s ease;
	opacity: 0;
	position: relative;
	z-index: 2;
}

.page-gallery figure img.lazy-loaded {
	opacity: 1;
}

.page-gallery figure:hover img.lazy-loaded {
	transform: scale(1.05);
}

.page-gallery figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	text-align: center;
	padding: 10px;
	font-size: 14px;
	transition: background 0.3s ease;
	z-index: 3;
}

.page-gallery figure:hover figcaption {
	background: rgba(0, 0, 0, 0.85);
}

/* Category filter */
.page-gallery .category-filter-form {
	margin-bottom: 20px;
	text-align: center;
}

.page-gallery select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	min-width: 200px;
	cursor: pointer;
}

.page-gallery select:focus {
	outline: none;
	border-color: #222;
}

/* Gallery figure specific styles */
.page-gallery .gallery-item-figure {
	position: relative;
	margin: 0;
}

.page-gallery .gallery-item-figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	text-align: center;
	padding: 10px;
	font-size: 14px;
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: flex-start !important;
	flex-wrap: wrap;
	margin-top: 30px;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 8px 12px;
	margin: 2px;
	border-radius: 4px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.pagination span.ellipsis {
	color: #999;
	background: transparent;
}

.pagination a:not(.active) {
	background: #eee;
	color: #000;
}

.pagination a:not(.active):hover {
	background: #ddd;
}

.pagination a.active {
	background: #222;
	color: #fff;
	cursor: default;
}

/* Responsive adjustments */
@media (max-width: 576px) {
	.page-gallery .container {
		padding: 0 10px;
	}

	.page-gallery .row {
		margin: 0 -10px;
	}

	.page-gallery .row > div {
		padding: 0 10px;
	}

	.page-gallery .gallery-item-figcaption {
		font-size: 12px;
		padding: 8px;
		bottom: 30px;
	}
}
