/* Шапка «вариант 3 · компактное меню» (20.10.2026), см. inc/header-v3.php.
   Только десктоп ≥992px: мобильная шапка и шторка cfk-drawer не трогаются.
   Префикс body.cfh3 .header — чтобы перебить и тему, и стили лендингов cf-korea (header-mobile.css). */

body.cfh3 {
	--h3-ink: #13233A;
	--h3-muted: #6B7689;
	--h3-line: #E3E8EF;
	--h3-blue: #1D9BE2;
	--h3-blue-dark: #1384C4;
	--h3-soft: #EAF5FC;
}

@media (min-width: 992px) {
	body.cfh3 .header { background: #fff; padding: 0; }
	body.cfh3 .header .header__wrapper { gap: 18px; flex-wrap: nowrap; padding-top: 16px; padding-bottom: 16px; }

	/* ——— логотип: подпись под ним, справа тонкая черта ——— */
	body.cfh3 .header .logo {
		flex-direction: column; align-items: flex-start; gap: 6px;
		padding-right: 22px; margin-right: 4px; border-right: 1px solid var(--h3-line);
		flex: none;
	}
	body.cfh3 .header .logo img { height: auto; width: 196px; max-width: 196px; }
	body.cfh3 .header .logo > span {
		display: block !important; max-width: 200px;
		font: 500 12.5px/1.35 Manrope, system-ui, sans-serif; color: var(--h3-muted);
	}
	body.cfh3 .header .cfk-hdr-usp { display: none !important; }

	/* ——— плашка «Я 5,0 · N офисов» ——— */
	body.cfh3 .header .cfr__btn { gap: 12px; padding: 9px 16px 9px 10px; border-color: var(--h3-line); border-radius: 12px; }
	body.cfh3 .header .cfr__btn:hover { border-color: #C9D3E1; }
	body.cfh3 .header .cfr.is-open .cfr__btn { border-color: var(--h3-blue); box-shadow: 0 0 0 3px rgba(29,155,226,.12); }
	body.cfh3 .header .cfr__ya { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; }
	body.cfh3 .cfh3-score { display: flex; flex-direction: column; gap: 3px; }
	body.cfh3 .cfh3-score .cfr__score { font-size: 19px; color: var(--h3-ink); }
	body.cfh3 .cfh3-score .cfr-stars { height: 12px; }
	body.cfh3 .header .cfr__sep { height: 30px; margin: 0 2px; }
	body.cfh3 .cfh3-offices { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--h3-ink); white-space: nowrap; }
	body.cfh3 .cfh3-pin { width: 19px; height: 19px; color: var(--h3-blue); flex: none; }

	/* ——— Telegram / MAX ——— */
	body.cfh3 .cfh3-msg { align-items: center; gap: 10px; flex: none; }
	body.cfh3 .cfm { position: relative; font-family: Manrope, system-ui, sans-serif; }
	body.cfh3 .cfm__btn {
		display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 13px 0 9px;
		background: #fff; border: 1px solid var(--h3-line); border-radius: 12px; cursor: pointer;
		font: 700 15px/1 Manrope, system-ui, sans-serif; color: var(--h3-ink);
		transition: border-color .18s, box-shadow .18s;
	}
	body.cfh3 .cfm__btn:hover { border-color: #C9D3E1; }
	body.cfh3 .cfm.is-open .cfm__btn { border-color: var(--h3-blue); box-shadow: 0 0 0 3px rgba(29,155,226,.12); }
	body.cfh3 .cfm__btn:focus-visible { outline: 2px solid var(--h3-blue); outline-offset: 2px; }
	body.cfh3 .cfm__logo { width: 28px; height: 28px; flex: none; display: block; }
	body.cfh3 .cfm__chev { width: 11px; height: 11px; color: var(--h3-muted); transition: transform .2s; }
	body.cfh3 .cfm.is-open .cfm__chev { transform: rotate(180deg); }

	body.cfh3 .cfm__pop {
		position: absolute; top: calc(100% + 12px); left: 0; z-index: 1200; width: 330px; padding: 16px 12px 10px;
		background: #fff; border: 1px solid var(--h3-line); border-radius: 14px;
		box-shadow: 0 24px 50px -16px rgba(13,29,48,.30);
		opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
	}
	body.cfh3 .cfm__pop::before { /* уголок к кнопке */
		content: ""; position: absolute; top: -7px; left: 36px; width: 12px; height: 12px;
		background: #fff; border-left: 1px solid var(--h3-line); border-top: 1px solid var(--h3-line); transform: rotate(45deg);
	}
	body.cfh3 .cfm.is-open .cfm__pop { opacity: 1; visibility: visible; transform: none; }
	body.cfh3 .cfm__pop-h { padding: 0 8px 8px; font-size: 18px; font-weight: 800; color: var(--h3-ink); }
	body.cfh3 .cfm__item { display: flex; align-items: center; gap: 14px; padding: 11px 8px; border-radius: 10px; text-decoration: none; }
	body.cfh3 .cfm__item + .cfm__item { border-top: 1px solid var(--h3-line); border-radius: 0 0 10px 10px; }
	body.cfh3 .cfm__item:hover { background: #F5F8FB; }
	body.cfh3 .cfm__ico { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--h3-soft); color: var(--h3-blue); }
	body.cfh3 .cfm--max .cfm__ico { background: #EFEBFD; color: #5B48E8; }
	body.cfh3 .cfm__ico svg { width: 22px; height: 22px; }
	body.cfh3 .cfm__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
	body.cfh3 .cfm__txt b { font-size: 15px; font-weight: 700; color: var(--h3-ink); line-height: 1.2; }
	body.cfh3 .cfm__txt small { font-size: 13px; color: var(--h3-muted); line-height: 1.2; }
	body.cfh3 .cfm__arr { width: 14px; height: 14px; flex: none; color: #A7B1C0; transition: transform .15s; }
	body.cfh3 .cfm__item:hover .cfm__arr { transform: translateX(3px); color: var(--h3-blue); }

	/* ——— телефон и кнопка ——— */
	body.cfh3 .header .header__right-group { gap: 20px; margin-left: auto; }
	body.cfh3 .header .header__phone-block { padding-right: 20px; border-right: 1px solid var(--h3-line); }
	body.cfh3 .header .header__phone-main { text-align: left; }
	body.cfh3 .header .header__phone-number { gap: 10px; font-size: 22px; font-weight: 800; color: var(--h3-ink) !important; letter-spacing: -.01em; }
	body.cfh3 .header .header__phone-number b { font-size: 22px; font-weight: 800; color: var(--h3-ink); }
	body.cfh3 .header .header__phone-number svg { width: 20px; height: 20px; }
	body.cfh3 .header .header__phone-number svg path { fill: var(--h3-blue) !important; }
	body.cfh3 .header .header__phone-sub { justify-content: flex-start; margin: 3px 0 0 30px; gap: 10px; }
	body.cfh3 .header .header__phone-label { font-size: 13px; color: var(--h3-muted); font-weight: 500; }
	body.cfh3 .header .header__cities-toggle { font-size: 12px; color: #9AA4B4; }
	body.cfh3 .header .header__callback-btn {
		height: 50px; padding: 0 24px; border-radius: 10px;
		background: var(--h3-blue) !important; color: #fff !important;
		font: 700 15px/1 Manrope, system-ui, sans-serif;
		box-shadow: 0 8px 18px -10px rgba(29,155,226,.8);
	}
	body.cfh3 .header .header__callback-btn:hover { background: var(--h3-blue-dark) !important; box-shadow: 0 10px 20px -10px rgba(19,132,196,.9); }

	/* ——— вторая строка: меню в обычном регистре + широкий поиск ——— */
	body.cfh3 .nav { padding: 12px 0; border-top: 1px solid var(--h3-line); border-bottom: 1px solid var(--h3-line); background: #fff; }
	body.cfh3 .nav .nav__menu > ul { gap: 8px 26px; justify-content: flex-start; }
	body.cfh3 .nav .nav__menu > ul > li > a {
		text-transform: none; letter-spacing: 0; font: 600 15.5px/1.2 Manrope, system-ui, sans-serif; color: var(--h3-ink);
		padding: 8px 0;
	}
	body.cfh3 .nav .nav__menu > ul > li > a:hover { color: var(--h3-blue); }
	body.cfh3 .nav .nav__menu > ul > li > a::after { background: var(--h3-blue); }
	body.cfh3 .nav .nav__menu > ul > li > a .nav-chev { width: 11px; height: 11px; margin-left: 3px; }
	body.cfh3 .nav .cfs-nav { flex: 1 1 360px; max-width: 500px; margin-left: auto; }
	body.cfh3 .nav .cfs__field { height: 46px; padding: 0 16px; gap: 11px; border: 1px solid #D9E0EA; border-radius: 12px; background: #FAFBFD; }
	body.cfh3 .nav .cfs__field:focus-within { background: #fff; border-color: var(--h3-blue); box-shadow: 0 0 0 3px rgba(29,155,226,.14); }
	body.cfh3 .nav .cfs__input { font-size: 15px; }
	body.cfh3 .nav .cfs-ico { width: 20px; height: 20px; color: #6B7689; }
}

/* узкий десктоп: подписи у мессенджеров прячем, остаются значки со стрелкой */
@media (min-width: 992px) and (max-width: 1399.98px) {
	body.cfh3 .cfm__name { display: none; }
	body.cfh3 .cfm__btn { padding: 0 10px 0 9px; gap: 6px; }
	body.cfh3 .header .logo img { width: 176px; max-width: 176px; }
	body.cfh3 .header .logo > span { max-width: 180px; font-size: 12px; }
	body.cfh3 .header .header__wrapper { gap: 14px; }
	body.cfh3 .header .header__right-group { gap: 14px; }
	body.cfh3 .header .header__phone-block { padding-right: 14px; }
	body.cfh3 .header .header__phone-number, body.cfh3 .header .header__phone-number b { font-size: 20px; }
	body.cfh3 .header .header__callback-btn { padding: 0 18px; font-size: 14px; }
	body.cfh3 .nav .nav__menu > ul { gap: 8px 20px; }
	body.cfh3 .nav .nav__menu > ul > li > a { font-size: 14.5px; }
	body.cfh3 .nav .cfs-nav { flex-basis: 260px; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
	body.cfh3 .header .logo > span { display: none !important; }
	body.cfh3 .header .header__phone-block { padding-right: 0; border-right: 0; }
	body.cfh3 .header .header__callback-btn { height: 44px; padding: 0 14px; font-size: 13px; }
	body.cfh3 .nav .nav__menu > ul { gap: 8px 14px; }
	body.cfh3 .nav .nav__menu > ul > li > a { font-size: 13.5px; }
	body.cfh3 .nav .cfs-nav { flex-basis: 170px; min-width: 150px; }
	body.cfh3 .nav .cfs__input { font-size: 13.5px; }
}

/* ——— выпадашка «Каталог»: по левому краю, значки в одну колонку, как у Telegram / MAX ——— */
@media (min-width: 992px) {
	body.cfh3 .nav ul.nav-dropdown {
		left: -14px; transform: none; top: calc(100% + 6px);
		min-width: 268px; padding: 8px; gap: 2px;
		background: #fff; border: 1px solid var(--h3-line); border-radius: 14px;
		box-shadow: 0 24px 50px -16px rgba(13,29,48,.30);
		text-align: left; align-items: stretch;
	}
	body.cfh3 .nav .has-dropdown::after { height: 22px; }
	body.cfh3 .nav ul.nav-dropdown li { display: block; width: 100%; text-align: left; }
	body.cfh3 .nav ul.nav-dropdown li a {
		display: flex !important; justify-content: flex-start; align-items: center; gap: 12px;
		width: 100%; padding: 7px 10px; border-radius: 10px; text-align: left;
		font: 600 14.5px/1.2 Manrope, system-ui, sans-serif !important; color: var(--h3-ink) !important;
	}
	body.cfh3 .nav ul.nav-dropdown li a:hover { background: #F5F8FB; color: var(--h3-blue) !important; }
	body.cfh3 .nav ul.nav-dropdown li:first-child a { margin-bottom: 4px; }
	body.cfh3 .nav ul.nav-dropdown li:first-child { border-bottom: 1px solid var(--h3-line); padding-bottom: 4px; margin-bottom: 2px; }
	body.cfh3 .nav .nav-dropdown__flag {
		width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
		border-radius: 9px; background: #F1F4F8; font-size: 18px; line-height: 1;
	}
	body.cfh3 .nav ul.nav-dropdown li a:hover .nav-dropdown__flag { background: var(--h3-soft); }
	body.cfh3 .nav .nav-dropdown__flag img.emoji { width: 19px !important; height: 19px !important; margin: 0 !important; display: block; }
}
