/**
 * NewsFactory Header Styles
 *
 * Uses CSS variables output by customizer-colors.php
 * Semantic naming: --nf-{category}-{variant}
 *
 * @package Blanco_Lite
 */

/* ===============================================
   Site Header Wrapper
   =============================================== */

.nf-site-header {
	position: relative;
	z-index: 1000;
	width: 100%;
	background: var(--nf-header-bg);
}

/* ===============================================
   Top Bar
   =============================================== */

.nf-topbar {
	background: var(--nf-header-bg);
	border-bottom: 1px solid var(--nf-header-border);
	font-size: 13px;
	color: var(--nf-header-text-muted);
}

.nf-topbar__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
	padding: 8px 20px;
}

.nf-topbar__entry {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.nf-topbar__welcome {
	color: var(--nf-header-text-muted);
	font-weight: 600;
}

.nf-topbar__newsroom-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0 12px;
	border: 1px solid color-mix(in srgb, var(--nf-header-link-hover, #ff4d5a) 50%, transparent);
	background: color-mix(in srgb, var(--nf-header-link-hover, #ff4d5a) 14%, transparent);
	color: var(--nf-header-text, #fff);
	text-decoration: none !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nf-topbar__newsroom-link:hover,
.nf-topbar__newsroom-link:focus {
	border-color: var(--nf-header-link-hover, #ff4d5a);
	background: color-mix(in srgb, var(--nf-header-link-hover, #ff4d5a) 22%, transparent);
	color: #fff;
	outline: none !important;
}

.nf-topbar__socials {
	display: flex;
	gap: 2px;
}

.nf-topbar__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--nf-header-text-muted);
	text-decoration: none !important;
	transition: color 0.2s ease, background 0.2s ease;
	border-radius: 4px;
}

.nf-topbar__social-link:hover,
.nf-topbar__social-link:focus {
	color: var(--nf-header-link-hover);
	background: rgba(255, 255, 255, 0.1);
	outline: none !important;
}

/* ===============================================
   Branding Area
   =============================================== */

.nf-branding {
	position: relative;
	background-color: var(--nf-header-bg);
	min-height: 100px;
	margin-bottom: -50px; /* Extend background over navbar */
	padding-bottom: 50px; /* Compensate for negative margin */
}

.nf-branding__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	z-index: 0;
}

.nf-branding__overlay {
	position: absolute;
	inset: 0;
	background: #000000;
	pointer-events: none;
	z-index: 1;
}

.nf-branding__container {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
	min-height: 100px;
}

.nf-branding__logo {
	flex: 0 0 auto;
}

.nf-branding__logo .custom-logo-link {
	display: block;
}

.nf-branding__logo .custom-logo {
	max-height: 60px;
	width: auto;
}

.nf-branding__site-link {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	outline: none !important;
}

.nf-branding__site-title {
	font-size: 32px;
	font-weight: 700;
	color: var(--nf-header-text);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.nf-branding__tagline {
	font-size: 13px;
	color: var(--nf-header-text-muted);
	margin-top: 4px;
}

.nf-branding__site-link:hover .nf-branding__site-title,
.nf-branding__site-link:focus .nf-branding__site-title {
	color: var(--nf-header-link-hover);
}

.nf-branding__ad-space {
	position: relative;
	flex: 0 0 auto;
	overflow: hidden;
	border-radius: 4px;
}

/* Header banner ad creator badge - smaller for compact banner */
.nf-branding__ad-space .nf-ad-creator {
	position: absolute;
	bottom: 4px;
	left: 4px;
	top: auto;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 6px;
	font-size: 9px;
	font-weight: 600;
	color: #ffffff;
	border-radius: 10px;
	z-index: 10;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nf-branding__ad-space .nf-ad-creator.nf-agent-pill-link {
	cursor: pointer;
}

.nf-branding__ad-space .nf-ad-creator.nf-agent-pill-link::after {
	content: "↗";
	margin-left: 4px;
	font-size: 0.85em;
	line-height: 1;
	opacity: 0.95;
}

.nf-branding__ad-space .nf-ad-creator.nf-agent-pill-link:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.95);
	outline-offset: 2px;
}

.nf-branding__ad-space .nf-ad-creator__icon {
	font-size: 8px;
	opacity: 0.9;
}

.nf-branding__ad-link {
	display: block;
	width: 100%;
	height: 100%;
	transition: opacity 0.2s ease;
}

.nf-branding__ad-link:hover {
	opacity: 0.9;
}

.nf-branding__ad-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nf-branding__ad-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #05070d;
}

/* ===============================================
   Navigation Bar
   =============================================== */

.nf-navbar {
	position: relative;
	z-index: 10;
	/*background: rgba(30, 41, 59, 0.85);  Semi-transparent to show branding bg */
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--nf-header-border);
}

.nf-navbar__container {
	display: flex;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
}

/* Mobile toggle button */
.nf-navbar__toggle {
	display: none;
	background: none;
	border: none;
	padding: 12px;
	cursor: pointer;
	margin-left: -12px;
}

.nf-navbar__toggle-icon {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 22px;
	height: 16px;
}

.nf-navbar__toggle-icon span {
	display: block;
	height: 2px;
	background: var(--nf-header-text);
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Menu wrapper */
.nf-navbar__menu-wrap {
	flex: 1;
}

.nf-navbar__menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.nf-navbar__menu li {
	position: relative;
	margin: 0;
	padding: 0;
}

.nf-navbar__menu > li > a {
	display: block;
	padding: 16px 18px;
	color: var(--nf-header-text);
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s ease, background 0.2s ease;
}

.nf-navbar__menu > li > a:hover,
.nf-navbar__menu > li > a:focus,
.nf-navbar__menu > li.current-menu-item > a {
	color: var(--nf-header-link-hover);
	background: rgba(255, 255, 255, 0.05);
	outline: none !important;
}

/* Dropdown menus */
.nf-navbar__menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--nf-header-bg-alt);
	border: 1px solid var(--nf-header-border);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	z-index: 100;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nf-navbar__menu li:hover > .sub-menu {
	display: block;
}

.nf-navbar__menu .sub-menu a {
	display: block;
	padding: 10px 18px;
	color: var(--nf-header-text-muted);
	text-decoration: none !important;
	font-size: 13px;
	transition: color 0.2s ease, background 0.2s ease;
}

.nf-navbar__menu .sub-menu a:hover,
.nf-navbar__menu .sub-menu a:focus {
	color: var(--nf-header-link-hover);
	background: rgba(255, 255, 255, 0.05);
}

/* Actions (search + CTA) */
.nf-navbar__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.nf-navbar__search-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	color: var(--nf-header-text-muted);
	cursor: pointer;
	transition: color 0.2s ease;
	border-radius: 4px;
}

.nf-navbar__search-toggle:hover,
.nf-navbar__search-toggle:focus {
	color: var(--nf-header-link-hover);
	outline: none !important;
}

/* Search form overlay */
.nf-navbar__search-form {
	display: none;
	position: absolute;
	top: 100%;
	right: 20px;
	width: 320px;
	background: var(--nf-header-bg-alt);
	border: 1px solid var(--nf-header-border);
	padding: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	z-index: 101;
}

.nf-navbar__search-form.is-active {
	display: block;
}

.nf-navbar__search-form .search-form {
	display: flex;
	gap: 8px;
}

.nf-navbar__search-form input[type="search"],
.nf-navbar__search-form input[type="text"] {
	flex: 1;
	padding: 10px 14px;
	background: var(--nf-header-bg);
	border: 1px solid var(--nf-header-border);
	color: var(--nf-header-text);
	font-size: 14px;
	border-radius: 4px;
}

.nf-navbar__search-form input[type="search"]:focus,
.nf-navbar__search-form input[type="text"]:focus {
	outline: none;
	border-color: var(--nf-header-accent);
}

.nf-navbar__search-form button[type="submit"] {
	padding: 10px 16px;
	background: var(--nf-header-accent);
	border: none;
	color: #ffffff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.nf-navbar__search-form button[type="submit"]:hover {
	background: var(--nf-header-accent-hover);
}

.nf-navbar__search-close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: none;
	border: none;
	color: var(--nf-header-text-muted);
	cursor: pointer;
	padding: 4px;
}

.nf-navbar__search-close:hover {
	color: var(--nf-header-link-hover);
}

/* CTA Button */
.nf-navbar__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary) !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	transition: background 0.2s ease, transform 0.1s ease;
}

.nf-navbar__cta:hover,
.nf-navbar__cta:focus {
	background: var(--nf-accent-primary-hover);
	transform: translateY(-1px);
	outline: none !important;
}

/* ===============================================
   Mobile Responsive
   =============================================== */

@media (max-width: 991px) {
	.nf-navbar__toggle {
		display: flex;
	}

	.nf-navbar__menu-wrap {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--nf-header-bg-alt);
		border-top: 1px solid var(--nf-header-border);
		z-index: 99;
	}

	.nf-navbar__menu-wrap.is-active {
		display: block;
	}

	.nf-navbar__menu {
		flex-direction: column;
		align-items: stretch;
	}

	.nf-navbar__menu > li > a {
		padding: 14px 20px;
		border-bottom: 1px solid var(--nf-header-border);
	}

	.nf-navbar__menu .sub-menu {
		position: static;
		border: none;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.2);
	}

	.nf-navbar__menu .sub-menu a {
		padding-left: 36px;
	}

	.nf-branding__container {
		flex-direction: column;
		text-align: center;
		gap: 16px;
		padding: 16px 20px;
	}

	.nf-branding__ad-space {
		display: none;
	}
}

@media (max-width: 575px) {
	.nf-topbar__container {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 6px 16px;
	}

	.nf-topbar__entry {
		justify-content: flex-start;
	}

	.nf-topbar__welcome {
		font-size: 12px;
	}

	.nf-topbar__newsroom-link {
		min-height: 28px;
		font-size: 10px;
		padding: 0 10px;
	}

	.nf-branding__site-title {
		font-size: 24px;
	}

	.nf-navbar__container {
		padding: 0 16px;
	}

	.nf-navbar__cta {
		padding: 8px 14px;
		font-size: 13px;
	}

	.nf-navbar__search-form {
		left: 16px;
		right: 16px;
		width: auto;
	}
}

/* ===============================================
   Hide old theme header styles (override parent)
   =============================================== */

#header-wrapper > #header,
#header-wrapper > #logo-wrapper,
#header-wrapper > #menu-wrapper {
	display: none !important;
}

/* ===============================================
   Ticker Bars (Categories + Breaking News)
   =============================================== */

.nf-ticker-wrapper {
	background: var(--nf-header-bg);
}

.nf-ticker-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nf-ticker-bar--categories {
	background: rgba(255, 255, 255, 0.03);
}

.nf-ticker-bar--breaking {
	background: rgba(0, 0, 0, 0.15);
}

.nf-ticker-bar__container {
	display: flex;
	align-items: center;
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Categories bar uses its own height variable */
.nf-ticker-bar--categories .nf-ticker-bar__container {
	min-height: var(--nf-ticker-categories-height, 42px);
}

/* Breaking news bar uses its own height variable */
.nf-ticker-bar--breaking .nf-ticker-bar__container {
	min-height: var(--nf-ticker-breaking-height, 42px);
}

.nf-ticker-bar__label {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--nf-button-alt);
	color: var(--nf-button-alt-text);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-right: 16px;
	white-space: nowrap;
}

/* Categories label sizing */
.nf-ticker-bar--categories .nf-ticker-bar__label {
	font-size: var(--nf-ticker-cat-label-font, 11px);
	padding: var(--nf-ticker-cat-label-padding, 6px) 14px;
}

/* Breaking label sizing */
.nf-ticker-bar__label--breaking {
	background: var(--nf-accent-primary);
	gap: 10px;
	font-size: var(--nf-ticker-break-label-font, 11px);
	padding: var(--nf-ticker-break-label-padding, 6px) 14px;
}

/* Pulsing red dot */
.nf-ticker-bar__pulse {
	width: 8px;
	height: 8px;
	background: #ffffff;
	border-radius: 50%;
	animation: nf-pulse 1.5s ease-in-out infinite;
}

@keyframes nf-pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.4;
		transform: scale(0.85);
	}
}

.nf-ticker-bar__content {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow: hidden;
	flex: 1;
}

/* Categories styling */
.nf-ticker-bar__category {
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	padding: 5px 12px;
	white-space: nowrap;
	transition: all 0.2s ease;
	border-radius: 4px;
	background: var(--cat-color, #4a5568);
}

.nf-ticker-bar__category:hover {
	color: #ffffff;
	opacity: 0.85;
	transform: translateY(-1px);
}

/* Breaking news scroll container */
.nf-ticker-bar__scroll {
	position: relative;
	overflow: hidden;
	mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 3%,
		black 97%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 3%,
		black 97%,
		transparent 100%
	);
}

.nf-ticker-bar__track {
	display: flex;
	align-items: center;
	gap: 8px;
	animation: nf-ticker-scroll 20s linear infinite;
	width: max-content;
}

.nf-ticker-bar__track:hover {
	animation-play-state: paused;
}

@keyframes nf-ticker-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

.nf-ticker-bar__item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--nf-header-text);
	text-decoration: none !important;
	padding: 4px 16px 4px 4px;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.nf-ticker-bar__item:hover {
	color: var(--nf-header-link-hover);
}

.nf-ticker-bar__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	background: var(--nf-accent-primary);
	color: var(--nf-text-primary);
	font-size: 11px;
	font-weight: 700;
	border-radius: 3px;
}

.nf-ticker-bar__title {
	font-size: 13px;
}

/* Responsive */
@media (max-width: 991px) {
	.nf-ticker-bar__container {
		padding: 0 16px;
	}

	.nf-ticker-bar__label {
		padding: 5px 10px;
		font-size: 10px;
		margin-right: 12px;
	}

	.nf-ticker-bar__category {
		padding: 5px 8px;
		font-size: 12px;
	}
}

@media (max-width: 767px) {
	.nf-ticker-bar--categories .nf-ticker-bar__content {
		overflow-x: auto;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.nf-ticker-bar--categories .nf-ticker-bar__content::-webkit-scrollbar {
		display: none;
	}

	.nf-ticker-bar__title {
		font-size: 12px;
	}
}

@media (max-width: 575px) {
	.nf-ticker-bar__container {
		min-height: 38px;
	}

	.nf-ticker-bar__label {
		padding: 4px 8px;
		font-size: 9px;
		margin-right: 10px;
	}
}

