/* ==========================================================================
   Layout — global structure & page sections
   ========================================================================== */

.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

section {
	position: relative;
	/* space-6, not the original space-8 — 6rem top+bottom stacked into a
	   ~192px dead band between every pair of sections (flagged repeatedly
	   as "empty area, remove it"). 3rem each side keeps breathing room
	   while letting adjacent sections read as one continuous page. */
	padding-block: var(--space-6);
}

.section-head {
	max-width: 640px;
	margin-inline: auto;
	text-align: center;
	margin-bottom: var(--space-7);
}

.eyebrow {
	display: inline-block;
	font-size: var(--fs-xs);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-gold);
	margin-bottom: var(--space-2);
	position: relative;
	padding-inline-start: 28px;
}

.eyebrow::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	width: 18px;
	height: 1px;
	background: var(--color-gold);
	transform: translateY(-50%);
}

.section-title {
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	color: var(--color-white);
	margin-bottom: var(--space-3);
}

.section-desc {
	color: var(--color-gray);
	font-size: var(--fs-body-lg);
	line-height: 1.7;
}

.section-desc em {
	color: var(--color-gold-light);
	font-style: normal;
	font-weight: 600;
}

/* Services section header specifically — its description is long enough
   to wrap awkwardly at the shared .section-head width; widened + kept to
   one line here only, other sections' (shorter) descriptions are untouched. */
.services .section-head {
	max-width: 780px;
}

@media (min-width: 900px) {
	.section-desc--oneline {
		white-space: nowrap;
	}
}

/* ==========================================================================
   Loading Screen | صفحه بارگذاری
   ========================================================================== */

.loader {
	position: fixed;
	inset: 0;
	z-index: var(--z-loader);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	background: var(--color-bg);
	transition: opacity var(--dur-slow) var(--ease-luxury), visibility var(--dur-slow) var(--ease-luxury);
}

body:not(.is-loading) .loader {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loader__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	animation: loader-pulse 1.8s var(--ease-soft) infinite;
}

.loader__mark-img {
	/* Real logo image has its own art (flourishes/glow) — no background
	   badge box needed around it, unlike the old text-in-a-square mark. */
	height: 84px;
	width: auto;
}

.loader__clinic-name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	color: var(--color-gray);
	text-align: center;
}

.loader__bar {
	width: 160px;
	height: 2px;
	background: rgba(247, 247, 247, 0.08);
	border-radius: var(--radius-pill);
	overflow: hidden;
}

.loader__bar-fill {
	display: block;
	height: 100%;
	width: 0%;
	background: var(--gradient-gold);
	animation: loader-fill 1.6s var(--ease-luxury) forwards;
}

/* ==========================================================================
   Ambient decoration | ذرات طلایی و بافت گرین
   ========================================================================== */

.particles-canvas {
	position: fixed;
	inset: 0;
	z-index: var(--z-particles);
	pointer-events: none;
}

.grain-overlay {
	position: fixed;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	opacity: 0.035;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Navigation | ناوبری
   ========================================================================== */

.nav {
	position: fixed;
	top: 0;
	inset-inline: 0;
	z-index: var(--z-nav);
	padding-block: var(--space-3);
	transition: padding var(--dur-mid) var(--ease-soft), background var(--dur-mid) var(--ease-soft), box-shadow var(--dur-mid) var(--ease-soft);
}

.nav.is-scrolled {
	padding-block: var(--space-2);
	background: rgba(13, 13, 13, 0.55);
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	border-bottom: 1px solid var(--glass-border);
	box-shadow: var(--shadow-soft);
}

.nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.nav__logo {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-display);
	font-size: 1.05rem;
	white-space: nowrap;
}

.nav__logo-mark {
	/* Real logo image (not a plain-square icon) — sized by height so its
	   natural aspect ratio is preserved, never stretched into a square. */
	height: 40px;
	width: auto;
}

.nav__logo-text em {
	color: var(--color-gold);
	font-style: normal;
}

.nav__list {
	display: flex;
	align-items: center;
	gap: var(--space-5);
}

.nav__link {
	position: relative;
	font-size: var(--fs-small);
	color: var(--color-gray);
	transition: color var(--dur-fast) var(--ease-soft);
	padding-block: 4px;
}

.nav__link::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 1px;
	background: var(--color-gold);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--dur-fast) var(--ease-soft);
}

.nav__link:hover,
.nav__link.is-active {
	color: var(--color-white);
}

.nav__link:hover::after,
.nav__link.is-active::after {
	transform: scaleX(1);
}

.nav__actions {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.nav__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
}

.nav__burger span {
	display: block;
	height: 1px;
	background: var(--color-white);
	transition: transform var(--dur-fast) var(--ease-soft), opacity var(--dur-fast) var(--ease-soft);
}

/* ==========================================================================
   Hero | بخش قهرمان — layered editorial composition:
   aurora + twin glows + hairline inset frame behind a 2-column grid
   (masked-line display title / conic-glow slider frame). Entrance is
   GSAP-driven (js/modules/heroIntro.js); everything here is styled
   VISIBLE by default so a missing/blocked GSAP CDN degrades to a
   static-but-complete hero, never a blank one.
   ========================================================================== */

.hero {
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding-block: calc(var(--space-8) + var(--space-5)) var(--space-6);
	overflow: hidden;
}

.services {
	/* Tighter block padding than the generic `section` rule — the cards
	   carry enough visual weight that the default 6rem top+bottom read
	   as a dead gap between this section and the gallery below. */
	padding-top: var(--space-6);
	padding-bottom: var(--space-6);
	isolation: isolate;
}

/* Decorative backdrop behind the service cards — pure CSS, no image
   request. isolation: isolate keeps the z-index:-1 layers under the
   cards but above the page background. */
.services::before {
	/* Soft gold "aurora" glows — top-right / bottom-left, echoing the
	   hero's glow language so the page reads as one system. */
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		radial-gradient(42% 55% at 85% 8%, rgba(198, 164, 108, 0.14), transparent 70%),
		radial-gradient(38% 50% at 8% 90%, rgba(198, 164, 108, 0.10), transparent 70%),
		linear-gradient(180deg, transparent 0%, rgba(198, 164, 108, 0.03) 46%, transparent 100%);
	pointer-events: none;
}
.services::after {
	/* Fine gold dot-matrix, radially masked so it dissolves toward the
	   edges instead of ending in a hard line. */
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background-image: radial-gradient(rgba(198, 164, 108, 0.2) 1px, transparent 1.5px);
	background-size: 24px 24px;
	-webkit-mask-image: radial-gradient(62% 68% at 50% 45%, #000, transparent 80%);
	mask-image: radial-gradient(62% 68% at 50% 45%, #000, transparent 80%);
	opacity: 0.6;
	pointer-events: none;
}

/* Pull the gallery up toward the services cards — its 6rem default top
   padding plus services' bottom padding stacked into a ~190px hole. */
.gallery {
	padding-top: var(--space-5);
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hero__glow {
	position: absolute;
	width: 46vw;
	height: 46vw;
	border-radius: 50%;
	background: var(--gradient-radial-glow);
	filter: blur(10px);
	opacity: 0.6;
}

.hero__glow--1 { top: -10%; inset-inline-end: -10%; }
.hero__glow--2 { bottom: -20%; inset-inline-start: -15%; opacity: 0.35; }

/* Hairline editorial frame inset from the viewport edge, with gold
   corner ticks — pure decoration, sits under the content. Top edge
   clears the fixed navbar (~72px tall) so the hairline never crosses
   the nav links. */
.hero__deco-frame {
	position: absolute;
	inset: clamp(14px, 2.2vw, 30px);
	top: calc(72px + clamp(10px, 1.5vw, 22px));
	border: 1px solid rgba(198, 164, 108, 0.14);
	border-radius: var(--radius-lg);
}

.hero__deco-frame::before,
.hero__deco-frame::after {
	content: '';
	position: absolute;
	width: 26px;
	height: 26px;
	border: 1px solid rgba(198, 164, 108, 0.55);
}

.hero__deco-frame::before {
	top: -1px;
	inset-inline-start: -1px;
	border-block-end: none;
	border-inline-end: none;
	border-start-start-radius: var(--radius-lg);
}

.hero__deco-frame::after {
	bottom: -1px;
	inset-inline-end: -1px;
	border-block-start: none;
	border-inline-start: none;
	border-end-end-radius: var(--radius-lg);
}

.hero__inner {
	position: relative;
	z-index: var(--z-content);
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	align-items: center;
	gap: var(--space-7);
}

/* ---- Display title — each line lives in an overflow-hidden mask so
   heroIntro.js can slide it up from below the fold line. ---- */
.hero__title {
	font-family: var(--font-display);
	font-size: clamp(3rem, 7vw, 6.25rem);
	font-weight: 800;
	line-height: 1.08;
	margin: 0;
}

.hero__title-line {
	display: block;
	overflow: hidden;
	padding-block-end: 0.08em; /* keeps Persian descenders inside the mask */
}

.hero__title-inner {
	display: block;
	will-change: transform;
}

.hero__title em {
	font-style: normal;
	background: linear-gradient(105deg,
		var(--color-gold-dark) 0%,
		var(--color-gold) 30%,
		#f4e5c3 50%,
		var(--color-gold) 70%,
		var(--color-gold-dark) 100%);
	background-size: 220% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: hero-shimmer calc(7s / max(var(--motion-scale), 0.001)) linear infinite;
}

@keyframes hero-shimmer {
	to { background-position: -220% 0; }
}

/* Short gold rule separating title from the service chips. */
.hero__rule {
	width: 72px;
	height: 2px;
	margin-block: var(--space-5);
	background: var(--gradient-gold);
	border-radius: var(--radius-pill);
}

.hero__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.hero__tag {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-size: var(--fs-small);
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--color-white);
	border: 1px solid rgba(198, 164, 108, 0.4);
	border-radius: var(--radius-pill);
	padding: 0.65em 1.4em;
	background: var(--glass-bg);
	box-shadow: 0 8px 22px -16px rgba(198, 164, 108, 0.7), var(--shadow-inset-hairline);
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	transition: color calc(var(--dur-fast) * var(--motion-scale)) var(--ease-soft),
		border-color calc(var(--dur-fast) * var(--motion-scale)) var(--ease-soft),
		background calc(var(--dur-fast) * var(--motion-scale)) var(--ease-soft),
		box-shadow calc(var(--dur-fast) * var(--motion-scale)) var(--ease-soft),
		transform calc(var(--dur-fast) * var(--motion-scale)) var(--ease-spring);
}

.hero__tag-icon {
	color: var(--color-gold);
	transform: scale(1.15);
	transition: transform calc(var(--dur-fast) * var(--motion-scale)) var(--ease-spring);
}

.hero__tag:hover {
	color: var(--color-white);
	border-color: var(--color-gold);
	background: var(--glass-bg-strong);
	box-shadow: 0 10px 28px -14px rgba(198, 164, 108, 0.6);
	transform: translate3d(0, -2px, 0);
}

.hero__tag:hover .hero__tag-icon {
	transform: scale(1.15) rotate(-4deg);
}

/* ---- Visual column — slider frame wrapped by a slowly rotating conic
   gold sheen (@property registers --hero-angle so the custom property
   itself interpolates; without support the sheen just holds still). ---- */
@property --hero-angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

.hero__visual {
	position: relative;
	justify-self: center;
	width: min(100%, 440px);
	will-change: transform;
}

.hero__frame-glow {
	position: absolute;
	inset: -2px;
	z-index: 0;
	border-radius: calc(var(--radius-lg) + 2px);
	background: conic-gradient(from var(--hero-angle),
		transparent 0%,
		transparent 62%,
		rgba(231, 206, 159, 0.85) 74%,
		rgba(198, 164, 108, 0.25) 82%,
		transparent 92%);
	animation: hero-frame-spin calc(9s / max(var(--motion-scale), 0.001)) linear infinite;
	filter: blur(1px);
}

@keyframes hero-frame-spin {
	to { --hero-angle: 360deg; }
}

.hero__frame {
	position: relative;
	z-index: 1;
	aspect-ratio: 4 / 5;
	border-radius: var(--radius-lg);
	overflow: hidden;
	padding: 10px;
}

.hero__frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	border-radius: calc(var(--radius-lg) - 10px);
}

/* Slow Ken Burns drift on whichever slide is showing. */
.hero-slider__slide.is-active img {
	animation: hero-kenburns calc(11s / max(var(--motion-scale), 0.001)) var(--ease-soft) infinite alternate;
}

@keyframes hero-kenburns {
	from { transform: scale(1); }
	to { transform: scale(1.05); }
}

.hero__frame-ring {
	position: absolute;
	inset: -20px;
	z-index: 0;
	border: 1px solid var(--glass-border);
	border-radius: calc(var(--radius-lg) + 20px);
}

/* ---- Hero slider — 3-image crossfade carousel inside the frame ---- */
.hero-slider__track {
	position: relative;
	width: 100%;
	height: 100%;
}

.hero-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity calc(var(--dur-slow) * var(--motion-scale)) var(--ease-luxury);
	pointer-events: none;
}

.hero-slider__slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.hero-slider__dots {
	position: absolute;
	inset-inline: 0;
	bottom: var(--space-3);
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 0.5em;
}

.hero-slider__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: var(--radius-pill);
	background: rgba(247, 247, 247, 0.4);
	cursor: pointer;
	transition: width calc(var(--dur-fast) * var(--motion-scale)) var(--ease-out-expo),
		background calc(var(--dur-fast) * var(--motion-scale)) var(--ease-soft);
}

.hero-slider__dot.is-active {
	width: 26px;
	background: var(--gradient-gold);
}

.hero__scroll {
	position: absolute;
	bottom: var(--space-4);
	inset-inline-start: 50%;
	transform: translateX(50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-xs);
	letter-spacing: 0.25em;
	color: var(--color-gray);
	z-index: var(--z-content);
}

.hero__scroll-line {
	width: 1px;
	height: 44px;
	background: linear-gradient(var(--color-gold), transparent);
	overflow: hidden;
}

.hero__scroll-line::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	background: var(--color-gold);
	animation: scroll-line 2s var(--ease-soft) infinite;
}

@media (prefers-reduced-motion: reduce) {
	.hero__title em,
	.hero__frame-glow,
	.hero-slider__slide.is-active img,
	.hero__scroll-line::after {
		animation: none;
	}
}

/* ==========================================================================
   Services | خدمات
   ========================================================================== */

/* Flexbox, not CSS Grid — a wrapped flex row applies `justify-content`
   PER LINE, so a trailing incomplete row (5 cards → 3 + 2, or any future
   count that isn't a multiple of 3) is automatically centered instead of
   left-stuck with an awkward gap. Grid's equivalent would need manual
   spanning/placement re-tuned every time the card count changes. */
.services__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-4);
	perspective: 1200px;
}

/* ==========================================================================
   Gallery | نمونه کارها
   ========================================================================== */

/* Continuous marquee, not a static grid — .gallery__track renders the
   image set TWICE (see templates/index.html) and animates from
   translateX(-50%) to translateX(0), i.e. exactly one full set's width;
   since both halves are identical, the loop point is invisible and the
   strip appears to drift right forever with no jump/reset. */
.gallery__viewport {
	overflow: hidden;
	width: 100%;
	/* Forced LTR: the page is dir="rtl", and a block wider than its
	   container (.gallery__track's `width: max-content` is ~3.3x the
	   viewport) anchors its INLINE-END edge to the container in RTL —
	   i.e. its right edge, not its left. That silently broke the
	   translateX(-50%) -> translateX(0) marquee math below, which assumes
	   the standard LTR "left edge anchored, overflow extends right"
	   layout. Scoping direction to just this decorative strip keeps the
	   rest of the page RTL; Persian glyphs inside still render
	   correctly (direction affects block/inline flow, not script shaping). */
	direction: ltr;
	mask-image: linear-gradient(to left, transparent 0%, black 5%, black 95%, transparent 100%);
	-webkit-mask-image: linear-gradient(to left, transparent 0%, black 5%, black 95%, transparent 100%);
}

.gallery__track {
	display: flex;
	width: max-content;
	gap: var(--space-4);
	padding-inline: var(--container-pad);
	animation: gallery-marquee calc(32s * var(--motion-scale, 1)) linear infinite;
}

.gallery__viewport:hover .gallery__track {
	animation-play-state: paused;
}

@keyframes gallery-marquee {
	from { transform: translateX(-50%); }
	to { transform: translateX(0%); }
}

.gallery__item {
	position: relative;
	flex: 0 0 auto;
	width: clamp(240px, 26vw, 360px);
	border-radius: var(--radius-md);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: 1px solid var(--glass-border);
}

.gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-luxury);
}

.gallery__item:hover img {
	transform: scale(1.08);
}

.gallery__item figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: var(--space-3);
	background: linear-gradient(0deg, rgba(13,13,13,0.9), transparent);
	font-size: var(--fs-small);
	color: var(--color-gold-light);
	letter-spacing: 0.02em;
}

/* ==========================================================================
   AI Section | هوش مصنوعی
   ========================================================================== */

.ai-section {
	position: relative;
	overflow: hidden;
	background: radial-gradient(60% 60% at 80% 20%, rgba(198,164,108,0.08), transparent);
}

.ai-section__aurora {
	position: absolute;
	inset: -15% -8%;
	background:
		radial-gradient(38% 42% at 16% 28%, rgba(198,164,108,0.10), transparent 70%),
		radial-gradient(30% 34% at 84% 72%, rgba(198,164,108,0.07), transparent 70%);
	filter: blur(48px);
	pointer-events: none;
}

.ai-section__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 0.85fr;
	gap: var(--space-7);
	align-items: center;
}

/* ---- Journey rail | مسیر شش‌قدمی ------------------------------------ */

.ai-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-4) var(--space-5);
	margin-block: var(--space-5) var(--space-6);
	padding: 0;
	list-style: none;
}

.ai-steps__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding-top: var(--space-3);
}

.ai-steps__item::before {
	content: "";
	position: absolute;
	top: 0;
	inset-inline: 0;
	height: 1px;
	/* strong at the inline-start edge, fading out — "to left" is
	   inline-end on this RTL page */
	background: linear-gradient(to left, rgba(198,164,108,0.55), rgba(198,164,108,0.06));
	transition: background calc(0.4s / var(--motion-scale, 1)) ease;
}

.ai-steps__num {
	font-family: var(--font-display);
	font-size: 1.45rem;
	line-height: 1;
	background: linear-gradient(135deg, #E8D3A9, #C6A46C 55%, #9C7D49);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.ai-steps__label {
	font-size: var(--fs-small);
	color: var(--color-gray);
	letter-spacing: 0.02em;
	transition: color calc(0.35s / var(--motion-scale, 1)) ease;
}

.ai-steps__item:hover .ai-steps__label { color: var(--color-white); }
.ai-steps__item:hover::before {
	background: linear-gradient(to left, rgba(232,211,169,0.95), rgba(198,164,108,0.18));
}

.ai-section__actions {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex-wrap: wrap;
}

.ai-section__note {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: var(--fs-xs);
	color: var(--color-gray);
}

.ai-section__note svg { color: var(--color-gold); flex-shrink: 0; }

/* ---- Preview stage | استیج مقایسه‌ی قبل/بعد --------------------------
   Auto-sweeping before/after driven by --ai-pos (set by aiShowcase.js;
   the CSS default keeps it meaningful without JS). */

.ai-section__showcase {
	position: relative;
	display: flex;
	justify-content: center;
}

.ai-stage {
	position: relative;
	width: min(100%, 400px);
}

.ai-stage__halo {
	position: absolute;
	inset: -16px;
	border-radius: 40px;
	background: conic-gradient(from var(--hero-angle, 0turn),
		rgba(198,164,108,0) 0%, rgba(198,164,108,0.5) 12%, rgba(198,164,108,0) 26%,
		rgba(198,164,108,0) 54%, rgba(232,211,169,0.38) 68%, rgba(198,164,108,0) 84%);
	filter: blur(18px);
	opacity: 0.85;
	/* reuses the hero's registered --hero-angle property + spin keyframes */
	animation: hero-frame-spin calc(11s / var(--motion-scale, 1)) linear infinite;
	pointer-events: none;
}

.ai-stage__frame {
	/* BA layers must anchor to the LEFT edge regardless of page RTL —
	   same lesson as .gallery__viewport / consult's .ba */
	direction: ltr;
	--ai-pos: 50%;
	position: relative;
	margin: 0;
	aspect-ratio: 27 / 40;
	border-radius: 26px;
	overflow: hidden;
	border: 1px solid rgba(198,164,108,0.35);
	background: #141210;
	box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.04);
	isolation: isolate;
}

.ai-stage__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	user-select: none;
	-webkit-user-drag: none;
}

.ai-stage__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--ai-pos)) 0 0);
}

.ai-stage__divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--ai-pos);
	width: 1px;
	margin-left: -0.5px;
	background: linear-gradient(180deg,
		rgba(232,211,169,0.08), rgba(232,211,169,0.9) 28%,
		rgba(232,211,169,0.9) 72%, rgba(232,211,169,0.08));
	z-index: 3;
	pointer-events: none;
}

.ai-stage__handle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--gradient-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-gold), 0 0 0 6px rgba(13,13,13,0.35);
}

.ai-stage__scan {
	position: absolute;
	inset-inline: 7%;
	top: 0;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, rgba(232,211,169,0.85), transparent);
	filter: drop-shadow(0 0 8px rgba(232,211,169,0.55));
	opacity: 0;
	z-index: 2;
	animation: ai-scan calc(7s / var(--motion-scale, 1)) ease-in-out infinite 1.4s;
	pointer-events: none;
}

@keyframes ai-scan {
	0%, 54% { opacity: 0; top: 4%; }
	60% { opacity: 0.9; }
	78% { opacity: 0.8; }
	86%, 100% { opacity: 0; top: 93%; }
}

.ai-stage__tag {
	position: absolute;
	top: 14px;
	z-index: 3;
	font-size: 11px;
	letter-spacing: 0.08em;
	padding: 0.35em 0.95em;
	border-radius: var(--radius-pill);
	background: rgba(13,13,13,0.55);
	border: 1px solid rgba(255,255,255,0.14);
	color: var(--color-white);
	backdrop-filter: blur(8px);
	pointer-events: none;
}

.ai-stage__tag--before { left: 14px; }

.ai-stage__tag--after {
	right: 14px;
	background: linear-gradient(135deg, rgba(198,164,108,0.92), rgba(156,125,73,0.92));
	border-color: rgba(232,211,169,0.5);
	color: #0D0D0D;
	font-weight: 600;
}

.ai-stage__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	z-index: 4;
}

/* ---- Floating status chips ------------------------------------------ */

.ai-chip {
	position: absolute;
	z-index: 5;
	pointer-events: none;
}

.ai-chip__inner {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0.55em 1em;
	border-radius: var(--radius-pill);
	font-size: var(--fs-xs);
	color: var(--color-gold-light);
	background: rgba(20,18,15,0.74);
	border: 1px solid rgba(198,164,108,0.3);
	box-shadow: 0 14px 34px rgba(0,0,0,0.45);
	backdrop-filter: blur(10px);
	white-space: nowrap;
	animation: ai-chip-float calc(5.5s / var(--motion-scale, 1)) ease-in-out infinite;
}

.ai-chip--points { top: 7%; inset-inline-start: -13%; }

.ai-chip--treatment { bottom: 24%; inset-inline-end: -11%; }
.ai-chip--treatment .ai-chip__inner {
	animation-delay: -1.8s;
	animation-duration: calc(6.3s / var(--motion-scale, 1));
}

.ai-chip--natural { bottom: -16px; inset-inline-start: 9%; }
.ai-chip--natural .ai-chip__inner { animation-delay: -3.4s; }

@keyframes ai-chip-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-9px); }
}

@media (prefers-reduced-motion: reduce) {
	.ai-stage__halo,
	.ai-stage__scan,
	.ai-chip__inner {
		animation: none;
	}
}

.ai-workflow {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4) var(--space-5);
	margin-block: var(--space-5);
	padding: var(--space-4);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-md);
	background: var(--glass-bg);
}

.ai-workflow li {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-small);
	color: var(--color-gray);
}

.ai-workflow__num {
	font-family: var(--font-display);
	color: var(--color-gold);
	font-size: 0.95rem;
}

.ai-section__mockup {
	position: relative;
	justify-self: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-4);
}

.phone-mockup {
	position: relative;
	width: min(100%, 300px);
	aspect-ratio: 9 / 18;
	border-radius: 42px;
	padding: 14px;
	box-shadow: var(--shadow-soft);
}

.phone-mockup__notch {
	position: absolute;
	top: 14px;
	inset-inline: 0;
	margin-inline: auto;
	width: 90px;
	height: 20px;
	border-radius: var(--radius-pill);
	background: rgba(0,0,0,0.55);
	z-index: 2;
}

.phone-mockup__upload {
	position: absolute;
	bottom: 20px;
	inset-inline: 0;
	margin-inline: auto;
	width: fit-content;
	display: flex;
	align-items: center;
	gap: var(--space-1);
	padding: 0.6em 1.1em;
	border-radius: var(--radius-pill);
	background: rgba(13,13,13,0.7);
	border: 1px solid var(--glass-border);
	color: var(--color-gold-light);
	font-size: var(--fs-xs);
	z-index: 3;
	backdrop-filter: blur(6px);
}

.ai-section__badge {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	padding: 0.6em 1.1em;
	border-radius: var(--radius-pill);
	font-size: var(--fs-xs);
	color: var(--color-gold-light);
}

/* ---- Before/After slider ------------------------------------------- */

.ba-slider {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 30px;
	overflow: hidden;
}

.ba-slider__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	user-select: none;
}

.ba-slider__before-wrap {
	position: absolute;
	inset: 0;
	width: 50%;
	overflow: hidden;
}

.ba-slider__before-wrap .ba-slider__img--before {
	width: var(--ba-img-width, 300px);
	max-width: none;
}

.ba-slider__label {
	position: absolute;
	top: var(--space-2);
	font-size: 10px;
	letter-spacing: 0.1em;
	padding: 0.3em 0.7em;
	border-radius: var(--radius-pill);
	background: rgba(13,13,13,0.6);
	color: var(--color-white);
	z-index: 2;
	pointer-events: none;
}

.ba-slider__label--before { inset-inline-start: var(--space-2); }
.ba-slider__label--after { inset-inline-end: var(--space-2); }

.ba-slider__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: ew-resize;
	z-index: 4;
}

.ba-slider__handle {
	position: absolute;
	top: 50%;
	inset-inline-start: 50%;
	width: 34px;
	height: 34px;
	margin-inline-start: -17px;
	border-radius: 50%;
	background: var(--gradient-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 3;
	box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   Benefits | مراقبت‌ها
   ========================================================================== */

.benefits__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-4);
}

/* ==========================================================================
   About | درباره دکتر
   ========================================================================== */

.about {
	isolation: isolate;
}

/* Understated backdrop — mirror of the services section's aurora
   treatment (glow biased toward the portrait side, i.e. inline-start
   in RTL) so the two sections read as one design system. Deliberately
   quieter than .services: this section's photo already carries light. */
.about::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		radial-gradient(40% 55% at 12% 30%, rgba(198, 164, 108, 0.10), transparent 70%),
		radial-gradient(34% 45% at 92% 85%, rgba(198, 164, 108, 0.06), transparent 70%);
	pointer-events: none;
}
.about::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background-image: radial-gradient(rgba(198, 164, 108, 0.14) 1px, transparent 1.5px);
	background-size: 26px 26px;
	-webkit-mask-image: radial-gradient(55% 60% at 30% 45%, #000, transparent 80%);
	mask-image: radial-gradient(55% 60% at 30% 45%, #000, transparent 80%);
	opacity: 0.5;
	pointer-events: none;
}

.about__inner {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: var(--space-7);
	align-items: center;
}

.about__portrait-frame {
	border-radius: var(--radius-lg);
	overflow: hidden;
	padding: 10px;
	max-height: 560px;
}

.about__portrait-frame img {
	width: 100%;
	height: 100%;
	max-height: 540px;
	object-fit: cover;
	object-position: top center;
	border-radius: calc(var(--radius-lg) - 10px);
}

.about__content .section-desc {
	margin-bottom: var(--space-5);
}

.about__stats {
	display: flex;
	gap: var(--space-6);
	margin-bottom: var(--space-5);
}

.about__stats strong {
	display: block;
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	color: var(--color-gold);
}

.about__stats span {
	font-size: var(--fs-xs);
	color: var(--color-gray);
}

/* ==========================================================================
   Contact | تماس
   ========================================================================== */

.contact__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-7);
	align-items: center;
}

.contact__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin-block: var(--space-5);
}

.contact__list li {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--color-gray);
	font-size: var(--fs-small);
}

/* Additional clinic locations beyond the primary address/phone above —
   admin-managed, zero or more entries. */
.contact__branches {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--space-3);
	margin-bottom: var(--space-5);
}

.contact__branch {
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-md);
	border: 1px solid var(--glass-border);
	background: var(--glass-bg);
}

.contact__branch-name {
	font-family: var(--font-display);
	font-size: var(--fs-small);
	font-weight: 700;
	color: var(--color-gold-light);
	margin: 0 0 0.35em;
}

.contact__branch-address {
	font-size: var(--fs-xs);
	color: var(--color-gray);
	margin: 0 0 0.35em;
	line-height: 1.6;
}

.contact__branch-phone {
	font-size: var(--fs-xs);
	color: var(--color-gray-dim);
	text-decoration: none;
}
.contact__branch-phone:hover {
	color: var(--color-gold);
}

.contact__map {
	border-radius: var(--radius-lg);
	overflow: hidden;
	padding: 6px;
}

.contact__map img {
	border-radius: calc(var(--radius-lg) - 6px);
	width: 100%;
}

/* Real embedded map (admin-provided embed URL) — same frame styling as
   the placeholder graphic it replaces. Grayscale+dim keeps the bright
   default map tiles from breaking the page's dark palette; full color
   on hover for reading it. */
.contact__map--live iframe {
	display: block;
	width: 100%;
	height: 480px;
	border: 0;
	border-radius: calc(var(--radius-lg) - 6px);
	filter: grayscale(0.85) invert(0.92) contrast(0.9) hue-rotate(180deg);
	transition: filter var(--dur-mid) var(--ease-soft);
}
.contact__map--live:hover iframe { filter: none; }

/* ==========================================================================
   Footer | فوتر
   ========================================================================== */

.footer {
	background: var(--color-bg-elevated);
	border-top: 1px solid var(--glass-border);
	padding-top: var(--space-7);
}

.footer__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: var(--space-6);
	padding-bottom: var(--space-6);
}

.footer__brand p {
	color: var(--color-gray);
	font-size: var(--fs-small);
	margin-block: var(--space-3);
	max-width: 32ch;
}

.footer__social {
	display: flex;
	gap: var(--space-2);
}

.footer__social a {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--glass-border);
	color: var(--color-gold);
	transition: background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}

.footer__social a:hover {
	background: var(--color-gold);
	color: var(--color-on-gold);
	transform: translateY(-3px);
}

.footer__col {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.footer__col h4 {
	color: var(--color-gold-light);
	font-size: var(--fs-small);
	margin-bottom: var(--space-1);
}

.footer__col a,
.footer__col span {
	color: var(--color-gray);
	font-size: var(--fs-small);
	transition: color var(--dur-fast) var(--ease-soft);
}

.footer__col a:hover {
	color: var(--color-gold);
}

.footer__branch-name {
	margin-top: var(--space-2);
	padding-top: var(--space-2);
	border-top: 1px solid rgba(247, 247, 247, 0.06);
	color: var(--color-gold-light) !important;
	font-weight: 600;
}

.footer__bottom {
	border-top: 1px solid rgba(247,247,247,0.06);
	padding-block: var(--space-4);
	text-align: center;
	font-size: var(--fs-xs);
	color: var(--color-gray-dim);
}
