/* =========================================================================
   Home "services chapters" (main.tpl section.rp-sx, card: modules/functions/services-scroll.tpl, js/services-scroll.js)
   - .is-pin (set by the script on wide, tall-enough screens with motion allowed): the block pins while you scroll,
     a dial of numbers turns at the side and the six services take turns: text rises in, the photo is revealed from
     the bottom and its glass panel (key services) rises; hovering the chapter opens the panel fully, like the old cards.
   - otherwise (phones, short screens, reduced motion, no JS): the same chapters stack, each fades in once.
   Logical properties keep one file for both directions (fa = rtl, en = ltr).
   ========================================================================= */

.rp-sx {
	--sx-ink: #29292B;
	--sx-mute: #6b6b72;
	--sx-line: rgba(41, 41, 43, .12);
	--sx-soft: #f6f6f8;
	--sx-red: #fb4848;
	--sx-ease: cubic-bezier(.22, 1, .36, 1);
	--sx-start: left;
	--sx-end: right;
	padding-bottom: 50px;
}
/* set by the script from the page direction */
.rp-sx.is-rtl { --sx-start: right; --sx-end: left; }
html[data-theme="dark"] .rp-sx {
	--sx-ink: #f2f2f5;
	--sx-mute: rgba(255, 255, 255, .64);
	--sx-line: rgba(255, 255, 255, .12);
	--sx-soft: rgba(255, 255, 255, .05);
}

.rp-sx-list { margin: 0; padding: 0; list-style: none; }
.rp-sx-item { margin: 0; padding: 0; }
.rp-sx-card { position: relative; }

/* ---- text column ---- */
.rp-sx-num {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 14px;
	letter-spacing: .04em;
	color: var(--sx-red);
}
.rp-sx-num:empty { display: none; }
.rp-sx-num::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; }
.rp-sx-num small { font-size: 12px; color: var(--sx-mute); letter-spacing: 0; }
.rp-sx-title {
	margin: 0 0 14px;
	font-family: 'IranSansBold', 'IranSans', sans-serif;
	font-size: clamp(24px, 2.5vw, 40px);
	line-height: 1.45;
	text-wrap: balance;
}
.rp-sx-title a { color: var(--sx-ink); text-decoration: none; transition: color .3s; }
.rp-sx-title a:hover, .rp-sx-title a:focus-visible { color: var(--sx-red); }
.rp-sx-body img, .rp-sx-body a.highslide { display: none; }          /* same picture as the photo */
.rp-sx-body .svc-wrap { display: contents; }
.rp-sx-body .svc-sum {
	max-width: 34em;
	margin: 0 0 26px;
	font-family: 'IranSans', sans-serif;
	font-size: 15.5px;
	line-height: 2.1;
	color: var(--sx-mute);
}

/* key services as pills (on the photo's glass panel once the script moves them; under the summary without it) */
.rp-sx .svc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
}
.rp-sx .svc-tags li {
	margin: 0;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--sx-soft);
	box-shadow: inset 0 0 0 1px var(--sx-line);
	font-family: 'IranSans', sans-serif;
	font-size: 13px;
	line-height: 1.6;
	color: var(--sx-ink);
	white-space: nowrap;
}

/* "details" button: the shared .rp-svc-btn (css/service-glow.css) sized to its label here */
.rp-sx .rp-svc-btn { display: inline-flex; align-self: flex-start; width: auto; min-width: 230px; max-width: 100%; }
.rp-sx-text { display: flex; flex-direction: column; align-items: flex-start; }
/* running red light round the button while the chapter is hovered (as on the old cards) */
.rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-svc-btn::before { opacity: 1; animation: svc-spin 3.5s linear infinite; }
.rp-sx .rp-svc-btn:hover::before, .rp-sx .rp-svc-btn:focus-visible::before { opacity: 0; }
html:not([data-theme="dark"]) .rp-sx .rp-svc-btn {
	color: #29292B !important;
	background: #f6f6f8;
	box-shadow: inset 0 0 0 1px #e2e2e6;
}
html:not([data-theme="dark"]) .rp-sx .rp-svc-btn:hover,
html:not([data-theme="dark"]) .rp-sx .rp-svc-btn:focus-visible { color: #fff !important; }

/* The chapter wakes up (photo in colour, panel rises, button light runs) only while the pointer is on
   the photo, the title or the button, never on the empty space around them. */
/* ---- photo + glass panel ---- */
.rp-sx-media {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	background: #1d1d1f;
	aspect-ratio: 4 / 3;
	box-shadow: 0 30px 60px -40px rgba(20, 20, 24, .6);
	isolation: isolate;
}
.rp-sx-img { position: absolute; inset: 0; display: block; }
.rp-sx-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
	filter: grayscale(1) brightness(.82);                 /* grey at rest, colour on hover */
	transform: scale(1.02);
	transition: filter .6s ease, transform 1.1s var(--sx-ease);
}
.rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-img img,
.rp-sx-card:focus-within .rp-sx-img img { filter: none; transform: scale(1.06); }
.rp-sx-media::before {                                    /* soft dark floor so the glass panel reads on any photo */
	content: "";
	position: absolute;
	inset: 45% 0 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(14, 14, 16, 0), rgba(14, 14, 16, .55));
	pointer-events: none;
}
.rp-sx-panel {
	position: absolute;
	inset-inline: 16px;
	bottom: 16px;
	z-index: 2;
	padding: 14px 16px;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(22, 22, 24, .42), rgba(22, 22, 24, .66));
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	backdrop-filter: blur(14px) saturate(1.3);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 40px -24px rgba(0, 0, 0, .7);
	color: #fff;
	transition: transform .6s var(--sx-ease), opacity .5s ease;
}
.rp-sx-panel::before {                                    /* small handle, hints that the panel opens */
	content: "";
	position: absolute;
	top: 6px;
	left: 50%;
	width: 34px;
	height: 3px;
	margin-left: -17px;
	border-radius: 3px;
	background: rgba(255, 255, 255, .28);
	transition: background-color .4s, width .4s, margin .4s;
}
.rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-panel::before { width: 48px; margin-left: -24px; background: var(--sx-red); }
.rp-sx-ico {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: rgba(255, 255, 255, .1);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
	font-size: 17px;
	vertical-align: middle;
	transition: background-color .4s, transform .7s var(--sx-ease), box-shadow .4s;
}
.rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-ico { background: var(--sx-red); box-shadow: 0 10px 22px -10px rgba(251, 72, 72, .9); transform: rotateY(360deg); }
.rp-sx-ks {
	margin-inline-start: 10px;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 13.5px;
	vertical-align: middle;
	color: rgba(255, 255, 255, .9);
}
.rp-sx-panel .svc-tags { margin: 12px 0 0; gap: 7px; }
.rp-sx-panel .svc-tags li {
	padding: 5px 12px;
	background: rgba(255, 255, 255, .1);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
	font-size: 12.5px;
	color: #fff;
	transition: background-color .3s, box-shadow .3s;
}
.rp-sx-panel .svc-tags li:hover { background: rgba(251, 72, 72, .85); box-shadow: none; }

/* ======================= stacked layout (default) ======================= */
.rp-sx:not(.is-pin) .rp-sx-item + .rp-sx-item { margin-top: 30px; }
.rp-sx:not(.is-pin) .rp-sx-card {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding-bottom: 30px;
	border-bottom: 1px solid var(--sx-line);
}
.rp-sx:not(.is-pin) .rp-sx-item:last-child .rp-sx-card { border-bottom: 0; padding-bottom: 0; }
.rp-sx:not(.is-pin) .rp-sx-media { order: -1; }
.rp-sx:not(.is-pin) .rp-sx-title { font-size: clamp(22px, 5.6vw, 30px); }
@media (min-width: 768px) {
	.rp-sx:not(.is-pin) .rp-sx-card { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
	.rp-sx:not(.is-pin) .rp-sx-media { order: 0; }
	.rp-sx:not(.is-pin) .rp-sx-item:nth-child(even) .rp-sx-media { order: -1; }
}
@media (max-width: 575px) {
	.rp-sx .rp-svc-btn { align-self: stretch; min-width: 0; }
	.rp-sx-panel { inset-inline: 10px; bottom: 10px; padding: 12px; }
	/* phones: the key services become one swipeable row, so the photo stays in view */
	.rp-sx-panel .svc-tags {
		flex-wrap: nowrap;
		margin-inline: -12px;
		padding-inline: 12px;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		-webkit-mask-image: linear-gradient(to var(--sx-end), #000 82%, transparent);
		mask-image: linear-gradient(to var(--sx-end), #000 82%, transparent);
	}
	.rp-sx-panel .svc-tags::-webkit-scrollbar { display: none; }
	.rp-sx-media { aspect-ratio: 4 / 4.2; }
	.rp-sx-body .svc-sum { font-size: 14.5px; }
}
/* phones and touch screens: no hover, so the photo is in colour once the chapter is in view */
@media (hover: none) {
	.rp-sx-item.is-in .rp-sx-img img, .rp-sx.is-pin .rp-sx-item.is-on .rp-sx-img img { filter: none; }
}
/* entrance (script only): the chapter rises in, the photo opens from the bottom, then the panel rises */
.rp-sx.is-js:not(.is-pin) .rp-sx-text > * { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .9s var(--sx-ease); }
.rp-sx.is-js:not(.is-pin) .rp-sx-media { clip-path: inset(100% 0 0 0 round 22px); transition: clip-path 1.1s var(--sx-ease); }
.rp-sx.is-js:not(.is-pin) .rp-sx-panel { opacity: 0; transform: translateY(24px); transition-delay: .45s; }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-text > * { opacity: 1; transform: none; }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-text > :nth-child(2) { transition-delay: .08s; }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-text > :nth-child(3) { transition-delay: .16s; }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-text > :nth-child(4) { transition-delay: .24s; }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-media { clip-path: inset(0 0 0 0 round 22px); }
.rp-sx.is-js:not(.is-pin) .rp-sx-item.is-in .rp-sx-panel { opacity: 1; transform: none; }

/* ======================= pinned layout (wide screens) ======================= */
.rp-sx.is-pin { padding: 0; }
.rp-sx.is-pin .rp-sx-track { position: relative; height: calc(var(--n, 6) * 72vh + 100vh); }
.rp-sx.is-pin .rp-sx-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.rp-sx.is-pin .rp-sx-inner {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	height: 100%;
	padding-top: calc(clamp(34px, 7vh, 72px) + var(--sx-hdr, 0px));
	transition: padding-top .4s ease-out;            /* same slide as the sticky menu (css/smart-menu.css) */
	padding-bottom: clamp(18px, 3.4vh, 34px);
}
.rp-sx.is-pin .rp-sx-inner::before, .rp-sx.is-pin .rp-sx-inner::after { display: none; }      /* clearfix boxes would become grid rows */
.rp-sx.is-pin .sec-title { padding-bottom: clamp(14px, 3vh, 34px); }
.rp-sx.is-pin .rp-sx-main { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 0; }
.rp-sx.is-pin .rp-sx-list { position: relative; display: grid; min-height: 0; }
.rp-sx.is-pin .rp-sx-item { grid-area: 1 / 1; min-height: 0; pointer-events: none; }
.rp-sx.is-pin .rp-sx-item.is-on { pointer-events: auto; z-index: 1; }
.rp-sx.is-pin .rp-sx-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	align-items: center;
	gap: clamp(30px, 4vw, 64px);
	height: 100%;
}
.rp-sx.is-pin .rp-sx-media { aspect-ratio: auto; height: min(100%, 560px); align-self: center; }
.rp-sx.is-pin .rp-sx-body .svc-sum { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* chapter states: below the active one = waiting under (+), above = gone up (-) */
.rp-sx.is-pin .rp-sx-text > * {
	opacity: 0;
	filter: blur(6px);
	transform: translateY(46px);
	transition: opacity .35s ease, transform .45s var(--sx-ease), filter .35s ease;
}
.rp-sx.is-pin .rp-sx-item.is-past .rp-sx-text > * { transform: translateY(-46px); }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-text > * {
	opacity: 1;
	filter: none;
	transform: none;
	transition: opacity .7s ease, transform 1s var(--sx-ease), filter .7s ease;
	transition-delay: .12s;
}
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-text > :nth-child(2) { transition-delay: .2s; }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-text > :nth-child(3) { transition-delay: .28s; }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-text > :nth-child(4) { transition-delay: .36s; }

/* photo: revealed upward from the bottom edge; the old one is wiped away upward */
.rp-sx.is-pin .rp-sx-media { clip-path: inset(100% 0 0 0 round 22px); transition: clip-path .6s var(--sx-ease); }
.rp-sx.is-pin .rp-sx-item.is-past .rp-sx-media { clip-path: inset(0 0 100% 0 round 22px); }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-media { clip-path: inset(0 0 0 0 round 22px); transition: clip-path 1.05s var(--sx-ease) .05s; }
.rp-sx.is-pin .rp-sx-img img { transform: scale(1.16); }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-img img { transform: scale(1.02); transition: filter .6s ease, transform 1.4s var(--sx-ease); }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-img img { transform: scale(1.06); }

/* glass panel: rises in after the photo; resting = one row of pills fading out at the end,
   chapter hovered = the panel opens upward with every key service (the old card's rising panel) */
.rp-sx.is-pin .rp-sx-panel { opacity: 0; transform: translateY(40px); }
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-panel { opacity: 1; transform: none; transition-delay: .5s; }
.rp-sx.is-pin .rp-sx-panel .svc-tags {
	flex-wrap: nowrap;
	max-height: 34px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to var(--sx-end, left), #000 70%, transparent);
	mask-image: linear-gradient(to var(--sx-end, left), #000 70%, transparent);
	transition: max-height .6s var(--sx-ease);
}
.rp-sx.is-pin .rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-panel .svc-tags,
.rp-sx.is-pin .rp-sx-card:focus-within .rp-sx-panel .svc-tags {
	flex-wrap: wrap;
	max-height: 170px;
	-webkit-mask-image: none;
	mask-image: none;
}
.rp-sx.is-pin .rp-sx-item.is-on .rp-sx-card:has(.rp-sx-media:hover, .rp-sx-title a:hover, .rp-svc-btn:hover) .rp-sx-panel { transform: translateY(-6px); transition-delay: 0s; }
@media (hover: none) {
	.rp-sx.is-pin .rp-sx-panel .svc-tags { flex-wrap: wrap; max-height: none; -webkit-mask-image: none; mask-image: none; }
}

/* dial: the numbers ride a large arc at the start side, the current one sits on the red dot (js/services-scroll.js) */
.rp-sx-dial { position: relative; min-height: 0; direction: ltr; }
.rp-sx-arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rp-sx-arc circle { fill: none; stroke: var(--sx-line); stroke-width: 1.2; }
.rp-sx-arc .rp-sx-arc-run { stroke: var(--sx-red); stroke-width: 2; stroke-linecap: round; }
.rp-sx-dot {
	position: absolute;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: var(--sx-red);
	box-shadow: 0 0 0 6px rgba(251, 72, 72, .16), 0 0 18px rgba(251, 72, 72, .7);
	animation: rpSxPulse 2.4s ease-in-out infinite;
}
@keyframes rpSxPulse { 50% { box-shadow: 0 0 0 10px rgba(251, 72, 72, .06), 0 0 18px rgba(251, 72, 72, .5); } }
.rp-sx-tick {
	position: absolute;
	top: 0;
	left: 0;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: none;
	font-family: 'IranSansLight', 'IranSans', sans-serif;
	font-size: 22px;
	line-height: 1;
	color: var(--sx-mute);
	cursor: pointer;
	white-space: nowrap;
	transform-origin: 0 50%;
	transition: color .3s;
	will-change: transform, opacity;
}
.rp-sx-tick:hover { color: var(--sx-ink); }
.rp-sx-tick.is-on { color: var(--sx-ink); font-family: 'IranSansMedium', 'IranSans', sans-serif; }
.rp-sx-tick:focus-visible { outline: 2px solid var(--sx-red); outline-offset: 2px; }
.rp-sx-tick .rp-sx-tick-name {
	position: absolute;
	top: 50%;
	left: calc(100% + 4px);
	font-family: 'IranSans', sans-serif;
	font-size: 12px;
	color: var(--sx-mute);
	opacity: 0;
	transform: translate(-6px, -50%);
	transition: opacity .3s, transform .3s;
	pointer-events: none;
}
.rp-sx-tick:hover .rp-sx-tick-name, .rp-sx-tick:focus-visible .rp-sx-tick-name { opacity: 1; transform: translate(0, -50%); }
.rp-sx-tick.is-on .rp-sx-tick-name { display: none; }
.rp-sx.is-rtl .rp-sx-tick { transform-origin: 100% 50%; }
.rp-sx.is-rtl .rp-sx-tick .rp-sx-tick-name { left: auto; right: calc(100% + 4px); transform: translate(6px, -50%); }
.rp-sx.is-rtl .rp-sx-tick:hover .rp-sx-tick-name, .rp-sx.is-rtl .rp-sx-tick:focus-visible .rp-sx-tick-name { transform: translate(0, -50%); }

/* foot: progress line + counter + scroll hint */
.rp-sx-foot { display: flex; align-items: center; gap: 18px; padding-top: clamp(12px, 2.4vh, 24px); color: var(--sx-mute); font-size: 13px; }
.rp-sx-bar { position: relative; flex: 1 1 auto; height: 2px; border-radius: 2px; background: var(--sx-line); overflow: hidden; }
.rp-sx-bar i { position: absolute; inset: 0; background: var(--sx-red); transform: scaleX(0); transform-origin: var(--sx-start, right) center; }
.rp-sx-count { font-family: 'IranSansMedium', 'IranSans', sans-serif; color: var(--sx-ink); font-variant-numeric: tabular-nums; }
.rp-sx-count span { color: var(--sx-mute); }
.rp-sx-hint { display: inline-flex; align-items: center; gap: 8px; }
.rp-sx-hint i { display: inline-block; width: 16px; height: 24px; border-radius: 9px; box-shadow: inset 0 0 0 1.5px currentColor; position: relative; }
.rp-sx-hint i::after { content: ""; position: absolute; top: 5px; left: 50%; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: var(--sx-red); animation: rpSxWheel 1.8s ease-in-out infinite; }
@keyframes rpSxWheel { 60% { transform: translateY(7px); opacity: 0; } 61% { transform: none; opacity: 0; } }
.rp-sx.is-end .rp-sx-hint { opacity: 0; transition: opacity .4s; }

/* the dial is only for the pinned layout */
.rp-sx:not(.is-pin) .rp-sx-dial, .rp-sx:not(.is-pin) .rp-sx-foot { display: none; }
@media (max-width: 1199px) {
	.rp-sx.is-pin .rp-sx-main { grid-template-columns: 110px minmax(0, 1fr); }
	.rp-sx-tick { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	.rp-sx *, .rp-sx *::before, .rp-sx *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* =========================================================================
   Phones and portrait tablets (.is-pin.is-mob): like the wide layout, but the dial is a gentle arc across the top,
   the current number sits under the red dot, the text is centred and the photo takes the rest of the screen.
   The section heading stays above the pinned block (moved there by the script).
   ========================================================================= */
.rp-sx-headbox .sec-title { padding-bottom: 6px; }
.rp-sx.is-pin.is-mob { padding-top: 56px; }
.rp-sx.is-pin.is-mob .rp-sx-track { height: calc(var(--n, 6) * 62vh + 100vh); }
.rp-sx.is-pin.is-mob .rp-sx-stage { height: 100vh; }
@supports (height: 100svh) {
	.rp-sx.is-pin.is-mob .rp-sx-track { height: calc(var(--n, 6) * 62svh + 100svh); }
	.rp-sx.is-pin.is-mob .rp-sx-stage { height: 100svh; }
}
.rp-sx.is-pin.is-mob .rp-sx-inner {
	grid-template-rows: minmax(0, 1fr) auto;
	padding-top: calc(10px + var(--sx-hdr, 0px));
	padding-bottom: 14px;
}
.rp-sx.is-pin.is-mob .rp-sx-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: 104px minmax(0, 1fr); }
.rp-sx.is-pin.is-mob .rp-sx-dial { margin-inline: -15px; }
.rp-sx.is-mob .rp-sx-tick {
	padding: 4px 6px;
	font-size: 17px;
	transform-origin: 50% 50%;
}
.rp-sx.is-mob .rp-sx-tick.is-on { font-size: 30px; font-family: 'IranSansMedium', 'IranSans', sans-serif; }
.rp-sx.is-mob .rp-sx-tick .rp-sx-tick-name { display: none; }
.rp-sx.is-mob .rp-sx-dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; }

/* one chapter: centred text, then the photo filling what is left */
.rp-sx.is-pin.is-mob .rp-sx-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	height: 100%;
	padding-bottom: 0;
	border: 0;
}
.rp-sx.is-pin.is-mob .rp-sx-text { align-items: center; text-align: center; }
.rp-sx.is-pin.is-mob .rp-sx-num { display: none; }
.rp-sx.is-pin.is-mob .rp-sx-title { margin-bottom: 8px; font-size: clamp(21px, 6vw, 30px); line-height: 1.5; }
.rp-sx.is-pin.is-mob .rp-sx-body .svc-sum {
	max-width: 30em;
	margin: 0 auto 14px;
	font-size: 14px;
	line-height: 1.95;
	-webkit-line-clamp: 3;
}
.rp-sx.is-pin.is-mob .rp-svc-btn { align-self: center; min-width: 210px; }
.rp-sx.is-pin.is-mob .rp-sx-media {
	order: 0;
	align-self: stretch;
	flex: 1 1 0;
	min-height: 150px;
	height: auto;
	max-height: 520px;
	aspect-ratio: auto;
	border-radius: 20px;
}
.rp-sx.is-pin.is-mob .rp-sx-img img { filter: none; }       /* no hover on touch: the current photo is in colour */
/* key services: one swipeable row on the glass panel */
.rp-sx.is-pin.is-mob .rp-sx-panel { inset-inline: 10px; bottom: 10px; padding: 12px; }
.rp-sx.is-pin.is-mob .rp-sx-panel .svc-tags {
	flex-wrap: nowrap;
	max-height: none;
	margin-inline: -12px;
	padding-inline: 12px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to var(--sx-end), #000 82%, transparent);
	mask-image: linear-gradient(to var(--sx-end), #000 82%, transparent);
}
.rp-sx.is-pin.is-mob .rp-sx-panel .svc-tags::-webkit-scrollbar { display: none; }
.rp-sx.is-pin.is-mob .rp-sx-foot { padding-top: 12px; gap: 12px; font-size: 12px; }
.rp-sx.is-pin.is-mob .rp-sx-hint { display: none; }
/* short phones: smaller photo floor, two-line summary */
@media (max-height: 700px) {
	.rp-sx.is-pin.is-mob .rp-sx-main { grid-template-rows: 94px minmax(0, 1fr); }
	.rp-sx.is-pin.is-mob .rp-sx-body .svc-sum { -webkit-line-clamp: 2; margin-bottom: 10px; }
	.rp-sx.is-pin.is-mob .rp-sx-card { gap: 12px; }
	.rp-sx.is-pin.is-mob .rp-sx-media { min-height: 120px; }
}
/* portrait tablets: a bit more air */
@media (min-width: 600px) {
	.rp-sx.is-pin.is-mob .rp-sx-main { grid-template-rows: 120px minmax(0, 1fr); }
	.rp-sx.is-pin.is-mob .rp-sx-title { font-size: 32px; }
	.rp-sx.is-pin.is-mob .rp-sx-body .svc-sum { font-size: 15.5px; }
	.rp-sx.is-mob .rp-sx-tick { font-size: 20px; }
	.rp-sx.is-mob .rp-sx-tick.is-on { font-size: 36px; }
}

/* the round back-to-top button sits at the bottom start corner: keep the hint and the bar clear of it */
@media (max-width: 1330px) {
	.rp-sx.is-pin .rp-sx-foot { padding-inline-start: 58px; }
}

/* foot text: the hint, then (sixth chapter) a call to action in the same place */
.rp-sx-say { display: inline-grid; align-items: center; flex: 0 0 auto; }
.rp-sx-say > * { grid-area: 1 / 1; }
.rp-sx-hint { pointer-events: none; transition: opacity .35s ease, transform .45s var(--sx-ease); }   /* decorative: never catches the end link's clicks */
.rp-sx.is-end .rp-sx-hint { opacity: 0; transform: translateY(-8px); }
.rp-sx-end {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	border: 0;
	background: none;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 14px;
	color: var(--sx-red);
	cursor: pointer;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .35s ease, transform .45s var(--sx-ease), visibility 0s .45s;
}
.rp-sx.is-end .rp-sx-end { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.rp-sx-end i { transition: transform .3s var(--sx-ease); }
.rp-sx-end:hover i, .rp-sx-end:focus-visible i { transform: translateX(-4px); }
.rp-sx:not(.is-rtl) .rp-sx-end:hover i, .rp-sx:not(.is-rtl) .rp-sx-end:focus-visible i { transform: translateX(4px); }
.rp-sx-end:focus-visible { outline: 2px solid var(--sx-red); outline-offset: 4px; border-radius: 6px; }
/* phones: no hint, but the call to action shows up at the end */
.rp-sx.is-pin.is-mob .rp-sx-say { flex: 0 1 auto; }
.rp-sx.is-pin.is-mob:not(.is-end) .rp-sx-say { display: none; }
.rp-sx.is-pin.is-mob .rp-sx-end { font-size: 13px; }

/* =========================================================================
   Heading smiley (main.tpl #rp-sx-title svg.rp-smile; was the icofont glyph): it smiles gently,
   blinks every few seconds, sometimes winks, and spins around once about every 9s. CSS only, takes the text colour.
   ========================================================================= */
.rp-smile { display: inline-block; width: 1.16em; height: 1em; margin-inline-start: .08em; vertical-align: -.12em; overflow: visible; fill: currentColor; animation: rpSmileSpin 9s cubic-bezier(.65, 0, .35, 1) 1.5s infinite; }
.rp-smile-eye { transform-box: fill-box; transform-origin: center; animation: rpSmileBlink 4.5s infinite; }
.rp-smile-eye.is-wink { animation-name: rpSmileWink; }
.rp-smile-mouth { fill: none; stroke: currentColor; stroke-width: 5.5; stroke-linecap: round; transform-box: fill-box; transform-origin: center top; animation: rpSmileGrin 2.6s ease-in-out infinite; }
@keyframes rpSmileBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes rpSmileWink { 0%, 46%, 56%, 92%, 100% { transform: scaleY(1); } 50%, 95% { transform: scaleY(.1); } }
@keyframes rpSmileGrin { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.1, 1.22); } }
@keyframes rpSmileSpin { 0%, 78% { transform: rotate(0); } 92% { transform: rotate(380deg); } 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.rp-smile, .rp-smile-eye, .rp-smile-mouth { animation: none; }
}
