/**
 * Projects Archive
 * Precision Home
 * Mobile First
 *
 * @package PrecisionHome
 * @version 1.1.0
 */

.ph-projects-archive {
	overflow: hidden;
}

/* ==================================================
   Hero
================================================== */

.ph-projects-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 64px 0 58px;
	background:
		radial-gradient(
			circle at 90% 8%,
			rgba(212, 175, 55, 0.13),
			transparent 28%
		),
		linear-gradient(
			145deg,
			#0f151c 0%,
			#17222c 56%,
			#111820 100%
		);
}

.ph-projects-hero *,
.ph-projects-hero *::before,
.ph-projects-hero *::after,
.ph-projects-list *,
.ph-projects-list *::before,
.ph-projects-list *::after {
	box-sizing: border-box;
}

.ph-projects-hero__pattern {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(
			rgba(255, 255, 255, 0.025) 1px,
			transparent 1px
		),
		linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.025) 1px,
			transparent 1px
		);
	background-size: 48px 48px;
	mask-image: linear-gradient(
		to bottom,
		#000,
		transparent 95%
	);
	pointer-events: none;
}

.ph-projects-hero__layout {
	display: grid;
	gap: 38px;
}

.ph-projects-hero__content {
	min-width: 0;
}

.ph-projects-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 13px;
	color: var(--ph-color-gold-light, #efd16b);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.6;
}

.ph-projects-hero__eyebrow span {
	width: 30px;
	height: 2px;
	background: var(--ph-color-gold, #d4af37);
	border-radius: 999px;
}

.ph-projects-hero__title {
	margin: 0;
	color: #ffffff;
	font-size: clamp(34px, 10vw, 49px);
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -0.4px;
	text-wrap: balance;
}

.ph-projects-hero__title span {
	display: block;
	margin-top: 5px;
	color: var(--ph-color-gold-light, #efd16b);
}

.ph-projects-hero__description {
	margin: 17px 0 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	line-height: 1.9;
	text-wrap: pretty;
}

.ph-projects-hero__actions {
	display: flex;
	align-items: stretch;
	flex-direction: column;
	gap: 9px;
	margin-top: 24px;
}

.ph-projects-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 52px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 11px;
	font-size: 13.5px;
	font-weight: 800;
	text-decoration: none;
	transition:
		transform var(--ph-transition-base, 260ms ease),
		background-color var(--ph-transition-base, 260ms ease),
		border-color var(--ph-transition-base, 260ms ease),
		box-shadow var(--ph-transition-base, 260ms ease);
}

.ph-projects-hero__button svg {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.ph-projects-hero__button--primary {
	background:
		linear-gradient(
			135deg,
			var(--ph-color-primary-dark, #742f36),
			var(--ph-color-primary, #8e3b43)
		);
	color: #ffffff;
	border-color: rgba(212, 175, 55, 0.62);
	box-shadow: 0 15px 30px rgba(116, 47, 54, 0.27);
}

.ph-projects-hero__button--secondary {
	background: rgba(255, 255, 255, 0.07);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.26);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ph-projects-hero__button:hover,
.ph-projects-hero__button:focus-visible {
	transform: translateY(-3px);
}

.ph-projects-hero__button--primary:hover,
.ph-projects-hero__button--primary:focus-visible {
	background: var(--ph-color-primary-dark, #742f36);
	border-color: var(--ph-color-gold, #d4af37);
}

.ph-projects-hero__button--secondary:hover,
.ph-projects-hero__button--secondary:focus-visible {
	background: rgba(255, 255, 255, 0.13);
	border-color: rgba(212, 175, 55, 0.56);
}

.ph-projects-hero__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 7px;
	margin-top: 22px;
}

.ph-projects-hero__stats > div {
	padding: 13px 8px;
	background: rgba(255, 255, 255, 0.065);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	text-align: center;
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

.ph-projects-hero__stats strong,
.ph-projects-hero__stats span {
	display: block;
}

.ph-projects-hero__stats strong {
	color: var(--ph-color-gold-light, #efd16b);
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

.ph-projects-hero__stats span {
	margin-top: 5px;
	color: rgba(255, 255, 255, 0.63);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.45;
}

.ph-projects-hero__visual {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, 155px);
	gap: 9px;
	min-width: 0;
}

.ph-projects-hero__visual-item {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #29313a;
	border: 1px solid rgba(212, 175, 55, 0.32);
	border-radius: 17px;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
	text-decoration: none;
}

.ph-projects-hero__visual-item img,
.ph-projects-hero__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform var(
		--ph-transition-slow,
		500ms cubic-bezier(0.22, 0.72, 0.22, 1)
	);
}

.ph-projects-hero__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background:
		linear-gradient(
			145deg,
			var(--ph-color-primary-dark, #742f36),
			var(--ph-color-dark, #15171b)
		);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	text-align: center;
}

.ph-projects-hero__visual-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(
			180deg,
			transparent 35%,
			rgba(7, 11, 15, 0.78) 100%
		);
}

.ph-projects-hero__visual-title {
	position: absolute;
	right: 12px;
	bottom: 11px;
	left: 12px;
	z-index: 2;
	overflow: hidden;
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1.45;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ph-projects-hero__visual-item:hover img,
.ph-projects-hero__visual-item:focus-visible img {
	transform: scale(1.06);
}

.ph-projects-hero__empty {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	min-height: 300px;
	padding: 28px;
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	border: 1px dashed rgba(212, 175, 55, 0.36);
	border-radius: 18px;
	text-align: center;
}

.ph-projects-hero__empty strong {
	font-size: 19px;
}

.ph-projects-hero__empty span {
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.65);
	font-size: 13px;
	line-height: 1.7;
}

/* ==================================================
   قائمة المشاريع
================================================== */

.ph-projects-list {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 66px 0 62px;
	background:
		radial-gradient(
			circle at 94% 8%,
			rgba(142, 59, 67, 0.07),
			transparent 25%
		),
		linear-gradient(
			180deg,
			#ffffff,
			#faf7f3
		);
}

.ph-projects-list__decoration {
	position: absolute;
	top: -170px;
	left: -160px;
	z-index: -1;
	width: 430px;
	height: 430px;
	border: 1px solid rgba(212, 175, 55, 0.12);
	border-radius: 50%;
	pointer-events: none;
}

.ph-projects-list__header {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 22px;
	margin-bottom: 30px;
}

.ph-projects-list__header > div:first-child {
	max-width: 760px;
}

.ph-projects-list__eyebrow {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 11px;
	color: var(--ph-color-primary, #8e3b43);
	font-size: 13px;
	font-weight: 800;
}

.ph-projects-list__eyebrow span {
	width: 29px;
	height: 2px;
	background: var(--ph-color-gold, #d4af37);
	border-radius: 999px;
}

.ph-projects-list__title {
	margin: 0;
	color: var(--ph-color-dark, #15171b);
	font-size: clamp(30px, 8vw, 42px);
	font-weight: 800;
	line-height: 1.35;
}

.ph-projects-list__title span {
	display: block;
	color: var(--ph-color-primary, #8e3b43);
}

.ph-projects-list__description {
	margin: 13px 0 0;
	color: var(--ph-color-text, #4b4f56);
	font-size: 14px;
	line-height: 1.85;
}

.ph-projects-list__count {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 11px 14px;
	background: #ffffff;
	border: 1px solid rgba(142, 59, 67, 0.13);
	border-radius: 12px;
	box-shadow: var(
		--ph-shadow-sm,
		0 6px 18px rgba(21, 23, 27, 0.06)
	);
}

.ph-projects-list__count strong {
	color: var(--ph-color-primary, #8e3b43);
	font-size: 22px;
	font-weight: 800;
}

.ph-projects-list__count span {
	color: var(--ph-color-muted, #737881);
	font-size: 12px;
	font-weight: 700;
}

/* ==================================================
   الفلاتر
================================================== */

.ph-projects-filter {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	padding: 15px;
	background: #ffffff;
	border: 1px solid rgba(142, 59, 67, 0.11);
	border-radius: 18px;
	box-shadow: var(
		--ph-shadow-md,
		0 16px 38px rgba(21, 23, 27, 0.1)
	);
}

.ph-projects-filter__search {
	position: relative;
}

.ph-projects-filter__search > span {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	width: 20px;
	height: 20px;
	color: var(--ph-color-primary, #8e3b43);
	pointer-events: none;
	transform: translateY(-50%);
}

.ph-projects-filter__search input,
.ph-projects-filter__select select {
	width: 100%;
	height: 51px;
	margin: 0;
	background: #faf8f5;
	color: var(--ph-color-dark, #15171b);
	border: 1px solid rgba(142, 59, 67, 0.12);
	border-radius: 11px;
	font-family: inherit;
	font-size: 13px;
	outline: none;
}

.ph-projects-filter__search input {
	padding: 10px 44px 10px 13px;
}

.ph-projects-filter__select select {
	padding: 10px 13px;
	cursor: pointer;
}

.ph-projects-filter__search input:focus,
.ph-projects-filter__select select:focus {
	background: #ffffff;
	border-color: var(--ph-color-gold, #d4af37);
	box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

.ph-projects-filter__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 51px;
	padding: 10px 16px;
	background:
		linear-gradient(
			135deg,
			var(--ph-color-primary-dark, #742f36),
			var(--ph-color-primary, #8e3b43)
		);
	color: #ffffff;
	border: 1px solid rgba(212, 175, 55, 0.54);
	border-radius: 11px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	transition:
		background-color var(--ph-transition-base, 260ms ease),
		border-color var(--ph-transition-base, 260ms ease),
		transform var(--ph-transition-base, 260ms ease);
}

.ph-projects-filter__submit svg {
	width: 19px;
	height: 19px;
}

.ph-projects-filter__reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 43px;
	color: var(--ph-color-primary, #8e3b43);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
}

/* ==================================================
   أزرار الخدمات
================================================== */

.ph-projects-chips {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 17px -16px 29px;
	padding: 0 16px 8px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.ph-projects-chips__item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	min-height: 39px;
	padding: 8px 13px;
	background: #ffffff;
	color: var(--ph-color-text, #4b4f56);
	border: 1px solid rgba(142, 59, 67, 0.12);
	border-radius: 999px;
	box-shadow: 0 7px 17px rgba(21, 23, 27, 0.045);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	transition:
		transform var(--ph-transition-fast, 180ms ease),
		border-color var(--ph-transition-fast, 180ms ease);
}

.ph-projects-chips__item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 2px 6px;
	background: rgba(142, 59, 67, 0.08);
	color: var(--ph-color-primary, #8e3b43);
	border-radius: 999px;
	font-size: 10px;
}

.ph-projects-chips__item.is-active {
	background: var(--ph-color-primary, #8e3b43);
	color: #ffffff;
	border-color: var(--ph-color-gold, #d4af37);
}

.ph-projects-chips__item.is-active span {
	background: rgba(255, 255, 255, 0.14);
	color: var(--ph-color-gold-light, #efd16b);
}

/* ==================================================
   شبكة المشاريع
================================================== */

.ph-projects-list__grid {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
	gap: 17px;
}

.ph-project-card--archive-featured {
	grid-column: auto;
}

/* ==================================================
   الحالة الفارغة
================================================== */

.ph-projects-list__empty {
	display: flex;
	align-items: center;
	flex-direction: column;
	max-width: 620px;
	margin: 20px auto 0;
	padding: 40px 22px;
	background: #ffffff;
	border: 1px dashed rgba(142, 59, 67, 0.25);
	border-radius: 18px;
	text-align: center;
}

.ph-projects-list__empty > span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	background: rgba(142, 59, 67, 0.08);
	color: var(--ph-color-primary, #8e3b43);
	border-radius: 16px;
}

.ph-projects-list__empty svg {
	width: 31px;
	height: 31px;
}

.ph-projects-list__empty h3 {
	margin: 17px 0 0;
	color: var(--ph-color-dark, #15171b);
	font-size: 21px;
	font-weight: 800;
}

.ph-projects-list__empty p {
	margin: 9px 0 0;
	color: var(--ph-color-text, #4b4f56);
	font-size: 13px;
	line-height: 1.8;
}

.ph-projects-list__empty a {
	margin-top: 17px;
	color: var(--ph-color-primary, #8e3b43);
	font-size: 13px;
	font-weight: 800;
}

/* ==================================================
   ترقيم الصفحات
================================================== */

.ph-projects-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 35px;
}

.ph-projects-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 7px 11px;
	background: #ffffff;
	color: var(--ph-color-dark, #15171b);
	border: 1px solid rgba(142, 59, 67, 0.13);
	border-radius: 10px;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
}

.ph-projects-pagination .page-numbers.current {
	background: var(--ph-color-primary, #8e3b43);
	color: #ffffff;
	border-color: var(--ph-color-gold, #d4af37);
}

/* ==================================================
   التابلت
================================================== */

@media (min-width: 768px) {

	.ph-projects-hero {
		padding: 82px 0 72px;
	}

	.ph-projects-hero__layout {
		grid-template-columns:
			minmax(0, 0.92fr)
			minmax(390px, 1.08fr);
		align-items: center;
		gap: 45px;
	}

	.ph-projects-hero__actions {
		align-items: center;
		flex-direction: row;
	}

	.ph-projects-hero__button {
		min-width: 175px;
	}

	.ph-projects-hero__visual {
		grid-template-rows: repeat(2, 205px);
	}

	.ph-projects-hero__visual-item--1 {
		grid-row: 1 / 3;
	}

	.ph-projects-hero__stats > div {
		padding: 15px 10px;
	}

	.ph-projects-hero__stats strong {
		font-size: 27px;
	}

	.ph-projects-hero__stats span {
		font-size: 11px;
	}

	.ph-projects-list {
		padding: 82px 0 76px;
	}

	.ph-projects-list__header {
		align-items: flex-end;
		justify-content: space-between;
		flex-direction: row;
	}

	.ph-projects-filter {
		grid-template-columns:
			minmax(220px, 1.4fr)
			repeat(3, minmax(150px, 0.75fr))
			auto;
		align-items: center;
	}

	.ph-projects-filter__reset {
		grid-column: 1 / -1;
		justify-content: flex-start;
	}

	.ph-projects-list__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.ph-projects-chips {
		margin-inline: 0;
		padding-inline: 0;
	}
}

/* ==================================================
   الكمبيوتر
================================================== */

@media (min-width: 1100px) {

	.ph-projects-hero {
		display: flex;
		align-items: center;
		min-height: 720px;
		padding: 100px 0 88px;
	}

	.ph-projects-hero__layout {
		grid-template-columns:
			minmax(460px, 0.82fr)
			minmax(560px, 1.18fr);
		gap: 72px;
	}

	.ph-projects-hero__title {
		font-size: clamp(48px, 4.7vw, 70px);
	}

	.ph-projects-hero__description {
		font-size: 16px;
	}

	.ph-projects-hero__visual {
		grid-template-columns: 1.15fr 0.85fr;
		grid-template-rows: repeat(2, 255px);
		gap: 12px;
	}

	.ph-projects-hero__visual-item {
		border-radius: 21px;
	}

	.ph-projects-hero__visual-title {
		right: 16px;
		bottom: 15px;
		left: 16px;
		font-size: 13px;
	}

	.ph-projects-list {
		padding: 96px 0 90px;
	}

	.ph-projects-list__title {
		font-size: 50px;
	}

	.ph-projects-list__description {
		font-size: 15.5px;
	}

	.ph-projects-list__grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		gap: 22px;
	}

	.ph-projects-list__grid > .ph-project-card {
		grid-column: span 4;
	}

	.ph-projects-list__grid > .ph-project-card:nth-child(1) {
		grid-column: span 8;
	}

	.ph-projects-list__grid > .ph-project-card:nth-child(4n + 4) {
		grid-column: span 8;
	}

	.ph-projects-list__grid > .ph-project-card:nth-child(4n + 5) {
		grid-column: span 4;
	}
}

/* ==================================================
   الشاشات الصغيرة
================================================== */

@media (max-width: 390px) {

	.ph-projects-hero__stats {
		gap: 5px;
	}

	.ph-projects-hero__stats > div {
		padding-inline: 5px;
	}

	.ph-projects-hero__stats strong {
		font-size: 21px;
	}

	.ph-projects-hero__stats span {
		font-size: 9px;
	}

	.ph-projects-hero__visual {
		grid-template-rows: repeat(2, 135px);
	}
}

/* ==================================================
   Hover
================================================== */

@media (hover: hover) {

	.ph-projects-chips__item:hover,
	.ph-projects-chips__item:focus-visible {
		transform: translateY(-2px);
		border-color: rgba(212, 175, 55, 0.6);
	}

	.ph-projects-filter__submit:hover,
	.ph-projects-filter__submit:focus-visible {
		transform: translateY(-2px);
		background: var(--ph-color-primary-dark, #742f36);
		border-color: var(--ph-color-gold, #d4af37);
	}
}

/* ==================================================
   تقليل الحركة
================================================== */

@media (prefers-reduced-motion: reduce) {

	.ph-projects-hero__button,
	.ph-projects-hero__visual-item img,
	.ph-projects-chips__item,
	.ph-projects-filter__submit {
		transition: none;
	}
}