/*
 * Шапка сайта и окна шаблона custom («Позвонить мне», «Спасибо») на страницах онлайн-сервисов.
 * Общий style.css шаблона здесь не подключается (его глобальные правила для *, input, h2, .container
 * ломают оформление сервисов), поэтому сюда скопированы только правила шапки и окон из
 * media/templates/site/custom/css/style.css, а базовые сбросы ограничены #header и .modal.
 * При изменении шапки в style.css — перенести правку и сюда.
 */

/* ---------- Базовые правила шаблона — только внутри шапки и окон (нулевая специфичность) ---------- */
:where(#header, .modal),
:where(#header, .modal) *,
:where(#header, .modal) ::before,
:where(#header, .modal) ::after {
	box-sizing: border-box;
}
:where(#header, .modal) :where(*) {
	margin: 0;
	padding: 0;
	border: none;
	transition: all 0.3s;
}
#header, .modal {
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	line-height: normal;
	color: #4d4d4d;
	letter-spacing: normal;
	text-align: left;
}
:where(#header, .modal) :where(img) {
	max-width: 100%;
}
:where(#header, .modal) :where(a) {
	text-decoration: inherit;
	color: inherit;
}
:where(#header, .modal) :where(ul) {
	list-style: none;
}
:where(#header, .modal) :where(.visually-hidden) {
	display: none;
}
:where(#header, .modal) :where(.flex) {
	display: flex;
}
:where(#header, .modal) :where(.relative) {
	position: relative;
}
:where(#header, .modal) :where(.text-center) {
	text-align: center;
}
:where(#header, .modal) :where(.text-transform) {
	text-transform: uppercase;
}
:where(#header, .modal) :where(.color-white) {
	color: #fff;
}
#header .row {
	margin-left: auto;
	margin-right: auto;
}
#header .container {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	position: relative;
	z-index: 1;
}
@media (min-width: 1725px) {
	#header .container {
		width: 1695px;
	}
}
@media (max-width: 1724px) {
	#header .container {
		padding: 0 15px;
	}
}
.mod-languages a {
	color: #e6c587;
	font-weight: 700;
	transition: color 0.4s ease, text-shadow 0.4s ease;
}
.mod-languages a:hover {
	color: #fff3c4;
	text-shadow: 0 0 6px rgba(230,197,135,0.6);
}

/* ---------- Шапка (style.css, строки 277–623) ---------- */
#header {
	background: #141414;
	z-index: 3;
}
#header:after {
	content: '';
	background-image: -ms-linear-gradient( 0deg, rgb(31,31,31) 15%, rgb(171,136,89) 40%, rgb(233,200,137) 56%, rgb(31,31,31) 84%);
	opacity: 0.502;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	margin: auto;
}
#header .row {
	align-items: center;
	justify-content: space-between;
}
#header .menu-list li {
	padding: 24px 15px 21px;
	position: relative;
}
#header .menu-list li:last-child:after {
	display: none;
}
#header .menu-list a {
	font-family: 'Philosopher', sans-serif;
	color: #fff;
	font-weight: bold;
}
#header .menu-list a:hover {
	color: rgb(224, 191, 130);
}
.callback {
	border: 0.51px solid rgb(224, 191, 130);
	width: 196px;
	height: 39px;
	border-radius: 50px;
	background-color: transparent;
	font-size: 16px;
	font-family: 'Philosopher', sans-serif;
	color: rgb(224, 191, 130);
	cursor: pointer;
}
.callback:hover {
	box-shadow: 0px 0px 13px 0px rgb(220, 187, 127);
}
.callback img {
	position: absolute;
	left: 0;
	top: 0;
}
.callback span {
	left: 15px;
	background: linear-gradient( -90deg, rgb(195, 155, 101) 0%, rgb(233,200,137) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-weight: bold;
}
.link-phone {
	align-items: center;
}
.header_mess {
	color: #fff;
	font-size: 12px;
	padding: 0 2px;
	-ms-grid-row-align: center;
	align-self: center;
}
.link-phone img {
	width: 25px;
	height: 25px;
	margin-left: 10px;
}
#header .menu-list .nav-child {
	position: absolute;
	width: 300px;
	background: #141414;
	transition: .5s;
}
@media (min-width: 999.1px) {
	#header .menu-list .nav-child {
		top: 0;
		left: 0;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
	#header .menu-list .item-115 .nav-child, #header .menu-list .item-159 .nav-child {
		width: 620px;
		columns: 2;
		column-gap: 20px;
		left: 100%!important;
		right: 0!important;
		padding-bottom: 20px!important;
	}
	#header .menu-list li:hover .nav-child {
		top: 60px;
		opacity: 1;
		visibility: visible;
		pointer-events: inherit;
	}
	#header .menu-list .nav-child li {
		padding: 15px 20px;
	}
	#header .menu-list .item-115, #header .menu-list .item-159 {
		position: relative;
	}
}
#header .menu-list .nav-child li li {
	padding: 8px 20px;
}
#header .menu-list .nav-child li .nav-child {
	top: 0;
	left: 0;
	right: 0;
	border-radius: 4px;
	opacity: 0;
	pointer-events: none;
}
#header .menu-list .nav-child li:hover .nav-child {
	right: -300px;
	opacity: 1;
	pointer-events: inherit;
}
.nav-menu img {
	display: none;
}
@media (min-width: 1000px) {
	#header .menu-list li:after {
		content: '';
		background-image: -ms-linear-gradient( 90deg, rgb(233,200,137) 0%, rgb(31,31,31) 100%, rgb(233,200,137) 100%);
		opacity: 0.502;
		position: absolute;
		right: 0;
		bottom: 0;
		width: 1px;
		height: 72px;
	}
	#header .menu-list .nav-child li li {
		padding: 6px;
	}
}
@media (min-width: 1200px) {
	#header {
		top: -100%;
	}
	#header.fixed {
		position: fixed;
		width: 100%;
		z-index: 3;
		top: 0;
	}
	#header.fixed .logo {
		padding: 5px;
	}
	#header.fixed .logo img {
		width: 210px;
	}
}
@media (min-width: 1440px) {
	#header .menu-list li {
		padding: 21px 10px;
	}
	#header.fixed .menu-list li {
		padding: 20px 10px;
	}
}
@media (max-width: 1439px) {
	#header .logo {
		width: 165px;
	}
	#header .callback {
		width: 165px;
		font-size: 14px;
	}
}
@media (max-width: 1299px) {
	#header .menu-list li {
		font-size: 12px;
	}
}
@media (max-width: 1199px) and (min-width: 999px) {
	#header .logo {
		width: 50px;
		overflow: hidden;
	}
	#header .logo img {
		max-width: inherit;
		width: 190px;
	}
}
@media (max-width: 999px) {
	#header {
		padding: 15px 0;
		z-index: 2;
	}
	#header .callback {
		margin-right: 100px;
	}
	.nav-icon {
		min-width: 40px;
		min-height: 40px;
		width: 40px;
		height: 40px;
		position: absolute;
		z-index: 600;
		cursor: pointer;
		top: 0;
		right: 15px;
		background: #c2a06b;
		border-radius: 50%;
	}
	.nav-icon span {
		width: 100%;
		height: 2px;
		position: absolute;
		display: block;
		-webkit-transform: scaleX(0.55);
		transform: scaleX(0.55);
		-webkit-transform-origin: center;
		transform-origin: center;
		transition: all .3s ease;
		background-color: #0e0f10;
		cursor: pointer;
	}
	.nav-icon span:nth-child(1) {
		top: 13px;
	}
	.nav-icon span:nth-child(2), .nav-icon span:nth-child(4) {
		top: 19px;
	}
	.nav-icon span:nth-child(3) {
		top: 25px;
	}
	.nav-icon.in span:nth-child(1) {
		-webkit-transform: translate3d(0, -12px, 0) scale(0.55);
		transform: translate3d(0, -12px, 0) scale(0.55);
		opacity: 0;
	}
	.nav-icon.in span:nth-child(2) {
		-webkit-transform: rotate(-45deg) scale(0.55);
		transform: rotate(-45deg) scale(0.55);
	}
	.nav-icon.in span:nth-child(3) {
		-webkit-transform: translate3d(0, 12px, 0) scale(0.55);
		transform: translate3d(0, 12px, 0) scale(0.55);
		opacity: 0;
	}
	.nav-icon.in span:nth-child(4) {
		-webkit-transform: rotate(45deg) scale(0.55);
		transform: rotate(45deg) scale(0.55);
	}
	#header .nav-menu {
		position: fixed;
		overflow-y: auto;
		left: -100%;
		top: 0;
		background: #c2a06b;
		height: 100vh;
		z-index: 1;
		width: 220px;
	}
	#header .nav-icon.in+.nav-menu {
		left: 0;
	}
	#header .nav-menu ul {
		display: block;
	}
	#header .menu-list li {
		padding: 10px 15px;
		margin-right: 35px;
	}
	#header .menu-list li.deeper.parent::after {
		content: '';
		display: block;
		position: absolute;
		top: 8px;
		right: -25px;
		background: url("/templates/mag/images/white-triangle.png") no-repeat center/cover;
		width: 15px;
		height: 15px;
		transition: all linear 0.3s;
	}
	#header .menu-list li.item-115.deeper.parent::after {
		top: 20px;
		right: -75px;
	}
	#header .menu-list li.deeper.parent.open::after {
		-webkit-transform: rotate(90deg);
		transform: rotate(90deg);
	}
	#header .menu-list .deeper.parent.open>.nav-child {
		display: block;
		position: relative;
		top: 10px;
		background: #c2a06b;
		max-width: 100%;
		opacity: 1;
		transition: all linear 0.3s;
	}
	#header .menu-list .nav-child li:hover .nav-child {
		right: 0;
	}
	#header .menu-list li a {
		color: #fff;
		width: 100%;
		display: block;
	}
	#header .menu-list .nav-child {
		display: none;
	}
	.mod-languages {
		display: flex;
		align-items: center;
		position: absolute;
		right: 55px;
		top: 0;
		bottom: 0;
		margin: auto 0;
	}
}
@media (max-width: 767px) {
	#header .link-phone, #header .header_mess {
		display: none;
	}
}
@media (max-width: 479px) {
	#header .callback {
		width: 39px;
		font-size: 0;
		margin-right: 80px;
		flex-shrink: 0;
	}
	div.mod-languages li {
		margin: 0!important;
	}
}

/* ---------- Пункт «Маг Сергей Кобзарь» скрыт, стрелка у «Любовной магии» (style.css, 2643, 2722–2757) ---------- */
#header .item-101 {
	display: none !important;
}
#header .line-right {
	position: relative;
}
#header .line-right::after {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	right: -130px;
	background: url("/templates/mag/images/right-arrow.png");
	width: 18px;
	height: 18px;
}
@media (max-width: 998px) {
	#header .line-right::after {
		display: none;
	}
}

/* ---------- Ссылки на мессенджеры (style.css, строки 2961–3020) ---------- */
.header-social-link {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Philosopher', sans-serif;
	font-weight: bold;
	font-size: 16px;
	color: #E0BF82;
	border: 1px solid #E0BF82;
	border-radius: 19px;
	transition: 0.3s;
	background: transparent;
	margin: 0 8px;
}
.header-social-link span {
	margin-left: 8px;
}
.header-social-link:hover {
	box-shadow: 0px 0px 13px 0px rgb(220, 187, 127);
}
.header-social-link img {
	width: 21px;
	height: 21px;
}
@media screen and (max-width: 1640px) {
	.header-social-link {width: 38px; border-radius: 50%;}
	.header-social-link span {display: none;}
}
@media screen and (max-width: 567px) {
	.header-social-link.whatsapp {display: none;}
}

/* ---------- Окна «Позвонить мне», «Спасибо» (style.css, строки 2423–2506, 2780) ---------- */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	background: rgba(12, 12, 12, 0.6196078431372549);
	z-index: 1000; /* в шаблоне 1; на страницах сервисов поверх их слоёв */
	display: none;
}
.modal.fade {
	opacity: 0;
}
.modal.fade.in {
	opacity: 1;
	display: flex;
}
.modal .more {
	margin-top: 15px;
}
.modal-content {
	background: #fff;
	box-shadow: 0px 0px 8px rgba(233, 200, 137, 0.55);
	width: 520px;
	max-width: calc(100% - 20px);
	padding: 30px;
	position: relative;
}
.modal-content .close {
	display: inline-flex;
	align-items: center;
	background: linear-gradient( 90deg, rgb(233,200,137) 0%, rgb(171,136,89) 100%);
	width: 39px;
	height: 39px;
	padding: 8.5px 11px;
	border-radius: 50%;
	position: absolute;
	right: -17px;
	top: -17px;
	box-shadow: 0px 0px 8px rgba(233, 200, 137, 0.55);
	cursor: pointer;
	z-index: 200;
}
@media (max-width: 576px) {
	.modal-content {padding: 30px 20px;}
	.modal-content .close {right: -7px; top: -7px;}
}
.modal-content .close:hover img {
	-webkit-transform: rotate(90deg);
	transform: rotate(90deg);
}
.modal-content .title {
	margin-bottom: 30px;
}
@media (min-width: 992px) {
	.modal-content {
		margin-left: 350px;
	}
	.modal-content:before {
		content: '';
		width: 350px;
		height: 100%;
		background: url(/templates/mag/images/anonymity.png) center no-repeat;
		position: absolute;
		top: 0;
		left: -350px;
	}
}
.modal-content p {
	color: gray;
}
.modal .title-medium {
	font-family: 'Philosopher', sans-serif;
	color: #141414;
	font-weight: bold;
	line-height: 1.2;
	margin-bottom: 5px;
	font-size: 28px;
}
@media (min-width: 768px) {
	.modal .title-medium {
		font-size: 36px;
	}
}
.modal input {
	margin-bottom: 15px;
}
.modal input, .modal textarea {
	border: 1px solid #e9c889;
	border-radius: 8px;
	width: 100%;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	padding: 10px 30px;
	background: transparent;
	color: #4d4d4d;
}
.modal input[type="number"] {
	-moz-appearance: textfield;
}
.modal input[type="number"]::-webkit-outer-spin-button,
.modal input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.modal .btn {
	background-image: linear-gradient( 0deg, rgb(233,200,137) 0%, rgb(171,136,89) 100%);
	box-shadow: 1.5px 2.598px 7px 0px rgba(0, 0, 0, 0.18);
	width: 207px;
	height: 40px;
	color: #1f1f1f;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	padding: 0 7px;
}
.modal .btn:hover {
	box-shadow: 0px 0px 12px 0px rgb(220, 187, 127);
}
.modal .btn.more {
	margin: auto;
	width: 235px;
	height: 45px;
}
.modal .btn.color-white {
	color: #fff;
}

/* При печати результата (Таро, расклады, руны) шапка и окна не нужны */
@media print {
	#header, .modal { display: none !important; }
}
