/**
 * Projects page (/project/) — native styles, no Elementor.
 * Markup: template-projects.php · Content: inc/projects-content.php · Behaviour: assets/js/projects.js
 * Sections: hero · stats · categories · gallery (tabs, cards, details window) · call to action · features
 * Breakpoints: tablet <= 1024px, mobile <= 767px.
 */

.pb-projects-page{
	--pb-primary:#2E3192;
	--pb-navy:#11145E;
	--pb-red:#EC1B23;
	--pb-yellow:#FFC20E;
	--pb-muted:#5C6A82;
	--pb-line:#E4EAF4;
	--pb-font:"Vazirmatn","vazir",Sans-serif;
	padding:0 0 40px;
	background:#F4F7FC;
	font-family:var(--pb-font);
	color:var(--pb-navy);
}
.pb-projects-page *,
.pb-projects-page *::before,
.pb-projects-page *::after{box-sizing:border-box}
/* zero specificity: the margins / paddings set by the section classes below must win */
:where(.pb-projects-page) :where(h1,h2,h3,p,ul,figure){margin:0;padding:0}
.pb-projects-page ul{list-style:none}
.pb-projects-page img{display:block;max-width:100%;height:auto}
.pb-projects-page :is(button,a){font-family:inherit}

/* shared: width of every block, tri-colour bar, section title */
.pb-pstats,
.pb-psec,
.pb-pcta,
.pb-pfeat{width:calc(100% - 40px);max-width:1200px;margin-inline:auto}
.pb-psec{margin-top:44px}
.pb-bar{
	display:block;
	width:200px;
	height:5px;
	border-radius:10px;
	background:linear-gradient(to right,#2E3192 0 33%,#EC1B23 33% 66%,#FFC20E 66% 100%);
}
.pb-ptitle{
	display:flex;
	align-items:center;
	gap:14px;
	margin-bottom:20px;
	font-size:26px;
	font-weight:900;
	line-height:1.5;
	color:var(--pb-navy);
}
.pb-ptitle::after{
	content:"";
	width:42px;
	height:5px;
	border-radius:10px;
	background:linear-gradient(to right,#2E3192 0 33%,#EC1B23 33% 66%,#FFC20E 66% 100%);
}

/* ===== Hero ===== */
.pb-ph{
	position:relative;
	display:flex;
	align-items:center;
	min-height:340px;
	padding:40px max(20px,calc((100% - 1200px) / 2));
	overflow:hidden;
	background:linear-gradient(120deg,#dfe9fb,#f4f7fc);
}
.pb-ph--plain{min-height:240px}
.pb-ph__bg,
.pb-ph__bg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pb-ph::before{
	content:"";
	position:absolute;
	inset:0;
	background:linear-gradient(270deg,rgba(255,255,255,.88) 0%,rgba(255,255,255,.6) 40%,rgba(255,255,255,0) 78%);
}
.pb-ph__inner{position:relative;display:flex;flex-direction:column;gap:14px;max-width:560px}
.pb-ph__title{font-size:38px;font-weight:900;line-height:1.5;color:var(--pb-navy)}
.pb-ph__text{font-size:16px;font-weight:600;line-height:1.9;color:var(--pb-navy)}

/* ===== Stats strip ===== */
.pb-pstats{
	position:relative;
	z-index:2;
	display:flex;
	justify-content:center;
	margin-top:-44px;
	padding:20px 10px;
	border-radius:22px;
	background:#fff;
	box-shadow:0 10px 30px rgba(17,20,94,.1);
}
.pb-pstats li{display:flex;flex:1;align-items:center;justify-content:center;gap:16px;padding:6px 10px;text-align:center}
.pb-pstats li + li{border-right:1px solid var(--pb-line)}
.pb-pstats__icon{display:inline-flex;color:var(--pb-primary)}
.pb-pstats__text{display:flex;flex-direction:column;gap:2px}
.pb-pstats__text strong{font-size:34px;font-weight:900;line-height:1.2;color:var(--pb-navy)}
.pb-pstats__text span{font-size:15px;font-weight:700;color:var(--pb-navy)}

/* ===== Category cards (icon above the name; the active one is navy with a yellow edge) ===== */
.pb-pcats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.pb-pcat{
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:10px;
	height:100%;
	padding:20px 10px 16px;
	border:1px solid var(--pb-line);
	border-bottom:4px solid transparent;
	border-radius:14px;
	background:linear-gradient(180deg,#fff,#EEF3FB);
	box-shadow:0 4px 14px rgba(17,20,94,.07);
	color:var(--pb-navy);
	text-decoration:none;
	transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease,color .2s ease;
}
.pb-pcat:hover,.pb-pcat:focus-visible{transform:translateY(-3px);box-shadow:0 10px 24px rgba(17,20,94,.16)}
.pb-pcat__icon{display:inline-flex;color:var(--pb-primary);transition:color .2s ease}
.pb-pcat__name{font-size:15px;font-weight:800;line-height:1.5;text-align:center}
.pb-pcat.is-active{border-color:var(--pb-navy);border-bottom-color:var(--pb-yellow);background:var(--pb-navy);color:var(--pb-yellow)}
.pb-pcat.is-active .pb-pcat__icon{color:#fff}

/* ===== Gallery: tabs ===== */
.pb-ptabs{display:flex;gap:10px;margin-bottom:22px;overflow-x:auto;scrollbar-width:none}
.pb-ptabs::-webkit-scrollbar{display:none}
.pb-ptabs button{
	flex:0 0 auto;
	padding:10px 22px;
	border:0;
	border-radius:10px;
	background:#E7ECF4;
	color:var(--pb-muted);
	font-size:14px;
	font-weight:700;
	cursor:pointer;
	transition:background-color .2s ease,color .2s ease;
}
.pb-ptabs button:hover{background:#D8E0EE}
.pb-ptabs button.is-active{background:var(--pb-primary);color:#fff}

/* ===== Gallery: project cards ===== */
.pb-pgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.pb-proj{
	display:flex;
	flex-direction:column;
	overflow:hidden;
	border:1px solid var(--pb-line);
	border-radius:14px;
	background:#fff;
	box-shadow:0 4px 14px rgba(17,20,94,.05);
	transition:box-shadow .2s ease,transform .2s ease;
}
.pb-proj:hover{box-shadow:0 12px 28px rgba(17,20,94,.14);transform:translateY(-3px)}
.pb-proj[hidden]{display:none}
.pb-proj__img{aspect-ratio:8/5;overflow:hidden;background:#D5DEEE}
.pb-proj__img img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.pb-proj:hover .pb-proj__img img{transform:scale(1.04)}
.pb-proj__body{display:flex;flex:1;flex-direction:column;gap:8px;padding:16px 18px 18px}
.pb-proj__title{margin-bottom:2px;font-size:18px;font-weight:800;line-height:1.7;color:var(--pb-navy)}
.pb-proj__meta{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:var(--pb-muted)}
.pb-proj__meta svg{flex:0 0 auto;color:var(--pb-primary)}
.pb-proj__btn{
	display:inline-flex;
	align-items:center;
	gap:8px;
	align-self:flex-end;
	margin-top:auto;
	padding:9px 18px;
	border:0;
	border-radius:9px;
	background:var(--pb-yellow);
	color:var(--pb-navy);
	font-size:14px;
	font-weight:800;
	line-height:1.4;
	text-decoration:none;
	cursor:pointer;
	transition:background-color .2s ease,color .2s ease;
}
.pb-proj__btn:hover,.pb-proj__btn:focus-visible{background:var(--pb-primary);color:#fff}
.pb-pempty{padding:30px 0;color:var(--pb-muted);text-align:center}
.pb-pmore{
	display:block;
	margin:26px auto 0;
	padding:12px 30px;
	border:2px solid var(--pb-primary);
	border-radius:10px;
	background:transparent;
	color:var(--pb-primary);
	font-size:14px;
	font-weight:800;
	cursor:pointer;
	transition:background-color .2s ease,color .2s ease;
}
.pb-pmore:hover,.pb-pmore:focus-visible{background:var(--pb-primary);color:#fff}
.pb-pmore[hidden],.pb-pempty[hidden]{display:none}

/* ===== Details window (<dialog>) ===== */
.pb-pmodal{
	width:min(860px,calc(100% - 28px));
	max-height:calc(100vh - 40px);
	padding:0;
	overflow:auto;
	border:0;
	border-radius:16px;
	background:#fff;
	color:var(--pb-navy);
	font-family:var(--pb-font);
}
.pb-pmodal::backdrop{background:rgba(10,13,65,.72)}
.pb-pmodal__close{
	position:absolute;
	top:10px;
	left:10px;
	z-index:2;
	width:38px;
	height:38px;
	border:0;
	border-radius:50%;
	background:rgba(255,255,255,.92);
	color:var(--pb-navy);
	font-size:24px;
	line-height:1;
	cursor:pointer;
}
.pb-pmodal__img{width:100%;max-height:60vh;object-fit:cover}
.pb-pmodal__img[hidden]{display:none}
.pb-pmodal__body{display:flex;flex-direction:column;gap:8px;padding:20px 24px 24px}
.pb-pmodal__body h3{margin:0;font-size:20px;font-weight:800;line-height:1.7}
.pb-pmodal__meta,.pb-pmodal__text{margin:0;font-size:14px;line-height:2;color:var(--pb-muted)}
.pb-pmodal__meta:empty,.pb-pmodal__text:empty{display:none}

/* ===== Call to action ===== */
.pb-pcta{
	position:relative;
	display:flex;
	align-items:stretch;
	min-height:190px;
	margin-top:44px;
	overflow:hidden;
	border-radius:18px;
	background:linear-gradient(110deg,#1E2A8E 0%,var(--pb-navy) 70%);
	color:#fff;
}
.pb-pcta__media{position:relative;flex:0 0 38%;min-height:190px}
.pb-pcta__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;clip-path:polygon(24% 0,100% 0,100% 100%,8% 100%)}
.pb-pcta__media::before,
.pb-pcta__media::after{content:"";position:absolute;inset:0;z-index:1}
.pb-pcta__media::before{background:var(--pb-red);clip-path:polygon(18% 0,22% 0,6% 100%,2% 100%)}
.pb-pcta__media::after{background:var(--pb-yellow);clip-path:polygon(22.5% 0,24% 0,8% 100%,6.5% 100%)}
.pb-pcta__body{display:flex;flex:1;flex-direction:column;justify-content:center;gap:12px;padding:24px 36px}
.pb-pcta h2{font-size:30px;font-weight:900;line-height:1.5;color:#fff}
.pb-pcta h2 span{color:var(--pb-yellow)}
.pb-pcta p{max-width:520px;font-size:15px;font-weight:500;line-height:1.9;color:#DCE3F7}
.pb-pcta__btn{
	display:inline-flex;
	align-items:center;
	gap:10px;
	align-self:flex-start;
	margin-top:4px;
	padding:10px 20px 10px 14px;
	border-radius:999px;
	background:var(--pb-red);
	color:#fff;
	font-size:15px;
	font-weight:800;
	text-decoration:none;
	transition:background-color .2s ease;
}
.pb-pcta__btn:hover,.pb-pcta__btn:focus-visible{background:#C9141B}
.pb-pcta__icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#fff;color:var(--pb-red)}

/* ===== Features strip ===== */
.pb-pfeat{display:flex;justify-content:center;margin-top:32px;padding:18px 10px;border-radius:18px;background:#fff;box-shadow:0 4px 16px rgba(17,20,94,.06)}
.pb-pfeat li{display:flex;flex:1;align-items:center;justify-content:center;gap:14px;padding:4px 10px}
.pb-pfeat li + li{border-right:1px solid var(--pb-line)}
.pb-pfeat__icon{display:inline-flex;color:var(--pb-primary)}
.pb-pfeat__text{display:flex;flex-direction:column;gap:2px}
.pb-pfeat__text strong{font-size:15px;font-weight:800;color:var(--pb-navy)}
.pb-pfeat__text span{font-size:13px;font-weight:500;color:var(--pb-muted)}

/* ===== Tablet ===== */
@media (max-width:1024px){
	.pb-pcats{grid-template-columns:repeat(3,1fr)}
	.pb-pgrid{grid-template-columns:repeat(2,1fr)}
	.pb-pfeat{flex-wrap:wrap;gap:14px 0}
	.pb-pfeat li{flex:0 0 50%}
	.pb-pfeat li:nth-child(3){border-right:0}
}

/* ===== Mobile ===== */
@media (max-width:767px){
	.pb-pstats,.pb-psec,.pb-pcta,.pb-pfeat{width:calc(100% - 28px)}
	.pb-psec{margin-top:32px}
	.pb-ph{min-height:260px;padding:28px 18px}
	.pb-ph::before{background:linear-gradient(180deg,rgba(255,255,255,.88) 0%,rgba(255,255,255,.6) 60%,rgba(255,255,255,.2) 100%)}
	.pb-ph__title{font-size:24px}
	.pb-ph__text{font-size:14px}
	.pb-bar{width:140px;height:4px}
	.pb-ptitle{font-size:20px}
	/* Compact stats: keep all three items on one line on mobile. */
	.pb-pstats{display:flex;flex-direction:row;align-items:stretch;gap:0;margin-top:-30px;padding:10px 6px;border-radius:14px}
	.pb-pstats li{flex:1 1 0;min-width:0;flex-direction:column;justify-content:center;gap:4px;padding:6px 3px}
	.pb-pstats li + li{border-right:1px solid var(--pb-line);border-top:0}
	.pb-pstats__icon{align-items:center;justify-content:center}
	.pb-pstats__icon svg{width:22px;height:22px}
	.pb-pstats__text{align-items:center;gap:1px;min-width:0}
	.pb-pstats__text strong{font-size:18px;line-height:1.25}
	.pb-pstats__text span{font-size:10px;line-height:1.5;text-align:center}

	/* Category cards become compact horizontal-scroll chips, like gallery tabs. */
	.pb-pcats{display:flex;gap:8px;width:100%;overflow-x:auto;overflow-y:hidden;padding:2px 1px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
	.pb-pcats::-webkit-scrollbar{display:none}
	.pb-pcats li{flex:0 0 auto;min-width:0}
	.pb-pcats li:last-child:nth-child(odd){grid-column:auto}
	.pb-pcat{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;min-height:42px;height:auto;padding:8px 12px;border:0;border-radius:10px;background:#E7ECF4;box-shadow:none;white-space:nowrap}
	.pb-pcat:hover,.pb-pcat:focus-visible{transform:none;box-shadow:none}
	.pb-pcat__icon{align-items:center}
	.pb-pcat__icon svg{width:20px;height:20px}
	.pb-pcat__name{font-size:11px;font-weight:700;line-height:1.4}
	.pb-pcat.is-active{background:var(--pb-primary);color:#fff;border:0}
	.pb-pgrid{grid-template-columns:1fr}
	.pb-pcta{flex-direction:column;border-radius:16px}
	.pb-pcta__media{flex:0 0 auto;min-height:150px}
	.pb-pcta__media img,.pb-pcta__media::before,.pb-pcta__media::after{clip-path:none}
	.pb-pcta__media::before,.pb-pcta__media::after{display:none}
	.pb-pcta__body{padding:20px}
	.pb-pcta h2{font-size:22px}
	.pb-pcta__btn{align-self:stretch;justify-content:center}
	.pb-pfeat li{flex:0 0 100%;justify-content:flex-start;padding:8px 14px}
	.pb-pfeat li + li{border-right:0}
}
@media (prefers-reduced-motion:reduce){
	.pb-pcat,.pb-proj,.pb-proj__img img,.pb-proj__btn,.pb-pmore,.pb-ptabs button{transition:none}
}
