/* ==========================================================================
   Техномаг — Центр помощи: блоки контента
   Пространство имён: .tmh-*
   ========================================================================== */

/* ---------- Шаги ---------- */
.tmh-steps {
	margin: 32px 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 20px;
	counter-reset: tmh-step;
}

.tmh-step {
	position: relative;
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: 20px;
	padding: 24px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 10px;
	transition: border-color .2s var(--tmh-ease, ease), transform .2s var(--tmh-ease, ease);
}

.tmh-step:hover {
	border-color: var(--line-strong);
}

.tmh-step--media {
	grid-template-columns: 58px minmax(0, 1fr) minmax(200px, 300px);
	align-items: start;
}

.tmh-step__num {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	font-family: var(--font-display, 'Oswald', sans-serif);
	line-height: 1;
	color: var(--yellow);
	flex: none;
}

.tmh-step__num-label {
	font-family: var(--font-body, 'Inter', sans-serif);
	font-size: 8px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 3px;
}

.tmh-step__num-value {
	font-size: 21px;
	font-weight: 600;
	letter-spacing: .02em;
}

.tmh-step__body {
	min-width: 0;
	padding-top: 4px;
}

.tmh-step__title {
	margin: 0 0 12px;
	font-family: var(--font-display, 'Oswald', sans-serif);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: .01em;
}

.tmh-step__text {
	color: var(--ink-2);
	font-size: 15.5px;
	line-height: 1.7;
}

.tmh-step__text > :first-child { margin-top: 0; }
.tmh-step__text > :last-child { margin-bottom: 0; }
.tmh-step__text p { margin: 0 0 10px; }
.tmh-step__text ul, .tmh-step__text ol { margin: 10px 0; padding-left: 20px; list-style: disc; }
.tmh-step__text ol { list-style: decimal; }

.tmh-step__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ink);
	border-bottom: 1px solid var(--yellow);
	padding-bottom: 3px;
	transition: color .2s, border-color .2s;
}

.tmh-step__link:hover { color: var(--yellow); }
.tmh-step__link-icon { transition: transform .2s; }
.tmh-step__link:hover .tmh-step__link-icon { transform: translateX(3px); }

.tmh-step__media {
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-2);
}

.tmh-step__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
}

.tmh-step__media figcaption {
	padding: 8px 10px 10px;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--ink-3);
}

/* ---------- Видео ---------- */
.tmh-video {
	margin: 32px 0;
}

.tmh-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--line);
}

.tmh-video__facade {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #111;
	cursor: pointer;
	text-align: left;
	overflow: hidden;
}

.tmh-video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .72;
	transition: transform .5s var(--tmh-ease, ease), opacity .3s;
}

.tmh-video__facade:hover .tmh-video__poster { transform: scale(1.03); opacity: .8; }

.tmh-video__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .05) 25%, rgba(0, 0, 0, .72) 100%);
	pointer-events: none;
}

.tmh-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--yellow);
	color: var(--on-accent, #0A0A09);
	box-shadow: 0 14px 44px rgba(0, 0, 0, .45);
	transition: transform .25s var(--tmh-ease, ease), background-color .2s;
}

.tmh-video__facade:hover .tmh-video__play { transform: translate(-50%, -50%) scale(1.06); }

.tmh-video__meta {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px;
	color: #fff;
	max-width: 80%;
}

.tmh-video__provider {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--yellow);
}

.tmh-video__title {
	font-family: var(--font-display, 'Oswald', sans-serif);
	font-size: 20px;
	line-height: 1.15;
	text-transform: uppercase;
}

.tmh-video__player {
	display: block;
	width: 100%;
	max-height: 70vh;
	background: #000;
}

.tmh-video figcaption {
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ink-3);
}

.tmh-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tmh-video__fallback {
	position: absolute;
	inset: auto 16px 16px auto;
	z-index: 3;
	font-size: 12px;
	text-decoration: underline;
	color: #fff;
}

/* ---------- Информационные блоки ---------- */
.tmh-notice {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	gap: 14px;
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-left: 4px solid var(--yellow);
	border-radius: 8px;
	background: var(--bg-2);
}

.tmh-notice__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(var(--yellow-rgb), .14);
	color: var(--yellow);
	flex: none;
}

.tmh-notice__label {
	margin: 0 0 4px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink);
}

.tmh-notice__text {
	font-size: 15px;
	line-height: 1.65;
	color: var(--ink-2);
}

.tmh-notice__text > :first-child { margin-top: 0; }
.tmh-notice__text > :last-child { margin-bottom: 0; }
.tmh-notice__text p { margin: 0 0 8px; }
.tmh-notice__text a { text-decoration: underline; text-decoration-color: currentColor; }

.tmh-notice--important {
	background: var(--ink);
	border-color: var(--ink);
	border-left-color: var(--yellow);
}

.tmh-notice--important .tmh-notice__icon { background: rgba(var(--yellow-rgb), .16); color: var(--yellow); }
.tmh-notice--important .tmh-notice__label { color: var(--yellow); }
.tmh-notice--important .tmh-notice__text { color: var(--bg); }

.tmh-notice--warning {
	background: color-mix(in srgb, var(--red) 8%, var(--bg-2));
	border-color: color-mix(in srgb, var(--red) 25%, var(--line));
	border-left-color: var(--red);
}

.tmh-notice--warning .tmh-notice__icon { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.tmh-notice--warning .tmh-notice__label { color: var(--red); }

.tmh-notice--error {
	background: var(--red);
	border-color: var(--red);
	border-left-color: var(--red);
	color: #fff;
}

.tmh-notice--error .tmh-notice__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.tmh-notice--error .tmh-notice__label { color: #fff; }
.tmh-notice--error .tmh-notice__text { color: rgba(255, 255, 255, .92); }
.tmh-notice--error .tmh-notice__text a { color: #fff; }

.tmh-notice--attention {
	background: var(--yellow);
	border-color: var(--yellow);
	border-left-color: var(--yellow);
	color: var(--on-accent, #0A0A09);
}

.tmh-notice--attention .tmh-notice__icon { background: rgba(0, 0, 0, .10); color: var(--on-accent, #0A0A09); }
.tmh-notice--attention .tmh-notice__label { color: var(--on-accent, #0A0A09); }
.tmh-notice--attention .tmh-notice__text { color: var(--on-accent, #0A0A09); }

/* ---------- Галерея ---------- */
.tmh-gallery {
	margin: 32px 0;
}

.tmh-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.tmh-gallery--cols-2 .tmh-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tmh-gallery--cols-4 .tmh-gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tmh-gallery__item {
	margin: 0;
}

.tmh-gallery__button {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-2);
	cursor: zoom-in;
}

.tmh-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .4s var(--tmh-ease, ease);
}

.tmh-gallery__button:hover .tmh-gallery__img { transform: scale(1.04); }

.tmh-gallery__zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(10, 10, 9, .72);
	color: #fff;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .25s, transform .25s;
}

.tmh-gallery__button:hover .tmh-gallery__zoom,
.tmh-gallery__button:focus-visible .tmh-gallery__zoom { opacity: 1; transform: none; }

.tmh-gallery__item figcaption {
	margin-top: 7px;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--ink-3);
}

.tmh-gallery__caption {
	margin-top: 10px;
	font-size: 12.5px;
	color: var(--ink-3);
}

/* ---------- FAQ ---------- */
.tmh-faq {
	margin: 32px 0;
}

.tmh-faq__title {
	margin: 0 0 16px;
	font-family: var(--font-display, 'Oswald', sans-serif);
	font-size: 26px;
	text-transform: uppercase;
}

.tmh-faq__item {
	margin-bottom: 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--card);
	overflow: hidden;
}

.tmh-faq__item[open] {
	border-color: var(--line-strong);
}

.tmh-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 17px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	cursor: pointer;
	list-style: none;
	transition: color .2s;
}

.tmh-faq__question::-webkit-details-marker { display: none; }
.tmh-faq__question:hover { color: var(--yellow); }

.tmh-faq__chevron {
	flex: none;
	color: var(--ink-3);
	transition: transform .25s var(--tmh-ease, ease), color .2s;
}

.tmh-faq__item[open] .tmh-faq__chevron {
	transform: rotate(180deg);
	color: var(--yellow);
}

.tmh-faq__answer {
	padding: 2px 20px 20px;
	color: var(--ink-2);
	font-size: 15.5px;
	line-height: 1.7;
}

.tmh-faq__answer > :first-child { margin-top: 0; }
.tmh-faq__answer > :last-child { margin-bottom: 0; }
.tmh-faq__answer p { margin: 0 0 10px; }
.tmh-faq__answer ul, .tmh-faq__answer ol { margin: 10px 0; padding-left: 20px; list-style: disc; }

/* ---------- Файл ---------- */
.tmh-file {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--card);
}

.tmh-file__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: rgba(var(--yellow-rgb), .12);
	color: var(--yellow);
	flex: none;
}

.tmh-file__body { min-width: 0; }

.tmh-file__title {
	margin: 0;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.tmh-file__desc {
	margin: 3px 0 0;
	font-size: 13px;
	color: var(--ink-2);
}

.tmh-file__meta {
	margin: 5px 0 0;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.tmh-file__actions {
	display: flex;
	gap: 8px;
	margin-left: auto;
	flex: none;
}

/* ---------- Оглавление внутри статьи ---------- */
.tmh-toc-block__nav {
	margin: 28px 0;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg-2);
}

.tmh-toc-block__title {
	margin: 0 0 12px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.tmh-toc-block__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 7px;
}

.tmh-toc-block__item--l3 { padding-left: 16px; }
.tmh-toc-block__item--l4 { padding-left: 32px; }

.tmh-toc-block__link {
	font-size: 14px;
	line-height: 1.45;
	color: var(--ink-2);
	transition: color .2s;
}

.tmh-toc-block__link:hover { color: var(--yellow); }

/* ---------- Адаптив блоков ---------- */
@media (max-width: 1300px) {
	.tmh-step--media {
		grid-template-columns: 58px minmax(0, 1fr);
	}

	.tmh-step__media {
		grid-column: 2;
		margin-top: 6px;
	}
}

@media (max-width: 900px) {
	.tmh-gallery__grid,
	.tmh-gallery--cols-4 .tmh-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.tmh-step {
		grid-template-columns: 44px minmax(0, 1fr);
		gap: 14px;
		padding: 18px;
	}

	.tmh-step--media { grid-template-columns: 44px minmax(0, 1fr); }

	.tmh-step__num {
		width: 44px;
		height: 44px;
	}

	.tmh-step__num-value { font-size: 17px; }
	.tmh-step__title { font-size: 18px; }

	.tmh-gallery__grid,
	.tmh-gallery--cols-2 .tmh-gallery__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmh-file {
		flex-wrap: wrap;
	}

	.tmh-file__actions {
		width: 100%;
		margin-left: 0;
	}

	.tmh-video__play {
		width: 58px;
		height: 58px;
	}

	.tmh-video__meta { padding: 14px; }
	.tmh-video__title { font-size: 16px; }

	.tmh-notice {
		grid-template-columns: 34px minmax(0, 1fr);
		padding: 16px;
	}

	.tmh-notice__icon {
		width: 34px;
		height: 34px;
	}
}