/*
 * Egypt Gate Child: three-level header and breaking-news strip.
 *
 * Markup comes from inc/header.php. Foxiz's own navbar, mobile header and
 * sticky holder are reused; Foxiz switches between navbar (desktop) and
 * mobile header at 1024px, and the same breakpoint is used here.
 */

.egc-header {
	background: var(--egc-bg);
}

/* Level 1: utility bar */
.egc-utility {
	border-block-end: 1px solid var(--egc-line);
	background: var(--egc-bg-soft);
	color: var(--egc-muted);
	font-size: 0.8125rem;
}

.egc-utility__inner {
	display: flex;
	align-items: center;
	gap: var(--egc-space-4);
	min-block-size: 36px;
}

.egc-utility__menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--egc-space-1) var(--egc-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.egc-utility__menu a {
	color: var(--egc-muted);
	text-decoration: none;
}

.egc-utility__menu a:hover {
	color: var(--egc-red);
}

.egc-utility__social {
	margin-inline-start: auto;
}

/* Level 2: brand header */
.egc-brand {
	border-block-end: 1px solid var(--egc-line);
}

.egc-brand__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: var(--egc-space-4);
	padding-block: var(--egc-space-4);
}

.egc-brand__start {
	justify-self: start;
	color: var(--egc-muted);
}

.egc-brand__tagline {
	margin: 0;
	font-size: 0.9375rem;
}

.egc-brand__logo {
	display: flex;
	justify-content: center;
}

.egc-brand__end {
	justify-self: end;
}

.egc-brand .logo-wrap img {
	inline-size: auto;
	max-block-size: 72px;
}

.egc-brand .is-text-logo .logo-title {
	margin: 0;
	font-size: var(--egc-h1);
	font-weight: 800;
	line-height: 1.3;
}

.egc-brand .is-text-logo .logo-title a {
	color: var(--egc-ink);
	text-decoration: none;
}

/* Editor-in-chief credential */
.egc-eic {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-inline-start: var(--egc-space-3);
	border-inline-start: 3px solid var(--egc-red);
	overflow-wrap: anywhere;
}

.egc-eic__label {
	color: var(--egc-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

.egc-eic__name {
	color: var(--egc-ink);
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.5;
	text-decoration: none;
}

a.egc-eic__name:hover {
	color: var(--egc-red);
	text-decoration: underline;
}

/* Level 3: main navigation (Foxiz navbar) */
.egc-header .navbar-wrap {
	border-block: 1px solid var(--egc-line);
	background: var(--egc-bg);
	box-shadow: none;
}

.egc-header .main-menu > li > a {
	color: var(--egc-ink);
	font-weight: 700;
}

.egc-header .main-menu > li > a:hover {
	color: var(--egc-red);
}

.egc-header .main-menu > li.current-menu-item > a,
.egc-header .main-menu > li.current-menu-ancestor > a,
.egc-header .main-menu > li.current-category-ancestor > a,
.egc-header .main-menu > li > a[aria-current] {
	color: var(--egc-red);
	box-shadow: inset 0 -3px 0 var(--egc-red);
}

/* Breaking-news strip: shown only when PHP printed it (real posts exist). */
.egc-breaking {
	background: var(--egc-red);
	color: #ffffff;
}

.egc-breaking__inner {
	display: flex;
	align-items: center;
	gap: var(--egc-space-3);
	min-block-size: 40px;
}

.egc-breaking__label {
	flex: none;
	padding: 0.125rem 0.75rem;
	border-radius: var(--egc-radius);
	background: var(--egc-red-dark);
	color: #ffffff;
	font-weight: 800;
}

.egc-breaking__list {
	flex: 1 1 auto;
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.egc-breaking__item {
	display: none;
	margin: 0;
}

.egc-breaking__item:first-child {
	display: block;
}

.egc-breaking.is-enhanced .egc-breaking__item:first-child {
	display: none;
}

.egc-breaking.is-enhanced .egc-breaking__item.is-active {
	display: block;
}

.egc-breaking__item a {
	display: block;
	overflow: hidden;
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.egc-breaking__item a:hover {
	text-decoration: underline;
}

.egc-breaking__controls {
	display: flex;
	flex: none;
	gap: var(--egc-space-1);
}

.egc-breaking__btn {
	min-inline-size: 28px;
	min-block-size: 28px;
	border: 1px solid #ffffff;
	border-radius: var(--egc-radius);
	background: transparent;
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
}

.egc-breaking__btn:hover {
	background: #ffffff;
	color: var(--egc-red);
}

.egc-breaking a:focus-visible,
.egc-breaking button:focus-visible {
	outline-color: #ffffff;
}

/* Tablet and mobile: Foxiz shows its mobile header (logo, menu button, search). */
.egc-mobile-meta {
	display: none;
}

@media (max-width: 1024px) {
	.egc-utility,
	.egc-brand {
		display: none;
	}

	.egc-mobile-meta {
		display: block;
		border-block-end: 1px solid var(--egc-line);
		background: var(--egc-bg-soft);
		font-size: 0.8125rem;
	}

	.egc-mobile-meta__inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: var(--egc-space-1) var(--egc-space-3);
		min-block-size: 32px;
		padding-block: var(--egc-space-1);
	}

	.egc-eic--mobile {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: baseline;
		gap: var(--egc-space-2);
		padding-inline-start: var(--egc-space-2);
		border-inline-start-width: 2px;
	}

	.egc-eic--mobile .egc-eic__name {
		font-size: 0.9375rem;
	}

	.egc-date {
		color: var(--egc-muted);
	}
}

@media (max-width: 600px) {
	.egc-breaking__inner {
		gap: var(--egc-space-2);
	}

	.egc-breaking__btn.egc-breaking__prev,
	.egc-breaking__btn.egc-breaking__next {
		display: none;
	}
}
