/* ==========================================================================
   NoirBite — free plugins edition
   Loaded after noirbite.css (the design system from the demo's Site Settings).
   Styles what replaces Elementor Pro: the Header & Footer Builder (UAE)
   header, menu and posts list, Contact Form 7, and the theme's own blog,
   archive, search and 404 pages.
   ========================================================================== */

/* ============================================== 1. STICKY HEADER ====== */
/* Pro's sticky container, done with CSS; noirbite.js adds .nb-scrolled.
   UAE sets `.ehf-header #masthead { position: relative }`, so these selectors
   must outrank it; otherwise `top` just pushes the header down over the hero. */
body.ehf-header #masthead,
body #masthead {
	position: sticky;
	top: 0;
	z-index: 999;
}
body.admin-bar.ehf-header #masthead,
body.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar.ehf-header #masthead, body.admin-bar #masthead { top: 46px; } }
@media (max-width: 600px) { body.admin-bar.ehf-header #masthead, body.admin-bar #masthead { top: 0; } }

#masthead .nb-header {
	background-color: transparent;
	transition: background-color .35s ease, box-shadow .35s ease;
}
#masthead.nb-scrolled .nb-header {
	background-color: rgba(8, 10, 13, .92) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 1px 0 var(--nb-border);
}

/* ============================================ 2. HEADER MENU (UAE) ====== */
/* Desktop only: below 1025px the plugin decides whether the panel shows. */
@media (min-width: 1025px) {
	.nb-nav { flex-shrink: 0; }
	.nb-nav .hfe-nav-menu-layout { flex-direction: row; width: auto; }
	.nb-nav ul.hfe-nav-menu {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		gap: 26px;
		width: auto;
	}
	.nb-nav ul.hfe-nav-menu > li { flex: 0 0 auto; margin: 0 !important; }
	.nb-nav ul.hfe-nav-menu::before,
	.nb-nav ul.hfe-nav-menu::after { display: none; }
}

.nb-nav .hfe-nav-menu { list-style: none; margin: 0; padding: 0; }
.nb-nav .hfe-nav-menu li { margin: 0; position: relative; }
.nb-nav .hfe-nav-menu a.hfe-menu-item {
	position: relative;
	padding: 10px 0;
	color: var(--nb-heading);
	font-family: "DM Sans", sans-serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .3px;
	text-decoration: none;
	transition: color .25s ease;
}
.nb-nav .hfe-nav-menu > li > a.hfe-menu-item::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 2px;
	width: 100%;
	height: 2px;
	background: var(--nb-gold);
	opacity: 0;
	transition: opacity .25s ease;
}
.nb-nav .hfe-nav-menu a.hfe-menu-item:hover,
.nb-nav .hfe-nav-menu .current-menu-item > a.hfe-menu-item {
	color: var(--nb-gold);
}
.nb-nav .hfe-nav-menu > li > a.hfe-menu-item:hover::after,
.nb-nav .hfe-nav-menu > .current-menu-item > a.hfe-menu-item::after {
	opacity: 1;
}

.nb-header .elementor-widget-button .elementor-button { white-space: nowrap; }

/* Linked headings (the NoirBite wordmark) keep their own colour on pages the
   theme draws, where Elementor does not load its heading styles. */
.elementor-widget-heading .elementor-heading-title a { color: inherit; font-size: inherit; line-height: inherit; }

/* ======================================= 2b. MOBILE MENU (UAE flyout) ====== */
/* Below desktop the demo opened a full-screen menu popup; the flyout does the same job. */
.nb-mobile-nav .hfe-nav-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	min-height: 46px;
	margin-left: auto;
	padding: 0;
	color: var(--nb-heading);
	background: transparent;
	border: 0;
	cursor: pointer;
}
.nb-mobile-nav .hfe-nav-menu__toggle:hover,
.nb-mobile-nav .hfe-nav-menu__toggle:focus-visible { color: var(--nb-gold); }
.nb-mobile-nav .hfe-nav-menu-icon,
.nb-mobile-nav .hfe-nav-menu-icon i { color: inherit; font-size: 24px; }
.nb-mobile-nav .hfe-nav-menu-icon svg { width: 24px; height: 24px; fill: currentColor; }

.nb-mobile-nav .hfe-flyout-overlay { background: rgba(8, 10, 13, .72); }
.nb-mobile-nav .hfe-flyout-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100%;
	padding: 88px 24px 48px !important;
	background: var(--nb-bg) !important;
	box-shadow: -1px 0 0 var(--nb-border);
}
.nb-mobile-nav .hfe-flyout-content .hfe-nav-menu {
	display: flex;
	flex-direction: column;
	align-items: center;
	list-style: none;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	max-width: 340px;
	background: transparent !important;
}
.nb-mobile-nav .hfe-flyout-content .hfe-nav-menu li { width: 100%; margin: 0 !important; text-align: center; }
.nb-mobile-nav .hfe-flyout-content a.hfe-menu-item {
	justify-content: center;
	min-height: 46px;
	padding: 12px 0 !important;
	color: var(--nb-heading) !important;
	background: transparent !important;
	font-family: "DM Sans", sans-serif;
	font-size: 22px;
	font-weight: 500;
	text-decoration: none;
}
.nb-mobile-nav .hfe-flyout-content a.hfe-menu-item:hover,
.nb-mobile-nav .hfe-flyout-content .current-menu-item > a.hfe-menu-item { color: var(--nb-gold) !important; }
.nb-mobile-nav .hfe-flyout-close {
	position: absolute;
	top: 18px;
	right: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	color: var(--nb-heading);
	cursor: pointer;
}
.nb-mobile-nav .hfe-flyout-close:hover { color: var(--nb-gold); }
@media (max-width: 420px) {
	.nb-mobile-nav .hfe-flyout-wrapper .hfe-side { width: 100vw !important; }
}

/* Desktop menu toggle (not used: the desktop menu has no small-screen mode). */
.nb-nav .hfe-nav-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	min-height: 46px;
	padding: 0;
	color: var(--nb-heading);
	background: transparent;
	border: 0;
	cursor: pointer;
}
.nb-nav .hfe-nav-menu__toggle:hover,
.nb-nav .hfe-nav-menu__toggle:focus-visible { color: var(--nb-gold); }
.nb-nav .hfe-nav-menu-icon,
.nb-nav .hfe-nav-menu-icon svg { color: inherit; fill: currentColor; }

/* Footer menu: a plain vertical list, spaced like the Pro menu. */
.nb-footer-nav .hfe-nav-menu { list-style: none; margin: 0; padding: 0; }
.nb-footer-nav .hfe-nav-menu li { margin: 0 !important; }
.nb-footer-nav .hfe-nav-menu a.hfe-menu-item {
	display: flex;
	align-items: center;
	padding: 8px 20px !important;
	color: var(--nb-body);
	font-family: Inter, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	text-decoration: none;
	background: transparent !important;
	transition: color .25s ease;
}
@media (max-width: 1024px) {
	.nb-footer-nav .hfe-nav-menu a.hfe-menu-item { min-height: 44px; }
}
.nb-footer-nav .hfe-nav-menu a.hfe-menu-item:hover,
.nb-footer-nav .hfe-nav-menu .current-menu-item > a.hfe-menu-item { color: var(--nb-gold); }
.nb-footer-nav .hfe-nav-menu__toggle { display: none !important; }

/* ================================================ 3. CONTACT FORM 7 ====== */
/* Sized like the Pro Form widget: 16px between rows, 10px between columns,
   labels sitting right on their 47px fields, a full-width 48px button. */
.nb-form .wpcf7-form {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 10px;
}
.nb-form .nb-field { display: flex; flex-direction: column; width: 100%; }
.nb-form .nb-field--half { width: calc(50% - 5px); }
@media (max-width: 767px) { .nb-form .nb-field--half { width: 100%; } }
/* CF7 wraps fields in <p> and turns line breaks into <br>. */
.nb-form .nb-field p { margin: 0; }
.nb-form .nb-field br { display: none; }

.nb-form label {
	display: block;
	margin: 0;
	color: var(--nb-body);
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 14px;
}
.nb-form .wpcf7-form-control-wrap { display: block; width: 100%; }
.nb-form input[type="text"],
.nb-form input[type="email"],
.nb-form input[type="tel"],
.nb-form input[type="date"],
.nb-form select,
.nb-form textarea {
	width: 100%;
	height: 47px;
	padding: 6px 16px;
	background-color: var(--nb-surface);
	color: var(--nb-heading);
	border: 1px solid var(--nb-border);
	border-radius: 8px;
	font-family: Inter, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	transition: border-color .2s ease;
	color-scheme: dark;
}
.nb-form textarea { height: auto; min-height: 126px; padding-top: 10px; resize: vertical; }
.nb-form input::placeholder,
.nb-form textarea::placeholder { color: #7d838b; opacity: 1; }
.nb-form input:focus,
.nb-form select:focus,
.nb-form textarea:focus { border-color: var(--nb-gold); outline: none; }
/* A dropdown still on its prompt ("Choose a time") looks like a placeholder. */
.nb-form select:has(option[value=""]:checked) { color: #7d838b; }
.nb-form select option { color: var(--nb-heading); background: var(--nb-surface); }
.nb-form select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #7d838b 50%), linear-gradient(135deg, #7d838b 50%, transparent 50%);
	background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 42px;
}

.nb-form .nb-field--consent { color: var(--nb-body); font-size: 14px; line-height: 1.6; }
.nb-form .wpcf7-acceptance label { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-family: Inter, sans-serif; font-weight: 400; }
.nb-form .wpcf7-acceptance input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--nb-gold); flex: 0 0 auto; }

.nb-form .wpcf7-submit {
	width: 100%;
	min-height: 48px;
	padding: 16px 32px;
	background-color: var(--nb-gold);
	color: var(--nb-bg);
	border: 0;
	border-radius: 8px;
	font-family: "DM Sans", sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 16px;
	cursor: pointer;
	transition: background-color .25s ease;
}
.nb-form .wpcf7-submit:hover,
.nb-form .wpcf7-submit:focus-visible { background-color: var(--nb-ember); }
.nb-form .nb-field--submit { position: relative; }
/* CF7's spinner sits over the button's right end instead of pushing it. */
.nb-form .wpcf7-spinner { position: absolute; right: 16px; top: 50%; margin: -12px 0 0; }

.nb-form .wpcf7-not-valid-tip { margin-top: 6px; color: var(--nb-ember); font-size: 13px; }
.nb-form .wpcf7-response-output {
	width: 100%;
	margin: 4px 0 0 !important;
	padding: 14px 16px !important;
	border: 1px solid var(--nb-border) !important;
	border-radius: 8px;
	color: var(--nb-heading);
	font-size: 15px;
}
.nb-form form.sent .wpcf7-response-output { border-color: var(--nb-success) !important; background: rgba(67, 197, 158, .08); }
.nb-form form.invalid .wpcf7-response-output,
.nb-form form.failed .wpcf7-response-output { border-color: var(--nb-ember) !important; background: rgba(255, 107, 53, .08); }

/* Footer newsletter: smaller label, field above a full-width button. */
.nb-form--newsletter .wpcf7-form { gap: 12px; }
.nb-form--newsletter label { font-size: 13px; line-height: 13px; }

/* ================================================ 4. JOURNAL LIST (UAE) === */
/* Same card as the Pro Posts widget: photo, title, date, excerpt, link. */
.nb-posts .hfe-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--nb-surface) !important;
	border: 1px solid var(--nb-border) !important;
	border-radius: 16px;
	transition: transform .35s ease, border-color .35s ease;
}
.nb-posts .hfe-post-card:hover { transform: translateY(-4px); border-color: #3a434e; }
.nb-posts .hfe-post-image { margin: 0; overflow: hidden; }
.nb-posts .hfe-post-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	height: auto;
	object-fit: cover;
	border-radius: 0;
	transition: transform .6s ease;
}
.nb-posts .hfe-post-card:hover .hfe-post-image img { transform: scale(1.05); }
.nb-posts .hfe-post-content { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 20px 22px 24px !important; }
.nb-posts .hfe-post-title { order: 1; margin: 0 0 12px !important; font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 600; line-height: 1.35; }
.nb-posts .hfe-post-title a { color: var(--nb-heading) !important; text-decoration: none; }
.nb-posts .hfe-post-title a:hover { color: var(--nb-gold) !important; }
.nb-posts .hfe-post-meta { order: 2; margin: 0 0 12px !important; color: #7d838b !important; font-family: "DM Sans", sans-serif; font-size: 12px; }
.nb-posts .hfe-post-excerpt { order: 3; margin: 0 0 10px !important; color: var(--nb-body) !important; font-size: 14px; line-height: 21px; }
.nb-posts .hfe-read-more {
	order: 4;
	margin-top: auto;
	display: inline-block;
	padding: 10px 0;
	color: var(--nb-gold) !important;
	font-family: "DM Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.nb-posts .hfe-read-more:hover { color: var(--nb-ember); }

/* ================================================== 5. ARTICLE PAGES ====== */
.nb-post-info .nb-post-cats {
	margin: 0;
	text-align: center;
	font-family: "DM Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.nb-post-info .nb-post-cats a { color: var(--nb-gold); text-decoration: none; }
.nb-post-info .nb-post-cats a:hover { color: var(--nb-ember); }
.nb-post-info .nb-post-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
	color: var(--nb-body);
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
}
.nb-post-meta__sep { width: 1px; height: 14px; background: var(--nb-border); }

.nb-author {
	background: var(--nb-surface);
	border: 1px solid var(--nb-border);
	border-radius: 16px;
	padding: 28px;
}
.nb-author__name { margin: 0 0 6px; color: var(--nb-heading); font-family: "Space Grotesk", sans-serif; font-size: 20px; font-weight: 600; }
.nb-author__bio { margin: 0; color: var(--nb-body); font-size: 16px; line-height: 1.7; }

.nb-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 28px;
	padding-top: 26px;
	border-top: 1px solid var(--nb-border);
}
.nb-postnav a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.nb-postnav__next { text-align: right; }
.nb-postnav__label { color: #7d838b; font-family: "DM Sans", sans-serif; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }
.nb-postnav__title { color: var(--nb-heading); font-family: "Space Grotesk", sans-serif; font-size: 16px; line-height: 1.4; transition: color .25s ease; }
.nb-postnav a:hover .nb-postnav__title { color: var(--nb-gold); }
@media (max-width: 600px) {
	.nb-postnav { grid-template-columns: 1fr; }
	.nb-postnav__next { text-align: left; }
}

/* ============================== 6. THEME PAGES: BLOG, ARCHIVE, SEARCH, 404 = */
body.blog .site-main,
body.archive .site-main,
body.search .site-main,
body.error404 .site-main,
body.single-post:not(.elementor-page) .site-main {
	max-width: var(--nb-maxw);
	margin: 0 auto;
	padding: 72px 24px 96px;
}
body.single-post:not(.elementor-page) .site-main { max-width: calc(var(--nb-narrow) + 48px); }

.site-main .page-header { margin: 0 0 40px; text-align: center; }
.site-main .page-header .entry-title {
	margin: 0;
	color: var(--nb-heading);
	font-family: "Space Grotesk", sans-serif;
	font-size: 52px;
	font-weight: 600;
	line-height: 1.15;
}
.site-main .page-header .entry-title span { color: var(--nb-gold); }
.site-main .archive-description { max-width: var(--nb-narrow); margin: 14px auto 0; color: var(--nb-body); }
@media (max-width: 1024px) { .site-main .page-header .entry-title { font-size: 42px; } }
@media (max-width: 767px) {
	.site-main .page-header .entry-title { font-size: 34px; }
	body.blog .site-main, body.archive .site-main, body.search .site-main, body.error404 .site-main { padding: 48px 16px 72px; }
}

/* Lists of posts become the same cards as the journal. */
body.blog .page-content,
body.archive .page-content,
body.search .page-content {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
@media (max-width: 1024px) { body.blog .page-content, body.archive .page-content, body.search .page-content { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { body.blog .page-content, body.archive .page-content, body.search .page-content { grid-template-columns: 1fr; } }
body.blog .page-content > p,
body.search .page-content > p { grid-column: 1 / -1; text-align: center; }

.site-main .page-content article.post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin: 0;
	background: var(--nb-surface);
	border: 1px solid var(--nb-border);
	border-radius: 16px;
	transition: transform .35s ease, border-color .35s ease;
}
.site-main .page-content article.post:hover { transform: translateY(-4px); border-color: #3a434e; }
.site-main .page-content article.post > a { order: 1; display: block; overflow: hidden; }
.site-main .page-content article.post > a img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; border-radius: 0; }
.site-main .page-content article.post .entry-title { order: 2; margin: 20px 22px 10px; font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 600; line-height: 1.35; }
.site-main .page-content article.post .entry-title a { color: var(--nb-heading); text-decoration: none; }
.site-main .page-content article.post .entry-title a:hover { color: var(--nb-gold); }
.site-main .page-content article.post p { order: 3; margin: 0 22px 24px; color: var(--nb-body); font-size: 14px; line-height: 1.7; }

.site-main .pagination {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 44px;
}
.site-main .pagination a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--nb-border);
	border-radius: 8px;
	color: var(--nb-body);
	font-family: "DM Sans", sans-serif;
	text-decoration: none;
	transition: border-color .25s ease, color .25s ease;
}
.site-main .pagination a:hover { border-color: var(--nb-gold); color: var(--nb-gold); }

/* 404: the big gold numeral of the Pro template. */
body.error404 .site-main { text-align: center; min-height: 60vh; }
body.error404 .page-header .entry-title::before {
	content: "404";
	display: block;
	margin-bottom: 18px;
	color: var(--nb-gold);
	font-size: 150px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -2px;
}
@media (max-width: 767px) { body.error404 .page-header .entry-title::before { font-size: 96px; } }
body.error404 .page-content p { color: var(--nb-body); }
body.error404 .page-content::after {
	content: "";
	display: block;
}

/* Articles written later without Elementor use the theme's single view. */
body.single-post:not(.elementor-page) .page-header { text-align: left; }
body.single-post:not(.elementor-page) .page-content h2 { margin: 40px 0 14px; color: var(--nb-heading); font-family: "Space Grotesk", sans-serif; font-size: 32px; line-height: 1.25; }
body.single-post:not(.elementor-page) .page-content h3 { margin: 32px 0 12px; color: var(--nb-heading); font-family: "Space Grotesk", sans-serif; font-size: 24px; }
body.single-post:not(.elementor-page) .page-content p,
body.single-post:not(.elementor-page) .page-content li { color: var(--nb-body); font-size: 18px; line-height: 1.75; }
body.single-post:not(.elementor-page) .page-content a { color: var(--nb-gold); text-underline-offset: 3px; }
body.single-post:not(.elementor-page) .page-content img { border-radius: 16px; height: auto; }
body.single-post:not(.elementor-page) .post-tags { margin-top: 28px; color: #7d838b; font-size: 14px; }

/* The theme's search form, where it appears. */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1;
	min-height: 50px;
	padding: 0 16px;
	background: var(--nb-surface);
	color: var(--nb-heading);
	border: 1px solid var(--nb-border);
	border-radius: 8px;
}
.search-form input[type="search"]:focus { border-color: var(--nb-gold); outline: none; }
.search-form button,
.search-form input[type="submit"] {
	min-height: 50px;
	padding: 0 22px;
	background: var(--nb-gold);
	color: var(--nb-bg);
	border: 0;
	border-radius: 8px;
	font-family: "DM Sans", sans-serif;
	font-weight: 600;
	cursor: pointer;
}
