.projects .project:nth-child(5n + 1) {
	--p-color-main: #f69368;
	--p-color-dark: #b84f22;
	--p-shadow-glow: rgba(246, 147, 104, 0.22);
}

.projects .project:nth-child(5n + 2) {
	--p-color-main: #38cde5;
	--p-color-dark: #07546d;
	--p-shadow-glow: rgba(56, 205, 229, 0.22);
}

.projects .project:nth-child(5n + 3) {
	--p-color-main: #c1dd8f;
	--p-color-dark: #3d5c07;
	--p-shadow-glow: rgba(193, 221, 143, 0.25);
}

.projects .project:nth-child(5n + 4) {
	--p-color-main: #f5cf6e;
	--p-color-dark: #785a00;
	--p-shadow-glow: rgba(245, 207, 110, 0.25);
}

.projects .project:nth-child(5n + 5) {
	--p-color-main: #da8ae2;
	--p-color-dark: #631d6c;
	--p-shadow-glow: rgba(218, 138, 226, 0.22);
}

.page-content-body {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	padding: 24px 0;
}

#projects-search-result {
	flex-grow: 1;
}

#projects-search-result > div:first-child {
	font-size: 1.05rem;
	font-weight: 700;
	color: #334155;
	margin-bottom: 20px;
}

.projects {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 28px;
}

.projects .project.card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 20px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	overflow: visible;
	position: relative;
	text-decoration: none !important;
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.projects .project.card:hover {
	transform: translateY(-6px);
	border-color: var(--p-color-main);
	box-shadow: 0 18px 36px var(--p-shadow-glow);
}

.projects .project .ribbon-2 {
	position: absolute;
	top: 16px !important;
	right: -8px !important;
	z-index: 10;
	padding: 6px 16px;
	background: linear-gradient(135deg, var(--p-color-main) 0%, var(--p-color-dark) 100%);
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	border-radius: 6px 0 0 6px;
	box-shadow: -2px 4px 12px var(--p-shadow-glow);
	inset: auto;
	clip-path: none;
}

.projects .project .ribbon-2::after {
	content: '';
	position: absolute;
	bottom: -8px;
	right: 0;
	border-width: 8px 8px 0 0;
	border-style: solid;
	border-color: var(--p-color-dark) transparent transparent transparent;
	filter: brightness(0.65);
}

.projects .project .card-image {
	order: 1;
	height: 220px;
	width: 100%;
	position: relative;
	overflow: hidden;
	background: #0f172a;
	border-radius: 20px 20px 0 0;
}

.projects .project .card-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(15, 23, 42, 0.92) 100%);
	z-index: 2;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.projects .project .card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects .project.card:hover .card-image img {
	transform: scale(1.06);
}

.projects .project .card-header {
	order: 2;
	position: absolute;
	top: 110px;
	right: 0;
	left: 0;
	height: 110px;
	z-index: 5;
	padding: 10px 20px 14px 20px;
	background: transparent !important;
	color: #ffffff !important;
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.35;
	display: flex;
	align-items: flex-end;
	text-align: right;
	border: none !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
	pointer-events: none;
}

.projects .project.card:hover .card-header {
	color: #ffffff !important;
}

.projects .project .cat2 {
	order: 3;
	padding: 12px 20px;
	background: #ffffff;
	border-radius: 0 0 20px 20px;
	display: flex;
	align-items: center;
	border-top: 1px solid #f1f5f9;
	z-index: 4;
}

.projects .project .status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 600;
}

.projects .project .status:before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	display: inline-block;
}

.projects .project .status.status-1 { background: #f0fdf4; color: #166534; }
.projects .project .status.status-1:before { background-color: #22c55e; }

.projects .project .status.status-2 { background: #fff7ed; color: #9a3412; }
.projects .project .status.status-2:before { background-color: #f97316; }

.projects .project .status.status-3 { background: #f0f9ff; color: #075985; }
.projects .project .status.status-3:before { background-color: #0ea5e9; }

.filters {
	width: 290px;
	flex-shrink: 0;
	position: sticky;
	top: 100px;
	background: #ffffff;
	border-radius: 20px;
	padding: 22px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.04);
}

.filters form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: static;
}

.filters fieldset {
	border: none;
	padding: 0;
	margin: 0;
	min-height: auto !important;
}

.filters label[for="textsearch"] {
	display: block;
	font-size: 0.92rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 8px;
	position: static;
}

.filters input[type="text"] {
	width: 100%;
	height: 44px;
	position: static;
	border: 1.5px solid #cbd5e1;
	border-radius: 12px;
	padding: 0 14px;
	font-size: 0.95rem;
	color: #0f172a;
	background: #f8fafc;
	outline: none;
	transition: all 0.25s ease;
	box-sizing: border-box;
}

.filters input[type="text"]:focus {
	background: #ffffff;
	border-color: #38cde5;
	box-shadow: 0 0 0 3px rgba(56, 205, 229, 0.15);
}

.filters fieldset.radio {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 4px;
}

.filters fieldset.radio legend {
	position: static;
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 8px;
	display: block;
}

.filters fieldset.radio label {
	display: flex !important;
	align-items: center;
	padding: 8px 12px !important;
	border-radius: 10px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	color: #475569;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100% !important;
	box-sizing: border-box;
	margin: 0 !important;
}

.filters fieldset.radio label:hover {
	background: #ffffff;
	border-color: #cbd5e1;
	color: #0f172a;
}

.filters fieldset.radio label:has(input:checked) {
	background: rgba(11, 89, 162, 0.08);
	border-color: rgba(11, 89, 162, 0.3);
	color: #0b59a2;
	font-weight: 700;
}

.filters input[type="radio"] {
	margin-left: 8px;
	accent-color: #0b59a2;
}

.filters input[type="submit"] {
	width: 100% !important;
	height: 46px;
	background: linear-gradient(90deg, #38cde5 0%, #0b59a2 100%);
	color: #ffffff;
	border-radius: 12px;
	font-size: 0.98rem;
	font-weight: 700;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(11, 89, 162, 0.2);
	transition: all 0.3s ease;
	margin-top: 8px;
}

.filters input[type="submit"]:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(11, 89, 162, 0.3);
}

@media (max-width: 991px) {
	.page-content-body {
		flex-direction: column;
		padding: 16px;
	}

	.filters {
		width: 100%;
		position: static;
	}
}