/* «Семейство Eli ZERO» — блок внизу карточек Eli (news.detail/.default/eli_family.php).
   Подключается ссылкой из самого блока, поэтому на остальных карточках не грузится.
   Подача — как у премиальных автомобилей: крупные цифры, короткие главы, много воздуха. */
.eli-family {
	--ef-ink: #0d1220;
	--ef-navy: #1c263c;
	--ef-lime: #bae00b;
	--ef-red: #d4141c;
	--ef-gray: #f2f3f5;
	--ef-line: #e3e5ea;
	--ef-muted: #5d6474;
	--ef-radius: 20px;
	margin: 100px 0 80px;
	color: var(--ef-ink);
}

.eli-family img {
	display: block;
	max-width: 100%;
}

.eli-family .ef-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ef-eyebrow {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ef-lime);
}

/* --- Вступление: снимок на всю ширину, текст поверх, цифры полосой снизу --- */
.ef-hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--ef-radius);
	background: var(--ef-ink);
	color: #fff;
}

.ef-hero > img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* текст над снимком, а не поверх: машины в кадре по центру, надпись их перекрывала */
.ef-hero:after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 45%;
	background: linear-gradient(180deg, rgba(13, 18, 32, 0) 0%, rgba(13, 18, 32, .92) 100%);
	pointer-events: none;
}

.ef-hero-text {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 20px 60px;
	align-items: end;
	padding: 60px 60px 44px;
}

.ef-hero-text .ef-eyebrow {
	grid-column: 1 / -1;
	margin: 0;
}

.eli-family h2.ef-title {
	margin: 0 0 20px;
	margin: 0;
	font-size: clamp(32px, 3.8vw, 52px);
	line-height: 1.02;
	font-weight: 600;
	letter-spacing: -.025em;
	color: #fff;
}

.ef-lead {
	margin: 0 0 4px;
	max-width: 600px;
	font-size: 17px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .86);
}

.ef-facts {
	position: absolute;
	z-index: 1;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	margin: 0;
	padding: 0 60px 44px;
	list-style: none;
}

.ef-facts li {
	padding: 0 20px 0 0;
	margin: 0;
	border-top: 1px solid rgba(255, 255, 255, .28);
	padding-top: 16px;
}

.ef-facts li:before {
	display: none;
}

.ef-facts b {
	display: block;
	font-size: clamp(22px, 2.4vw, 34px);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.ef-facts span {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: rgba(255, 255, 255, .7);
}

/* --- Заголовки разделов --- */
.ef-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin: 90px 0 32px;
}

.eli-family h2.ef-h {
	margin: 0;
	font-size: clamp(28px, 3.2vw, 44px);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -.02em;
}

.ef-head p {
	margin: 0;
	max-width: 420px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ef-muted);
}

/* --- Плитки версий --- */
.ef-models {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ef-model {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0 24px;
	border-radius: var(--ef-radius);
	background: var(--ef-gray);
	transition: box-shadow .25s, transform .25s;
}

.ef-model:before {
	display: none;
}

.ef-model:hover {
	box-shadow: 0 18px 40px -22px rgba(13, 18, 32, .45);
	transform: translateY(-3px);
}

.ef-model.is-current {
	box-shadow: inset 0 0 0 2px var(--ef-navy);
}

.ef-model-pic {
	position: relative;
	padding: 18px 18px 0;
}

.ef-model-pic img {
	width: 100%;
	height: auto;
	transition: transform .4s;
}

.ef-model:hover .ef-model-pic img {
	transform: scale(1.04);
}

.ef-class,
.ef-here {
	position: absolute;
	top: 18px;
	padding: 5px 10px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}

.ef-class {
	left: 18px;
	background: #fff;
	color: var(--ef-ink);
}

.is-l7e .ef-class {
	background: var(--ef-ink);
	color: #fff;
}

.ef-here {
	right: 18px;
	background: var(--ef-lime);
	color: var(--ef-ink);
}

.ef-model-name {
	margin: 4px 24px 8px;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.01em;
}

.ef-model-name a {
	color: inherit;
	text-decoration: none;
}

/* вся плитка кликабельна, если у версии есть карточка в каталоге */
.ef-model-name a:after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--ef-radius);
}

.ef-model-tag {
	margin: 0 24px 18px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ef-muted);
}

.ef-model-specs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: auto 24px 20px;
	padding-top: 16px;
	border-top: 1px solid var(--ef-line);
}

.ef-model-specs dt {
	font-size: 12px;
	color: var(--ef-muted);
}

.ef-model-specs dd {
	margin: 4px 0 0;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.ef-model-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	margin: 0 24px;
}

.ef-price {
	font-size: 18px;
	font-weight: 700;
}

.ef-more {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 100px;
	background: var(--ef-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}

.ef-more:hover,
.ef-more:focus-visible {
	background: var(--ef-lime);
	color: var(--ef-ink);
}

.ef-more--ask {
	margin-left: auto;
	background: #fff;
	color: var(--ef-navy);
	box-shadow: inset 0 0 0 1px var(--ef-line);
}

/* --- Главы: снимок и короткий текст с крупной цифрой, стороны чередуются --- */
.ef-chapters {
	display: grid;
	gap: 20px;
	margin-top: 90px;
}

.ef-chapter {
	display: grid;
	grid-template-columns: 7fr 5fr;
	align-items: stretch;
	overflow: hidden;
	border-radius: var(--ef-radius);
	background: var(--ef-gray);
}

.ef-chapter:nth-child(even) .ef-chapter-pic {
	order: 2;
}

.ef-chapter-pic img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.ef-chapter-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px 52px;
}

.ef-num {
	display: block;
	margin-bottom: 18px;
	font-size: clamp(44px, 5.4vw, 80px);
	line-height: .95;
	font-weight: 700;
	letter-spacing: -.035em;
	color: var(--ef-navy);
}

.ef-chapter h3,
.ef-dark h3 {
	margin: 0 0 14px;
	font-size: clamp(22px, 2.2vw, 30px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -.015em;
}

.ef-chapter p {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #333a48;
}

/* --- MX и Race Edition: тёмные карточки, текст поверх снимка --- */
.ef-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 20px;
}

.ef-dark {
	position: relative;
	overflow: hidden;
	min-height: 560px;
	border-radius: var(--ef-radius);
	background: var(--ef-ink);
	color: #fff;
}

.ef-dark > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s;
}

.ef-dark:hover > img {
	transform: scale(1.03);
}

.ef-dark:after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(13, 18, 32, 0) 30%, rgba(13, 18, 32, .92) 100%);
}

.ef-dark-text {
	position: absolute;
	z-index: 1;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 40px;
}

.ef-dark h3 {
	font-size: clamp(26px, 2.6vw, 38px);
	color: #fff;
}

.ef-dark p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .85);
}

.ef-dark .ef-eyebrow {
	margin-bottom: 10px;
}

.ef-dark--race .ef-eyebrow {
	color: #ff4d55;
}

/* --- Таблица сравнения: на узком экране прокручивается, первая колонка липкая --- */
.ef-table-wrap {
	overflow-x: auto;
	border-radius: var(--ef-radius);
	box-shadow: inset 0 0 0 1px var(--ef-line);
	-webkit-overflow-scrolling: touch;
}

.ef-table-wrap:focus-visible {
	outline: 3px solid var(--ef-lime);
	outline-offset: 2px;
}

.ef-table {
	width: 100%;
	min-width: 920px;
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	line-height: 1.4;
}

.ef-table th,
.ef-table td {
	padding: 13px 16px;
	border-bottom: 1px solid var(--ef-line);
	text-align: center;
	vertical-align: middle;
	hyphens: auto;
	overflow-wrap: break-word;
}

.ef-table tbody tr:last-child th,
.ef-table tbody tr:last-child td {
	border-bottom: 0;
}

.ef-table thead th {
	position: sticky;
	top: 0;
	padding-top: 20px;
	padding-bottom: 20px;
	background: var(--ef-ink);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.ef-table thead th.is-current {
	background: var(--ef-lime);
	color: var(--ef-ink);
}

.ef-table th[scope="row"],
.ef-table .ef-corner {
	position: sticky;
	left: 0;
	z-index: 1;
	width: 220px;
	text-align: left;
	font-weight: 500;
	hyphens: manual;
	background: #fff;
	box-shadow: 1px 0 0 var(--ef-line);
}

.ef-table .ef-corner {
	z-index: 2;
	background: var(--ef-ink);
	color: rgba(255, 255, 255, .6);
	font-weight: 500;
}

.ef-table td small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 400;
	color: var(--ef-muted);
}

.ef-table td.is-current {
	background: #f7fbe6;
	font-weight: 600;
}

.ef-table .ef-group th {
	padding-top: 22px;
	padding-bottom: 10px;
	text-align: left;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ef-muted);
	background: var(--ef-gray);
}

/* ячейка группы во всю ширину таблицы не может прилипнуть сама — липнет надпись внутри */
.ef-table .ef-group span {
	position: sticky;
	left: 16px;
}

.ef-mark {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	vertical-align: middle;
}

.ef-mark--yes {
	background: var(--ef-navy);
}

.ef-mark--opt {
	box-shadow: inset 0 0 0 2px var(--ef-navy);
}

.ef-mark--no {
	width: 14px;
	height: 2px;
	border-radius: 0;
	background: #b7bcc6;
}

.ef-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	margin: 16px 0 0;
	font-size: 13px;
	color: var(--ef-muted);
}

.ef-legend .ef-mark {
	margin-right: 6px;
}

.ef-note {
	margin: 14px 0 0;
	max-width: 980px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--ef-muted);
}

/* --- Планшет --- */
@media (max-width: 1100px) {
	.ef-hero-text {
		padding: 40px 40px 32px;
	}

	.ef-facts {
		padding: 0 40px 32px;
	}

	.ef-models {
		grid-template-columns: repeat(2, 1fr);
	}

	.ef-chapter-text {
		padding: 36px;
	}
}

/* --- Телефон: текст вступления под снимком, плитки листаются вбок, главы в столбик --- */
@media (max-width: 800px) {
	.eli-family {
		margin: 60px 0 50px;
	}

	.ef-hero:after {
		display: none;
	}

	.ef-hero-text {
		display: block;
		padding: 30px 22px 24px;
	}

	.ef-hero-text .ef-eyebrow {
		margin-bottom: 14px;
	}

	.eli-family h2.ef-title {
		margin-bottom: 16px;
	}

	.ef-facts {
		position: static;
		padding: 24px 22px 0;
	}

	.ef-facts {
		grid-template-columns: 1fr 1fr;
		gap: 0 16px;
		padding-bottom: 24px;
	}

	.ef-facts li {
		padding-bottom: 16px;
	}

	.ef-facts li:last-child {
		grid-column: 1 / -1;
	}

	.ef-lead {
		font-size: 15px;
	}

	.ef-head {
		display: block;
		margin: 60px 0 22px;
	}

	.ef-head p {
		margin-top: 10px;
	}

	/* ряд плиток прокручивается внутри себя, страница вбок не едет */
	.ef-models {
		display: flex;
		gap: 12px;
		margin: 0 -20px;
		padding: 0 20px 8px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 20px;
		-webkit-overflow-scrolling: touch;
	}

	.ef-model {
		flex: 0 0 82%;
		scroll-snap-align: start;
	}

	.ef-model:hover {
		transform: none;
	}

	.ef-model-name {
		margin: 4px 18px 6px;
		font-size: 20px;
	}

	.ef-model-tag,
	.ef-model-specs,
	.ef-model-foot {
		margin-left: 18px;
		margin-right: 18px;
	}

	.ef-chapters {
		margin-top: 60px;
		gap: 14px;
	}

	.ef-chapter,
	.ef-duo {
		grid-template-columns: 1fr;
	}

	.ef-chapter:nth-child(even) .ef-chapter-pic {
		order: 0;
	}

	.ef-chapter-text {
		padding: 26px 22px 30px;
	}

	.ef-chapter p {
		font-size: 15px;
	}

	.ef-duo {
		gap: 14px;
		margin-top: 14px;
	}

	.ef-dark {
		min-height: 460px;
	}

	.ef-dark-text {
		padding: 26px 22px;
	}

	.ef-table {
		min-width: 960px;
		font-size: 13px;
	}

	.ef-table th,
	.ef-table td {
		padding: 11px 12px;
	}

	.ef-table th[scope="row"],
	.ef-table .ef-corner {
		width: 136px;
		min-width: 136px;
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ef-model,
	.ef-model-pic img,
	.ef-dark > img {
		transition: none;
	}
}
