/* MedLab section heading — modern title styles */

.medlab-sec-head {
	--msh-accent: #f58220;
	--msh-rule-w: 56px;
	--msh-font: var(--medlab-site-font, "Yekan", Tahoma, sans-serif);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 0 0 28px;
	font-family: var(--msh-font);
	direction: rtl;
}

.medlab-sec-head__main {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
	flex: 1 1 auto;
}

.medlab-sec-head__texts {
	min-width: 0;
}

.medlab-sec-head__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border-radius: 12px;
	background: color-mix(in srgb, var(--msh-accent) 14%, #fff);
	color: var(--msh-accent);
	font-size: 1.05rem;
	line-height: 1;
}

.medlab-sec-head__icon svg {
	width: 1.1em;
	height: 1.1em;
	fill: currentColor;
}

.medlab-sec-head__eyebrow {
	display: inline-block;
	margin: 0 0 8px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	color: var(--msh-accent);
}

.medlab-sec-head__title {
	position: relative;
	display: block;
	margin: 0;
	font-size: clamp(1.35rem, 2.5vw, 1.85rem);
	font-weight: 800;
	line-height: 1.35;
	color: #1a2744;
}

.medlab-sec-head__title-text {
	display: inline;
}

.medlab-sec-head__subtitle {
	margin: 10px 0 0;
	max-width: 42rem;
	font-size: 0.95rem;
	line-height: 1.75;
	color: #6b7280;
}

.medlab-sec-head__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	padding: 8px 0;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	color: #2f5aa8;
	white-space: nowrap;
	transition: color 0.2s ease, gap 0.2s ease;
}

.medlab-sec-head__link:hover {
	color: var(--msh-accent);
	gap: 9px;
}

.medlab-sec-head__link-arrow {
	display: block;
	transform: scaleX(-1);
}

/* Alignment */
.medlab-sec-head--align-center {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.medlab-sec-head--align-center .medlab-sec-head__main {
	flex-direction: column;
	align-items: center;
}

.medlab-sec-head--align-center .medlab-sec-head__subtitle {
	margin-left: auto;
	margin-right: auto;
}

.medlab-sec-head--align-left {
	flex-direction: row-reverse;
}

.medlab-sec-head--align-left .medlab-sec-head__main {
	flex-direction: row-reverse;
}

.medlab-sec-head--align-left .medlab-sec-head__texts {
	text-align: left;
}

/* ——— Style: underline ——— */
.medlab-sec-head--underline .medlab-sec-head__rule {
	display: block;
	width: var(--msh-rule-w);
	height: 3px;
	margin-top: 12px;
	border-radius: 999px;
	background: var(--msh-accent);
	transform-origin: right center;
	animation: medlab-msh-rule 0.55s ease both;
}

.medlab-sec-head--align-center.medlab-sec-head--underline .medlab-sec-head__rule {
	margin-left: auto;
	margin-right: auto;
	transform-origin: center;
}

.medlab-sec-head--align-left.medlab-sec-head--underline .medlab-sec-head__rule {
	transform-origin: left center;
}

/* ——— Style: gradient ——— */
.medlab-sec-head--gradient .medlab-sec-head__rule {
	display: block;
	width: var(--msh-rule-w);
	height: 4px;
	margin-top: 12px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--msh-accent), #2f5aa8 70%, transparent);
	animation: medlab-msh-rule 0.55s ease both;
}

.medlab-sec-head--align-center.medlab-sec-head--gradient .medlab-sec-head__rule {
	margin-left: auto;
	margin-right: auto;
	background: linear-gradient(90deg, transparent, var(--msh-accent), #2f5aa8, transparent);
}

.medlab-sec-head--align-left.medlab-sec-head--gradient .medlab-sec-head__rule {
	background: linear-gradient(270deg, var(--msh-accent), #2f5aa8 70%, transparent);
}

/* ——— Style: split lines ——— */
.medlab-sec-head--split .medlab-sec-head__title {
	display: flex;
	align-items: center;
	gap: 16px;
	justify-content: flex-start;
}

.medlab-sec-head--align-center.medlab-sec-head--split .medlab-sec-head__title {
	justify-content: center;
}

.medlab-sec-head--align-left.medlab-sec-head--split .medlab-sec-head__title {
	justify-content: flex-end;
	flex-direction: row-reverse;
}

.medlab-sec-head--split .medlab-sec-head__line {
	display: block;
	flex: 1 1 40px;
	max-width: 88px;
	height: 1px;
	background: linear-gradient(90deg, transparent, #d1d5db);
}

.medlab-sec-head--split .medlab-sec-head__line--end {
	background: linear-gradient(270deg, transparent, #d1d5db);
}

.medlab-sec-head--split .medlab-sec-head__title-text {
	position: relative;
	padding: 0 2px;
}

.medlab-sec-head--split .medlab-sec-head__title-text::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -2px;
	left: 0;
	height: 2px;
	border-radius: 999px;
	background: var(--msh-accent);
	opacity: 0.85;
}

/* ——— Style: accent bar ——— */
.medlab-sec-head--accent .medlab-sec-head__texts {
	padding-right: 16px;
	border-right: 3px solid var(--msh-accent);
}

.medlab-sec-head--align-center.medlab-sec-head--accent .medlab-sec-head__texts {
	padding-right: 0;
	border-right: 0;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--msh-accent);
}

.medlab-sec-head--align-left.medlab-sec-head--accent .medlab-sec-head__texts {
	padding-right: 0;
	border-right: 0;
	padding-left: 16px;
	border-left: 3px solid var(--msh-accent);
}

/* ——— Style: badge ——— */
.medlab-sec-head--badge .medlab-sec-head__eyebrow {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--msh-accent) 12%, #fff);
	color: var(--msh-accent);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
}

.medlab-sec-head--badge .medlab-sec-head__title {
	margin-top: 2px;
}

/* ——— Style: minimal ——— */
.medlab-sec-head--minimal {
	padding-bottom: 14px;
	border-bottom: 1px solid #e5e7eb;
}

.medlab-sec-head--minimal .medlab-sec-head__title {
	font-weight: 700;
	letter-spacing: -0.01em;
}

.medlab-sec-head--minimal .medlab-sec-head__eyebrow {
	text-transform: none;
	opacity: 0.9;
}

/* ——— Style: framed ——— */
.medlab-sec-head--framed {
	padding: 18px 20px;
	border-radius: 16px;
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(135deg, color-mix(in srgb, var(--msh-accent) 55%, #fff), #e8eef8) border-box;
	border: 1px solid transparent;
	box-shadow: 0 8px 24px rgba(26, 39, 68, 0.05);
}

.medlab-sec-head--framed .medlab-sec-head__title {
	font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

@keyframes medlab-msh-rule {
	from {
		transform: scaleX(0.35);
		opacity: 0;
	}
	to {
		transform: scaleX(1);
		opacity: 1;
	}
}

@media (max-width: 767px) {
	.medlab-sec-head {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.medlab-sec-head__link {
		margin-top: 4px;
	}

	.medlab-sec-head--split .medlab-sec-head__line {
		max-width: 48px;
	}
}
