/* =================================================================
   HEADER & NAVBAR  —  Eye on Terrorism
   Top bar → branding strip → sticky navbar. RTL-first.
   ================================================================= */

.eot-header {
	position: relative;
	z-index: 1000;
	background: var(--dark-surface);
}

/* ---------- TOP BAR ---------- */
.eot-topbar {
	background: var(--red-deep);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--font-body);
	font-size: 0.78rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}
.eot-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 34px;
	gap: 12px;
}
.eot-topbar-tagline { letter-spacing: 0.2px; }
.eot-topbar-date { color: rgba(255, 255, 255, 0.7); white-space: nowrap; }

/* ---------- BRANDING STRIP ---------- */
.eot-branding {
	background: var(--dark-surface);
	border-bottom: 1px solid var(--dark-border);
}
.eot-branding-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-block: 18px;
}

.eot-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
}
.eot-brand:hover { text-decoration: none; }

.eot-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	/* Logo artwork carries its own dark-navy ground, so keep the
	   container transparent and just clip its corners. */
	background: transparent;
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 auto;
	box-shadow: 0 4px 14px rgba(20, 0, 0, 0.5);
}
.eot-logo img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.eot-logo-text {
	font-family: var(--font-head);
	font-weight: 900;
	font-size: 2rem;
	color: #fff;
	line-height: 1;
}
.eot-logo-sm { width: 48px; height: 48px; }
.eot-logo-sm .eot-logo-text { font-size: 1.5rem; }

.eot-brand-text { display: flex; flex-direction: column; gap: 3px; }
.eot-site-name {
	font-family: var(--font-head);
	font-weight: 900;
	font-size: 1.6rem;
	color: var(--text-primary);
	line-height: 1.1;
}
.eot-site-tagline {
	font-family: var(--font-body);
	font-size: 0.82rem;
	color: var(--red-accent);
	font-weight: 500;
}

/* ---------- SEARCH ---------- */
.eot-search {
	display: flex;
	align-items: stretch;
	max-width: 340px;
	width: 100%;
	border: 1px solid var(--dark-border);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--dark-card);
}
.eot-search-input {
	flex: 1;
	min-width: 0;
	background: var(--dark-card);
	border: 0;
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: 0.9rem;
	padding: 10px 14px;
	outline: none;
}
.eot-search-input::placeholder { color: var(--text-dim); }
.eot-search:focus-within { border-color: var(--red-primary); box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.25); }
.eot-search-submit {
	background: var(--red-primary);
	color: #fff;
	border: 0;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0 18px;
	cursor: pointer;
	transition: background 0.2s ease;
	white-space: nowrap;
}
.eot-search-submit:hover { background: var(--red-bright); }
.eot-search-submit:focus-visible { outline: 2px solid var(--red-accent); outline-offset: -2px; }

/* ---------- NAVBAR (sticky) ---------- */
.eot-navbar {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #000;
	border-bottom: 3px solid var(--red-primary);
	transition: background 0.25s ease, box-shadow 0.25s ease;
}
.eot-navbar.scrolled {
	background: #050505;
	box-shadow: 0 6px 20px rgba(20, 0, 0, 0.6);
}
.eot-navbar-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: var(--nav-height);
}

/* ---------- PRIMARY MENU ---------- */
.eot-menu {
	display: flex;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	flex-wrap: wrap;
}
.eot-menu li { position: relative; }
.eot-menu a {
	display: flex;
	align-items: center;
	height: var(--nav-height);
	padding: 0 16px;
	color: var(--text-primary);
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.eot-menu a:hover,
.eot-menu .current-menu-item > a,
.eot-menu .current-cat > a {
	background: rgba(183, 28, 28, 0.18);
	color: #fff;
	text-decoration: none;
}
.eot-menu a:focus-visible {
	background: rgba(183, 28, 28, 0.18);
	color: #fff;
	outline: 2px solid var(--red-accent);
	outline-offset: -2px;
}

/* ---------- DROPDOWNS ---------- */
.eot-menu .sub-menu,
.eot-menu .children {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
	background: var(--dark-card);
	border-top: 3px solid var(--red-primary);
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: 0 14px 30px rgba(40, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	z-index: 1001;
}
.eot-menu li:hover > .sub-menu,
.eot-menu li:hover > .children,
.eot-menu li:focus-within > .sub-menu,
.eot-menu li:focus-within > .children {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.eot-menu .sub-menu a,
.eot-menu .children a {
	height: auto;
	padding: 10px 18px;
	font-size: 0.88rem;
	font-weight: 400;
	white-space: nowrap;
}

/* ---------- MOBILE NAV TOGGLE ---------- */
.eot-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--dark-border);
	color: var(--text-primary);
	font-size: 1.3rem;
	line-height: 1;
	padding: 6px 12px;
	border-radius: var(--radius);
	cursor: pointer;
	margin-inline-start: auto;
	transition: background 0.2s ease;
}
.eot-nav-toggle:hover { background: var(--dark-hover); }
.eot-nav-toggle:focus-visible { outline: 2px solid var(--red-accent); outline-offset: 2px; }

/* =================================================================
   RESPONSIVE  (desktop-first: 1024 → 768 → 560 → 400)
   ================================================================= */

/* ---------- TABLET  (<=1024) ---------- */
@media (max-width: 1024px) {
	/* Topbar may run out of room — let it wrap rather than crush. */
	.eot-topbar-inner { flex-wrap: wrap; row-gap: 4px; padding-block: 4px; }

	/* Branding stays inline here; just ease the spacing + sizes. */
	.eot-branding-inner { gap: 16px; padding-block: 16px; }
	.eot-search { max-width: 280px; }
	.eot-site-name { font-size: 1.45rem; }

	/* Tighten desktop menu padding so more items fit before stacking. */
	.eot-menu a { padding: 0 13px; font-size: 0.9rem; }
}

/* ---------- LARGE PHONE / SMALL TABLET  (<=768) ---------- */
@media (max-width: 768px) {
	/* Branding stack moves here: logo + name keep their row, search
	   drops to a full-width line below. */
	.eot-branding-inner {
		flex-wrap: wrap;
		align-items: center;
		gap: 12px 14px;
		padding-block: 14px;
	}
	.eot-brand { flex: 1 1 auto; min-width: 0; }
	.eot-site-name { font-size: 1.35rem; }
	/* Search becomes its own full-width row. */
	.eot-search { order: 3; flex-basis: 100%; max-width: none; }

	/* Hamburger takes over the navbar at this width. */
	.eot-nav-toggle {
		display: block;
		min-height: 44px;        /* touch target */
		min-width: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Collapsed primary menu: full-width column panel. */
	.eot-menu {
		display: none;
		flex-direction: column;
		flex-wrap: nowrap;
		flex-basis: 100%;
		width: 100%;
		order: 3;
		background: var(--dark-surface);
		border-top: 1px solid var(--dark-border);
		margin-block-start: 0;
	}
	.eot-navbar.eot-nav-open .eot-menu { display: flex; }
	.eot-navbar-inner { flex-wrap: wrap; }
	.eot-menu li { width: 100%; }
	.eot-menu a {
		height: auto;
		min-height: 48px;        /* >=48px tap target */
		width: 100%;
		padding-block: 12px;
		padding-inline: 16px;
		border-block-end: 1px solid var(--dark-border);
	}

	/* Dropdowns render static + expanded inside the mobile panel. */
	.eot-menu .sub-menu,
	.eot-menu .children {
		position: static;
		min-width: 0;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border-top: 0;
		border-radius: 0;
		padding-block: 0;
		background: rgba(0, 0, 0, 0.35);
	}
	.eot-menu .sub-menu a,
	.eot-menu .children a {
		min-height: 44px;
		font-size: 0.85rem;
		padding-inline-start: 30px; /* visual nesting indent */
		white-space: normal;        /* allow long labels to wrap */
	}
}

/* ---------- PHONE  (<=560) ---------- */
@media (max-width: 560px) {
	.eot-branding-inner { padding-block: 12px; gap: 10px 12px; }
	/* Logo steps down from 64 → ~52. */
	.eot-logo { width: 52px; height: 52px; }
	.eot-logo img { width: 46px; height: 46px; }
	.eot-logo-text { font-size: 1.6rem; }
	.eot-logo-sm { width: 42px; height: 42px; }
	.eot-logo-sm .eot-logo-text { font-size: 1.3rem; }
	.eot-brand { gap: 10px; }
	.eot-site-name { font-size: 1.2rem; }
	.eot-site-tagline { font-size: 0.76rem; }

	.eot-search-input { font-size: 16px; padding: 9px 12px; } /* 16px exactly — prevents iOS focus auto-zoom */
}

/* ---------- SMALL PHONE  (<=400) ---------- */
@media (max-width: 400px) {
	/* Hide the date so the tagline never collides on the topbar. */
	.eot-topbar-date { display: none; }
	.eot-topbar { font-size: 0.72rem; }

	.eot-logo { width: 46px; height: 46px; }
	.eot-logo img { width: 40px; height: 40px; }
	.eot-site-name { font-size: 1.08rem; }
	.eot-site-tagline { font-size: 0.72rem; }
}
