/*
 * RomaniaHUB – headerul site-ului (sections/header.php).
 * Bară închisă la culoare, 1440px, lipită sus. Butoane și câmpuri cu colțuri de 12px, panouri 20px.
 */

.rh-hd,
.rh-drawer {
	--rh-accent: #6c1cff;
	--rh-accent-ink: #5612d6;
	--rh-ink: #16141f;
	--rh-muted: #5b5870;
	--rh-dark: #120c26;
	--rh-hd-h: 76px;
}

.rh-hd *,
.rh-hd *::before,
.rh-hd *::after,
.rh-drawer *,
.rh-drawer *::before,
.rh-drawer *::after {
	box-sizing: border-box;
}

.rh-hd-ico {
	flex: 0 0 auto;
	display: block;
}

/* Headerul vechi al temei nu mai există: fără spațiul lăsat pentru el */
.c27-top-content-margin {
	display: none !important;
}

/* ---------- Bara ---------- */

.rh-hd {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 1000;
	background: rgba(18, 12, 38, .97);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 15px;
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	backdrop-filter: saturate(140%) blur(12px);
	transition: box-shadow .2s ease;
}

.rh-hd.is-scrolled {
	box-shadow: 0 10px 30px rgba(10, 6, 24, .35);
}

.rh-hd__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1440px;
	height: var(--rh-hd-h);
	margin: 0 auto;
	padding: 0 10px;
}

.rh-hd__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	color: #fff !important;
	font-size: 22px;
	font-weight: 800;
	text-decoration: none !important;
}

.rh-hd__logo img {
	display: block;
	width: auto;
	height: 34px;
}

/* ---------- Meniul ---------- */

.rh-hd__nav {
	flex: 1 1 auto;
	height: 100%;
}

.rh-hd__nav > ul {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rh-hd__nav > ul > li {
	display: flex;
	align-items: center;
	height: 100%;
	margin: 0;
	padding: 0;
}

.rh-hd__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 10px 14px;
	border-radius: 12px;
	color: #d6d1ea !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}

.rh-hd__link .rh-hd-ico {
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}

.rh-hd__link:hover,
.rh-hd__has-mega.is-open > .rh-hd__link {
	background: rgba(255, 255, 255, .08);
	color: #fff !important;
}

.rh-hd__link.is-current {
	background: rgba(169, 139, 255, .18);
	color: #fff !important;
}

.rh-hd__has-mega.is-open > .rh-hd__link .rh-hd-ico {
	transform: rotate(180deg);
}

/* ---------- Meniul „Articole” ---------- */

.rh-hd__has-mega {
	position: static;
}

.rh-mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	padding: 0 10px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.rh-hd__has-mega.is-open > .rh-mega {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: none;
	transition: opacity .18s ease, transform .18s ease;
}

.rh-mega__inner {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	max-width: 1140px;
	margin: 12px auto 0;
	overflow: hidden;
	border: 1px solid #ebe8f3;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(10, 6, 24, .28);
	color: var(--rh-ink);
}

.rh-mega__cats {
	margin: 0;
	padding: 12px;
	border-right: 1px solid #f0edf6;
	background: #faf9fd;
	list-style: none;
}

.rh-mega__cats li {
	margin: 0;
	padding: 0;
}

.rh-mega__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 11px 14px;
	border-radius: 12px;
	color: var(--rh-ink) !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.rh-mega__cat .rh-hd-ico {
	width: 16px;
	height: 16px;
	color: #b3abd1;
}

.rh-mega__cat:hover,
.rh-mega__cat.is-active {
	background: #fff;
	color: var(--rh-accent-ink) !important;
	box-shadow: 0 4px 14px rgba(18, 12, 38, .07);
}

.rh-mega__cat.is-active .rh-hd-ico {
	color: var(--rh-accent);
}

.rh-mega__all {
	margin-top: 8px !important;
	padding-top: 8px !important;
	border-top: 1px solid #ebe8f3;
}

.rh-mega__all a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 14px;
	border-radius: 12px;
	color: var(--rh-accent-ink) !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none !important;
}

.rh-mega__all a:hover {
	background: #f1ebff;
}

.rh-mega__all .rh-hd-ico {
	width: 16px;
	height: 16px;
}

.rh-mega__panel {
	display: none;
	padding: 24px;
}

.rh-mega__panel.is-active {
	display: block;
}

.rh-mega__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.rh-mega__title {
	color: var(--rh-ink);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

.rh-mega__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 12px;
	background: #f1ebff;
	color: var(--rh-accent-ink) !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
}

.rh-mega__more .rh-hd-ico {
	width: 16px;
	height: 16px;
}

.rh-mega__more:hover {
	background: #e6dbff;
}

.rh-mega__subs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.rh-mega__subs a {
	padding: 7px 12px;
	border: 1px solid #ebe8f3;
	border-radius: 999px;
	background: #fff;
	color: var(--rh-ink) !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.rh-mega__subs a:hover {
	border-color: #d9c9ff;
	background: #faf7ff;
	color: var(--rh-accent-ink) !important;
}

.rh-mega__label {
	display: block;
	margin-bottom: 10px;
	color: var(--rh-muted);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .4px;
	text-transform: uppercase;
}

.rh-mega__posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.rh-mega__post {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px;
	border: 1px solid #f0edf6;
	border-radius: 12px;
	color: var(--rh-ink) !important;
	text-decoration: none !important;
	transition: border-color .15s ease, background .15s ease;
}

.rh-mega__post:hover {
	border-color: #d9c9ff;
	background: #faf7ff;
}

.rh-mega__thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(135deg, #efe8ff, #e2d6ff);
}

.rh-mega__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rh-mega__ptext {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.rh-mega__ptext strong {
	display: -webkit-box;
	overflow: hidden;
	color: var(--rh-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.rh-mega__ptext small {
	color: var(--rh-muted);
	font-size: 12px;
	font-weight: 600;
}

/* ---------- Dreapta: căutare, mesaje, cont, Adaugă ---------- */

.rh-hd__right {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.rh-hd__icon {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, .08);
	color: #fff !important;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .15s ease;
}

.rh-hd__icon:hover {
	background: rgba(255, 255, 255, .16);
}

.rh-hd__messages .chat-counter-container:not(:empty) {
	position: absolute;
	top: 6px;
	right: 6px;
}

.rh-hd__search-btn,
.rh-hd__burger {
	display: none;
}

/* Căutarea de firme (căutarea rapidă a temei) */
.rh-hd__search {
	position: relative;
	width: 260px;
}

.rh-hd__search .quick-search-instance,
.rh-hd__search form {
	width: 100% !important;
	margin: 0 !important;
}

.rh-hd__search .header-search {
	position: relative;
	width: 100% !important;
	height: 44px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, .12) !important;
	border-radius: 12px !important;
	background: rgba(255, 255, 255, .08) !important;
	transition: background .15s ease, border-color .15s ease;
}

.rh-hd__search .header-search.is-focused,
.rh-hd__search .header-search:focus-within {
	border-color: rgba(169, 139, 255, .7) !important;
	background: rgba(255, 255, 255, .12) !important;
}

.rh-hd__search .header-search > i.mi {
	position: absolute !important;
	top: 50% !important;
	left: 12px !important;
	margin: 0 !important;
	color: #b9b2d4 !important;
	font-size: 20px !important;
	transform: translateY(-50%);
}

.rh-hd__search .header-search input[type="search"] {
	width: 100% !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 14px 0 40px !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600;
}

.rh-hd__search .header-search input[type="search"]::placeholder {
	color: #b9b2d4 !important;
	opacity: 1;
}

/* Rezultatele căutării */
.rh-hd__search .instant-results {
	top: calc(100% + 8px) !important;
	left: 0 !important;
	width: 360px !important;
	max-width: calc(100vw - 20px);
	overflow: hidden;
	border: 1px solid #ebe8f3 !important;
	border-radius: 20px !important;
	background: #fff !important;
	box-shadow: 0 24px 60px rgba(10, 6, 24, .28) !important;
}

.rh-hd__search .instant-results-list {
	padding: 8px !important;
}

.rh-hd__search .instant-results-list li a {
	border-radius: 12px !important;
	color: var(--rh-ink) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
}

.rh-hd__search .instant-results-list li a:hover {
	background: #f7f5fc !important;
}

.rh-hd__search .instant-results-list .ir-cat {
	color: var(--rh-muted) !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .4px;
	text-transform: uppercase;
}

.rh-hd__search .instant-results .view-all-results {
	border-radius: 0 !important;
	background: #f7f5fc !important;
	color: var(--rh-accent-ink) !important;
	font-size: 14px !important;
	font-weight: 800 !important;
}

/* Conectare (neconectat) */
.rh-hd__signin {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 14px;
	border-radius: 12px;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background .15s ease;
}

.rh-hd__signin:hover {
	background: rgba(255, 255, 255, .08);
}

/* Contul (conectat) */
.rh-hd__user {
	position: relative;
}

.rh-hd__user-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	margin: 0;
	padding: 0 10px 0 4px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease;
}

.rh-hd__user-btn:hover,
.rh-hd__user.is-open .rh-hd__user-btn {
	background: rgba(255, 255, 255, .16);
}

.rh-hd__user-btn .rh-hd-ico {
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}

.rh-hd__user.is-open .rh-hd__user-btn .rh-hd-ico {
	transform: rotate(180deg);
}

.rh-hd__avatar {
	display: block;
	width: 36px !important;
	height: 36px !important;
	border-radius: 10px !important;
	object-fit: cover;
}

.rh-hd__user-name {
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rh-hd__dropdown {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	width: 260px;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	border: 1px solid #ebe8f3;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(10, 6, 24, .28);
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.rh-hd__user.is-open .rh-hd__dropdown {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity .18s ease, transform .18s ease;
}

.rh-hd__dropdown-head {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 18px;
	border-bottom: 1px solid #f0edf6;
	background: #faf9fd;
}

.rh-hd__dropdown-head strong {
	color: var(--rh-ink);
	font-size: 15px;
	font-weight: 800;
}

.rh-hd__dropdown-head span {
	overflow: hidden;
	color: var(--rh-muted);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rh-hd__dropdown ul {
	margin: 0;
	padding: 8px;
	list-style: none;
}

.rh-hd__dropdown li {
	margin: 0;
	padding: 0;
}

.rh-hd__dropdown li a {
	display: block;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--rh-ink) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
}

.rh-hd__dropdown li a:hover {
	background: #f7f5fc;
	color: var(--rh-accent-ink) !important;
}

.rh-hd__dropdown li.is-logout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid #f0edf6;
}

.rh-hd__dropdown li.is-logout a {
	color: #a32b1f !important;
}

.rh-hd__dropdown li.is-logout a:hover {
	background: #fff3f1;
}

/* Adaugă firma */
.rh-hd__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border-radius: 12px;
	background: linear-gradient(90deg, #6c1cff, #4b2dff);
	color: #fff !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 10px 24px rgba(108, 28, 255, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}

.rh-hd__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(108, 28, 255, .45);
}

.rh-hd__cta .rh-hd-ico {
	width: 18px;
	height: 18px;
}

/* ---------- Meniul de pe telefon (din dreapta) ---------- */

.rh-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.rh-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.rh-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 6, 24, .55);
	opacity: 0;
	transition: opacity .2s ease;
}

.rh-drawer.is-open .rh-drawer__overlay {
	opacity: 1;
}

.rh-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(380px, 90vw);
	background: #fff;
	box-shadow: -20px 0 60px rgba(10, 6, 24, .3);
	transform: translateX(100%);
	transition: transform .25s ease;
}

.rh-drawer.is-open .rh-drawer__panel {
	transform: none;
}

.rh-drawer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 64px;
	padding: 0 12px 0 16px;
	background: var(--rh-dark);
}

.rh-drawer__top .rh-hd__logo img {
	height: 28px;
}

.rh-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.rh-drawer__user {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	padding: 12px;
	border-radius: 12px;
	background: #f7f5fc;
}

.rh-drawer__user .rh-hd__avatar {
	width: 44px !important;
	height: 44px !important;
	border-radius: 12px !important;
}

.rh-drawer__user div {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.rh-drawer__user strong {
	color: var(--rh-ink);
	font-size: 15px;
	font-weight: 800;
}

.rh-drawer__user span {
	overflow: hidden;
	color: var(--rh-muted);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rh-drawer__cta {
	justify-content: center;
	width: 100%;
	height: 48px;
	margin-bottom: 16px;
	font-size: 15px;
}

.rh-drawer__nav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rh-drawer__nav > li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f0edf6;
}

.rh-drawer__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 14px 4px;
	border: 0;
	background: none;
	color: var(--rh-ink) !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
}

.rh-drawer__link.is-current {
	color: var(--rh-accent-ink) !important;
}

.rh-drawer__toggle .rh-hd-ico {
	color: var(--rh-muted);
	transition: transform .2s ease;
}

.rh-drawer__toggle[aria-expanded="true"] .rh-hd-ico {
	transform: rotate(180deg);
}

.rh-drawer__sub {
	display: none;
	margin: 0 0 12px;
	padding: 6px;
	border-radius: 12px;
	background: #f7f5fc;
	list-style: none;
}

.rh-drawer__toggle[aria-expanded="true"] + .rh-drawer__sub {
	display: block;
}

.rh-drawer__sub li {
	margin: 0;
	padding: 0;
}

.rh-drawer__sub a {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--rh-ink) !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
}

.rh-drawer__sub a:hover {
	background: #fff;
}

.rh-drawer__label {
	display: block;
	margin: 24px 4px 4px;
	color: var(--rh-muted);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .4px;
	text-transform: uppercase;
}

.rh-drawer__nav--account .rh-drawer__link {
	padding: 12px 4px;
	font-size: 15px;
}

.rh-drawer__nav--account .is-logout .rh-drawer__link {
	color: #a32b1f !important;
}

.rh-drawer__auth {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 20px;
}

.rh-drawer__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	border-radius: 12px;
	background: var(--rh-dark);
	color: #fff !important;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none !important;
}

.rh-drawer__btn--soft {
	background: #f1ebff;
	color: var(--rh-accent-ink) !important;
}

html.rh-drawer-open,
html.rh-drawer-open body {
	overflow: hidden;
}

/* ---------- Fereastra de căutare de pe telefon ---------- */

.rh-search-modal .modal-content {
	padding: 20px !important;
	border-radius: 20px !important;
}

.rh-search-modal .header-search {
	border: 1px solid #dcd9e6 !important;
	border-radius: 12px !important;
	background: #faf9fd !important;
}

.rh-search-modal .header-search input[type="search"] {
	height: 48px !important;
	color: var(--rh-ink) !important;
	font-size: 16px !important;
}

/* ---------- Ecrane mai mici ---------- */

@media (max-width: 1360px) {
	.rh-hd__search {
		width: 200px;
	}

	.rh-hd__user-name {
		display: none;
	}
}

/* Între 1181 și 1280px nu încape și câmpul de căutare: rămâne doar butonul cu lupă */
@media (max-width: 1280px) {
	.rh-hd__search {
		display: none;
	}

	.rh-hd__search-btn {
		display: inline-grid;
	}
}

@media (max-width: 1180px) {
	.rh-hd {
		--rh-hd-h: 64px;
	}

	.rh-hd__nav,
	.rh-hd__search,
	.rh-hd__user,
	.rh-hd__signin span,
	.rh-hd__right > .rh-hd__cta {
		display: none;
	}

	.rh-hd__search-btn,
	.rh-hd__burger {
		display: inline-grid;
	}

	.rh-hd__signin {
		width: 44px;
		padding: 0;
		justify-content: center;
		background: rgba(255, 255, 255, .08);
	}

	.rh-hd__right {
		gap: 8px;
	}

	.rh-hd__logo img {
		height: 28px;
	}
}

@media (min-width: 1181px) {
	.rh-drawer {
		display: none;
	}
}

@media (max-width: 600px) {
	.rh-hd {
		top: 0;
	}
}
