
/* ================================================================
   Synergy Projects — Frontend Styles
   ================================================================ */
:root {
	--sp-primary: #7c3aed;
	--sp-primary-h: #6d28d9;
	--sp-primary-light: #ede9fe;
	--sp-orange: #f97316;
	--sp-orange-h: #ea6c00;
	--sp-text: #111827;
	--sp-muted: #6b7280;
	--sp-border: #e2e8f0;
	--sp-card-bg: #fff;
	--sp-radius-card: 14px;
	--sp-radius-btn: 50px;
	--sp-shadow-card: 0 1px 4px rgba(0, 0, 0, .07), 0 4px 18px rgba(0, 0, 0, .06);
	--sp-shadow-hover: 0 8px 32px rgba(0, 0, 0, .13);
	--sp-transition: .22s ease;
}

/* ── Wrapper ─────────────────────────────────────────────────────── */
.sp-projects-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px 60px;
	font-family: inherit;
}

/* ================================================================
   FILTER BAR
   ================================================================ */
.sp-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 40px;
	align-items: center;
}

.sp-filter-btn {
	background: transparent;
	border: 1.5px solid var(--sp-border);
	/*     border-radius: var(--sp-radius-btn); */
	padding: 8px 24px;
	font-size: .88rem;
	font-weight: 500;
	color: var(--sp-text);
	cursor: pointer;
	transition: all var(--sp-transition);
	line-height: 1.5;
	white-space: nowrap;
	letter-spacing: .01em;
	font-family: inherit;
}

.sp-filter-btn:hover {
	border-color: var(--sp-primary);
	color: var(--sp-primary);
	background: var(--sp-primary-light);
}

.sp-filter-btn.active {
	background: var(--sp-orange);
	border-color: var(--sp-orange);
	color: #fff;
	font-weight: 600;
}

.sp-filter-btn.active:hover {
	background: var(--sp-orange-h);
	border-color: var(--sp-orange-h);
}

/* ================================================================
   PROJECT GRID — equal-height rows via CSS Grid stretch
   ================================================================ */
.sp-projects-grid {
	display: grid;
	gap: 28px;
	/* stretch makes every cell fill the full row height */
	align-items: stretch;
}

.sp-cols-1 {
	grid-template-columns: 1fr;
}

.sp-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.sp-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.sp-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
	.sp-cols-3, .sp-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.sp-cols-2, .sp-cols-3, .sp-cols-4 {
		grid-template-columns: 1fr;
	}
	
	.sp-filter-bar {
		gap: 8px;
	}
	
	.sp-filter-btn {
		padding: 7px 18px;
		font-size: .82rem;
	}
}

/* ================================================================
   PROJECT CARD — height: 100% fills the grid cell
   ================================================================ */
.sp-project-card {
	background: var(--sp-card-bg);
	border-radius: var(--sp-radius-card);
	box-shadow: var(--sp-shadow-card);
	border: 1px solid rgba(0, 0, 0, .05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	/* CRITICAL for equal height: fill the grid cell completely */
	height: 100%;
	transition: transform var(--sp-transition), box-shadow var(--sp-transition), opacity var(--sp-transition);
}

.sp-project-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--sp-shadow-hover);
}

/* Filtered-out state */
.sp-project-card.sp-dimmed {
	opacity: .28;
}

/* ── Anchor card ────────────────────────────────────────────────── */
a.sp-project-card, a.sp-project-card:visited {
	text-decoration: none !important;
	color: inherit !important;
	cursor: pointer;
}

a.sp-project-card:hover {
	text-decoration: none !important;
	color: inherit !important;
}

/* ── Thumbnail — fixed height so all images are same size ──────── */
.sp-card-thumb {
	width: 100%;
	/* Fixed pixel height keeps thumbnails identical regardless of content */
	
	/*     height: 260px; */
	flex-shrink: 0;
	overflow: hidden;
	background: #eef0f4;
}

.sp-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform .45s ease;
}

.sp-project-card:hover .sp-card-thumb img {
	transform: scale(1.05);
}

.sp-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #dde4f5 0%, #c4cfee 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sp-card-thumb-placeholder::after {
	content: "No Image";
	font-size: .78rem;
	color: #9aa3b8;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
}

/* ── Card Body — flex:1 so it grows to fill remaining space ────── */
.sp-card-body {
	padding: 22px 22px 26px;
	display: flex;
	flex-direction: column;
	align-items: center;
	/* flex:1 makes all card bodies the same height within each row */
	flex: 1;
	text-align: center;
	border-top: 1px solid var(--sp-border);
}

/* Title */
.sp-card-title {
	font-size: .92rem;
	font-weight: 800;
	color: var(--sp-text);
	margin: 0 0 14px;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .07em;
	word-break: break-word;
}

/* Meta rows */
.sp-card-meta {
	font-size: .78rem;
	color: var(--sp-muted);
	margin: 0 0 5px;
	line-height: 1.45;
}

.sp-meta-label {
	font-weight: 600;
	color: var(--sp-text);
	margin-right: 3px;
}

/* Short description — flex:1 pushes button to bottom */
.sp-card-desc {
	font-size: .81rem;
	color: var(--sp-muted);
	margin: 8px 0 0;
	line-height: 1.55;
	flex: 1;
}

/* ── Spacer: pushes button to bottom when no description ───────── */
.sp-card-body > .sp-visit-btn {
	margin-top: auto;
}

/* When description exists, it takes the space; button stays bottom */
.sp-card-desc + .sp-visit-btn {
	margin-top: 16px;
}

/* ── Visit Website Button ────────────────────────────────────────── */
.sp-visit-btn {
	display: inline-block;
	background: var(--sp-primary);
	color: #fff !important;
	text-decoration: none !important;
	border: none;
	border-radius: var(--sp-radius-btn);
	padding: 11px 30px;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	cursor: pointer;
	text-align: center;
	transition: background var(--sp-transition), transform var(--sp-transition), box-shadow var(--sp-transition);
	white-space: nowrap;
	box-shadow: 0 2px 12px rgba(124, 58, 237, .22);
	font-family: inherit;
	line-height: 1.5;
	/* Ensures button never shrinks */
	flex-shrink: 0;
}

.sp-visit-btn:hover, .sp-project-card--linked:hover .sp-visit-btn {
	background: var(--sp-primary-h);
	box-shadow: 0 6px 20px rgba(124, 58, 237, .35);
	transform: translateY(-2px);
}

.sp-visit-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Disabled — no URL */
.sp-visit-btn--disabled {
	background: #d1d5db;
	color: #9ca3af !important;
	cursor: not-allowed;
	box-shadow: none;
	pointer-events: none;
}

.sp-project-card--linked:hover .sp-visit-btn--disabled {
	background: #d1d5db;
	transform: none;
	box-shadow: none;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.sp-no-projects {
	grid-column: 1/-1;
	text-align: center;
	color: var(--sp-muted);
	padding: 60px 0;
	font-size: 1rem;
}

p.sp-card-meta {
	display: none;
}

p.sp-card-desc {
	display: none;
}

h3.sp-card-title {
	font-size: 20px !important;
	font-weight: 600 !important;
	line-height: 20px !important;
	letter-spacing: 1px !important;
}

button.sp-filter-btn {
	font-size: 14px !important;
	font-weight: 400 !important;
	padding-top: 12px !important;
	padding-bottom: 12px !important;
	padding-left: 16px !important;
	padding-right: 16px !important;
	margin-right: 10px !important;
	border-width: 1px !important;
	border-style: solid solid solid solid;
	background-color: #6d5eab !important;
	color: #fff !important;
	border-color: #6d5eab !important;
	border-radius: 10px !important;
}

button.sp-filter-btn.active {
	background-color: #f6941c !important;
	color: #fff !important;
	border-color: #f6941c !important;
}

span.sp-visit-btn {
	background-color: #6d5ca8 !important;
	border-radius: 10px;
	color: #fff;
	font-size: 15px;
	font-weight: 400;
	padding-top: 15px;
	padding-bottom: 15px;
	padding-left: 16px;
	padding-right: 16px;
}

span.sp-visit-btn:hover {
	background-color: #f7941c !important;
}

/* ================================================================
   LOAD MORE
   ================================================================ */
.sp-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.sp-load-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--sp-primary);
	color: #fff;
	border: none;
	border-radius: var(--sp-radius-btn);
	padding: 13px 40px;
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background var(--sp-transition), transform var(--sp-transition), box-shadow var(--sp-transition);
	box-shadow: 0 2px 12px rgba(124, 58, 237, .25);
}

.sp-load-more-btn:hover:not(:disabled) {
	background: var(--sp-primary-h);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(124, 58, 237, .35);
}

.sp-load-more-btn:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: none;
}

.sp-load-more-btn:disabled {
	opacity: .75;
	cursor: not-allowed;
}

/* Spinner inside the button */
.sp-load-more-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sp-spin .7s linear infinite;
	flex-shrink: 0;
}

@keyframes sp-spin {
	to {
		transform: rotate(360deg);
	}
}

button.sp-load-more-btn {
	width: 100%;
	justify-content: center;
}
