/**
 * Ohio WordPress Theme
 * Header Style 8 (VKURSE custom) styles.
 * Loaded only when global_page_header_menu_style === 'style8'.
 */

/* Base layout --------------------------------------------------------- */
#masthead.header-8 {
	width: 100%;
	background-color: var(--header-8-bg, #ffffff);
	color: var(--header-8-text, #111111);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	z-index: 100;
	transition: background-color 0.25s ease, color 0.25s ease;
}

#masthead.header-8 .header-wrap {
	width: 100%;
}

#masthead.header-8 .header-wrap-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	min-height: 88px;
	padding: 10px 0;
}

#masthead.header-8 .left-part,
#masthead.header-8 .middle-part,
#masthead.header-8 .right-part {
	display: flex;
	align-items: center;
}

#masthead.header-8 .left-part {
	flex: 0 0 auto;
}

#masthead.header-8 .middle-part {
	flex: 1 1 auto;
	justify-content: center;
}

#masthead.header-8 .right-part {
	flex: 0 0 auto;
	gap: 16px;
}

/* Branding ------------------------------------------------------------ */
#masthead.header-8 .branding {
	display: flex;
	align-items: center;
}

/* Primary navigation -------------------------------------------------- */
#masthead.header-8 #menu-primary,
#masthead.header-8 .nav .mega-menu,
#masthead.header-8 .nav ul.menu {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#masthead.header-8 .nav .mega-menu-item {
	list-style: none;
}

#masthead.header-8 .nav .menu-link,
#masthead.header-8 .nav a.main-menu-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--header-8-text, #111111);
	font-weight: 500;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

#masthead.header-8 .nav .menu-link:hover,
#masthead.header-8 .nav a.main-menu-link:hover {
	opacity: 0.7;
}

#masthead.header-8 .nav .menu-link > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Per-item icon (injected by walker_nav_menu_start_el filter) --------- */
#masthead.header-8 .menu-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	/* Put icon to the right of the menu item text */
	order: 2;
}

/* Bootstrap-Icons variant inherits menu-link color */
#masthead.header-8 .menu-item-icon-bi {
	color: currentColor;
	opacity: 0.85;
}

/* Emoji variant — rendered by native colored emoji font, never tinted */
#masthead.header-8 .menu-item-icon-emoji {
	font-size: 16px;
	line-height: 1;
	color: initial;
	opacity: 1;
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
		"Noto Color Emoji", "Twemoji Mozilla", "EmojiOne Color",
		"Android Emoji", sans-serif;
	font-style: normal;
	text-decoration: none;
	font-variant-emoji: emoji;
}

/* Right-side extras: phone / social / CTA ----------------------------- */
#masthead.header-8 .header-8-extras {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	flex-wrap: nowrap;
}

#masthead.header-8 .header-8-extras > li {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

/* Phone */
#masthead.header-8 .header-8-phone-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--header-8-text, #111111);
	text-decoration: none;
	font-weight: 500;
	font-size: 15px;
	transition: opacity 0.2s ease;
}

#masthead.header-8 .header-8-phone-link:hover {
	opacity: 0.7;
}

#masthead.header-8 .header-8-phone-link .bi-telephone {
	font-size: 18px;
	line-height: 1;
}

/* Messengers group (Telegram / WhatsApp / MAX) ------------------------ */
#masthead.header-8 .header-8-messengers-wrap {
	display: inline-flex;
	align-items: center;
}

#masthead.header-8 .header-8-messengers {
	display: inline-flex;
	align-items: center;
	gap: 12px;           /* tight grouping between messenger items */
	margin: 0;
	padding: 0;
	list-style: none;
}

#masthead.header-8 .header-8-messengers > li {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

/* Social links — both variants present in DOM; CSS shows one or the other */
#masthead.header-8 .header-8-social-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--header-8-text, #111111);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

#masthead.header-8 .header-8-social-link:hover {
	opacity: 0.7;
}

#masthead.header-8 .header-8-social-icon {
	font-size: 20px;
	line-height: 1;
	display: none; /* hidden on desktop, shown on mobile */
}

#masthead.header-8 .header-8-social-icon--svg {
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

#masthead.header-8 .header-8-max-svg {
	width: 100%;
	height: 100%;
	display: block;
}

#masthead.header-8 .header-8-social-label {
	display: inline;
}

/* CTA button */
#masthead.header-8 .header-8-cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	background-color: var(--header-8-cta-bg, #2d6cdf);
	color: var(--header-8-cta-color, #ffffff);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	border: none;
	cursor: pointer;
	white-space: nowrap;
}

#masthead.header-8 .header-8-cta-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	opacity: 0.95;
}

/* Mobile hamburger — position at the right edge */
#masthead.header-8 .header-8-hamburger {
	display: none; /* desktop: hidden; mobile-breakpoint below re-enables */
	align-items: center;
	justify-content: center;
	margin-left: 4px;
}

#masthead.header-8 .header-8-hamburger .hamburger-button {
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--header-8-text, #111111);
}

/* Dark scheme (body.dark-scheme) --------------------------------------- */
.dark-scheme #masthead.header-8 {
	color: rgba(255, 255, 255, 0.9);
}

.dark-scheme #masthead.header-8 .nav .menu-link,
.dark-scheme #masthead.header-8 .nav a.main-menu-link,
.dark-scheme #masthead.header-8 .nav .menu-link > span {
	color: rgba(255, 255, 255, 0.9) !important;
}

.dark-scheme #masthead.header-8 .header-8-phone-link {
	color: rgba(255, 255, 255, 0.9) !important;
}

.dark-scheme #masthead.header-8 .header-8-social-link,
.dark-scheme #masthead.header-8 .header-8-social-label {
	color: rgba(255, 255, 255, 0.9) !important;
}

.dark-scheme #masthead.header-8 .header-8-hamburger .hamburger-button,
.dark-scheme #masthead.header-8 .hamburger .icon {
	color: rgba(255, 255, 255, 0.9) !important;
}

.dark-scheme #masthead.header-8 .branding.text-logo,
.dark-scheme #masthead.header-8 .branding .titles-typo {
	color: #fff !important;
}

/* Dark scheme + sticky header (light bg → dark text) ------------------ */
.dark-scheme #masthead.header-8.-sticky {
	color: var(--header-8-text, #111111);
}

.dark-scheme #masthead.header-8.-sticky .nav .menu-link,
.dark-scheme #masthead.header-8.-sticky .nav a.main-menu-link,
.dark-scheme #masthead.header-8.-sticky .nav .menu-link > span {
	color: var(--header-8-text, #111111) !important;
}

.dark-scheme #masthead.header-8.-sticky .header-8-phone-link {
	color: var(--header-8-text, #111111) !important;
}

.dark-scheme #masthead.header-8.-sticky .header-8-social-link,
.dark-scheme #masthead.header-8.-sticky .header-8-social-label {
	color: var(--header-8-text, #111111) !important;
}

.dark-scheme #masthead.header-8.-sticky .header-8-hamburger .hamburger-button,
.dark-scheme #masthead.header-8.-sticky .hamburger .icon {
	color: var(--header-8-text, #111111) !important;
}

.dark-scheme #masthead.header-8.-sticky .branding.text-logo,
.dark-scheme #masthead.header-8.-sticky .branding .titles-typo {
	color: var(--header-8-text, #111111) !important;
}

/* Sticky + dark: swap logo back to the "light-scheme" (dark/black) version */
.dark-scheme #masthead.header-8.-sticky .branding .light-scheme-logo {
	display: inline-block !important;
}
.dark-scheme #masthead.header-8.-sticky .branding .dark-scheme-logo {
	display: none !important;
}

/* Fallback: if there's no separate light logo, force image to dark via filter */
.dark-scheme #masthead.header-8.-sticky .branding .logo img:not(.light-scheme-logo):not(.dark-scheme-logo) {
	filter: brightness(0);
}

/* Responsive ---------------------------------------------------------- */

/* 17" laptops / smaller desktops (≤1600px) */
@media (max-width: 1600px) {
	#masthead.header-8 .header-wrap-inner {
		gap: 24px;
	}
	#masthead.header-8 #menu-primary,
	#masthead.header-8 .nav .mega-menu,
	#masthead.header-8 .nav ul.menu {
		gap: 22px;
	}
	#masthead.header-8 .nav .menu-link,
	#masthead.header-8 .nav a.main-menu-link {
		font-size: 14px;
	}
	#masthead.header-8 .header-8-extras {
		gap: 16px;
	}
	#masthead.header-8 .header-8-messengers {
		gap: 10px;
	}
	#masthead.header-8 .header-8-social-link {
		font-size: 14px;
	}
	#masthead.header-8 .header-8-phone-link {
		font-size: 14px;
	}
	#masthead.header-8 .header-8-cta-button {
		padding: 11px 20px;
		font-size: 14px;
	}
}

/* 15" laptops (≤1440px) */
@media (max-width: 1440px) {
	#masthead.header-8 .header-wrap-inner {
		gap: 20px;
		min-height: 78px;
	}
	#masthead.header-8 #menu-primary,
	#masthead.header-8 .nav .mega-menu,
	#masthead.header-8 .nav ul.menu {
		gap: 18px;
	}
	#masthead.header-8 .nav .menu-link,
	#masthead.header-8 .nav a.main-menu-link {
		font-size: 13px;
	}
	#masthead.header-8 .header-8-extras {
		gap: 14px;
	}
	#masthead.header-8 .header-8-messengers {
		gap: 8px;
	}
	#masthead.header-8 .header-8-social-link,
	#masthead.header-8 .header-8-phone-link {
		font-size: 13px;
	}
	#masthead.header-8 .header-8-cta-button {
		padding: 10px 18px;
		font-size: 13px;
	}
	#masthead.header-8 .header-8-phone-link .bi-telephone,
	#masthead.header-8 .header-8-social-icon {
		font-size: 17px;
	}
	#masthead.header-8 .menu-item-icon {
		font-size: 16px;
	}
}

/* Small 15" / 14" laptops (≤1366px) */
@media (max-width: 1366px) {
	#masthead.header-8 .header-wrap-inner {
		gap: 16px;
		min-height: 72px;
	}
	#masthead.header-8 #menu-primary,
	#masthead.header-8 .nav .mega-menu,
	#masthead.header-8 .nav ul.menu {
		gap: 14px;
	}
	#masthead.header-8 .header-8-extras {
		gap: 12px;
	}
	#masthead.header-8 .header-8-messengers {
		gap: 6px;
	}
	#masthead.header-8 .right-part {
		gap: 12px;
	}
}

/* Transitional range (≤1200px) */
@media (max-width: 1200px) {
	#masthead.header-8 .header-wrap-inner {
		gap: 14px;
		min-height: 68px;
	}
	#masthead.header-8 #menu-primary,
	#masthead.header-8 .nav .mega-menu,
	#masthead.header-8 .nav ul.menu {
		gap: 12px;
	}
	#masthead.header-8 .nav .menu-link,
	#masthead.header-8 .nav a.main-menu-link {
		font-size: 12.5px;
	}
	#masthead.header-8 .header-8-extras {
		gap: 10px;
	}
	#masthead.header-8 .header-8-messengers {
		gap: 4px;
	}
	#masthead.header-8 .header-8-social-link,
	#masthead.header-8 .header-8-phone-link {
		font-size: 12.5px;
	}
	#masthead.header-8 .header-8-cta-button {
		padding: 9px 16px;
		font-size: 12.5px;
	}
	#masthead.header-8 .header-8-phone-link .bi-telephone,
	#masthead.header-8 .header-8-social-icon {
		font-size: 16px;
	}
	#masthead.header-8 .menu-item-icon {
		font-size: 14px;
	}
}

/* ---- Mobile (<= 991px) ------------------------------------------------
   Layout becomes: [LOGO] .... [phone icon] [messenger icons] [HAMBURGER]
   - Theme JS adds `.-mobile` class to the header at its mobile breakpoint,
	 which turns `.nav` into a slide-in overlay. We don't override that.
   - Phone + social labels collapse into icons only.
   - CTA button hidden.
*/
@media (max-width: 991px) {
	#masthead.header-8 .header-wrap-inner {
		min-height: 64px;
		gap: 12px;
		flex-wrap: nowrap;
	}

	/* Inline desktop menu is not visible on mobile (theme moves it into a
	   fixed-position slide-in overlay). Collapse the middle-part so extras
	   on the right don't get pushed off-screen. */
	#masthead.header-8 .middle-part {
		flex: 0 0 0;
		min-width: 0;
		width: 0;
		overflow: visible; /* keep overlay, which is position:fixed, visible */
	}

	#masthead.header-8 .right-part {
		gap: 10px;
	}

	#masthead.header-8 .header-8-extras {
		gap: 8px;
	}

	/* Messengers: grouped tightly on mobile */
	#masthead.header-8 .header-8-messengers {
		gap: 4px;
	}

	/* Phone: icon only */
	#masthead.header-8 .header-8-phone-label {
		display: none;
	}
	#masthead.header-8 .header-8-phone-link {
		width: 40px;
		height: 40px;
		justify-content: center;
	}
	#masthead.header-8 .header-8-phone-link .bi-telephone {
		font-size: 20px;
	}

	/* Social: icon only */
	#masthead.header-8 .header-8-social-label {
		display: none;
	}
	#masthead.header-8 .header-8-social-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	#masthead.header-8 .header-8-social-link {
		width: 40px;
		height: 40px;
		justify-content: center;
		border-radius: 8px;
	}

	/* Hide CTA button on mobile */
	#masthead.header-8 .header-8-cta,
	#masthead.header-8 .header-8-cta-button {
		display: none !important;
	}

	/* Show hamburger */
	#masthead.header-8 .header-8-hamburger,
	#masthead.header-8 .mobile-hamburger {
		display: inline-flex !important;
	}
	#masthead.header-8 .header-8-hamburger .hamburger-button,
	#masthead.header-8 .mobile-hamburger .hamburger-button {
		display: inline-flex !important;
	}

	/* --- Mobile slide-in menu + custom text color --- */

	/* Use the menu selected in Theme Settings > Mobile Menu. */
	body.is-mobile-menu #masthead.header-8 .mobile-overlay .nav-container > ul#mobile-menu,
	#masthead.header-8 .mobile-overlay #mobile-menu,
	.header.-mobile #masthead.header-8 .nav.with-mobile-menu #mobile-menu {
		display: flex !important;
	}

	body.is-mobile-menu #masthead.header-8 .mobile-overlay .nav-container > ul#menu-primary,
	#masthead.header-8 .mobile-overlay #menu-primary,
	.header.-mobile #masthead.header-8 .nav.with-mobile-menu #menu-primary {
		display: none !important;
	}

	/* Top-level menu inside the mobile overlay: vertical, left-aligned */
	#masthead.header-8 .mobile-overlay .nav-container > ul#mobile-menu,
	#masthead.header-8 .mobile-overlay #mobile-menu {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		align-items: stretch !important;
		gap: 4px !important;
		padding: 12px 0 !important;
		margin: 0 !important;
		list-style: none !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}

	/* Kill theme's negative margin + reset per-item spacing */
	#masthead.header-8 .mobile-overlay #mobile-menu > li,
	.header.-mobile #masthead.header-8 .mobile-overlay #mobile-menu > .nav-item {
		width: 100% !important;
		flex: 0 0 auto !important;
		padding: 0 !important;
		margin: 0 !important;
		position: relative !important;
	}

	/* Links: inline-flex (override theme's display:block for mobile nav-item a) */
	#masthead.header-8 .mobile-overlay #mobile-menu > li > a,
	.header.-mobile #masthead.header-8 .mobile-overlay #mobile-menu > .nav-item > a {
		display: flex !important;
		align-items: center !important;
		line-height: 1.4 !important;
		padding: 7px 0 !important;
		font-size: 16px !important;
		color: #f5f5f5 !important;
		white-space: nowrap;
	}

	body.is-mobile-menu #masthead.header-8 .mobile-overlay #mobile-menu .sub-menu {
		position: static !important;
		left: auto !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	body.is-mobile-menu #masthead.header-8 .mobile-overlay #mobile-menu li.active > .sub-menu {
		height: auto !important;
	}

	#masthead.header-8 .mobile-overlay #mobile-menu .sub-menu .menu-link {
		padding: 5px 12px !important;
		font-size: 15px !important;
		line-height: 1.4 !important;
	}

	body.is-mobile-menu #masthead.header-8 .mobile-overlay #mobile-menu .has-submenu-icon {
		display: inline-flex !important;
	}

	/* Text color on all inner links / spans */
	#masthead.header-8 .mobile-overlay .menu-link,
	#masthead.header-8 .mobile-overlay a.main-menu-link,
	#masthead.header-8 .mobile-overlay .mega-menu a,
	#masthead.header-8 .mobile-overlay .mega-menu a > span {
		color: #f5f5f5 !important;
	}

}

@media (max-width: 576px) {
	#masthead.header-8 .header-wrap-inner {
		gap: 6px;
	}
	#masthead.header-8 .header-8-extras {
		gap: 4px;
	}
	#masthead.header-8 .header-8-phone-link,
	#masthead.header-8 .header-8-social-link {
		width: 36px;
		height: 36px;
	}
	#masthead.header-8 .header-8-phone-link .bi-telephone,
	#masthead.header-8 .header-8-social-icon {
		font-size: 18px;
	}
}

/* Prevent horizontal overflow from header row on very narrow screens */
@media (max-width: 400px) {
	#masthead.header-8 .header-8-extras {
		gap: 2px;
	}
	#masthead.header-8 .header-8-phone-link,
	#masthead.header-8 .header-8-social-link {
		width: 34px;
		height: 34px;
	}
}
