/* =========================================================
   Project Gallery Manager - Front End & Admin Styles
   ========================================================= */

/* ---------- Shared layout ---------- */
.pgm-wrapper {
	width: 100%;
}

.pgm-no-projects,
.pgm-no-images {
	text-align: center;
	font-size: 1.1rem;
	color: #6b7280;
	padding: 2rem 0;
}

/* ---------- Project Card (home grid + all projects grid) ---------- */
.pgm-grid-item {
	margin-bottom: 1.5rem;
}

.pgm-card {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.pgm-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

.pgm-card-img-link {
	display: block;
	text-decoration: none;
}

.pgm-card-img-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #eef1f5;
}

.pgm-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.pgm-card:hover .pgm-card-img {
	transform: scale(1.08);
}

.pgm-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.65) 100%);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.35s ease;
	padding-bottom: 16px;
}

.pgm-card:hover .pgm-card-overlay {
	opacity: 1;
}

.pgm-card-view {
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	padding: 6px 16px;
	transform: translateY(10px);
	transition: transform 0.35s ease;
}

.pgm-card:hover .pgm-card-view {
	transform: translateY(0);
}

.pgm-card-body {
	padding: 18px 20px 22px;
}

.pgm-card-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.4;
}

.pgm-card-title a {
	color: #111827;
	text-decoration: none;
	transition: color 0.25s ease;
}

.pgm-card:hover .pgm-card-title a {
	color: #2563eb;
}

/* ---------- Pagination (all projects) ---------- */
.pgm-pagination {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
}

.pgm-pagination ul.page-numbers {
	list-style: none;
	display: flex;
	gap: 8px;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.pgm-pagination .page-numbers li {
	display: inline-flex;
}

.pgm-pagination .page-numbers a,
.pgm-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	background: #f3f4f6;
	color: #111827;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.25s ease, color 0.25s ease;
}

.pgm-pagination .page-numbers a:hover {
	background: #2563eb;
	color: #fff;
}

.pgm-pagination .page-numbers .current {
	background: #2563eb;
	color: #fff;
}

/* ---------- Single Project page ---------- */
.pgm-single-project {
	background: #fff;
}

.pgm-single-title {
	font-size: 2.4rem;
	font-weight: 800;
	margin-bottom: 0.75rem;
}

.pgm-single-excerpt {
	font-size: 1.1rem;
	color: #6b7280;
	max-width: 700px;
	margin: 0 auto;
}

.pgm-single-content {
	max-width: 800px;
	margin: 0 auto;
	font-size: 1.05rem;
	line-height: 1.8;
}

.pgm-gallery-grid {
	margin-top: 1rem;
}

.pgm-gallery-col {
	margin-bottom: 0;
}

.pgm-gallery-link {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #eef1f5;
}

.pgm-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, filter 0.4s ease;
}

.pgm-gallery-link:hover .pgm-gallery-img {
	transform: scale(1.06);
	filter: brightness(0.92);
}

.pgm-back-link a {
	display: inline-block;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
}

.pgm-back-link a:hover {
	text-decoration: underline;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
	.pgm-single-title {
		font-size: 2rem;
	}
}

@media (max-width: 575.98px) {
	.pgm-card-body {
		padding: 14px 16px 18px;
	}

	.pgm-single-title {
		font-size: 1.6rem;
	}
}

/* =========================================================
   Admin: Gallery meta box
   ========================================================= */
.pgm-gallery-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 14px 0;
	padding: 0;
	min-height: 40px;
}

.pgm-gallery-item {
	position: relative;
	width: 100px;
	height: 100px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
	cursor: move;
	background: #f6f7f7;
}

.pgm-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pgm-gallery-item .pgm-remove-image {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 22px;
	height: 22px;
	line-height: 20px;
	text-align: center;
	background: rgba(220, 38, 38, 0.9);
	color: #fff;
	border-radius: 50%;
	font-size: 14px;
	font-weight: bold;
	border: none;
	cursor: pointer;
	padding: 0;
}

.pgm-gallery-item .pgm-remove-image:hover {
	background: #b91c1c;
}

.pgm-gallery-item.pgm-sortable-placeholder {
	border: 2px dashed #2563eb;
	background: #eff6ff;
}
