/* =========================================================
   AVANSEN — SINGLE PROJECT / CASE STUDY
========================================================= */


/* =========================================================
   BASE
========================================================= */

.single-av_project {
	color: #fff;
}

.single-av_project .av-case-study {
	--av-project-color: #d9d0c3;
	--av-project-accent: #ff5a00;

	width: 100%;

	background: transparent;

	overflow-x: hidden;
}

/* =========================================================
   01 — PROJECT HERO
========================================================= */

.av-case-hero {
	position: relative;

	width: 100%;
	height: 100svh;
	min-height: 720px;

	overflow: hidden;

	background: transparent;
	color: #fff;

	isolation: isolate;
}


/* =========================================================
   INNER
========================================================= */

.av-case-hero__inner {
	position: relative;

	width: 100%;
	max-width: 1600px;
	height: 100%;

	margin: 0 auto;
}


/* =========================================================
   LEFT — PROJECT IDENTITY
========================================================= */

.av-case-hero__identity {
	position: absolute;

	/* هم‌تراز با محتوای سمت چپ Header */
	left: clamp(120px, 8.25vw, 132px);

	top: 31%;

	z-index: 18;

	width: 34%;
	max-width: 500px;

	direction: ltr;
	text-align: left;
}


/* =========================================================
   AVANSEN × CLIENT
========================================================= */

.av-case-hero__collab {
	display: flex;
	align-items: center;

	gap: 11px;

	margin: 0 0 18px;

	font-family: "Michroma", sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .18em;

	color: rgba(255, 255, 255, .54);

	direction: ltr;
	text-align: left;
}


.av-case-hero__collab-cross {
	color: var(--av-project-accent);

	font-size: 13px;
}


/* =========================================================
   PROJECT TITLE
========================================================= */

.av-case-hero__title {
	margin: 0;

	font-family: "Candara", sans-serif;

	font-size: clamp(100px, 5.8vw, 92px);
	font-weight: 700;

	line-height: .87;
	letter-spacing: -.04em;

	color: #fff;

	direction: ltr;
	text-align: left;
}


/* =========================================================
   PROJECT CATEGORY
========================================================= */

.av-case-hero__category {
	margin: 48px 0 0;

	font-family: "Candara", sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;

	color: rgba(255, 255, 255, .45);

	direction: ltr;
	text-align: left;
}


/* =========================================================
   PROJECT META
   CLIENT / INDUSTRY / YEAR
========================================================= */

.av-case-hero__meta {
	position: relative;

	top: auto;
	left: auto;

	width: max-content;
	max-width: 100%;

	margin-top: 48px;

	display: flex;
	align-items: flex-start;

	gap: 24px;

	z-index: auto;

	direction: ltr;
	text-align: left;
}


.av-case-hero__meta-item {
	position: relative;

	min-width: 110px;

	padding-right: 24px;

	text-align: left;
}


.av-case-hero__meta-item:not(:last-child)::after {
	content: "";

	position: absolute;

	top: 2px;
	right: 0;

	width: 1px;
	height: 38px;

	background: rgba(255, 255, 255, .16);
}


.av-case-hero__meta-label {
	display: block;

	margin-bottom: 7px;

	font-family: "Michroma", sans-serif;
	font-size: 12px;
	font-weight: 400;

	letter-spacing: .18em;

	color: rgba(255, 255, 255, .88);

	text-align: left;
}


.av-case-hero__meta-item strong {
	display: block;

	font-family: "Candara", sans-serif;
	font-size: 20px;
	font-weight: 400;

	line-height: 1.2;

	color: rgba(255, 255, 255, .38);

	text-align: left;

	white-space: nowrap;
}

/* =========================================================
   MAIN VISUAL
========================================================= */

.av-case-hero__visual {
	position: absolute;

	top: 0;
	right: 0;

	width: 68%;
	height: 100%;

	z-index: 5;

	overflow: visible;

	pointer-events: none;
}


/* =========================================================
   VISUAL BACK GLOW
========================================================= */

.av-case-hero__visual::before {
	content: "";

	position: absolute;

	left: 57%;
	top: 58%;

	width: 650px;
	height: 470px;

	transform: translate(-50%, -50%);

	border-radius: 50%;

	background:
		radial-gradient(
			ellipse at center,
			rgba(255, 94, 0, .30) 0%,
			rgba(255, 94, 0, .19) 24%,
			rgba(255, 94, 0, .09) 46%,
			rgba(255, 94, 0, .035) 60%,
			rgba(255, 94, 0, 0) 78%
		);

	filter: blur(54px);

	opacity: .92;

	z-index: 0;

	pointer-events: none;
}


/* =========================================================
   HERO ARTWORK
========================================================= */

.av-case-hero__visual-image {
	position: absolute;

	top: 58%;
	right: -1%;

	width: min(900px, 59vw);
	height: auto;

	display: block;

	transform: translateY(-50%);

	object-fit: contain;
	object-position: right center;

	z-index: 2;

	pointer-events: none;
	user-select: none;
}




/* =========================================================
   BOTTOM LEFT — SCROLL
========================================================= */

.av-case-hero__scroll {
	position: absolute;

	left: clamp(120px, 8.25vw, 132px);
	bottom: 6%;

	z-index: 20;

	display: flex;
	align-items: center;

	gap: 14px;

	margin: 0;

	color: #fff;

	text-decoration: none;

	direction: ltr;
}


.av-case-hero__scroll-icon {
	width: 48px;
	height: 48px;

	display: flex;
	align-items: center;
	justify-content: center;

	border: 1px solid var(--av-project-accent);

	border-radius: 50%;

	color: #fff;

	font-family: Arial, sans-serif;
	font-size: 21px;

	box-shadow:
		0 0 12px
		color-mix(
			in srgb,
			var(--av-project-accent) 15%,
			transparent
		);

	transition:
		transform .25s ease,
		box-shadow .25s ease;
}


.av-case-hero__scroll-text {
	font-family: "Candara", sans-serif;
	font-size: 14px;
	font-weight: 400;

	line-height: 1.05;

	color: rgba(255, 255, 255, .70);
}


.av-case-hero__scroll:hover
.av-case-hero__scroll-icon {
	transform: translateX(4px);

	box-shadow:
		0 0 24px
		color-mix(
			in srgb,
			var(--av-project-accent) 30%,
			transparent
		);
}


/* =========================================================
   BOTTOM RIGHT — SERVICES
========================================================= */

.av-case-hero__footer-note {
	position: absolute;

	right: 4.8%;
	bottom: 5.5%;

	z-index: 20;

	display: flex;
	align-items: center;

	gap: 18px;

	direction: ltr;
}


.av-case-hero__footer-note span {
	max-width: 250px;

	font-family: "Kalameh", sans-serif;
	font-size: 12px;
	font-weight: 400;

	line-height: 1.5;

	color: rgba(255, 255, 255, .48);

	text-align: right;
}


.av-case-hero__footer-note i {
	display: block;

	width: 80px;
	height: 1px;

	background: rgba(255, 255, 255, .22);
}


/* =========================================================
   02 — CHALLENGE
========================================================= */

.av-case-challenge {
	position: relative;

	width: 100%;
	min-height: 100svh;

	background: transparent;
	color: #FFFFFF;

	overflow: hidden;
}


/* =========================================================
   MARKER — SAME SHARED MARKER AS HOME
========================================================= */

.av-case-challenge__marker {
	top: 36px;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.av-case-challenge__inner {
	position: relative;
	z-index: 2;

	width: calc(100% - 96px);
	max-width: 1320px;

	margin: 0 auto;

	padding-top: 150px;
	padding-bottom: 120px;

	display: grid;

	grid-template-columns:
		minmax(0, 1.15fr)
		minmax(380px, .85fr);

	grid-template-areas:
		"text title";

	column-gap: 110px;

	align-items: start;

	direction: ltr;

	box-sizing: border-box;
}


/* =========================================================
   TITLE — RIGHT COLUMN
========================================================= */

.av-case-challenge__title {
	grid-area: title;
align-self: start;

	width: 100%;
	max-width: 500px;

	margin: 0;
	justify-self: end;

	font-family: "Gofteh", sans-serif;
	font-size: 48px;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.03em;

	color: #FFFFFF;

	direction: rtl;
	text-align: right;
}


.av-case-challenge__title-main,
.av-case-challenge__title-accent {
	display: block;
}


.av-case-challenge__title-main {
	color: #FFFFFF;
}


.av-case-challenge__title-accent {
	margin-top: 2px;

	color: #FF5A00;
}


/* =========================================================
   TEXT — LEFT COLUMN
========================================================= */

.av-case-challenge__text {
	grid-area: text;
align-self: start;

	width: 100%;
	max-width: 660px;

	margin: 0;
	justify-self: start;
	align-self: start;

	
	font-family: "Kalameh", sans-serif;
	font-size: 26px;
	font-weight: 400;
	line-height: 2;

	color: rgba(255, 255, 255, .88);

	direction: rtl;
	text-align: right;
}


.av-case-challenge__text p {
	margin: 0;
}


.av-case-challenge__text p + p {
	margin-top: 32px;
}


/* =========================================================
   CHALLENGE — TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-challenge__inner {
		width: calc(100% - 64px);

		padding-top: 135px;

		grid-template-columns:
			minmax(0, 1fr)
			minmax(300px, .85fr);

		column-gap: 64px;
	}


	.av-case-challenge__title {
		font-size: 40px;
	}


	.av-case-challenge__text {
		font-size: 18px;
		line-height: 1.9;
	}

}


/* =========================================================
   CHALLENGE — MOBILE
========================================================= */

@media (max-width: 768px) {

	.av-case-challenge {
		min-height: auto;

		padding-bottom: 90px;
	}


	.av-case-challenge__marker {
		top: 28px;
	}


	.av-case-challenge__inner {
		width: calc(100% - 40px);

		padding-top: 105px;

		display: flex;
		flex-direction: column;

		gap: 32px;

		direction: rtl;
	}


	.av-case-challenge__title {
		width: 100%;
		max-width: none;

		font-size: 30px;
		line-height: 1.25;
	}


	.av-case-challenge__text {
		width: 100%;
		max-width: none;

		font-size: 18px;
		line-height: 1.8;
	}


	.av-case-challenge__text p + p {
		margin-top: 24px;
	}

}

/* =========================================================
   03 — DISCOVERY
========================================================= */

.av-case-discovery {
	position: relative;

	width: 100%;
	min-height: 100svh;

	background: transparent;
	color: #FFFFFF;

	overflow: hidden;
}


/* =========================================================
   DISCOVERY — MARKER
========================================================= */

.av-case-discovery__marker {
	top: 36px;
}


/* =========================================================
   DISCOVERY — MAIN CONTAINER
========================================================= */

.av-case-discovery__inner {
	position: relative;
	z-index: 2;

	width: calc(100% - 96px);
	max-width: 1320px;

	margin: 0 auto;

	padding-top: 150px;
	padding-bottom: 120px;

	display: grid;

	grid-template-columns:
		minmax(0, 1fr)
		minmax(380px, .85fr);

	grid-template-areas:
		"media content";

	column-gap: 110px;

	/* مهم */
	align-items: center;

	direction: ltr;

	box-sizing: border-box;
}

/* =========================================================
   DISCOVERY — CONTENT
========================================================= */

.av-case-discovery__content {
	grid-area: content;

	width: 100%;
	max-width: 560px;

	margin: 0;

	justify-self: end;
	align-self: start;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   DISCOVERY — TITLE
========================================================= */

.av-case-discovery__title {
	width: 100%;

	margin: 0;

	font-family: "Gofteh", sans-serif;
	font-size: 30px;
	font-weight: 800;

	line-height: 1.25;
	letter-spacing: -0.03em;

	color: #FFFFFF;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   DISCOVERY — TEXT
========================================================= */

.av-case-discovery__text {
	width: 100%;

	margin-top: 40px;

	font-family: "Kalameh", sans-serif;
	font-size: 18px;
	font-weight: 400;

	line-height: 2;

	color: rgba(255, 255, 255, .88);

	direction: rtl;
	text-align: right;
}


.av-case-discovery__text p {
	margin: 0;
}


.av-case-discovery__text p + p {
	margin-top: 28px;
}


/* =========================================================
   DISCOVERY — IMAGE BOX
========================================================= */

.av-case-discovery__media {
	grid-area: media;

	width: 100%;
	max-width: 560px;

	margin: 0;

	justify-self: start;

	/* اصل کاری اینجاست */
	align-self: center;

	display: flex;
	align-items: center;
	justify-content: center;

	box-sizing: border-box;
}


/* =========================================================
   DISCOVERY — IMAGE
========================================================= */

.av-case-discovery__image,
.av-case-discovery__video {
	display: block;

	width: 100%;
	height: auto;

	max-height: 560px;

	object-fit: contain;
	object-position: center;

	margin: 0;
}


/* =========================================================
   DISCOVERY — TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-discovery__inner {
		width: calc(100% - 64px);

		padding-top: 135px;
		padding-bottom: 90px;

		grid-template-columns:
			minmax(0, 1fr)
			minmax(300px, .85fr);

		column-gap: 64px;
	}


	.av-case-discovery__title {
		font-size: 40px;
	}


	.av-case-discovery__text {
		margin-top: 32px;

		font-size: 18px;
		line-height: 1.9;
	}

}


/* =========================================================
   DISCOVERY — MOBILE
========================================================= */

@media (max-width: 768px) {

	.av-case-discovery {
		min-height: auto;
	}


	.av-case-discovery__marker {
		top: 28px;
	}


	.av-case-discovery__inner {
		width: calc(100% - 40px);

		padding-top: 105px;
		padding-bottom: 80px;

		display: flex;
		flex-direction: column;

		gap: 42px;

		direction: rtl;
	}


	.av-case-discovery__content {
		width: 100%;
		max-width: none;

		order: 1;
	}


	.av-case-discovery__title {
		font-size: 32px;
		line-height: 1.3;
	}


	.av-case-discovery__text {
		margin-top: 28px;

		font-size: 18px;
		line-height: 1.8;
	}


	.av-case-discovery__media {
		width: 100%;

		aspect-ratio: 4 / 5;

		order: 2;
	}


	.av-case-discovery__text p + p {
		margin-top: 24px;
	}

}

/* =========================================================
   05 — VISUAL SHOWCASE
========================================================= */

.av-case-showcase {
	position: relative;

	width: 100%;
	height: 100svh;
	min-height: 720px;

	background: transparent;

	overflow: hidden;
}


/* =========================================================
   SHOWCASE GRID
========================================================= */

.av-case-showcase__grid {
	width: calc(100% - 200px);
	max-width: 1280px;

	height: calc(100% - 150px);

	margin: 75px auto;

	display: grid;

	grid-template-columns:
		1.25fr
		.75fr
		.75fr;

	grid-template-rows:
		1fr
		1fr;

	gap: 24px;

	box-sizing: border-box;
}


/* =========================================================
   ITEMS
========================================================= */

.av-case-showcase__item {
	position: relative;

	overflow: hidden;

	border-radius: 18px;

	background: rgba(255, 255, 255, .025);
}


/* HERO */

.av-case-showcase__item--1 {
	grid-column: 1 / span 2;
	grid-row: 1 / span 2;
}


/* TOP RIGHT */

.av-case-showcase__item--2 {
	grid-column: 3;
	grid-row: 1;
}


/* BOTTOM RIGHT */

.av-case-showcase__item--3 {
	grid-column: 3;
	grid-row: 2;
}


/* SMALL FLOATING CARD */

.av-case-showcase__item--4,
.av-case-showcase__item--5,
.av-case-showcase__item--6,
.av-case-showcase__item--7 {
	display: none;
}

/* =========================================================
   IMAGE
========================================================= */

.av-case-showcase__image,
.av-case-showcase__video {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
	object-position: center;

	transition:
		transform .7s cubic-bezier(.2,.7,.2,1);
}


.av-case-showcase__item:hover
.av-case-showcase__image,
.av-case-showcase__video {
	transform: scale(1.02);
}


/* =========================================================
   SHOWCASE — TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-showcase__item--4,
	.av-case-showcase__item--5,
	.av-case-showcase__item--6,
	.av-case-showcase__item--7 {
		display: block;
	}

	.av-case-showcase {
		height: auto;
		min-height: 900px;
	}


	.av-case-showcase__grid {
		min-height: 900px;

		grid-template-columns:
			1fr
			1fr;

		grid-template-rows:
			repeat(4, 1fr);
	}


	.av-case-showcase__item--1 {
		grid-column: 1;
		grid-row: 1;
	}


	.av-case-showcase__item--2 {
		grid-column: 2;
		grid-row: 1;
	}


	.av-case-showcase__item--3 {
		grid-column: 2;
		grid-row: 2 / span 2;
	}


	.av-case-showcase__item--4 {
		grid-column: 1;
		grid-row: 2;
	}


	.av-case-showcase__item--5 {
		grid-column: 1;
		grid-row: 3;
	}


	.av-case-showcase__item--6 {
		grid-column: 1;
		grid-row: 4;
	}


	.av-case-showcase__item--7 {
		grid-column: 2;
		grid-row: 4;
	}

}


/* =========================================================
   SHOWCASE — MOBILE
========================================================= */

@media (max-width: 768px) {

	.av-case-showcase {
		height: auto;
		min-height: 0;

		overflow: visible;
	}


	.av-case-showcase__grid {
		width: 100%;
		height: auto;
		min-height: 0;

		display: flex;
		flex-direction: column;

		gap: 10px;

		padding: 10px;
	}


	.av-case-showcase__item {
		width: 100%;

		aspect-ratio: 4 / 3;
	}


	.av-case-showcase__item:nth-child(3),
	.av-case-showcase__item:nth-child(6) {
		aspect-ratio: 3 / 4;
	}


	.av-case-showcase__image,
.av-case-showcase__video {
		width: 100%;
		height: 100%;
	}

}

/* =========================================================
   06 — EXECUTION
========================================================= */

.av-case-execution {
	position: relative;

	width: 100%;
	min-height: 100svh;

	background: transparent;
	color: #FFFFFF;

	overflow: hidden;
}


/* =========================================================
   EXECUTION — MARKER
========================================================= */

.av-case-execution__marker {
	top: 36px;
}


/* =========================================================
   EXECUTION — MAIN LAYOUT
========================================================= */

.av-case-execution__inner {
	position: relative;
	z-index: 2;

	width: calc(100% - 96px);
	max-width: 1320px;

	margin: 0 auto;

	padding-top: 150px;
	padding-bottom: 120px;

	display: grid;

	grid-template-columns:
		minmax(0, 1fr)
		minmax(380px, .85fr);

	grid-template-areas:
		"media content";

	column-gap: 110px;

	/* دو ستون نسبت به هم وسط‌چین */
	align-items: center;

	direction: ltr;

	box-sizing: border-box;
}

/* =========================================================
   EXECUTION — CONTENT / RIGHT
========================================================= */

.av-case-execution__content {
	grid-area: content;

	width: 100%;
	max-width: 560px;

	margin: 0;

	justify-self: end;
	align-self: start;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   EXECUTION — TITLE
========================================================= */

.av-case-execution__title {
	width: 100%;

	margin: 0;

	font-family: "Gofteh", sans-serif;
	font-size: 48px;
	font-weight: 800;

	line-height: 1.25;
	letter-spacing: -0.03em;

	color: #FFFFFF;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   EXECUTION — TEXT
========================================================= */

.av-case-execution__text {
	width: 100%;

	margin-top: 40px;

	font-family: "Kalameh", sans-serif;
	font-size: 26px;
	font-weight: 400;

	line-height: 2;

	color: rgba(255, 255, 255, .88);

	direction: rtl;
	text-align: right;
}


.av-case-execution__text p {
	margin: 0;
}


.av-case-execution__text p + p {
	margin-top: 28px;
}


/* =========================================================
   EXECUTION — IMAGES / LEFT
========================================================= */

.av-case-execution__media {
	grid-area: media;

	width: 100%;
	max-width: 620px;

	margin: 0;

	justify-self: start;
	align-self: center;

	display: grid;

	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;

	align-items: center;

	box-sizing: border-box;
}


/* =========================================================
   EXECUTION — IMAGE BOX
========================================================= */

.av-case-execution__image-wrap {
	position: relative;

	width: 100%;
	margin: 0;

	overflow: hidden;
	border-radius: 10px;
}


/* قبلاً عکس دوم پایین‌تر بود — حذف stagger */

.av-case-execution__image-wrap:nth-child(2) {
	margin-top: 0;
}


/* =========================================================
   EXECUTION — IMAGE
========================================================= */

.av-case-execution__image,
.av-case-execution__video {
	display: block;

	width: 100%;
	height: auto;

	aspect-ratio: 3 / 4;

	object-fit: cover;
	object-position: center;

	margin: 0;
}


/* =========================================================
   EXECUTION — TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-execution__inner {
		width: calc(100% - 64px);

		padding-top: 135px;
		padding-bottom: 90px;

		grid-template-columns:
			minmax(0, 1fr)
			minmax(300px, .85fr);

		column-gap: 64px;
	}


	.av-case-execution__title {
		font-size: 40px;
	}


	.av-case-execution__text {
		margin-top: 32px;

		font-size: 18px;
		line-height: 1.9;
	}


	.av-case-execution__media {
		gap: 16px;
	}


	.av-case-execution__image-wrap:nth-child(2) {
		margin-top: 40px;
	}

}


/* =========================================================
   EXECUTION — MOBILE
========================================================= */

@media (max-width: 768px) {

	.av-case-execution {
		min-height: auto;
	}


	.av-case-execution__marker {
		top: 28px;
	}


	.av-case-execution__inner {
		width: calc(100% - 40px);

		padding-top: 105px;
		padding-bottom: 80px;

		display: flex;
		flex-direction: column;

		gap: 42px;

		direction: rtl;
	}


	.av-case-execution__content {
		width: 100%;
		max-width: none;

		order: 1;
	}


	.av-case-execution__title {
		font-size: 32px;
		line-height: 1.3;
	}


	.av-case-execution__text {
		margin-top: 28px;

		font-size: 20px;
		line-height: 1.8;
	}


	.av-case-execution__media {
		width: 100%;

		order: 2;

		display: grid;
		grid-template-columns:
			repeat(2, minmax(0, 1fr));

		gap: 12px;
	}


	.av-case-execution__image-wrap {
		aspect-ratio: 3 / 4;

		border-radius: 12px;
	}


	.av-case-execution__image-wrap:nth-child(2) {
		margin-top: 28px;
	}


	.av-case-execution__text p + p {
		margin-top: 24px;
	}

}


/* =========================================================
   EXECUTION — SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

	.av-case-execution__media {
		gap: 10px;
	}


	.av-case-execution__image-wrap:nth-child(2) {
		margin-top: 20px;
	}

}

/* =========================================================
   08 — FULLSCREEN MEDIA SEQUENCE
========================================================= */

.av-case-fullscreen-sequence {
	position: relative;

	width: calc(100% - 96px);
	max-width: 1320px;

	margin: 0 auto;

	display: flex;
	flex-direction: column;

	gap: 48px;

	padding: 48px 0;

	box-sizing: border-box;
}


/* =========================================================
   EACH FULLSCREEN MEDIA ITEM
========================================================= */

.av-case-fullscreen-sequence__item {
	position: relative;

	width: 100%;

	/*
	 * یک viewport منهای فضای تنفسی بالا و پایین
	 * تا خود تصویر داخل صفحه سایت قرار بگیرد
	 */
	height: calc(100svh - 96px);
	min-height: 620px;

	overflow: hidden;

	border-radius: 12px;

	background: #0B0A0A;

	box-sizing: border-box;
}


/* =========================================================
   IMAGE
========================================================= */

.av-case-fullscreen-sequence__image,
.av-case-fullscreen-sequence__video {
	display: block;

	width: 100%;
	height: 100%;

	margin: 0;

	object-fit: cover;
	object-position: center;

	user-select: none;
}

.av-case-fullscreen-sequence__video {
	border: 0;
	outline: 0;

	background: transparent;
}


/* =========================================================
   FULLSCREEN VIDEO — CUSTOM PLAY / PAUSE
========================================================= */

.av-case-fullscreen-sequence__video {
	cursor: pointer;
}

.av-case-fullscreen-sequence__video-toggle {
	position: absolute;

	left: 28px;
	bottom: 28px;

	z-index: 5;

	width: 58px;
	height: 58px;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 0;

	border: 1px solid rgba(255, 255, 255, .42);
	border-radius: 50%;

	background: rgba(11, 10, 10, .46);
	color: #fff;

	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);

	cursor: pointer;

	transition:
		transform .25s ease,
		background .25s ease,
		border-color .25s ease;
}

.av-case-fullscreen-sequence__video-toggle:hover {
	transform: scale(1.06);

	background: rgba(11, 10, 10, .68);
	border-color: rgba(255, 255, 255, .78);
}

.av-case-fullscreen-sequence__video-toggle:focus-visible {
	outline: 2px solid var(--av-project-accent);
	outline-offset: 4px;
}


/* Play icon — default / paused */

.av-case-fullscreen-sequence__video-toggle-icon {
	display: block;

	width: 0;
	height: 0;

	margin-left: 4px;

	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 13px solid currentColor;
}


/* Pause icon — while video is playing */

.av-case-fullscreen-sequence__video-toggle.is-playing
.av-case-fullscreen-sequence__video-toggle-icon {
	position: relative;

	width: 13px;
	height: 16px;

	margin-left: 0;

	border: 0;
}

.av-case-fullscreen-sequence__video-toggle.is-playing
.av-case-fullscreen-sequence__video-toggle-icon::before,
.av-case-fullscreen-sequence__video-toggle.is-playing
.av-case-fullscreen-sequence__video-toggle-icon::after {
	content: "";

	position: absolute;
	top: 0;

	width: 4px;
	height: 16px;

	border-radius: 1px;

	background: currentColor;
}

.av-case-fullscreen-sequence__video-toggle.is-playing
.av-case-fullscreen-sequence__video-toggle-icon::before {
	left: 1px;
}

.av-case-fullscreen-sequence__video-toggle.is-playing
.av-case-fullscreen-sequence__video-toggle-icon::after {
	right: 1px;
}


@media (max-width: 768px) {

	.av-case-fullscreen-sequence__video-toggle {
		left: 18px;
		bottom: 18px;

		width: 50px;
		height: 50px;
	}

}



@media (max-width: 1100px) {

	.av-case-fullscreen-sequence {
		width: calc(100% - 64px);

		gap: 32px;
		padding: 32px 0;
	}

	.av-case-fullscreen-sequence__item {
		height: calc(100svh - 64px);
		min-height: 560px;
	}

}


@media (max-width: 768px) {

	.av-case-fullscreen-sequence {
		width: calc(100% - 40px);

		gap: 20px;
		padding: 20px 0;
	}

	.av-case-fullscreen-sequence__item {
		height: auto;
		min-height: 0;

		aspect-ratio: 4 / 5;

		border-radius: 8px;
	}

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-fullscreen-sequence__item {
		height: 100svh;
		min-height: 680px;
	}

}



/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

	.av-case-hero {
		min-height: 700px;
	}


	.av-case-hero__identity {
		left: 5%;
		top: 28%;

		width: 38%;
	}


	.av-case-hero__title {
		font-size: clamp(48px, 6vw, 72px);
	}


	.av-case-hero__meta {
		margin-top: 30px;

		gap: 18px;
	}


	.av-case-hero__meta-item {
		min-width: 90px;

		padding-right: 18px;
	}


	.av-case-hero__visual {
		width: 64%;
	}


	.av-case-hero__visual-image {
		top: 59%;
		right: -8%;

		width: min(780px, 62vw);
	}


	.av-case-hero__visual::before {
		left: 60%;
		top: 59%;

		width: 540px;
		height: 410px;
	}


	.av-case-hero__case {
		right: 3%;
	}


	.av-case-hero__footer-note {
		right: 3%;
	}

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

	.av-case-hero {
		height: auto;
		min-height: 100svh;

		padding:
			100px 0
			70px;
	}


	.av-case-hero__inner {
		width: calc(100% - 40px);
		height: auto;

		min-height: calc(100svh - 170px);

		display: flex;
		flex-direction: column;

		margin: 0 auto;
	}


	/* -------------------------
	   Identity
	------------------------- */

	.av-case-hero__identity {
		position: relative;

		top: auto;
		left: auto;

		width: 100%;
		max-width: none;

		order: 1;

		z-index: 10;
	}


	.av-case-hero__collab {
		margin-bottom: 18px;

		font-size: 10px;
	}


	.av-case-hero__title {
		font-size: clamp(46px, 15vw, 66px);

		line-height: .9;
	}


	.av-case-hero__category {
		margin-top: 16px;

		font-size: 16px;
	}


	/* -------------------------
	   Meta
	------------------------- */

	.av-case-hero__meta {
		width: 100%;

		margin-top: 30px;

		display: grid;
		grid-template-columns:
			repeat(3, minmax(0, 1fr));

		gap: 0;
	}


	.av-case-hero__meta-item {
		min-width: 0;

		padding:
			0 14px;
	}


	.av-case-hero__meta-item:first-child {
		padding-left: 0;
	}


	.av-case-hero__meta-item:last-child {
		padding-right: 0;
	}


	.av-case-hero__meta-label {
		font-size: 15px;
	}


	.av-case-hero__meta-item strong {
		font-size: 15px;
	}


	/* -------------------------
	   Visual
	------------------------- */

	.av-case-hero__visual {
		position: relative;

		top: auto;
		right: auto;

		width: calc(100% + 40px);
		height: 380px;

		margin:
			35px
			-20px
			0;

		order: 2;

		overflow: hidden;
	}


	.av-case-hero__visual-image {
		top: 53%;
		right: -18%;

		width: 125vw;
		max-width: none;
	}


	.av-case-hero__visual::before {
		left: 60%;
		top: 52%;

		width: 420px;
		height: 320px;

		filter: blur(48px);

		opacity: .80;
	}


	/* -------------------------
	   Case number
	------------------------- */

	.av-case-hero__case {
		top: 28px;
		right: 20px;
	}


	/* -------------------------
	   Scroll
	------------------------- */

	/* CASE STUDY — MOBILE SCROLL */

.av-case-hero__scroll {
    position: relative;
    left: auto;
    bottom: auto;

    order: 3;
    align-self: center;

    width: fit-content;
    margin: 22px auto 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.av-case-hero__scroll-icon {
    width: 44px;
    height: 44px;
    font-size: 19px;
    transform: rotate(90deg);
}

.av-case-hero__scroll-text {
    font-size: 13px;
}


	/* -------------------------
	   Footer note
	------------------------- */

	.av-case-hero__footer-note {
		display: none;
	}

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

	.av-case-hero__inner {
		width: calc(100% - 32px);
	}


	.av-case-hero__title {
		font-size: clamp(42px, 16vw, 58px);
	}


	.av-case-hero__meta {
		margin-top: 26px;
	}


	.av-case-hero__meta-item {
		padding:
			0 9px;
	}


	.av-case-hero__meta-label {
		font-size: 6px;

		letter-spacing: .12em;
	}


	.av-case-hero__meta-item strong {
		font-size: 15px;
	}


	.av-case-hero__visual {
		width: calc(100% + 32px);
		height: 330px;

		margin-left: -16px;
		margin-right: -16px;
	}


	.av-case-hero__visual-image {
		right: -24%;

		width: 135vw;
	}

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

	.av-case-hero__visual,
	.av-case-hero__meta,
	.av-case-hero__identity {
		opacity: 1;

		transform: none;

		animation: none;
	}

}

/* =========================================================
   CASE STUDY — BODY TEXT SIZE
========================================================= */

.av-case-challenge__text,
.av-case-discovery__text,
.av-case-creative__text,
.av-case-execution__text,
.av-case-result__text,
.av-case-takeaway__text {
	font-size: 26px;
	font-weight: 400;
	line-height: 1.9;

	letter-spacing: 0;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   CASE STUDY — SECTION SPACING SYSTEM
========================================================= */

:root {
	--av-case-section-space: 160px;
}


/* =========================================================
   STANDARD CONTENT SECTIONS
========================================================= */

.av-case-challenge,
.av-case-discovery,
.av-case-creative,
.av-case-execution,
.av-case-result,
.av-case-takeaway {
	padding-top: var(--av-case-section-space);
	padding-bottom: var(--av-case-section-space);

	box-sizing: border-box;
}

/* =========================================================
   REMOVE OLD INNER VERTICAL SPACING
========================================================= */

.av-case-challenge__inner,
.av-case-discovery__inner,
.av-case-creative__inner,
.av-case-execution__inner,
.av-case-result__inner,
.av-case-takeaway__inner {
	padding-top: 0;
	padding-bottom: 0;
}

.av-case-challenge__marker,
.av-case-discovery__marker,
.av-case-creative__marker,
.av-case-execution__marker,
.av-case-result__marker,
.av-case-takeaway__marker {
	top: 64px;
}

@media (max-width: 1100px) {

	:root {
		--av-case-section-space: 120px;
	}

}


@media (max-width: 768px) {

	:root {
		--av-case-section-space: 88px;
	}

	.av-case-challenge__marker,
	.av-case-discovery__marker,
	.av-case-creative__marker,
	.av-case-execution__marker,
	.av-case-result__marker,
	.av-case-takeaway__marker {
		top: 32px;
	}

}


/* =========================================================
   CASE STUDY — HEADER VISIBILITY
========================================================= */

body.single-av_project .site-header {
	transition:
		transform .4s cubic-bezier(.2,.7,.2,1),
		opacity .3s ease;

	will-change: transform, opacity;
}


body.single-av_project.av-case-header-hidden .site-header {
	transform: translateY(-110%);
	opacity: 0;

	pointer-events: none;
}




/* =========================================================
   CASE STUDY — HEADER VISIBILITY
========================================================= */

body.single-av_project .av-header {
	transition:
		transform 0.4s cubic-bezier(.2, .7, .2, 1),
		opacity 0.3s ease;

	will-change: transform, opacity;
}


/* Hero تمام شده → Header مخفی */

body.single-av_project.av-case-header-hidden .av-header {
	transform: translateY(-110%);
	opacity: 0;

	pointer-events: none;
}

/* =========================================================
   CASE STUDY — VERTICAL CENTERING FIX
   Keep existing layouts intact
========================================================= */

@media (min-width: 769px) {

	/* سکشن‌ها */
	.av-case-challenge,
	.av-case-discovery,
	.av-case-creative,
	.av-case-execution,
	.av-case-result,
	.av-case-takeaway {
		min-height: 100svh;

		display: flex;
		flex-direction: column;
		justify-content: center;

		padding-top: 0;
		padding-bottom: 0;
	}


	/* محتوای اصلی سکشن */
	.av-case-challenge__inner,
	.av-case-discovery__inner,
	.av-case-creative__inner,
	.av-case-execution__inner,
	.av-case-result__inner,
	.av-case-takeaway__inner {
		padding-top: 0;
		padding-bottom: 0;
	}


	/* مارکرها:
	   فقط موقعیت عمودی‌شان را نسبت به مرکز محتوا تنظیم می‌کنیم
	   بدون دست زدن به ساختار اصلی */
	.av-case-challenge__marker,
	.av-case-discovery__marker,
	.av-case-creative__marker,
	.av-case-execution__marker,
	.av-case-result__marker,
	.av-case-takeaway__marker {
		top: calc(50% - 300px);
	}

}

/* =========================================================
   DISCOVERY SECTION — LOCAL FIX ONLY
========================================================= */

@media (min-width: 769px) {

	/* -----------------------------------------
	   Marker
	   فقط مارکر همین سکشن
	----------------------------------------- */

	body.single-av_project
	.av-case-discovery__marker {
		top: calc(50% - 355px);
	}


	/* -----------------------------------------
	   Wider content column
	----------------------------------------- */

	body.single-av_project
	.av-case-discovery__inner {
		grid-template-columns:
			minmax(0, 0.88fr)
			minmax(0, 1.12fr);
	}


	/* متن اجازه داشته باشد عرض بیشتری بگیرد */

	body.single-av_project
	.av-case-discovery__content {
		width: 100%;
		max-width: none;
	}

}

/* =========================================================
   FULLSCREEN MEDIA SEQUENCE — CENTER EACH ITEM IN VIEWPORT
========================================================= */

@media (min-width: 769px) {

	body.single-av_project
	.av-case-fullscreen-sequence__item {

		width: 100%;
		height: 100svh;

		padding: 48px 0;

		box-sizing: border-box;

		display: flex;
		align-items: center;
		justify-content: center;

		overflow: hidden;
	}


	body.single-av_project
	.av-case-fullscreen-sequence__image,
	body.single-av_project
	.av-case-fullscreen-sequence__video {

		display: block;

		width: 100%;
		height: calc(100svh - 96px);

		object-fit: cover;
		object-position: center;

		margin: 0;

		border-radius: 12px;
	}

}

/* =========================================================
   FULLSCREEN MEDIA SEQUENCE — REMOVE GRAY BARS
========================================================= */

body.single-av_project
.av-case-fullscreen-sequence__item {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.single-av_project
.av-case-fullscreen-sequence__item::before,
body.single-av_project
.av-case-fullscreen-sequence__item::after {
	content: none !important;
	display: none !important;
}

body.single-av_project
.av-case-fullscreen-sequence__image,
body.single-av_project
.av-case-fullscreen-sequence__video {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}



/* =========================================================
   FULLSCREEN MEDIA SEQUENCE — MOBILE FINAL
========================================================= */

@media (max-width: 768px) {

    .av-case-fullscreen-sequence {
        width: calc(100% - 48px) !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 0 auto !important;
        padding: 24px 0 !important;

        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }


    .av-case-fullscreen-sequence__item {
        position: relative !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        aspect-ratio: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        display: block !important;
        overflow: hidden !important;

        border-radius: 8px !important;
    }


    .av-case-fullscreen-sequence__image,
    .av-case-fullscreen-sequence__video {
        position: static !important;

        display: block !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;

        object-fit: contain !important;
        transform: none !important;

        border-radius: 8px !important;
    }

}


@media (max-width: 768px) {

    /* نتیجه → مدیاها */
    .av-case-result {
        padding-bottom: 16px !important;
    }

    .av-case-fullscreen-sequence {
        padding-top: 24px !important;
    }

}
/* =========================================================
   CASE STUDY — IMAGE / VIDEO PARITY
   Video classes correspond to the updated single template.
========================================================= */

.av-case-discovery__video,
.av-case-showcase__video,
.av-case-execution__video {
    border: 0;
    background: #0b0a0a;
}

.av-case-discovery__video {
    max-width: 100%;
}

.av-case-showcase__video {
    position: absolute;
    inset: 0;
}

.av-case-execution__video {
    max-width: 100%;
}

@media (max-width: 768px) {
    .av-case-discovery__video {
        max-height: 100%;
    }
}

/* =========================================================
   EXECUTION — ONLY THE VIDEO FRAME USES ITS NATIVE RATIO
   All other media retain their original template dimensions.
========================================================= */

/* Whichever execution card contains a video can grow naturally. */
.av-case-execution__image-wrap:has(> .av-case-execution__video) {
    height: auto;
    aspect-ratio: auto;
    align-self: center;
}

.av-case-execution__image-wrap > .av-case-execution__video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
}

/* Override the fixed 3:4 card ratio on mobile for video only. */
@media (max-width: 768px) {
    .av-case-execution__image-wrap:has(> .av-case-execution__video) {
        height: auto;
        aspect-ratio: auto;
    }
}


/* CASE STUDY — MOBILE TYPOGRAPHY */

@media (max-width: 768px) {

    /* عنوان‌های فارسی */
    .av-case-challenge__title,
    .av-case-discovery__title,
    .av-case-creative__title,
    .av-case-execution__title,
    .av-case-result__title,
    .av-case-takeaway__title {
        font-family: "Gofteh", sans-serif;
        font-size: 30px;
        line-height: 1.3;
    }

    /* متن توضیحات */
    .av-case-challenge__text,
    .av-case-discovery__text,
    .av-case-creative__text,
    .av-case-execution__text,
    .av-case-result__text,
    .av-case-takeaway__text {
        font-family: "Kalameh", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.8;
    }

    /* عنوان انگلیسی پروژه */
    .av-case-hero__title {
        font-family: "Candara", sans-serif;
        font-size: clamp(42px, 16vw, 58px);
    }

    /* متن اسکرول */
    .av-case-hero__scroll-text {
        font-size: 13px;
    }
}


/* CASE STUDY — MOBILE MARKER FONT */

@media screen and (max-width: 768px) {

  body.single-av_project
  .av-case-study [class$="__marker"],
  body.single-av_project
  .av-case-study [class$="__marker"] span {
    font-family: "Kalameh", sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
  }

}



/* CASE STUDY — MOBILE CREATIVE TO SHOWCASE SPACING */

@media (max-width: 768px) {

    .av-case-creative {
        padding-bottom: 40px !important;
    }

    .av-case-showcase {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .av-case-showcase__grid {
        margin-top: 0 !important;
    }

}


/* CASE STUDY — MOBILE MEDIA SPACING */

@media (max-width: 768px) {
    .av-case-showcase__grid {
        row-gap: 24px !important;
    }
}


/* CASE STUDY — MOBILE SECTION SPACING */

@media (max-width: 768px) {

    /* مسیر خلاقه، نتیجه و برداشت آوانسن */
    .av-case-creative,
    .av-case-result,
    .av-case-takeaway {
        min-height: 0 !important;
        height: auto !important;
        padding-top: 56px !important;
    }

    /* فاصله انتهای سکشن قبل از مدیا */
    .av-case-discovery {
        padding-bottom: 40px !important;
    }

    /* فاصله گالری تا سکشن نتیجه */
    .av-case-showcase {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .av-case-result {
        margin-top: 0 !important;
    }
}


/* CASE STUDY — MOBILE MARKER TO TITLE SPACING */

@media (max-width: 768px) {

    .av-case-creative .av-case-challenge__inner,
    .av-case-result .av-case-challenge__inner,
    .av-case-takeaway .av-case-challenge__inner {
        margin-top: 48px !important;
    }

}




/* CASE STUDY — MOBILE HERO POSITION */

@media (max-width: 768px) {

    /* تصویر بالاتر بیاید */
    .av-case-hero__visual {
        margin-top: -50px !important;
    }

    /* اسکرول وسط‌چین و نزدیک‌تر به تصویر */
    .av-case-hero__scroll {
        align-self: center;
        margin: 8px auto 0 !important;
    }

    /* فلش رو به پایین، بدون چرخش دایره */
    .av-case-hero__scroll-icon {
        transform: none !important;
    }
}




.av-case-fullscreen-sequence__item {
    position: relative;
}

.av-video-sound {
    position: absolute;
    bottom: 24px;
    left: 88px;
    z-index: 20;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.av-video-sound [hidden] {
    display: none;
}



/* AVANSEN — VIDEO CONTROLS */

.av-case-fullscreen-sequence__item {
    position: relative;
}

.av-video-controls {
    position: absolute;
    bottom: 28px;
    left: 28px;
    z-index: 20;

    display: flex;
    align-items: center;
    gap: 10px;
}

.av-video-controls .av-case-fullscreen-sequence__video-toggle,
.av-video-controls .av-video-sound {
    position: relative;
    inset: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    padding: 0;

    background: rgba(11, 10, 10, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;

    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.av-video-controls .av-case-fullscreen-sequence__video-toggle:hover,
.av-video-controls .av-video-sound:hover {
    background: #FF5A00;
    border-color: #FF5A00;
    color: #fff;
    transform: translateY(-2px);
}

.av-video-controls .av-video-sound svg {
    width: 21px;
    height: 21px;
}

.av-video-controls .av-video-sound [hidden] {
    display: none !important;
}

/* MOBILE */

@media (max-width: 767px) {
    .av-video-controls {
        bottom: 16px;
        left: 16px;
        gap: 8px;
    }

    .av-video-controls .av-case-fullscreen-sequence__video-toggle,
    .av-video-controls .av-video-sound {
        width: 42px;
        height: 42px;
    }
}


