/**
 * Univs Site Navigation — univs-nav.css
 *
 * Loaded on ALL public Univs pages (enqueued globally in class-univs-frontend-portal.php).
 * home.php also outputs these styles inline — having both is intentional and harmless.
 *
 * Contains:
 *  1. Core nav styles (matches home.php inline .nav rules)
 *  2. Slim / non-sticky variant for non-homepage pages (.univs-site-nav--slim)
 *  3. WordPress theme default header suppression on Univs pages (.univs-public-page)
 */

/* ── 1. Core nav ────────────────────────────────────────────────────────── */
.nav.univs-site-nav,
nav.univs-site-nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 999;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(0,0,0,.06);
}

body.admin-bar .nav.univs-site-nav,
body.admin-bar nav.univs-site-nav {
	top: 32px;
}
@media (max-width: 782px) {
	body.admin-bar .nav.univs-site-nav,
	body.admin-bar nav.univs-site-nav {
		top: 46px;
	}
}

/* nav-inner is shared with home.php's .section-wrap */
nav.univs-site-nav .nav-inner {
	width: min(1240px, calc(100% - 48px));
	margin: 0 auto;
	min-height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

nav.univs-site-nav .nav-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	text-decoration: none;
}

nav.univs-site-nav .nav-logo-mark {
	width: auto;
	height: 36px;
}

nav.univs-site-nav .nav-logo-fallback {
	font-weight: 800;
	font-size: 22px;
	color: #1A56E8;
}

nav.univs-site-nav .nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

nav.univs-site-nav .nav-links a {
	padding: 10px 14px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
	transition: background .15s, color .15s;
}

nav.univs-site-nav .nav-links a:hover {
	background: #eff6ff;
	color: #1d4ed8;
}

nav.univs-site-nav .nav-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

nav.univs-site-nav .nav-user {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
}

nav.univs-site-nav .nav-user-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #1A56E8;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Buttons inside nav */
nav.univs-site-nav .btn-ghost {
	padding: 8px 16px;
	border-radius: 999px;
	border: 1.5px solid #d1d5db;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
	transition: border-color .15s, background .15s;
	background: transparent;
}

nav.univs-site-nav .btn-ghost:hover {
	border-color: #1A56E8;
	color: #1A56E8;
}

nav.univs-site-nav .btn-primary {
	padding: 8px 18px;
	border-radius: 999px;
	background: #1A56E8;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s;
}

nav.univs-site-nav .btn-primary:hover {
	background: #1745c0;
}

@media (max-width: 960px) {
	nav.univs-site-nav .nav-inner {
		width: min(1240px, calc(100% - 32px));
	}
	nav.univs-site-nav .nav-links {
		display: none;
	}
}

@media (max-width: 720px) {
	nav.univs-site-nav .nav-actions {
		flex-wrap: wrap;
		justify-content: flex-end;
	}
}

/* ── 2. Slim / non-sticky variant (all pages except homepage) ───────────── */
nav.univs-site-nav.univs-site-nav--slim {
	position: static;
	padding: 0;
	box-shadow: none;
	background: #fff;
	border-bottom: 1px solid #e8edf2;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

nav.univs-site-nav.univs-site-nav--slim .nav-inner {
	min-height: 56px;
}

nav.univs-site-nav.univs-site-nav--slim .nav-logo-mark {
	height: 28px;
}

/* When slim nav is present, no need to offset body padding for fixed bar */
body:has(nav.univs-site-nav--slim) {
	padding-top: 0 !important;
}

/* ── 3. Suppress WordPress theme default site header on Univs pages ─────── */
/*
 * These rules hide the default theme header markup so only the Univs nav
 * appears. The selectors cover Twenty-Something themes and most popular themes.
 * The .univs-public-page body class is added via the body_class filter in
 * class-univs-frontend-portal.php → add_univs_body_class().
 */
body.univs-public-page .site-header,
body.univs-public-page #masthead,
body.univs-public-page header.site-header,
body.univs-public-page .wp-block-template-part[class*="header"],
body.univs-public-page .wp-site-blocks > header,
body.univs-public-page .entry-header.wp-block-post-title {
	display: none !important;
}

/* ─── Verified badge — global (used on university cards, program cards, homepage) ─── */
.univs-verified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	margin-left: 4px;
	flex-shrink: 0;
	line-height: 1;
}
.univs-verified-badge svg,
.univs-verified-badge img {
	width: 18px;
	height: 18px;
	display: block;
}
.univs-verified-mark {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-left: 4px;
	flex-shrink: 0;
}
