.tm-footer {
	--tm-footer-bg: #0b1020;
	--tm-footer-text: #cbd5e1;
	--tm-footer-link: #f8fafc;
	--tm-footer-hover: #38bdf8;
	--tm-footer-border: rgba(148, 163, 184, .22);
	--tm-footer-telegram-button-text: #07111f;
	--tm-footer-telegram-button-align: flex-start;
	background: var(--tm-footer-bg);
	color: var(--tm-footer-text);
	direction: rtl;
}

.tm-footer--light-tech {
	--tm-footer-bg: #f8fafc;
	--tm-footer-text: #475569;
	--tm-footer-link: #0f172a;
	--tm-footer-border: #e2e8f0;
}

.tm-footer--minimal {
	--tm-footer-bg: #fff;
	--tm-footer-text: #475569;
	--tm-footer-link: #111827;
	--tm-footer-border: #e5e7eb;
}

.tm-footer a {
	color: var(--tm-footer-link);
	text-decoration: none;
	transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.tm-footer a:hover,
.tm-footer a:focus-visible {
	color: var(--tm-footer-hover);
}

.tm-footer__inner {
	inline-size: min(100% - 32px, 1240px);
	margin-inline: auto;
	padding-block: 56px 28px;
}

.tm-footer__grid {
	align-items: start;
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(150px, .75fr)) minmax(260px, 1.1fr);
}

.tm-footer__brand {
	order: 1;
}

.tm-footer__links--item {
	order: 2;
}

.tm-footer__newsletter {
	order: 3;
}

.tm-footer--layout-brand-left .tm-footer__brand {
	order: 3;
}

.tm-footer--layout-brand-left .tm-footer__links--item {
	order: 2;
}

.tm-footer--layout-brand-left .tm-footer__newsletter {
	order: 1;
}

.tm-footer--layout-newsletter-first .tm-footer__newsletter {
	order: 1;
}

.tm-footer--layout-newsletter-first .tm-footer__brand {
	order: 2;
}

.tm-footer--layout-newsletter-first .tm-footer__links--item {
	order: 3;
}

.tm-footer--layout-brand-top-center .tm-footer__brand {
	grid-column: 1 / -1;
	inline-size: min(760px, 100%);
	justify-self: center;
	order: 1;
	text-align: center;
}

.tm-footer--layout-brand-top-center .tm-footer__links--item,
.tm-footer--layout-brand-top-center .tm-footer__newsletter {
	order: 2;
}

.tm-footer--layout-brand-top-center .tm-footer__logo,
.tm-footer--layout-brand-top-center .tm-footer__socials {
	justify-content: center;
}

.tm-footer--align-right {
	text-align: right;
}

.tm-footer--align-center {
	text-align: center;
}

.tm-footer--align-center .tm-footer__logo,
.tm-footer--align-center .tm-footer__socials,
.tm-footer--align-center .tm-footer__form,
.tm-footer--align-center .tm-footer__bottom {
	justify-content: center;
}

.tm-footer--align-left {
	text-align: left;
}

.tm-footer--align-left .tm-footer__logo,
.tm-footer--align-left .tm-footer__socials,
.tm-footer--align-left .tm-footer__form {
	justify-content: flex-end;
}

.tm-footer__brand p,
.tm-footer__newsletter p {
	font-size: 14px;
	line-height: 2;
	margin: 0;
}

.tm-footer__brand p + p {
	margin-block-start: 14px;
}

.tm-footer__logo {
	display: inline-flex;
	margin-block-end: 18px;
}

.tm-footer__logo img {
	block-size: auto;
	display: block;
	max-block-size: 46px;
	max-inline-size: 160px;
	object-fit: contain;
}

.tm-footer__trust {
	border-inline-start: 3px solid var(--tm-footer-hover);
	padding-inline-start: 12px;
}

.tm-footer__links h2,
.tm-footer__newsletter h2 {
	color: var(--tm-footer-link);
	font-size: 15px;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 1.5;
	margin: 0 0 14px;
}

.tm-footer__links ul,
.tm-footer__menu {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-footer__links a,
.tm-footer__menu a {
	font-size: 14px;
	line-height: 1.8;
}

.tm-footer__social-link-label {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.tm-footer__social-link-label svg {
	block-size: 17px;
	fill: currentColor;
	flex: 0 0 17px;
	inline-size: 17px;
}

.tm-footer__newsletter {
	background: color-mix(in srgb, var(--tm-footer-link) 7%, transparent);
	border: 1px solid var(--tm-footer-border);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	padding: 20px;
}

.tm-footer__form {
	display: flex;
	gap: 8px;
	margin-block-start: 18px;
}

.tm-footer__form input[type="email"] {
	background: color-mix(in srgb, var(--tm-footer-bg) 82%, #fff);
	border: 1px solid var(--tm-footer-border);
	border-radius: 12px;
	color: var(--tm-footer-link);
	flex: 1 1 auto;
	min-block-size: 42px;
	min-inline-size: 0;
	padding-inline: 12px;
}

.tm-footer__form button {
	background: var(--tm-footer-hover);
	border: 0;
	border-radius: 12px;
	color: #07111f;
	cursor: pointer;
	font-weight: 850;
	min-block-size: 42px;
	padding-inline: 16px;
	white-space: nowrap;
}

.tm-footer a.tm-footer__telegram-button {
	align-items: center;
	align-self: var(--tm-footer-telegram-button-align);
	background: var(--tm-footer-hover);
	border-radius: 12px;
	color: var(--tm-footer-telegram-button-text);
	display: inline-flex;
	font-size: 14px;
	font-weight: 850;
	gap: 8px;
	line-height: 1;
	margin-block-start: 18px;
	min-block-size: 42px;
	padding-inline: 16px;
}

.tm-footer a.tm-footer__telegram-button:hover,
.tm-footer a.tm-footer__telegram-button:focus-visible {
	color: var(--tm-footer-telegram-button-text);
	filter: brightness(1.08);
}

.tm-footer a.tm-footer__telegram-button svg {
	block-size: 18px;
	fill: currentColor;
	inline-size: 18px;
}

.tm-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-start: 18px;
}

.tm-footer__socials a {
	align-items: center;
	border: 1px solid var(--tm-footer-border);
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 850;
	justify-content: center;
	min-block-size: 34px;
	min-inline-size: 34px;
	padding-inline: 9px;
}

.tm-footer__socials svg {
	block-size: 16px;
	fill: currentColor;
	inline-size: 16px;
}

:root.techmag-dark-mode .tm-footer,
body.techmag-dark-mode .tm-footer {
	--tm-footer-bg: #070b16 !important;
	--tm-footer-text: #cbd5e1 !important;
	--tm-footer-link: #f8fafc !important;
	--tm-footer-hover: #38bdf8 !important;
	--tm-footer-border: rgba(148, 163, 184, .22) !important;
}

.tm-footer__bottom {
	align-items: center;
	border-top: 1px solid var(--tm-footer-border);
	display: flex;
	font-size: 13px;
	gap: 16px;
	justify-content: space-between;
	margin-block-start: 38px;
	padding-block-start: 20px;
}

@media (max-width: 1024px) {
	.tm-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.tm-footer__inner {
		inline-size: min(100% - 24px, 1240px);
		padding-block: 26px 16px !important;
	}

	.tm-footer {
		--tm-footer-telegram-button-align: center;
		font-size: 14px !important;
		text-align: center;
	}

	.tm-footer__grid {
		gap: 18px;
		grid-template-columns: 1fr;
	}

	.tm-footer__brand,
	.tm-footer__links--item,
	.tm-footer__newsletter {
		grid-column: auto;
	}

	.tm-footer--layout-brand-top-center .tm-footer__brand {
		grid-column: auto;
		inline-size: auto;
	}

	.tm-footer__logo,
	.tm-footer__socials,
	.tm-footer__form {
		justify-content: center;
	}

	.tm-footer__links ul,
	.tm-footer__menu {
		justify-items: center;
	}

	.tm-footer__trust {
		border-inline-start: 0;
		border-block-start: 3px solid var(--tm-footer-hover);
		padding-block-start: 12px;
		padding-inline-start: 0;
	}

	.tm-footer__form,
	.tm-footer__bottom {
		align-items: stretch;
		flex-direction: column;
	}

	.tm-footer__telegram-button {
		justify-content: center;
	}

	.tm-footer__bottom {
		gap: 8px;
		margin-block-start: 22px;
		padding-block-start: 14px;
	}

	.tm-footer__brand p,
	.tm-footer__newsletter p {
		font-size: 13px !important;
		line-height: 1.8;
	}

	.tm-footer__links h2,
	.tm-footer__newsletter h2 {
		font-size: 14px !important;
		margin-block-end: 9px;
	}

	.tm-footer__links ul,
	.tm-footer__menu {
		gap: 7px;
	}

	.tm-footer__logo {
		margin-block-end: 12px;
	}

	.tm-footer__socials {
		margin-block-start: 12px;
	}
}
