/**
 * لنز هوش مصنوعی (AI Lens)
 */

.haam-pf-canvas {
	--pf-ink: #1a1532;
	--pf-muted: #5c5770;
	--pf-brand: #ebd11a;
	--pf-line: rgba(26, 21, 50, 0.12);
	--pf-soft: rgba(235, 209, 26, 0.22);
}

/* آرشیو لنز: شل عریض‌تر از صفحات بینش */
.haam-pf-canvas .haam-ins__shell,
#haam-pf-archive .haam-ins__shell {
	width: min(1320px, calc(100% - 24px));
	padding: clamp(28px, 4vw, 48px) clamp(22px, 3.2vw, 40px) clamp(32px, 4.5vw, 56px);
}

.haam-pf .haam-ins__lead {
	max-width: none;
}

.haam-pf__layout {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	gap: clamp(18px, 2.5vw, 28px);
	align-items: stretch;
	margin-top: 8px;
}

.haam-pf__toolbar {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	min-height: 1.5rem;
	padding-bottom: 4px;
}

.haam-pf__filters {
	padding: 18px 18px 20px;
	border: 1px solid var(--pf-ink);
	border-radius: 8px;
	background: #fff;
	position: sticky;
	top: 88px;
	align-self: start;
}

.haam-pf__main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.haam-pf__filter-label {
	display: block;
	margin: 0 0 10px;
	font-size: 0.82rem;
	font-weight: 800;
	color: var(--pf-ink);
}

.haam-pf__search {
	margin-bottom: 18px;
}

.haam-pf__search-input {
	width: 100%;
	min-height: 44px;
	padding: 8px 0 10px;
	border: 0;
	border-bottom: 1.5px solid rgba(26, 21, 50, 0.22);
	border-radius: 0;
	background: transparent;
	font: inherit;
	font-size: 0.95rem;
	outline: none;
}

.haam-pf__search-input:focus {
	border-bottom-color: var(--pf-ink);
	box-shadow: 0 2px 0 0 var(--pf-brand);
}

.haam-pf__facet {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.haam-pf__facet legend {
	padding: 0;
}

.haam-pf__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 0.84rem;
	line-height: 1.5;
	cursor: pointer;
	color: var(--pf-muted);
}

.haam-pf__check input {
	margin-top: 3px;
	accent-color: var(--pf-brand);
}

.haam-pf__count {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--pf-muted);
}

.haam-pf__count:empty {
	display: none;
}

.haam-pf__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.haam-pf__grid.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.haam-pf__card {
	margin: 0;
	height: 252px;
	border: 1px solid var(--pf-ink);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.haam-pf__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(26, 21, 50, 0.08);
}

.haam-pf__card-link {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	min-height: 0;
	padding: 12px;
	color: inherit;
	text-decoration: none !important;
}

.haam-pf__card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
	flex-shrink: 0;
}

.haam-pf__logo {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--pf-line);
	border-radius: 6px;
	background: #f7f7f8;
	overflow: hidden;
	flex-shrink: 0;
}

.haam-pf__logo--lg {
	width: 96px;
	height: 96px;
}

.haam-pf__logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
}

.haam-pf__logo-fallback {
	font-size: 1.35rem;
	font-weight: 900;
	color: var(--pf-ink);
}

.haam-pf__roi {
	display: inline-flex;
	align-items: center;
	padding: 4px 7px;
	border: 1px solid var(--pf-ink);
	border-radius: 5px;
	background: var(--pf-brand);
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 1.25;
	white-space: nowrap;
}

.haam-pf__roi--lg {
	font-size: 0.95rem;
	padding: 8px 14px;
	margin: 0 0 14px;
}

.haam-pf__client {
	margin: 0 0 2px;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--pf-muted);
	flex-shrink: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.haam-pf__client--lg {
	font-size: 0.95rem;
	margin-bottom: 6px;
}

.haam-pf__card-title {
	margin: 0 0 6px;
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1.35;
	color: var(--pf-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex-shrink: 0;
}

.haam-pf__card-sum {
	margin: 0 0 8px;
	font-size: 0.78rem;
	line-height: 1.55;
	color: var(--pf-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1 1 auto;
	min-height: 0;
}

.haam-pf__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.haam-pf__chip {
	display: inline-flex;
	align-items: center;
	padding: 3px 6px;
	border: 1px solid var(--pf-line);
	border-radius: 4px;
	font-size: 0.64rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pf-muted);
	background: #fafafa;
}

/* Archive cards: one chip row, truncate — never wrap under */
.haam-pf__card .haam-pf__chips {
	flex-wrap: nowrap;
	margin-top: auto;
	overflow: hidden;
	flex-shrink: 0;
}

.haam-pf__card .haam-pf__chip {
	max-width: 48%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 0 1 auto;
	min-width: 0;
}

a.haam-pf__chip--link {
	text-decoration: none !important;
	color: var(--pf-ink);
}

a.haam-pf__chip--link:hover {
	background: var(--pf-soft);
	border-color: var(--pf-ink);
}

.haam-pf__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 28px;
	text-align: center;
	color: var(--pf-muted);
}

.haam-pf__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 22px;
}

.haam-pf__more-wrap.is-hidden {
	display: none;
}

.haam-pf__more-wrap .haam-ins__btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.haam-pf__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end; /* فیزیکی چپ در RTL */
	gap: 10px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--pf-line);
}

.haam-pf__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) auto;
	gap: 24px;
	align-items: start;
	margin-bottom: 28px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--pf-line);
}

.haam-pf__sections {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.haam-pf__section h2 {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 800;
}

.haam-pf__section p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--pf-muted);
}

.haam-pf__specs-title {
	margin: 0 0 16px;
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--pf-ink);
}

.haam-pf__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
}

.haam-pf__spec {
	padding: 14px 16px;
	border: 1px solid var(--pf-line);
	border-radius: 8px;
	background: #fff;
}

.haam-pf__spec-label {
	margin: 0 0 8px;
	font-size: 0.82rem;
	font-weight: 800;
	color: var(--pf-ink);
}

.haam-pf__spec-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.haam-pf__spec-list li {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--pf-muted);
}

@media (max-width: 700px) {
	.haam-pf__specs {
		grid-template-columns: 1fr;
	}
}

.haam-pf__term-desc {
	margin: 0 0 22px;
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--pf-muted);
}

.haam-pf__grid--tax {
	margin-top: 8px;
}

.haam-pf-cross {
	margin: 36px 0 8px;
	padding: 22px 24px;
	border: 1px solid #1a1532;
	border-radius: 8px;
	background: linear-gradient(135deg, #fff 0%, rgba(235, 209, 26, 0.22) 100%);
}

.haam-pf-cross__kicker {
	margin: 0 0 6px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #5c5770;
}

.haam-pf-cross__title {
	margin: 0 0 8px;
	font-size: 1.15rem;
	font-weight: 800;
	color: #1a1532;
}

.haam-pf-cross__text {
	margin: 0 0 14px;
	font-size: 0.95rem;
	line-height: 1.7;
	color: #5c5770;
}

.haam-pf-cross__btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid #1a1532;
	border-radius: 6px;
	background: #ebd11a;
	color: #1a1532 !important;
	font-weight: 700;
	text-decoration: none !important;
}

.haam-pf-cross__btn:hover {
	background: #f0d94a;
}

@media (max-width: 900px) {
	.haam-pf__layout,
	.haam-pf__hero,
	.haam-pf__grid,
	.haam-pf__grid--tax {
		grid-template-columns: 1fr;
	}

	.haam-pf__toolbar {
		grid-column: auto;
	}

	.haam-pf__filters {
		position: static;
	}

	.haam-pf__cta {
		justify-content: stretch;
	}

	.haam-pf__cta .haam-ins__btn {
		width: 100%;
		justify-content: center;
	}
}

/* —— Single project (services-like layout) —— */
.haam-pf-s__logo {
	overflow: hidden;
	border-radius: 12px !important;
	width: 120px;
	height: 120px;
	flex-shrink: 0;
}

body.single-haam_portfolio .haam-svc__single-ico.haam-pf-s__logo {
	width: 120px;
	height: 120px;
	border-radius: 12px !important;
}

.haam-pf-s__logo .haam-pf__logo-img,
.haam-pf-s__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
	background: #fff;
}

.haam-pf-s__logo .haam-pf__logo-fallback {
	font-size: 2rem;
	font-weight: 900;
	color: #ebd11a;
}

/* متا: بردکرامب راست + کلاینت/سال چپ */
body.single-haam_portfolio .haam-pf-s__meta-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 0 0 22px;
	flex-wrap: wrap;
}

body.single-haam_portfolio .haam-pf-s__meta-row .haam-svc__crumb {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
}

body.single-haam_portfolio .haam-pf-s__meta-tag.haam-svc__card-tag {
	margin: 0;
	flex: 0 0 auto;
	text-align: start;
	white-space: nowrap;
}

/* هیرو: متن (عنوان+لید) کنار گالری — بدون فضای خالی زیر عنوان */
body.single-haam_portfolio .haam-svc__single-head.haam-pf-s__head {
	display: block;
	grid-template-columns: none;
}

body.single-haam_portfolio .haam-pf-s__title-row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px 36px;
	margin: 0;
}

body.single-haam_portfolio .haam-pf-s__text {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 8px;
}

body.single-haam_portfolio .haam-pf-s__text .haam-svc__title {
	margin: 0 0 14px;
	text-align: start;
}

body.single-haam_portfolio .haam-pf-s__text .haam-svc__lead {
	margin: 0;
	max-width: 36rem;
}

body.single-haam_portfolio .haam-pf-s__title-row .haam-pf-s__logo {
	margin: 0;
}

/* گالری اسلایدر هیرو (جای لوگو فقط در تک‌پروژه) */
.haam-pf-s__hero-slider {
	position: relative;
	flex: 0 0 auto;
	width: min(480px, 46vw);
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(26, 21, 50, 0.14);
	background: #fff;
	box-shadow: 0 10px 28px rgba(26, 21, 50, 0.08);
}

.haam-pf-s__hero-viewport {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.haam-pf-s__hero-track {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	width: 100%;
	height: 100%;
}

.haam-pf-s__hero-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.45s ease, visibility 0.45s ease;
}

.haam-pf-s__hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.haam-pf-s__hero-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.haam-pf-s__hero-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(26, 21, 50, 0.16);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #1a1532;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.haam-pf-s__hero-nav:hover {
	background: #ebd11a;
	border-color: #1a1532;
}

.haam-pf-s__hero-nav--prev {
	right: 10px;
}

.haam-pf-s__hero-nav--next {
	left: 10px;
}

.haam-pf-s__hero-dots {
	position: absolute;
	left: 50%;
	bottom: 10px;
	z-index: 2;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
}

.haam-pf-s__hero-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(26, 21, 50, 0.28);
	cursor: pointer;
}

.haam-pf-s__hero-dot.is-active {
	background: #1a1532;
}

@media (max-width: 700px) {
	body.single-haam_portfolio .haam-pf-s__title-row {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
	}

	body.single-haam_portfolio .haam-pf-s__text {
		padding-top: 0;
		order: 0;
	}

	.haam-pf-s__hero-slider {
		width: 100%;
		max-width: none;
		order: 1;
	}

	body.single-haam_portfolio .haam-pf-s__logo,
	body.single-haam_portfolio .haam-svc__single-ico.haam-pf-s__logo {
		width: 96px;
		height: 96px;
		order: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.haam-pf-s__hero-slide {
		transition: none;
	}
}

/* مشخصات — همان تم leaders، زیر بلوک روایت */
body.single-haam_portfolio .haam-pf-s__specs-panel .haam-svc__section-title {
	max-width: none;
}

.haam-pf-s__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	margin: 0;
	border-top: 1px solid rgba(26, 21, 50, 0.14);
}

.haam-pf-s__spec {
	padding: 22px 20px 22px 0;
	border: none;
	border-bottom: 1px solid rgba(26, 21, 50, 0.14);
	border-radius: 0;
	background: transparent;
}

.haam-pf-s__spec:nth-child(even) {
	padding-right: 20px;
	padding-left: 0;
}

.haam-pf-s__spec-label {
	margin: 0 0 8px;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #1a1532;
	line-height: 1.35;
}

.haam-pf-s__spec-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.haam-pf-s__spec-list li {
	margin: 0;
	padding: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #5c5770;
	background: none;
	border-radius: 0;
}

@media (max-width: 700px) {
	.haam-pf-s__specs {
		grid-template-columns: 1fr;
	}

	.haam-pf-s__spec,
	.haam-pf-s__spec:nth-child(even) {
		padding-right: 0;
		padding-left: 0;
	}
}

.haam-pf-s__roi {
	display: inline-flex;
	align-items: center;
	margin: 16px 0 0;
	padding: 8px 14px;
	border: 1px solid #1a1532;
	border-radius: 6px;
	background: #ebd11a;
	font-size: 0.9rem;
	font-weight: 800;
	color: #1a1532;
	line-height: 1.3;
}

.haam-pf-s__narr-label {
	display: block;
	margin: 0 0 4px;
	font-size: 0.95rem;
	font-weight: 800;
	color: #1a1532;
}

.haam-pf-s__narr-body {
	display: block;
	font-size: 1rem;
	line-height: 1.75;
	color: #5c5770;
	font-weight: 400;
}

.haam-pf-s__similar-logo {
	overflow: hidden;
}

.haam-pf-s__similar-logo .haam-pf__logo-img,
.haam-pf-s__similar-logo img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.haam-pf-s__similar-logo .haam-pf__logo-fallback {
	font-size: 0.95rem;
	font-weight: 900;
	color: #ebd11a;
}

/* Portfolio single: shared site ground; sections stay transparent for glow continuity */
body.single-haam_portfolio,
body.single-haam_portfolio .wp-site-blocks {
	--footer-ground: #e9e9eb;
	background: #e9e9eb !important;
	background-color: #e9e9eb !important;
	background-image: none !important;
}

body.single-haam_portfolio .haam-pf-s-canvas,
body.single-haam_portfolio .haam-svc-canvas,
body.single-haam_portfolio .haam-svc-page,
body.single-haam_portfolio .haam-site-header,
body.single-haam_portfolio .haam-svc.haam-pf-s,
body.single-haam_portfolio .haam-svc__hero--single,
body.single-haam_portfolio .haam-svc__below,
body.single-haam_portfolio .haam-svc__panel,
body.single-haam_portfolio .haam-svc__about,
body.single-haam_portfolio .haam-svc__leaders,
body.single-haam_portfolio .haam-svc__similar,
body.single-haam_portfolio .haam-svc__end-cta,
body.single-haam_portfolio .haam-site-footer {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
}

body.single-haam_portfolio .haam-site-footer__atmosphere {
	display: none !important;
}

body.single-haam_portfolio .haam-svc__panel {
	border-top-color: rgba(26, 21, 50, 0.08);
}

/* عنوان similar هم‌تراز پنل‌های ۹۲۰؛ گرید عریض می‌ماند */
body.single-haam_portfolio .haam-svc__similar .haam-svc__panel-inner {
	width: min(1120px, calc(100% - 48px));
	max-width: none;
}

body.single-haam_portfolio .haam-pf-s__similar-head {
	width: 100%;
	max-width: 920px;
	margin-inline: auto;
	margin-bottom: 0;
}

body.single-haam_portfolio .haam-pf-s__similar-head .haam-svc__section-title {
	margin-bottom: 28px;
}

body.single-haam_portfolio .haam-svc__end-cta {
	border-top: 1px solid rgba(26, 21, 50, 0.08);
}

body.single-haam_portfolio .haam-site-header {
	border-bottom: none !important;
	box-shadow: none !important;
}

body.single-haam_portfolio .haam-svc__section-title,
body.single-haam_portfolio #pf-narrative-title {
	max-width: none;
	white-space: nowrap;
}

@media (max-width: 560px) {
	body.single-haam_portfolio .haam-svc__section-title,
	body.single-haam_portfolio #pf-narrative-title {
		white-space: normal;
	}
}

.haam-pf-s__video {
	margin: 8px 0 22px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(26, 21, 50, 0.12);
	background: #0c0a12;
}

.haam-pf-s__video-el {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(70vh, 560px);
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background: #0c0a12;
}

.haam-pf-s__gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.haam-pf-s__gallery-link {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(26, 21, 50, 0.12);
	background: #fff;
	aspect-ratio: 4 / 3;
}

.haam-pf-s__gallery-link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 700px) {
	.haam-pf-s__gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
