/* ==========================================================================
   ارزیابی اولیه‌ی رایگان — مرکز مشاوره رکن
   ========================================================================== */

.ra-page {
	--ra-p: var(--rk-primary, #0a6843);
	--ra-d: var(--rk-primary-d, #064b31);
	--ra-g: var(--rk-green, #3c7f5b);
	--ra-sage: var(--rk-sage, #b6d98a);
	--ra-tint: var(--rk-tint, #edf6e1);
	--ra-cream: var(--rk-cream, #f7faf2);
	--ra-ink: var(--rk-ink, #1f2a24);
	--ra-muted: var(--rk-muted, #5e6b63);
	--ra-line: var(--rk-line, #d8e8c4);
	--ra-radius: var(--rk-radius, 18px);
	--ra-radius-lg: var(--rk-radius-lg, 26px);
	--ra-pill: var(--rk-pill, 999px);
	--ra-shadow: var(--rk-shadow, 0 34px 60px -34px rgba(20, 60, 42, 0.55));
	--ra-shadow-sm: var(--rk-shadow-sm, 0 8px 18px -12px rgba(20, 60, 42, 0.5));
}

.ra-page .rk-page__head {
	position: relative;
	max-width: none;
	overflow: hidden;
	margin-bottom: 0;
	padding: clamp(26px, 4.2vw, 52px) clamp(18px, 4vw, 44px);
	border-radius: var(--ra-radius-lg);
	background:
		radial-gradient(circle at 12% 18%, rgba(182, 217, 138, 0.28), transparent 42%),
		linear-gradient(135deg, var(--ra-d), var(--ra-p) 62%, #0d7a50);
	color: #fff;
	text-align: center;
}

.ra-page .rk-page__head::before,
.ra-page .rk-page__head::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.ra-page .rk-page__head::before {
	width: 220px;
	height: 220px;
	inset-inline-end: -70px;
	top: -90px;
	background: rgba(255, 255, 255, 0.07);
}

.ra-page .rk-page__head::after {
	width: 150px;
	height: 150px;
	inset-inline-start: -50px;
	bottom: -80px;
	background: rgba(182, 217, 138, 0.16);
}

.ra-page .rk-page__head h1 {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #fff;
	font-size: clamp(24px, 3.4vw, 36px);
	font-weight: 800;
	line-height: 1.5;
}

.ra-page .rk-entry {
	max-width: none;
}

.ra {
	display: grid;
	gap: clamp(18px, 2.6vw, 30px);
	margin-top: clamp(20px, 3vw, 34px);
	color: var(--ra-ink);
	line-height: 2;
}

.ra * {
	box-sizing: border-box;
}

/* ---------- هیرو ---------- */

.ra-hero {
	padding: clamp(20px, 3vw, 30px);
	border: 1.5px solid var(--ra-line);
	border-radius: var(--ra-radius-lg);
	background: linear-gradient(180deg, #fff, var(--ra-cream));
	text-align: center;
}

.ra-eyebrow {
	display: inline-block;
	margin: 0 0 12px;
	padding: 5px 16px;
	border-radius: var(--ra-pill);
	background: var(--ra-tint);
	color: var(--ra-d);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0;
}

.ra-lead {
	max-width: 760px;
	margin: 0 auto;
	color: var(--ra-muted);
	font-size: 15.5px;
	line-height: 2.1;
	text-wrap: pretty;
}

.ra-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.ra-meta li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 7px 16px;
	border: 1px solid var(--ra-line);
	border-radius: var(--ra-pill);
	background: #fff;
	color: var(--ra-d);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.8;
}

.ra-meta li span {
	color: var(--ra-g);
	font-size: 14px;
}

/* ---------- ارزیابی چیست ---------- */

.ra-note {
	padding: clamp(20px, 3vw, 28px);
	border: 1.5px dashed var(--ra-line);
	border-radius: var(--ra-radius);
	background: #fff;
	text-align: center;
}

.ra-note h2 {
	margin: 0 0 8px;
	color: var(--ra-d);
	font-size: clamp(18px, 2.2vw, 23px);
	font-weight: 800;
	line-height: 1.7;
	text-align: center;
}

.ra-note p {
	max-width: 760px;
	margin: 0 auto;
	color: var(--ra-muted);
	font-size: 14.8px;
	text-align: center;
	text-wrap: pretty;
}

/* ---------- سه مرحله ---------- */

.ra-how {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 20px);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.ra-how li {
	position: relative;
	margin: 0;
	padding: clamp(18px, 2.4vw, 24px);
	border: 1.5px solid var(--ra-line);
	border-radius: var(--ra-radius);
	background: #fff;
	box-shadow: var(--ra-shadow-sm);
	text-align: center;
	transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.ra-how li:hover {
	transform: translateY(-3px);
	border-color: var(--ra-g);
	box-shadow: 0 18px 30px -22px rgba(20, 60, 42, 0.55);
}

.ra-how-n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: var(--ra-tint);
	color: var(--ra-d);
	font-size: 15px;
	font-weight: 800;
}

.ra-how h3 {
	margin: 0 0 6px;
	color: var(--ra-ink);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.7;
	text-align: center;
}

.ra-how p {
	margin: 0;
	color: var(--ra-muted);
	font-size: 13.6px;
	line-height: 1.95;
	text-align: center;
}

/* ---------- کارت فرم ---------- */

.ra-card {
	padding: clamp(20px, 3.2vw, 34px);
	border: 1.5px solid var(--ra-line);
	border-radius: var(--ra-radius-lg);
	background: #fff;
	box-shadow: var(--ra-shadow);
}

.ra-card-head {
	margin-bottom: 18px;
	text-align: center;
}

.ra-card-head h2 {
	margin: 0 0 6px;
	color: var(--ra-d);
	font-size: clamp(19px, 2.3vw, 25px);
	font-weight: 800;
	line-height: 1.7;
	text-align: center;
}

.ra-card-head p {
	margin: 0;
	color: var(--ra-muted);
	font-size: 13.6px;
	text-align: center;
}

/* ---------- نوار پیشرفت ---------- */

.ra-progress {
	margin-bottom: clamp(20px, 3vw, 28px);
}

.ra-bar {
	height: 6px;
	min-height: 6px;
	border-radius: var(--ra-pill);
	background: var(--ra-tint);
	overflow: hidden;
}

.ra-bar span {
	display: block;
	height: 100%;
	border-radius: var(--ra-pill);
	background: linear-gradient(90deg, var(--ra-g), var(--ra-p));
	transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ra-dots {
	display: flex;
	gap: 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.ra-dots li {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	margin: 0;
	color: var(--ra-muted);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.7;
}

.ra-dots b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--ra-line);
	background: #fff;
	color: var(--ra-muted);
	font-size: 12px;
	transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.ra-dots li.is-active b {
	border-color: var(--ra-p);
	background: var(--ra-p);
	color: #fff;
}

.ra-dots li.is-done b {
	border-color: var(--ra-g);
	background: var(--ra-tint);
	color: var(--ra-d);
}

/* ---------- گام‌ها ---------- */

.ra-step {
	margin: 0;
	padding: 0;
	border: 0;
	animation: ra-fade 0.35s ease both;
}

.ra-step[hidden] {
	display: none;
}

.ra-step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0 0 4px;
	padding: 0;
	color: var(--ra-d);
	font-size: clamp(17px, 2vw, 20px);
	font-weight: 800;
	line-height: 1.7;
}

.ra-step-title b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ra-tint);
	color: var(--ra-d);
	font-size: 14px;
}

.ra-step-desc {
	margin: 0 0 18px;
	color: var(--ra-muted);
	font-size: 13.6px;
	line-height: 2;
	text-wrap: pretty;
}

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

.ra-field {
	grid-column: 1 / -1;
	min-width: 0;
}

.ra-field.ra-half {
	grid-column: span 1;
}

.ra-label {
	display: block;
	margin-bottom: 8px;
	color: var(--ra-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.8;
}

.ra-req {
	color: #b4351f;
	font-style: normal;
	font-weight: 800;
}

.ra-hint {
	margin: 6px 0 0;
	color: var(--ra-muted);
	font-size: 12.4px;
	line-height: 1.85;
}

/* ---------- ورودی‌ها ---------- */

.ra input[type="text"],
.ra input[type="number"],
.ra input[type="tel"],
.ra input[type="email"],
.ra textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1.5px solid var(--ra-line);
	border-radius: 12px;
	background: #fff;
	color: var(--ra-ink);
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.8;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.ra textarea {
	min-height: 96px;
	resize: vertical;
}

.ra input::placeholder,
.ra textarea::placeholder {
	color: #9aa8a0;
}

.ra input:focus,
.ra textarea:focus {
	outline: none;
	border-color: var(--ra-p);
	box-shadow: 0 0 0 3px rgba(10, 104, 67, 0.14);
}

.ra-input-wrap {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.ra-input-wrap input {
	flex: 1;
}

.ra-suffix {
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	border-radius: 12px;
	background: var(--ra-cream);
	border: 1.5px solid var(--ra-line);
	color: var(--ra-muted);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.ra-code-btn {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 8px 16px;
	border: 1.5px solid var(--ra-p);
	border-radius: 12px;
	background: var(--ra-tint);
	color: var(--ra-d);
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.6;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s, color 0.2s;
}

.ra-code-btn:hover:not(:disabled) {
	background: var(--ra-p);
	color: #fff;
}

.ra-code-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.ra-code-btn--ok {
	background: var(--ra-p);
	color: #fff;
}

.ra-code-btn--link {
	border-color: var(--ra-line);
	background: #fff;
	color: var(--ra-g);
}

.ra-code-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
	margin-top: 10px;
	animation: ra-fade 0.3s ease both;
}

.ra-code-row[hidden] {
	display: none;
}

.ra-code-row input {
	max-width: 180px;
	letter-spacing: 6px;
	text-align: center;
	font-weight: 800;
}

.ra-verify-msg {
	margin: 8px 0 0;
	font-size: 12.6px;
	line-height: 1.9;
	min-height: 0;
}

.ra-verify-msg.is-ok {
	color: var(--ra-p);
	font-weight: 700;
}

.ra-verify-msg.is-error {
	color: #b4351f;
	font-weight: 700;
}

/* ---------- گزینه‌ها ---------- */

.ra-opts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ra-opts--cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.ra-opts--cards.ra-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ra-opt {
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 14px;
	border: 1.5px solid var(--ra-line);
	border-radius: 12px;
	background: #fff;
	color: var(--ra-ink);
	font-size: 13.6px;
	font-weight: 600;
	line-height: 1.8;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ra-opts--cards .ra-opt {
	min-height: 54px;
	padding: 12px 16px;
	border-radius: 14px;
	font-size: 13.8px;
}

.ra-opts--cards .ra-opt span {
	display: block;
	padding-inline-start: 24px;
	position: relative;
}

.ra-opts--cards .ra-opt span::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border: 1.5px solid var(--ra-line);
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.ra-opt input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.ra-opt:hover {
	border-color: var(--ra-g);
	background: var(--ra-cream);
}

.ra-opt:has(input:checked) {
	border-color: var(--ra-p);
	background: var(--ra-tint);
	box-shadow: 0 0 0 3px rgba(10, 104, 67, 0.1);
	color: var(--ra-d);
	font-weight: 700;
}

.ra-opts--cards .ra-opt:has(input:checked) span::before {
	border-color: var(--ra-p);
	background: var(--ra-p);
	box-shadow: inset 0 0 0 3px #fff;
}

.ra-opt:focus-within {
	outline: 3px solid var(--ra-g);
	outline-offset: 2px;
}

.ra-opts--seg .ra-opt {
	flex: 1 1 auto;
	justify-content: center;
	padding: 9px 16px;
	border-radius: var(--ra-pill);
	text-align: center;
}

.ra-opts--chips .ra-opt {
	padding: 7px 14px;
	border-radius: var(--ra-pill);
	font-size: 13px;
}

.ra-opts--chips .ra-opt:has(input:checked) {
	border-color: var(--ra-p);
	background: var(--ra-p);
	color: #fff;
}

.ra-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 4px 0 0;
	padding: 12px 14px;
	border: 1.5px solid var(--ra-line);
	border-radius: 12px;
	background: var(--ra-cream);
	font-size: 13.4px;
	line-height: 1.9;
	cursor: pointer;
}

.ra-consent input {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 4px 0 0;
	accent-color: var(--ra-p);
}

.ra-consent:has(input:checked) {
	border-color: var(--ra-g);
	background: var(--ra-tint);
}

/* ---------- خطا و دکمه‌ها ---------- */

.ra-error {
	margin: 16px 0 0;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1px solid #f0c2b8;
	background: #fdf0ec;
	color: #8f2a17;
	font-size: 13.4px;
	font-weight: 700;
	line-height: 1.9;
}

.ra-error[hidden] {
	display: none;
}

.ra-field.is-invalid input,
.ra-field.is-invalid textarea {
	border-color: #d4644a;
	box-shadow: 0 0 0 3px rgba(180, 53, 31, 0.12);
}

.ra-field.is-invalid .ra-label {
	color: #b4351f;
}

.ra-nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: clamp(18px, 2.6vw, 26px);
	padding-top: 18px;
	border-top: 1px solid var(--ra-line);
}

.ra-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 9px 26px;
	border: 1.5px solid var(--ra-p);
	border-radius: var(--ra-pill);
	background: var(--ra-p);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.7;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ra-btn:hover:not(:disabled) {
	background: #fff;
	color: var(--ra-p);
	transform: translateY(-1px);
}

.ra-btn:disabled {
	opacity: 0.65;
	cursor: progress;
}

.ra-btn--ghost {
	border-color: var(--ra-line);
	background: #fff;
	color: var(--ra-d);
}

.ra-btn--ghost:hover:not(:disabled) {
	border-color: var(--ra-p);
	background: var(--ra-tint);
	color: var(--ra-d);
}

.ra-btn--submit {
	padding-inline: 32px;
	box-shadow: 0 14px 26px -16px rgba(6, 75, 49, 0.9);
}

.ra-btn[hidden] {
	display: none;
}

/* ---------- موفقیت ---------- */

.ra-success {
	padding: clamp(26px, 4vw, 44px) clamp(18px, 3vw, 30px);
	text-align: center;
	animation: ra-fade 0.4s ease both;
}

.ra-success[hidden] {
	display: none;
}

.ra-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--ra-tint);
	color: var(--ra-p);
	font-size: 30px;
	font-weight: 800;
	box-shadow: 0 0 0 8px rgba(182, 217, 138, 0.22);
}

.ra-success h2 {
	margin: 0 0 8px;
	color: var(--ra-d);
	font-size: clamp(20px, 2.4vw, 26px);
	text-align: center;
}

.ra-success p {
	max-width: 560px;
	margin: 0 auto 6px;
	color: var(--ra-muted);
	font-size: 14.4px;
	text-align: center;
}

.ra-code-ref {
	margin: 14px 0 22px !important;
	color: var(--ra-ink) !important;
	font-size: 15px !important;
}

.ra-code-ref b {
	display: inline-block;
	padding: 3px 14px;
	border-radius: var(--ra-pill);
	background: var(--ra-tint);
	color: var(--ra-d);
	letter-spacing: 1px;
}

.ra-hp {
	position: absolute !important;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ra-loading {
	pointer-events: none;
	opacity: 0.7;
}

@keyframes ra-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- موبایل ---------- */

@media (max-width: 820px) {
	.ra-how {
		grid-template-columns: 1fr;
	}

	.ra-dots li span {
		display: none;
	}

	.ra-dots li {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.ra-grid,
	.ra-opts--cards,
	.ra-opts--cards.ra-cols-2 {
		grid-template-columns: 1fr;
	}

	.ra-field.ra-half {
		grid-column: 1 / -1;
	}

	.ra-input-wrap {
		flex-wrap: wrap;
	}

	.ra-input-wrap input {
		flex: 1 1 100%;
	}

	.ra-code-btn {
		width: 100%;
	}

	.ra-code-row {
		flex-wrap: wrap;
	}

	.ra-code-row input {
		max-width: none;
		flex: 1 1 100%;
	}

	.ra-nav {
		flex-direction: column-reverse;
	}

	.ra-nav .ra-btn {
		width: 100%;
	}

	.ra-page .rk-page__head {
		padding: 22px 16px;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ra-step,
	.ra-success,
	.ra-code-row {
		animation: none;
	}

	.ra-how li,
	.ra-btn,
	.ra-bar span {
		transition: none;
	}
}
