.cm-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: linear-gradient(180deg, #02040a 0%, #050913 100%);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.cm-header.header-sticky {
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.cm-topbar {
	background: #0a0f14;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 13px;
}

.cm-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0 10px;
}

.cm-trending {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: rgba(255, 255, 255, 0.88);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cm-trending__label {
	font-weight: 700;
	color: #ff9f2d;
}

.cm-trending__text {
	color: rgba(255, 255, 255, 0.68);
}

.cm-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	position: relative;
}

.cm-region-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.92rem;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.cm-region-badge:hover {
	color: #ffffff;
	opacity: 0.95;
}

.cm-region-badge__icon {
	font-size: 1rem;
	line-height: 1;
	opacity: 0.92;
}

.cm-region-badge__text {
	color: rgba(255, 255, 255, 0.82);
}

.cm-rates-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid rgba(247, 147, 26, 0.28);
	background: rgba(247, 147, 26, 0.12);
	color: #f7931a;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cm-rates-badge:hover {
	transform: translateY(-1px);
	background: rgba(247, 147, 26, 0.18);
	border-color: rgba(247, 147, 26, 0.42);
}

.cm-action-group {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.015);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.cm-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	padding: 0 14px;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cm-icon-btn:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.085);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.cm-theme-toggle {
	width: 48px;
	padding: 0;
	background: rgba(255, 255, 255, 0.04);
}

.cm-theme-toggle__moon {
	display: none;
}

.dark-mode .cm-theme-toggle__sun {
	display: none;
}

.dark-mode .cm-theme-toggle__moon {
	display: inline;
}

.cm-language-switch {
	position: relative;
}

.cm-language-toggle {
	min-width: 72px;
	width: auto;
	padding: 0 14px;
	gap: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
}

.cm-language-toggle__code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.94rem;
	font-weight: 700;
	letter-spacing: 0.03em;
}

.cm-language-toggle__caret {
	font-size: 0.78rem;
	line-height: 1;
	color: rgba(255, 255, 255, 0.72);
}

.cm-flag svg {
	display: block;
	width: 100%;
	height: 100%;
}

.cm-flag img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cm-language-toggle__flag .cm-flag {
	background: rgba(255, 255, 255, 0.06);
}

.cm-language-menu__item .cm-flag {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
}

.cm-language-toggle.active {
	background: transparent;
}

.cm-search-toggle {
	width: 40px;
	padding: 0;
	background: rgba(255, 255, 255, 0.04);
}

.cm-language-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	min-width: 0;
	padding: 8px;
	border-radius: 18px;
	background: #02040a;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
	z-index: 1000;
}

.cm-language-menu__item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	padding: 10px;
	border-radius: 999px;
	color: #fff;
	text-decoration: none;
	transition: transform 0.2s ease;
}

.cm-language-menu__item:hover,
.cm-language-menu__item.is-active {
	transform: translateX(2px);
}

.cm-language-menu__item.is-active {
	cursor: default;
	opacity: 0.9;
}

.cm-language-menu__label {
	font-size: 0.92rem;
	font-weight: 700;
}

.cm-main-header {
	background: linear-gradient(180deg, #0b0f14 0%, #0f1720 100%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0 16px;
}

.cm-logo {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-weight: 900;
	line-height: 1;
	background: transparent;
	color: #ffffff;
	text-decoration: none;
	letter-spacing: -0.03em;
	text-shadow: none;
}

.cm-logo:hover {
	color: #ffffff;
	background: transparent !important;
}

.cm-logo__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 12px;
	background: linear-gradient(135deg, #f7931a 0%, #ffb347 100%);
	box-shadow:
		0 0 20px rgba(247, 147, 26, 0.34),
		inset 0 0 10px rgba(255, 255, 255, 0.14);
	flex: 0 0 58px;
}

.cm-logo__icon-mark {
	position: relative;
	display: block;
	width: 34px;
	height: 34px;
}

.cm-logo__icon-mark::before {
	content: '';
	position: absolute;
	inset: 0 8px 0 0;
	border: 5px solid #0b0f14;
	border-right: 0;
	border-radius: 9px 0 0 9px;
}

.cm-logo__icon-mark::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #0b0f14;
	transform: translateY(-50%);
}

.cm-logo__text {
	display: inline-flex;
	align-items: baseline;
	gap: 0;
	font-size: 30px;
	font-weight: 900;
}

.cm-logo__name {
	display: inline-flex;
	align-items: baseline;
	gap: 0;
	line-height: 1;
}

.cm-logo__accent {
	color: #f7931a;
}

.cm-nav {
	flex: 1;
}

.cm-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-menu > .menu-item-has-children {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}

.cm-menu a {
	position: relative;
	color: rgba(255, 255, 255, 0.84);
	text-decoration: none;
	font-size: 0.94rem;
	font-weight: 700;
	transition: color 0.2s ease;
}

.cm-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 0;
	padding: 0;
	border-radius: 999px;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cm-menu__toggle:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: translateY(-1px);
}

.cm-menu > .menu-item-has-children > .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	min-width: 220px;
	margin: 0;
	padding: 10px;
	list-style: none;
	border-radius: 18px;
	background: #02040a;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
	border: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 30;
}

.cm-menu > .menu-item-has-children.is-open > .sub-menu {
	display: block;
}

.cm-menu > .menu-item-has-children > .sub-menu > li {
	margin: 0;
}

.cm-menu > .menu-item-has-children > .sub-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 0.92rem;
	font-weight: 600;
}

.cm-menu > .menu-item-has-children > .sub-menu a::after {
	display: none;
}

.cm-menu a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -8px;
	width: 100%;
	height: 2px;
	border-radius: 999px;
	background: linear-gradient(90deg, #f7931a, #ffb84d);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.cm-menu a:hover::after,
.cm-menu .current-menu-item > a::after,
.cm-menu .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.cm-main-header .cm-menu > li > a::after {
	height: 3px;
	bottom: -10px;
	background: linear-gradient(90deg, #f7931a 0%, #ffcf8a 55%, rgba(247, 147, 26, 0.08) 100%);
	box-shadow: 0 0 14px rgba(247, 147, 26, 0.22);
}

.cm-main-header .cm-menu > li > a:hover::after,
.cm-main-header .cm-menu > li.current-menu-item > a::after,
.cm-main-header .cm-menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.cm-burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 10px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.cm-burger span {
	width: 26px;
	height: 2px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.cm-burger.active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.cm-burger.active span:nth-child(2) {
	opacity: 0;
}

.cm-burger.active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.cm-search {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 12px 24px 24px;
	background: transparent;
	z-index: 1200;
	pointer-events: none;
}

.cm-search.active {
	display: flex;
}

.cm-search-box {
	width: min(100%, 620px);
	margin: 0 auto;
	padding: 18px 20px 20px;
	border-radius: 20px;
	background: rgba(9, 14, 28, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	pointer-events: auto;
}

.cm-search input {
	width: 100%;
	padding: 16px 18px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	font-size: 1.05rem;
	outline: none;
	background: #fff;
	color: #111;
}

.cm-search input:focus-visible {
	outline: 3px solid #f7931a;
	outline-offset: 3px;
	box-shadow: 0 0 0 4px rgba(247, 147, 26, 0.18);
}

html:not(.dark-mode) .cm-header {
	background: linear-gradient(180deg, #070b15 0%, #03060e 100%);
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

html:not(.dark-mode) .cm-topbar {
	background: linear-gradient(180deg, rgba(8, 12, 22, 0.98) 0%, rgba(4, 7, 14, 0.98) 100%);
	border-bottom-color: rgba(255, 255, 255, 0.06);
}

html:not(.dark-mode) .cm-topbar__inner {
	padding: 8px 0;
}

html:not(.dark-mode) .cm-trending__label {
	color: #ff9f2d;
}

html:not(.dark-mode) .cm-trending__text {
	color: rgba(255, 255, 255, 0.68);
}

html:not(.dark-mode) .cm-main-header {
	background: #02040a;
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

html:not(.dark-mode) .cm-header__inner {
	padding: 18px 0;
}

html:not(.dark-mode) .cm-menu {
	gap: 26px;
}

html:not(.dark-mode) .cm-menu a {
	font-size: 0.96rem;
}

html:not(.dark-mode) .cm-main-header .cm-menu > li > a::after {
	height: 3px;
	bottom: -8px;
	background: linear-gradient(90deg, #f7931a, #ffb84d);
	box-shadow: 0 0 12px rgba(247, 147, 26, 0.16);
}

html:not(.dark-mode) .cm-logo {
	color: #ffffff;
}

@media (max-width: 992px) {
	.cm-header__inner {
		flex-wrap: wrap;
	}

	.cm-nav {
		display: none;
		order: 3;
		width: 100%;
	}

	.cm-nav.active {
		display: block;
	}

	.cm-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 10px 0 0;
	}

	.cm-menu li {
		width: 100%;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.cm-menu a {
		display: block;
		padding: 14px 0;
	}

	.cm-menu a::after {
		display: none;
	}

	.cm-burger {
		display: flex;
		margin-left: auto;
	}
}

@media (max-width: 768px) {
	.cm-topbar__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.cm-actions {
		width: 100%;
		justify-content: flex-end;
		flex-wrap: wrap;
	}

	.cm-language-toggle {
		min-width: 44px;
	}
}
