/* Современный стиль */
.header--modern {
	background: linear-gradient(90deg, #7b61ff 0%, #1ec1ff 100%);
	color: #fff;
	box-shadow: 0 6px 20px rgba(16, 24, 40, 0.12);
	height: 72px;
}

/* Если задан кастомный цвет фона, градиент не применяется */
.header--modern[style*="background-color"] {
	background: var(--bg) !important;
	color: var(--text) !important;
}

.header--modern .container {
	padding: 0 32px;
	height: 100%;
}

.header--modern .logo {
	color: #fff;
}

/* Для светлой темы с кастомным фоном - логотип темный */
html:not(.dark) .header--modern[style*="background-color"] .logo {
	color: #111 !important;
}

/* Для темной темы с кастомным фоном - логотип белый */
html.dark .header--modern[style*="background-color"] .logo {
	color: #fff !important;
}

.header--modern .logo img {
	max-width: 200px;
	max-height: 50px;
}

.header--modern .nav a {
	color: #fff;
	opacity: 0.95;
	padding: 8px 12px;
	border-radius: 6px;
	font-weight: 500;
	font-size: 16px;
}

/* Если задан кастомный фон, цвет ссылок зависит от темы */
/* Светлая тема - темные ссылки */
html:not(.dark) .header--modern[style*="background-color"] .nav a {
	color: #111 !important;
	opacity: 1;
}

html:not(.dark) .header--modern[style*="background-color"] .nav a:hover {
	color: #007bff !important;
	background: rgba(0, 123, 255, 0.1);
}

/* Темная тема - белые ссылки */
html.dark .header--modern[style*="background-color"] .nav a {
	color: #fff !important;
	opacity: 0.95;
}

html.dark .header--modern[style*="background-color"] .nav a:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
	opacity: 1;
}

.header--modern .nav a:hover {
	background: rgba(255, 255, 255, 0.08);
	opacity: 1;
}

.header--modern .theme-toggle {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 6px;
	color: #fff;
	margin-left: 12px;
}

.header--modern .theme-toggle:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Кнопка гамбургера для современного стиля */
/* Светлая тема с кастомным фоном - кнопка темная */
html:not(.dark) .header--modern[style*="background-color"] .mobile-menu-toggle .hamburger-line {
	background-color: #121212 !important;
}

html:not(.dark) .header--modern[style*="background-color"] .mobile-menu-toggle.active .hamburger-line:nth-child(1),
html:not(.dark) .header--modern[style*="background-color"] .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
	background-color: #121212 !important;
}

/* Темная тема с кастомным фоном - кнопка белая */
html.dark .header--modern[style*="background-color"] .mobile-menu-toggle .hamburger-line {
	background-color: #fff !important;
}

html.dark .header--modern[style*="background-color"] .mobile-menu-toggle.active .hamburger-line:nth-child(1),
html.dark .header--modern[style*="background-color"] .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
	background-color: #fff !important;
}

/* Если используется градиент (темный фон), кнопка белая */
.header--modern:not([style*="background-color"]) .mobile-menu-toggle .hamburger-line {
	background-color: #fff !important;
}

html.dark .header--modern:not([style*="background-color"]) .mobile-menu-toggle .hamburger-line {
	background-color: #fff !important;
}

.header--modern:not([style*="background-color"]) .mobile-menu-toggle.active .hamburger-line:nth-child(1),
.header--modern:not([style*="background-color"]) .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
	background-color: #fff !important;
}

html.dark .header--modern {
	background: linear-gradient(90deg, #5a4dcc 0%, #1aa8cc 100%);
}

.header--modern .btn--custom {
	color: #fff;
	text-transform: none;
}

.header--modern .btn--custom[style*="transparent"] {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
}

.header--modern .btn--custom[style*="transparent"]:hover {
	background: rgba(255, 255, 255, 0.1) !important;
}

/* Светлая тема с кастомным фоном - кнопки темные */
html:not(.dark) .header--modern[style*="background-color"] .btn--custom {
	color: #111 !important;
}

html:not(.dark) .header--modern[style*="background-color"] .btn--custom[style*="transparent"] {
	color: #111 !important;
	border-color: rgba(0, 0, 0, 0.2);
}

html:not(.dark) .header--modern[style*="background-color"] .btn--custom[style*="transparent"]:hover {
	background: rgba(0, 0, 0, 0.05) !important;
}

/* Темная тема с кастомным фоном - кнопки белые */
html.dark .header--modern[style*="background-color"] .btn--custom {
	color: #fff !important;
}

html.dark .header--modern[style*="background-color"] .btn--custom[style*="transparent"] {
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.3);
}

html.dark .header--modern[style*="background-color"] .btn--custom[style*="transparent"]:hover {
	background: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 768px) {
	.header--modern {
		height: 64px;
	}
}

