/*
 * Card list looks (Style tab "کارت‌ها" → hmf-cards--<option> on the widget).
 * Icons come from each item's own "Icon or image" (.hmf-card-list__media);
 * emphasis comes from the item's "Emphasise this card" (__item--accent);
 * numbers come from the "numbered" layout. Inside a Navy / Navy panel
 * surface the cards switch to their on-dark tone automatically.
 */

/* ---------- Icon row: icon tile beside a short title or text ---------- */

.hmf-cards--icon-row .hmf-card-list__item {
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 0;
	border-radius: 18px;
	background: var(--hc-white);
	box-shadow: 0 12px 24px -20px rgb(15 16 29 / 0.4);
}

.hmf-cards--icon-row .hmf-card-list__media {
	box-sizing: border-box;
	inline-size: 44px;
	block-size: 44px;
	padding: 10px;
	border-radius: 14px;
	background: #fff6e6;
}

.hmf-cards--icon-row .hmf-card-list__body {
	gap: 0;
}

.hmf-cards--icon-row .hmf-card-list__title {
	color: var(--hc-ink);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.8;
}

.hmf-cards--icon-row .hmf-card-list__text {
	color: var(--hc-slate-2);
	font-size: 16px;
	font-weight: 600;
	line-height: 2.15;
}

.hmf-cards--icon-row .hmf-card-list__text p {
	text-wrap: pretty;
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list {
	margin-block: 18px 20px;
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__item,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__item {
	gap: 12px;
	min-block-size: 56px;
	padding: 8px 14px;
	border: 1px solid rgb(255 255 255 / 0.12);
	background: rgb(255 255 255 / 0.06);
	box-shadow: none;
	color: var(--hc-white);
	transition: background-color 0.2s, border-color 0.2s;
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__media,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__media {
	inline-size: 40px;
	block-size: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, #ffbf56, var(--hc-gold-deep));
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__badge,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__badge {
	padding: 0;
	background: none;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__title,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__title {
	color: inherit;
	font-size: 17px;
	line-height: 1.6;
	letter-spacing: 0.5px;
}

.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__text,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__text {
	color: var(--hc-line-2);
	font-weight: 400;
	line-height: 1.9;
}

@media (hover: hover) {
	.hmf-surface--navy .hmf-cards--icon-row .hmf-card-list__item:hover,
	:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--icon-row .hmf-card-list__item:hover {
		border-color: rgb(255 178 56 / 0.5);
		background: rgb(255 255 255 / 0.1);
	}
}

/* Numbered layout: a gold number circle in place of the icon. */
.hmf-cards--icon-row .hmf-card-list--numbered .hmf-card-list__body {
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
}

.hmf-cards--icon-row .hmf-card-list--numbered .hmf-card-list__badge {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	inline-size: 30px;
	block-size: 30px;
	padding: 0;
	border-radius: 50%;
	background: var(--hc-gold);
	color: var(--hc-ink-2);
	font-size: 15px;
	font-weight: 900;
	line-height: 1;
}

@media (width >= 68.75rem) {
	.hmf-cards--icon-row .hmf-card-list__text p {
		text-align: justify;
	}
}

/* ---------- Feature: icon, title and copy; row on phones, centred column wider ---------- */

.hmf-cards--feature .hmf-card-list__item {
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 24px 22px;
	border: 1px solid rgb(15 23 42 / 0.1);
	border-radius: 26px;
	background: var(--hc-white);
	box-shadow: 0 30px 60px -40px rgb(15 16 29 / 0.35);
}

.hmf-cards--feature .hmf-card-list__media {
	inline-size: 64px;
	block-size: 64px;
	border-radius: 50%;
	box-shadow: 0 10px 20px -10px rgb(199 127 0 / 0.7);
}

.hmf-cards--feature .hmf-card-list__body {
	gap: 4px;
	align-items: flex-start;
	text-align: start;
}

.hmf-cards--feature .hmf-card-list__title {
	color: var(--hc-ink);
	font-size: 18px;
	font-weight: 900;
	line-height: 1.7;
}

.hmf-cards--feature .hmf-card-list__text {
	color: var(--hc-slate-2);
	font-size: 15.5px;
	font-weight: 600;
	line-height: 2.2;
}

.hmf-cards--feature .hmf-card-list__text p {
	text-align: justify;
	text-wrap: pretty;
}

.hmf-cards--feature .hmf-card-list-clamp {
	gap: 20px;
}

.hmf-cards--feature .hmf-card-list-clamp.is-clamped > .hmf-card-list__grid {
	-webkit-mask-image: linear-gradient(#000 calc(100% - 110px), transparent);
	mask-image: linear-gradient(#000 calc(100% - 110px), transparent);
}

.hmf-cards--feature .hmf-card-list__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-block-size: 0;
	padding: 12px 26px;
	border: 0;
	border-radius: 99px;
	background: var(--hc-gold);
	color: var(--hc-ink-2);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.9;
	transition: background-color 0.2s, transform 0.2s;
}

.hmf-cards--feature .hmf-card-list__toggle::after {
	content: "";
	inline-size: 20px;
	block-size: 20px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.5s;
}

.hmf-cards--feature .hmf-card-list__toggle[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

.hmf-cards--feature .hmf-card-list__toggle:hover {
	background: var(--hc-gold-deep);
	color: var(--hc-ink-2);
}

.hmf-cards--feature .hmf-card-list__toggle:active {
	transform: scale(0.97);
}

.hmf-surface--navy .hmf-cards--feature .hmf-card-list__item,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--feature .hmf-card-list__item {
	border-color: rgb(255 255 255 / 0.14);
	background: rgb(255 255 255 / 0.06);
	box-shadow: none;
}

.hmf-surface--navy .hmf-cards--feature .hmf-card-list__title,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--feature .hmf-card-list__title {
	color: var(--hc-white);
}

.hmf-surface--navy .hmf-cards--feature .hmf-card-list__text,
:is(.hmf-surface--navy-panel, .hmf-surface--offer) .hmf-cards--feature .hmf-card-list__text {
	color: #dfe5f1;
}

@media (width >= 48rem) {
	.hmf-cards--feature .hmf-card-list__item {
		flex-direction: column;
		padding: 30px;
		text-align: center;
	}

	.hmf-cards--feature .hmf-card-list__media {
		inline-size: 84px;
		block-size: 84px;
	}

	.hmf-cards--feature .hmf-card-list__body {
		align-items: center;
		text-align: center;
	}

	.hmf-cards--feature .hmf-card-list__text {
		font-size: 16.5px;
	}
}

/* ---------- Edge: icon tile, title and copy with a gold marker on the side ---------- */

.hmf-cards--edge .hmf-card-list__item {
	gap: 14px;
	padding: 24px 22px 26px;
	border: 1px solid var(--hc-line);
	border-radius: 24px;
	background: var(--hc-white);
	box-shadow: 0 30px 60px -44px rgb(15 16 29 / 0.28);
	transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hmf-cards--edge .hmf-card-list__item::before {
	content: "";
	position: absolute;
	inset-block-start: 24px;
	inset-inline-start: -1px;
	inline-size: 4px;
	block-size: 44px;
	border-start-end-radius: 4px;
	border-end-end-radius: 4px;
	background: var(--hc-gold);
}

.hmf-cards--edge .hmf-card-list__media {
	box-sizing: border-box;
	inline-size: 52px;
	block-size: 52px;
	padding: 12px;
	border-radius: 16px;
	background: var(--hc-sky);
}

.hmf-cards--edge .hmf-card-list__body {
	gap: 14px;
}

.hmf-cards--edge .hmf-card-list__title {
	color: var(--hc-ink);
	font-size: 20px;
	font-weight: 900;
	line-height: 1.75;
	text-wrap: balance;
}

.hmf-cards--edge .hmf-card-list__text {
	color: var(--hc-slate);
	font-size: 16px;
	line-height: 2.1;
}

.hmf-cards--edge .hmf-card-list__text p {
	margin: 0;
	text-wrap: pretty;
}

/* Emphasised card: dark panel with a gold tile. */
.hmf-cards--edge .hmf-card-list__item--accent {
	border-color: var(--hc-ink);
	background: linear-gradient(135deg, var(--hc-ink), #1a1c33);
}

.hmf-cards--edge .hmf-card-list__item--accent .hmf-card-list__media {
	background: var(--hc-gold);
}

.hmf-cards--edge .hmf-card-list__item--accent .hmf-card-list__title {
	color: var(--hc-white);
}

.hmf-cards--edge .hmf-card-list__item--accent .hmf-card-list__text {
	color: #e8ecf5;
}

@media (hover: hover) {
	.hmf-cards--edge .hmf-card-list__item:hover {
		border-color: var(--hc-blue);
		transform: translateY(-3px);
		box-shadow: 0 30px 60px -36px rgb(4 107 210 / 0.35);
	}
}

@media (width >= 48rem) {
	.hmf-cards--edge .hmf-card-list__item {
		padding: 28px 28px 30px;
		border-radius: 28px;
	}
}

@media (width >= 68.75rem) {
	.hmf-cards--edge .hmf-card-list__item {
		padding: 28px 24px 30px;
	}

	.hmf-cards--edge .hmf-card-list__title {
		font-size: 19px;
	}
}

/* ---------- Top: blue bar on top, large faded number when numbered ---------- */

.hmf-cards--top .hmf-card-list__item {
	overflow: hidden;
	padding: 28px 22px 26px;
	border: 0;
	border-block-start: 5px solid var(--hc-blue);
	border-radius: 26px;
	background: var(--hc-sky);
	box-shadow: 0 30px 60px -40px rgb(15 16 29 / 0.35);
}

.hmf-cards--top .hmf-card-list__item--accent {
	border-block-start-color: var(--hc-gold);
	background: #fff8ec;
}

.hmf-cards--top .hmf-card-list__body {
	gap: 0;
}

.hmf-cards--top .hmf-card-list__badge {
	position: absolute;
	inset-block-start: 8px;
	inset-inline-end: 16px;
	padding: 0;
	background: none;
	color: rgb(4 107 210 / 0.1);
	font-size: 86px;
	font-weight: 900;
	line-height: 1;
}

.hmf-cards--top .hmf-card-list__item--accent .hmf-card-list__badge {
	background: none;
	color: rgb(251 172 2 / 0.25);
}

.hmf-cards--top .hmf-card-list__title {
	position: relative;
	margin: 0 0 10px;
	color: var(--hc-blue-deep);
	font-size: 20px;
	font-weight: 900;
	line-height: 1.7;
}

.hmf-cards--top .hmf-card-list__item--accent .hmf-card-list__title {
	color: var(--hc-ink);
}

.hmf-cards--top .hmf-card-list__text {
	position: relative;
	color: var(--hc-slate-2);
	font-size: 15.5px;
	font-weight: 600;
	line-height: 2.2;
	text-align: justify;
}

.hmf-cards--top .hmf-card-list__text p {
	margin: 0;
}

@media (width >= 48rem) {
	.hmf-cards--top .hmf-card-list__item {
		padding: 34px 32px 32px;
	}

	/* A lone last card in a two-column grid spans the row. */
	.hmf-cards--top .hmf-card-list__item:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.hmf-cards--top .hmf-card-list__text {
		font-size: 16px;
	}
}

@media (width >= 68.75rem) {
	.hmf-cards--top .hmf-card-list__item {
		border-radius: 30px;
	}
}

/* ---------- Pill: badge pill above the copy on a tinted card ---------- */

.hmf-cards--pill {
	margin-block-start: 20px;
}

.hmf-cards--pill .hmf-card-list__grid {
	align-items: stretch;
}

.hmf-cards--pill .hmf-card-list__item {
	padding: 18px;
	border: 1px solid var(--hc-line);
	border-radius: 20px;
	background: var(--hc-sky);
}

.hmf-cards--pill .hmf-card-list__body {
	gap: 8px;
}

.hmf-cards--pill .hmf-card-list__badge {
	padding: 2px 14px;
	border-radius: 99px;
	background: var(--hc-ink);
	color: var(--hc-white);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.9;
	direction: ltr; /* keeps "+۷۰" in order; Persian labels read the same */
	unicode-bidi: isolate;
}

.hmf-cards--pill .hmf-card-list__text {
	color: var(--hc-slate);
	font-size: 16px;
	line-height: 1.95;
}

.hmf-cards--pill .hmf-card-list__item--accent {
	border-color: var(--hc-gold);
	background: #fff6e6;
	box-shadow: 0 18px 36px -26px rgb(199 127 0 / 0.8);
}

.hmf-cards--pill .hmf-card-list__item--accent .hmf-card-list__badge {
	background: var(--hc-gold);
	color: var(--hc-ink-2);
}

.hmf-cards--pill .hmf-card-list__item--accent .hmf-card-list__text {
	color: var(--hc-slate-2);
	font-weight: 600;
}

@media (width >= 48rem) {
	.hmf-cards--pill .hmf-card-list__item {
		padding: 22px 26px;
	}
}

@media (width >= 68.75rem) {
	.hmf-cards--pill .hmf-card-list__text p {
		text-align: justify;
	}
}

/* ---------- Profile: portrait with a caption over it, gold-edged body ---------- */

.hmf-cards--profile .hmf-card-list__item {
	flex-flow: column nowrap;
	overflow: hidden;
	border: 0;
	border-radius: 26px;
	background: var(--hc-white);
	box-shadow: 0 30px 60px -40px rgb(15 16 29 / 0.35);
}

.hmf-cards--profile .hmf-card-list__figure {
	flex: none;
}

.hmf-cards--profile .hmf-card-list__figure > .hmf-card-list__media {
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 520 / 692;
	object-fit: cover;
	background: #c5cde0;
}

.hmf-cards--profile .hmf-card-list__caption {
	gap: 2px;
	padding: 80px 20px 20px;
	background: linear-gradient(to top, rgb(15 16 29 / 0.92), rgb(15 16 29 / 0.6) 55%, transparent);
}

.hmf-cards--profile .hmf-card-list__caption::before {
	content: "";
	inline-size: 34px;
	block-size: 34px;
	margin-block-end: 6px;
	border-radius: 50%;
	background: var(--hc-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.hmf-cards--profile .hmf-card-list__caption-line:nth-child(1) {
	color: var(--hc-gold);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.8;
}

.hmf-cards--profile .hmf-card-list__caption-line:nth-child(2) {
	font-size: 20px;
	font-weight: 900;
	line-height: 1.7;
}

.hmf-cards--profile .hmf-card-list__caption-line:nth-child(3) {
	color: rgb(255 255 255 / 0.92);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.9;
}

.hmf-cards--profile .hmf-card-list__body {
	flex: 1;
	gap: 0;
	padding: 20px 22px 26px;
	border-block-start: 4px solid var(--hc-gold);
}

.hmf-cards--profile .hmf-card-list__title {
	margin: 0 0 8px;
	color: var(--hc-ink);
	font-size: 19px;
	font-weight: 900;
	line-height: 1.7;
}

.hmf-cards--profile .hmf-card-list__subtitle {
	margin: 0 0 6px;
	color: var(--hc-slate);
	font-size: 15px;
	font-weight: 700;
	line-height: 2.1;
}

.hmf-cards--profile .hmf-card-list__text {
	font-size: 15px;
	line-height: 2.1;
}

/* Rich-text label line inside a card's copy (Format → Label). */
.hmf-cards--profile .hmf-card-list__text .hmf-format--label {
	margin: 0 0 6px;
	color: var(--hc-blue-deep);
	font-size: 15px;
	font-weight: 800;
	line-height: 2.1;
}

.hmf-cards--profile .hmf-card-list__text ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hmf-cards--profile .hmf-card-list__text li {
	position: relative;
	margin: 0;
	padding-inline-start: 20px;
	color: var(--hc-slate-2);
	font-weight: 600;
}

.hmf-cards--profile .hmf-card-list__text li::before {
	content: "";
	position: absolute;
	inset-block-start: 0.95em;
	inset-inline-start: 2px;
	inline-size: 8px;
	block-size: 8px;
	border-radius: 50%;
	background: var(--hc-gold);
}

@media (width >= 48rem) {
	.hmf-cards--profile .hmf-card-list__caption-line:nth-child(2) {
		font-size: 22px;
	}
}

@media (width >= 68.75rem) {
	.hmf-cards--profile .hmf-card-list__item {
		flex-direction: row;
		border-radius: 30px;
	}

	.hmf-cards--profile .hmf-card-list__figure {
		flex: 0 0 46%;
	}

	.hmf-cards--profile .hmf-card-list__figure > .hmf-card-list__media {
		position: absolute;
		inset: 0;
		block-size: 100%;
		aspect-ratio: auto;
	}

	.hmf-cards--profile .hmf-card-list__caption {
		padding: 70px 16px 16px;
	}

	.hmf-cards--profile .hmf-card-list__caption-line:nth-child(2) {
		font-size: 18px;
	}

	.hmf-cards--profile .hmf-card-list__caption-line:nth-child(3) {
		font-size: 13px;
	}

	.hmf-cards--profile .hmf-card-list__body {
		padding: 26px 22px;
		border-block-start: 0;
		border-inline-start: 4px solid var(--hc-gold);
	}

	.hmf-cards--profile .hmf-card-list__title {
		font-size: 20px;
	}
}

/* ---------- Stats: large number over a short label ---------- */

.hmf-cards--stats .hmf-card-list__item {
	align-items: center;
	padding: 28px 16px;
	border-color: var(--hc-line);
	border-radius: 24px;
	background: var(--hc-white);
	text-align: center;
}

.hmf-cards--stats .hmf-card-list__badge {
	padding: 0;
	background: transparent;
	color: var(--hc-blue-deep);
	font-size: 32px;
	font-weight: 900;
	line-height: 1.5;
	direction: ltr;
	unicode-bidi: isolate;
}

.hmf-cards--stats .hmf-card-list__title {
	color: var(--hc-ink);
	font-size: 16px;
	line-height: 1.9;
}

/* The top accent keeps its colour when optional side borders are enabled. */
.hmf-cards--top .hmf-card-list__item { border-inline-color: var(--hc-line); border-block-end-color: var(--hc-line); }
