/**
 * Header bubble nav — inspired by bbso.ro
 */

:root {
	--noul-header-bubble-width: 70vw;
	--noul-layout-gutter: calc((100vw - var(--noul-header-bubble-width)) / 2);
	--noul-card-top-spacing: 3.5rem;
	--noul-header-bubble-bg: rgba(255, 255, 255, 0.52);
	--noul-header-bubble-border: rgba(255, 255, 255, 0.45);
	--noul-header-bubble-radius: 6px;
	--noul-header-sticky-top: 18px;
	--noul-page-bg: #2b2f36;
	--noul-gold-text: #e2c56a;
	--noul-gold-heading: #f0d57a;
	--noul-gold-link: #e8c547;
	--noul-gold-link-hover: #ffe08a;
	--noul-gold-muted: #c9a962;
	--noul-font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
	--ast-body-font-family: var(--noul-font-family);
	--ast-heading-font-family: var(--noul-font-family);
}

body {
	--ast-global-color-0: var(--noul-gold-link);
	--ast-global-color-1: var(--noul-gold-link-hover);
	--ast-global-color-2: var(--noul-gold-heading);
	--ast-global-color-3: var(--noul-gold-text);
	--ast-body-font-family: var(--noul-font-family);
	--ast-heading-font-family: var(--noul-font-family);
	font-family: var(--noul-font-family) !important;
}

/* Montserrat everywhere — inherit from body, keep icon fonts intact */
body :where(
	h1, h2, h3, h4, h5, h6,
	p, a, span, li, label, small, strong, em,
	input, textarea, select, button,
	td, th, blockquote, figcaption,
	.entry-content,
	.entry-title,
	.site-title,
	.site-description,
	.menu-link,
	.ast-footer-copyright,
	.wp-block-button__link,
	.noul-welcome-card,
	.noul-welcome-card *
) {
	font-family: inherit !important;
}

/* Dark page background — all pages */
html,
body {
	background-color: var(--noul-page-bg) !important;
}

#page,
.site,
#content,
.site-content,
.ast-separate-container,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .comment-respond,
.ast-separate-container .ast-comment-list li,
.ast-plain-container,
.ast-page-builder-template .site-content > .ast-container,
.error404,
.search-no-results {
	background-color: var(--noul-page-bg) !important;
}

.entry-content,
.entry-header,
.ast-single-entry-banner,
.ast-archive-description {
	background-color: transparent !important;
}

body,
body .entry-content,
body .entry-title,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body li,
body .entry-content :where(h1, h2, h3, h4, h5, h6),
body .wp-block-heading,
body .site-description,
body .ast-archive-description * {
	color: var(--noul-gold-text) !important;
}

body h1,
body h2,
body h3,
body .entry-title,
body .entry-content :where(h1, h2, h3),
body .wp-block-heading {
	color: var(--noul-gold-heading) !important;
}

#content a:not(.menu-link),
.entry-content a:not(.menu-link),
.site-content a:not(.menu-link),
body a:not(.menu-link):not(.wp-block-button__link):not(.site-title):not(.custom-logo-link) {
	color: var(--noul-gold-link) !important;
}

#content a:not(.menu-link):hover,
.entry-content a:not(.menu-link):hover,
.site-content a:not(.menu-link):hover,
body a:not(.menu-link):not(.wp-block-button__link):not(.site-title):not(.custom-logo-link):hover,
#content a:not(.menu-link):focus-visible,
.entry-content a:not(.menu-link):focus-visible {
	color: var(--noul-gold-link-hover) !important;
}

body .wp-block-button__link {
	background-color: var(--noul-gold-link) !important;
	color: #2b2f36 !important;
}

body .wp-block-button__link:hover {
	background-color: var(--noul-gold-link-hover) !important;
	color: #2b2f36 !important;
}

body .menu-link,
body .ast-site-identity .site-title a {
	color: #1f2937 !important;
}

/* Sticky wrapper, no full-width bar */
#masthead {
	position: sticky;
	top: var(--noul-header-sticky-top);
	z-index: 999;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

#masthead .main-header-bar,
#masthead .ast-primary-header-bar,
#masthead .ast-main-header-wrap,
#masthead .site-primary-header-wrap,
#masthead .ast-mobile-header-wrap,
#masthead .ast-primary-header-bar {
	border: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

#masthead .site-primary-header-wrap {
	min-height: 0 !important;
}

/* Bubble container — desktop */
#masthead .site-primary-header-wrap.ast-container {
	width: var(--noul-header-bubble-width) !important;
	max-width: var(--noul-header-bubble-width) !important;
	margin-left: var(--noul-layout-gutter) !important;
	margin-right: auto !important;
	padding: 0.65rem 1.75rem !important;
	background: var(--noul-header-bubble-bg) !important;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--noul-header-bubble-border);
	border-radius: var(--noul-header-bubble-radius);
	box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08);
	transition:
		background 0.35s ease,
		box-shadow 0.35s ease,
		border-color 0.35s ease,
		transform 0.35s ease;
	transform: scale(1);
	transform-origin: center top;
}

#masthead .site-primary-header-wrap.ast-container:hover {
	transform: scale(1.02);
}

/* Keep bubble transparent on scroll — override Astra sticky styles */
#masthead.is-scrolled .site-primary-header-wrap.ast-container,
#masthead.ast-sticky-shrunk .site-primary-header-wrap.ast-container,
#masthead.ast-primary-sticky-enabled .site-primary-header-wrap.ast-container,
.ast-primary-sticky-header-active #masthead .site-primary-header-wrap.ast-container {
	background: var(--noul-header-bubble-bg) !important;
	border-color: var(--noul-header-bubble-border) !important;
	box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08) !important;
}

#masthead.is-scrolled,
#masthead.ast-sticky-shrunk,
.ast-primary-sticky-header-active #masthead {
	background: transparent !important;
}

#masthead.is-scrolled .main-header-bar,
#masthead.is-scrolled .ast-primary-header-bar,
#masthead.is-scrolled .ast-main-header-wrap,
#masthead.is-scrolled .site-primary-header-wrap,
.ast-primary-sticky-header-active #masthead .main-header-bar,
.ast-primary-sticky-header-active #masthead .ast-primary-header-bar {
	background: transparent !important;
	box-shadow: none !important;
}

/* Layout inside bubble */
#masthead .site-header-primary-section-left,
#masthead .site-header-primary-section-right {
	background: transparent !important;
}

#masthead .ast-builder-grid-row {
	align-items: center;
}

#masthead .main-header-menu > .menu-item {
	line-height: 1.2 !important;
}

/* Hide home + sample from fallback menus */
.main-header-menu .menu-item-home,
.main-header-menu .page_item.page-item-home,
.main-header-menu .page-item-2 {
	display: none !important;
}

.main-header-menu > .menu-item > .menu-link {
	transition: color 0.25s ease, opacity 0.25s ease;
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item > .menu-link:focus-visible {
	opacity: 0.75;
}

.ast-site-identity .site-title a {
	text-decoration: none;
	transition: opacity 0.25s ease;
}

.ast-site-identity .site-title a:hover,
.ast-site-identity .site-title a:focus-visible {
	opacity: 0.75;
}

.ast-footer-copyright a[href*="wpastra.com"],
.ast-footer-copyright a[href*="astra"] {
	display: none !important;
}

.ast-footer-copyright p {
	margin: 0;
}

/* Footer — same dark background as page */
.site-footer,
.site-footer .site-footer-wrap,
.site-below-footer-wrap,
.site-below-footer-wrap[data-section="section-below-footer-builder"],
.ast-small-footer,
.ast-small-footer-wrap,
.ast-footer-overlay,
.ast-footer-copyright,
.ast-footer-copyright.site-footer-focus-item {
	background-color: var(--noul-page-bg) !important;
	border-top: none !important;
	box-shadow: none !important;
}

.site-footer,
.site-below-footer-wrap,
.ast-footer-copyright,
.ast-footer-copyright * {
	color: var(--noul-gold-muted) !important;
}

/* Mobile bubble */
@media (max-width: 921px) {
	:root {
		--noul-header-bubble-width: 92vw;
		--noul-header-sticky-top: 10px;
	}

	#masthead .ast-mobile-header-wrap .ast-primary-header-bar,
	#masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row-container {
		width: var(--noul-header-bubble-width) !important;
		max-width: var(--noul-header-bubble-width) !important;
		margin-left: var(--noul-layout-gutter) !important;
		margin-right: auto !important;
		padding: 0.5rem 1rem !important;
		background: var(--noul-header-bubble-bg) !important;
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
		border: 1px solid var(--noul-header-bubble-border);
		border-radius: var(--noul-header-bubble-radius);
		box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08);
		transition:
			background 0.35s ease,
			box-shadow 0.35s ease,
			border-color 0.35s ease,
			transform 0.35s ease;
		transform: scale(1);
		transform-origin: center top;
	}

	#masthead .ast-mobile-header-wrap .ast-primary-header-bar:hover,
	#masthead .ast-mobile-header-wrap .ast-primary-header-bar:hover .ast-builder-grid-row-container {
		transform: scale(1.02);
	}

	#masthead.is-scrolled .ast-mobile-header-wrap .ast-primary-header-bar,
	#masthead.is-scrolled .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row-container,
	.ast-primary-sticky-header-active #masthead .ast-mobile-header-wrap .ast-primary-header-bar,
	.ast-primary-sticky-header-active #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row-container {
		background: var(--noul-header-bubble-bg) !important;
		border-color: var(--noul-header-bubble-border) !important;
		box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08) !important;
	}

	.ast-mobile-header-content .main-header-menu > .menu-item > .menu-link:hover {
		opacity: 0.75;
	}
}
