/**
 * ProBetters — native site header (inc/header/header-style1.php).
 * Replaces the old HFE Elementor header. Loaded on every page.
 */

/* Neutralise the parent theme's absolute/overlay header wrapper. */
#themephi-header {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	float: none !important;
	transform: none !important;
}
/* If a .container / .header-inner still wraps us (cached HTML), stop it boxing. */
#themephi-header .header-inner,
#themephi-header .container {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

.pb-hdr {
	--pb-hdr-blue:    #2563eb;
	--pb-hdr-blue-2:  #3b82f6;
	--pb-hdr-blue-3:  #60a5fa;
	--pb-hdr-gold:    #facc15;
	--pb-hdr-text:    #eef2fb;
	--pb-hdr-muted:   #93a4c3;
	--pb-hdr-border:  rgba(59, 130, 246, 0.20);

	position: relative;
	z-index: 50;
	/* rendered outside #page (direct body child) → 100% is the full viewport */
	width: 100%;
	font-family: 'Noto Sans Georgian', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--pb-hdr-text);
	background:
		radial-gradient(90% 220% at 12% -60%, rgba(37, 99, 235, 0.35) 0%, transparent 60%),
		linear-gradient(180deg, #0b1a3c 0%, #0a1428 45%, #070d1c 100%);
	border-bottom: 1px solid var(--pb-hdr-border);
}
.pb-hdr *, .pb-hdr *::before, .pb-hdr *::after { box-sizing: border-box; }
.pb-hdr a { text-decoration: none; color: inherit; }

.pb-hdr--sticky { position: sticky; top: 0; }
.admin-bar .pb-hdr--sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .pb-hdr--sticky { top: 46px; } }

/* ====================== Row 1 ====================== */
.pb-hdr__bar {
	width: 100%;
	max-width: var(--pb-hdr-max, 1370px);
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.pb-hdr__logo { flex-shrink: 0; display: inline-flex; align-items: center; line-height: 0; }
.pb-hdr__logo-img { width: auto; display: block; }
.pb-hdr__logo-text {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.6px;
	color: #fff;
	white-space: nowrap;
	line-height: 1;
}

/* --- search --- */
.pb-hdr__search-wrap { flex: 1 1 auto; min-width: 0; display: flex; }
.pb-hdr__search {
	flex: 1 1 auto;      /* absorbs the slack so the account area sits flush right */
	min-width: 220px;
	display: flex;
	align-items: stretch;
	height: 48px;
	background: linear-gradient(180deg, rgba(13, 27, 56, 0.85), rgba(6, 12, 26, 0.75));
	border: 1px solid var(--pb-hdr-border);
	border-radius: 999px;
}
.pb-hdr__search:focus-within { border-color: rgba(96, 165, 250, 0.6); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

/* custom category dropdown (replaces the native <select> — fully themed) */
.pb-hdr__cat { position: relative; flex-shrink: 0; display: flex; }
.pb-hdr__cat-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 100%;
	max-width: 180px;
	border: 0;
	border-radius: 999px 0 0 999px;
	background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.04));
	color: #cfe0ff;
	font-size: 12.5px;
	font-weight: 600;
	padding: 0 16px 0 20px;
	cursor: pointer;
	white-space: nowrap;
}
.pb-hdr__cat-btn .pb-hdr__cat-label { overflow: hidden; text-overflow: ellipsis; }
.pb-hdr__cat-btn svg { color: var(--pb-hdr-blue-3); transition: transform 0.18s ease; flex-shrink: 0; }
.pb-hdr__cat.is-open .pb-hdr__cat-btn svg { transform: rotate(180deg); }
.pb-hdr__cat-list {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 220px;
	max-height: 340px;
	overflow-y: auto;
	list-style: none;
	margin: 0;
	padding: 6px;
	background: #0b1a3c;
	border: 1px solid var(--pb-hdr-border);
	border-radius: 14px;
	box-shadow: 0 20px 46px rgba(0, 0, 0, 0.55);
	z-index: 60;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: 0.15s ease;
}
.pb-hdr__cat.is-open .pb-hdr__cat-list { opacity: 1; visibility: visible; transform: translateY(0); }
.pb-hdr__cat-list li {
	padding: 10px 12px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 500;
	color: var(--pb-hdr-muted);
	cursor: pointer;
}
.pb-hdr__cat-list li:hover { background: rgba(59, 130, 246, 0.14); color: #fff; }
.pb-hdr__cat-list li.is-sel { background: rgba(37, 99, 235, 0.25); color: #fff; font-weight: 700; }
.pb-hdr__cat-list::-webkit-scrollbar { width: 6px; }
.pb-hdr__cat-list::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 6px; }

.pb-hdr__search::before { content: ""; width: 1px; margin: 13px 0; background: var(--pb-hdr-border); }
.pb-hdr__search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--pb-hdr-text);
	font-size: 14px;
	padding: 0 18px;
	outline: none;
}
.pb-hdr__search-input::placeholder { color: var(--pb-hdr-muted); }
.pb-hdr__search-btn {
	flex-shrink: 0;
	border: 0;
	background: linear-gradient(135deg, var(--pb-hdr-blue-2), var(--pb-hdr-blue));
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 0 28px;
	margin: 5px;
	cursor: pointer;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.pb-hdr__search-btn:hover { filter: brightness(1.1); }

/* --- telegram pill --- */
.pb-hdr__telegram {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px 8px 8px;
	border: 1px solid rgba(59, 130, 246, 0.45);
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(10, 20, 40, 0.4));
	box-shadow: 0 0 24px rgba(37, 99, 235, 0.15), inset 0 0 20px rgba(37, 99, 235, 0.06);
	transition: 0.2s ease;
}
.pb-hdr__telegram:hover { border-color: var(--pb-hdr-blue-3); box-shadow: 0 0 30px rgba(37, 99, 235, 0.3); }
.pb-hdr__telegram svg {
	width: 42px;
	height: 42px;
	padding: 10px;
	color: #fff;
	background: radial-gradient(circle at 35% 30%, #4b93ff, #1d4ed8 70%);
	border: 1px solid rgba(147, 197, 253, 0.5);
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 6px 18px rgba(37, 99, 235, 0.55);
}
.pb-hdr__telegram span { display: flex; flex-direction: column; line-height: 1.3; padding-right: 4px; }
.pb-hdr__telegram strong { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; }
.pb-hdr__telegram em { font-size: 11px; font-style: normal; font-weight: 600; color: var(--pb-hdr-blue-3); }
.pb-hdr__telegram::after {
	content: "";
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	border-radius: 50%;
	background: rgba(59, 130, 246, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* --- account area (guest buttons + logged-in shortcodes) --- */
.pb-hdr__account { flex-shrink: 0; display: flex; align-items: center; gap: 14px; }
.pb-hdr__btn {
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	font-weight: 700;
	padding: 11px 22px;
	border-radius: 999px;
	white-space: nowrap;
	transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}
.pb-hdr__btn--ghost {
	color: var(--pb-hdr-text);
	border: 1px solid rgba(148, 163, 184, 0.35);
	background: rgba(255, 255, 255, 0.03);
}
.pb-hdr__btn--ghost:hover { border-color: var(--pb-hdr-blue-3); color: #fff; }
.pb-hdr__btn--solid {
	background: linear-gradient(135deg, #fde047, #eab308);
	color: #1e1b06;
	box-shadow: 0 6px 18px rgba(250, 204, 21, 0.3);
}
.pb-hdr__btn--solid:hover { transform: translateY(-1px); filter: brightness(1.04); }
.pb-hdr__btn svg { flex-shrink: 0; }
.pb-hdr__btn .pb-hdr__btn-text { margin-left: 8px; }
.pb-hdr__acc-link { font-size: 13px; font-weight: 700; }

/* logged-in: tighten the Core notification bell + user-menu that render here */
.pb-hdr__account .sn-notif-wrap,
.pb-hdr__account .sn-user-menu-wrap { display: inline-flex; align-items: center; }
.pb-hdr__account .sn-notif-bell { color: var(--pb-hdr-text); }
.pb-hdr__account .sn-user-menu-avatar { box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4); }

/* ====================== Row 2 ====================== */
.pb-hdr__nav {
	width: 100%;
	background: rgba(3, 7, 16, 0.55);
	border-top: 1px solid var(--pb-hdr-border);
}
.pb-hdr__nav-inner {
	max-width: var(--pb-hdr-max, 1370px);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* hamburger — first child of row 2, shown only on mobile */
.pb-hdr__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 40px;
	padding: 0;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--pb-hdr-border);
	border-radius: 11px;
	cursor: pointer;
	flex-shrink: 0;
}
.pb-hdr__toggle span { display: block; width: 20px; height: 2px; margin: 0 auto; background: #fff; border-radius: 2px; transition: 0.2s; }
.pb-hdr__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pb-hdr__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pb-hdr__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.pb-hdr__menu-list {
	display: flex;
	align-items: stretch;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pb-hdr__menu-list > li { position: relative; display: flex; }
.pb-hdr__menu-list > li > a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 15px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pb-hdr-muted);
	position: relative;
	transition: color 0.15s ease;
}
.pb-hdr__menu-list > li > a::after {
	content: "";
	position: absolute;
	left: 15px;
	right: 15px;
	bottom: 0;
	height: 2px;
	background: var(--pb-hdr-blue-2);
	border-radius: 2px 2px 0 0;
	transform: scaleX(0);
	transition: transform 0.18s ease;
}
.pb-hdr__menu-list > li > a:hover,
.pb-hdr__menu-list > li.current-menu-item > a,
.pb-hdr__menu-list > li.current-menu-parent > a,
.pb-hdr__menu-list > li.current-menu-ancestor > a { color: #fff; }
.pb-hdr__menu-list > li > a:hover::after,
.pb-hdr__menu-list > li.current-menu-item > a::after,
.pb-hdr__menu-list > li.current-menu-parent > a::after { transform: scaleX(1); }
.pb-hdr__menu-list .menu-item-has-children > a .pb-hdr__caret,
.pb-hdr__menu-list .menu-item-has-children > a::before {
	content: "";
	width: 6px; height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.7;
	order: 9;
}

/* submenu */
.pb-hdr__menu-list ul.sub-menu {
	position: absolute;
	top: 100%;
	left: 8px;
	min-width: 216px;
	background: #0b1730;
	border: 1px solid var(--pb-hdr-border);
	border-radius: 14px;
	padding: 7px;
	list-style: none;
	margin: 0;
	box-shadow: 0 20px 46px rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: 0.16s ease;
	z-index: 999;
}
.pb-hdr__menu-list li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.pb-hdr__menu-list ul.sub-menu li { display: block; }
.pb-hdr__menu-list ul.sub-menu a {
	display: block;
	padding: 10px 13px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 500;
	color: var(--pb-hdr-muted);
}
.pb-hdr__menu-list ul.sub-menu a:hover { background: rgba(59, 130, 246, 0.14); color: #fff; }

.pb-hdr__switchers {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	padding-left: 18px;
	border-left: 1px solid var(--pb-hdr-border);
}

/* ====================== Mobile: the slide-in drawer ======================
 * The breakpoint at which .pb-hdr__desktop-only hides / .pb-hdr__toggle shows
 * is injected inline from inc/theme-scripts.php (ProBetters → Settings → Mobile
 * menu below). The drawer holds the search + full menu; the switchers stay in
 * row 2 next to the hamburger. */

.pb-hdr__scrim {
	position: fixed;
	inset: 0;
	background: rgba(2, 6, 16, 0.6);
	backdrop-filter: blur(2px);
	z-index: 998;
}
.pb-hdr__scrim[hidden] { display: none; }

.pb-hdr__drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: min(92vw, 400px);
	height: 100%;
	z-index: 999;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 18px 32px;
	background: linear-gradient(180deg, #0b1a3c 0%, #0a1428 40%, #070d1c 100%);
	border-left: 1px solid var(--pb-hdr-border);
	box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
	transform: translateX(100%);
	transition: transform 0.28s ease;
	overflow-y: auto;
	font-family: 'Noto Sans Georgian', 'DM Sans', sans-serif;
}
.pb-hdr__drawer.is-open { transform: translateX(0); }

.pb-hdr__drawer-head { display: flex; align-items: center; justify-content: space-between; }
.pb-hdr__drawer-title { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pb-hdr-muted); }
.pb-hdr__drawer-close {
	width: 34px; height: 34px;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, 0.06);
	border: 0; border-radius: 10px;
	color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}

/* drawer search — a clean vertical stack of full-width pills (no fixed height,
   no wrapping overlap) */
.pb-hdr__drawer-search .pb-hdr__search {
	max-width: none;
	height: auto;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	background: none;
	border: 0;
	border-radius: 0;
}
.pb-hdr__drawer-search .pb-hdr__search::before { display: none; }
.pb-hdr__drawer-search .pb-hdr__cat { width: 100%; }
.pb-hdr__drawer-search .pb-hdr__cat-btn {
	width: 100%;
	max-width: none;
	height: 46px;
	justify-content: space-between;
	border: 1px solid var(--pb-hdr-border);
	border-radius: 12px;
	background: rgba(13, 27, 56, 0.7);
}
.pb-hdr__drawer-search .pb-hdr__cat-list { width: 100%; left: 0; right: 0; }
.pb-hdr__drawer-search .pb-hdr__search-input {
	height: 46px;
	border: 1px solid var(--pb-hdr-border);
	border-radius: 12px;
	background: rgba(13, 27, 56, 0.7);
	padding: 0 16px;
}
.pb-hdr__drawer-search .pb-hdr__search-btn { margin: 0; height: 44px; border-radius: 12px; }

.pb-hdr__drawer-nav .pb-hdr__menu-list--mobile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pb-hdr__menu-list--mobile li { display: block; }
.pb-hdr__menu-list--mobile > li { border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 4px; }
.pb-hdr__menu-list--mobile > li:last-child { border-bottom: 0; }
.pb-hdr__menu-list--mobile > li > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 15px 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--pb-hdr-text);
	border-radius: 10px;
}
.pb-hdr__menu-list--mobile > li > a::after { content: none; }
.pb-hdr__menu-list--mobile > li > a:hover,
.pb-hdr__menu-list--mobile > li.current-menu-item > a { background: rgba(59, 130, 246, 0.14); color: #fff; }
.pb-hdr__menu-list--mobile ul.sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	background: none;
	border: 0;
	margin: 0 0 4px 8px;
	padding: 0;
}
.pb-hdr__menu-list--mobile ul.sub-menu a {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--pb-hdr-muted);
	padding: 11px 12px;
	border-radius: 8px;
}
.pb-hdr__menu-list--mobile ul.sub-menu a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.pb-hdr__menu-list--mobile .menu-item-has-children > a::before { margin-left: auto; }

.pb-hdr__drawer-account { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--pb-hdr-border); }
.pb-hdr__drawer-account .pb-hdr__btn { flex: 1; justify-content: center; }
.pb-hdr__drawer-account .pb-hdr__btn .pb-hdr__btn-text { display: inline; margin-left: 8px; }

/* ====================== Fine-detail responsive ====================== */
@media (max-width: 1240px) {
	.pb-hdr__telegram span { display: none; }
}
@media (max-width: 560px) {
	/* row 1: logo centred, account pinned right */
	.pb-hdr__bar { position: relative; justify-content: center; padding: 20px 16px; }
	.pb-hdr__logo-img { max-height: 44px !important; }
	.pb-hdr__logo-text { font-size: 21px; }
	.pb-hdr__account {
		position: absolute;
		right: 14px;
		top: 50%;
		transform: translateY(-50%);
		gap: 16px;
	}
	.pb-hdr__account .sn-notif-bell svg,
	.pb-hdr__account .sn-user-menu-trigger { transform: scale(1.2); }
	/* row 2: hamburger + switchers, centred */
	.pb-hdr__nav-inner { padding: 12px 14px; justify-content: center; gap: 10px; }
	.pb-hdr__toggle { width: 46px; height: 42px; }
}

/* The parent theme pushed content down 100px to clear its absolute header;
   our header sits in normal flow now, so drop that dead space. */
.main-contain #content { padding-top: 0 !important; }
