/* ==========================================================================
   eCampusOntario global header — SkillsFinder.ai
   Append to style.css. Markup lives in header.php.
   ========================================================================== */

:root {
	/* eCampusOntario palette (subset used by the header) */
	--clr-light: #ffffff;
	--clr-aubergine: #1E1A34;
	--clr-aubergine50: #8E8C99;
	--clr-aubergine10: #E9E8EB;
	--clr-tangerine: #F1B434;

	/* header geometry */
	--eco-bar-height: 80px;
	--eco-gutter: clamp(20px, 5vw, 80px);
}

.ng-cloak { display: none; }


/* --------------------------------------------------------------------------
   Fixed bar
   -------------------------------------------------------------------------- */

.ec-header {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 1000;
	height: var(--eco-bar-height);
	background: var(--clr-aubergine);
}

body.admin-bar .ec-header { top: 32px; }

@media screen and (max-width: 782px) {
	body.admin-bar .ec-header { top: 46px; }
}

@media screen and (max-width: 600px) {
	.ec-header,
	body.admin-bar .ec-header { top: 0; }
}

.ec-header-inner {
	position: relative;
	height: 100%;
	padding: 0 var(--eco-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}


/* --------------------------------------------------------------------------
   Brand cluster: 9-dot toggle + logo
   -------------------------------------------------------------------------- */

.ec-brand {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 4px;
}

.ec-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: -8px;   /* optical alignment with the logo's left edge */
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	cursor: pointer;
}

.ec-menu-toggle svg {
	display: block;
	width: 28px;
	height: 28px;
}

.ec-menu-toggle svg rect {
	fill: var(--clr-light);
	transition: fill .3s ease;
}

.ec-menu-toggle[aria-expanded="true"] svg rect { fill: var(--clr-tangerine); }

@media (hover: hover) and (pointer: fine) {
	.ec-menu-toggle:hover svg rect { fill: var(--clr-tangerine); }
}

.ec-menu-toggle:focus-visible {
	outline: 2px solid var(--clr-tangerine);
	outline-offset: 3px;
}

.ec-menu-toggle:focus-visible svg rect { fill: var(--clr-tangerine); }

.ec-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.ec-logo {
	display: block;
	height: 28px;
	width: auto;
}

.ec-logo .logo-path {
	fill: var(--clr-light);
	transition: fill .3s ease;
}

.ec-logo-link:hover .logo-path,
.ec-logo-link:focus .logo-path { fill: var(--clr-tangerine); }

.ec-logo-link:focus-visible {
	outline: 2px solid var(--clr-tangerine);
	outline-offset: 3px;
	border-radius: 3px;
}


/* --------------------------------------------------------------------------
   Language switch
   -------------------------------------------------------------------------- */

.ec-lang {
	padding: 8px 10px;
	border-radius: 3px;
	color: var(--clr-light);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
}

.ec-lang:hover,
.ec-lang:focus {
	color: var(--clr-tangerine);
	text-decoration: none;
}

.ec-lang:focus-visible {
	outline: 2px solid var(--clr-tangerine);
	outline-offset: 2px;
}

/* used only if WPML is inactive and the widget fallback renders */
.ec-lang-fallback ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 12px;
}

.ec-lang-fallback a,
.ec-lang-fallback span {
	color: var(--clr-light) !important;
	text-decoration: none;
}


/* --------------------------------------------------------------------------
   Mega menu
   -------------------------------------------------------------------------- */

.ec-mega-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 9999;
	width: 45vw;
    max-width: 100vw;
	padding: 1.5rem;
	background: var(--clr-light);
	color: var(--clr-aubergine);
	box-shadow: 0 8px 24px rgba(30, 26, 52, .18);
}

.ec-mega-menu.show {
	display: block;
	animation: ecFadeInDown .25s ease forwards;
}

@keyframes ecFadeInDown {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ec-mega-menu-content {
	display: grid;
	grid-template-rows: repeat(4, 1fr);
	grid-auto-flow: column;
	gap: 8px 24px;
}

.ec-mega-menu-column { display: contents; }

.ec-mega-menu-item {
	padding: 0 6px 12px;
	border-bottom: 1px solid var(--clr-aubergine10);
	color: inherit;
	text-decoration: none;
	transition: background-color .25s ease;
}

.ec-mega-menu-column .ec-mega-menu-item:nth-child(4) { border-bottom: none; }
.ec-mega-menu-column .ec-mega-menu-item:not(:last-child) { margin-bottom: .625rem; }

.ec-mega-menu-item h4 {
	margin: 0 0 6px;
	font-size: clamp(16px, 1.6vw, 18px);
	font-weight: 700;
	line-height: 1.2;
}

.ec-mega-menu-item p {
	margin: 0;
	color: var(--clr-aubergine50);
	font-size: clamp(14px, 1.2vw, 16px);
	line-height: 1.45;
}

.ec-mega-menu-item:hover,
.ec-mega-menu-item:focus-visible { background-color: var(--clr-tangerine); }

.ec-mega-menu-item:hover h4,
.ec-mega-menu-item:focus-visible h4 { text-decoration: underline; }

.ec-mega-menu-item:hover p,
.ec-mega-menu-item:focus-visible p { color: var(--clr-aubergine); }

.ec-mega-menu-item:focus-visible {
	outline: 2px solid var(--clr-aubergine);
	outline-offset: 3px;
	border-radius: 3px;
}

@media (max-width: 1360px) {
	.ec-mega-menu { width: 60vw; }
}

@media (max-width: 650px) {
	.ec-mega-menu {
		width: 80vw;
		max-height: 80vh;
		overflow-y: auto;
	}

	.ec-mega-menu-content {
		grid-template-rows: auto;
		grid-auto-flow: row;
	}

	.ec-mega-menu-column .ec-mega-menu-item:last-child {
		border-bottom: 1px solid var(--clr-aubergine10);
	}

	.ec-mega-menu-column:last-child .ec-mega-menu-item:last-child {
		border-bottom: none;
	}
}


/* --------------------------------------------------------------------------
   Skip link + content offset
   -------------------------------------------------------------------------- */

.ec-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1100;
	padding: 12px 20px;
	background: var(--clr-light);
	color: var(--clr-aubergine);
	
	&:focus,
	&:focus-visible {
		top: 10px;
		left: 10px;
		outline: 3px solid var(--clr-tangerine);
		outline-offset: 2px;
	}
}

.page-container { padding-top: var(--eco-bar-height) !important; }


/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.ec-mega-menu.show { animation: none; }
	.ec-mega-menu-item,
	.ec-logo .logo-path,
	.ec-menu-toggle svg rect { transition: none; }
}

/* ==========================================================================
   eCampusOntario global footer — SkillsFinder.ai
   ========================================================================== */

.eco-footer {
	background-color: var(--clr-aubergine);
	min-height: 220px;
	padding: 3rem 0;
}

.footer-container {
	max-width: 100%;
	padding-left: var(--eco-gutter);
	padding-right: var(--eco-gutter);
}


/* --------------------------------------------------------------------------
   Top row: branding + tagline
   -------------------------------------------------------------------------- */

.footer-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 4rem;
}

.footer-branding {
	display: flex;
	align-items: flex-end;
	gap: 30px;
	flex-shrink: 0;
}

.eco-footer-logo {
	height: 55px;
	width: auto;
}

.logo-divider {
	width: 1px;
	height: 35px;
	background-color: rgba(255, 255, 255, .3);
	flex-shrink: 0;
}

.ontario-branding {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.funded-by-text {
	color: var(--clr-light);
	font-size: 9px;
	font-weight: 400;
	letter-spacing: .5px;
	text-transform: none;
}

.ontario-logo {
	height: auto;
	width: 120px;
}

.footer-tagline {
	max-width: 1000px;
	margin: 0;
	color: var(--clr-light);
	font-size: 16px;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Divider — Bootstrap sets hr to rgba(0,0,0,.1), invisible on aubergine
   -------------------------------------------------------------------------- */

.footer-divider {
	margin: 2rem 0;
}

.footer-divider hr {
	margin: 0;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, .4);
}


/* --------------------------------------------------------------------------
   Bottom row: nav + social
   -------------------------------------------------------------------------- */

.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
}

.footer-nav {
	display: flex;
	gap: 40px;
	flex-wrap: wrap;
}

.eco-footer-logo {
	display: block;
	width: 120px;
	height: auto;
	padding: 0;
}

.footer-nav a {
	color: var(--clr-light);
	font-family: "Roboto", Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	text-decoration: none;
	transition: color .3s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
	color: var(--clr-tangerine);
	text-decoration: underline;
}

.footer-nav a:focus-visible,
.eco-social-links a:focus-visible {
	outline: 2px solid var(--clr-tangerine);
	outline-offset: 3px;
	border-radius: 3px;
}

.eco-footer address {
	margin: 0;
	font-style: normal;
}

.eco-social-links {
	display: flex;
	align-items: center;
	gap: 32px;
}

.eco-social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--clr-light);
	transition: color .3s ease;
}

.eco-social-links a:hover,
.eco-social-links a:focus { color: var(--clr-tangerine); }

.eco-social-links i { font-size: 24px; }

.eco-social-links svg {
	width: 24px;
	height: 24px;
}

/* the Bluesky mark is inline SVG, so it needs fill rather than color */
.eco-social-links svg path {
	fill: currentColor;
	transition: fill .3s ease;
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.footer-top {
		flex-direction: column;
		gap: 30px;
	}

	.footer-nav { gap: 25px; }
}

@media (max-width: 768px) {
	.eco-footer { padding: 40px 0 30px; }

	.footer-branding {
		flex-wrap: nowrap;
		gap: 20px;
	}

	.eco-footer-logo,
	.ontario-logo { width: 100px; }

	.logo-divider { height: 30px; }

	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-nav {
		flex-direction: column;
		gap: 15px;
	}

	.eco-social-links { margin-top: 20px; }
}


@media (prefers-reduced-motion: reduce) {
	.footer-nav a,
	.eco-social-links a,
	.eco-social-links svg path { transition: none; }
	.eco-footer-logo .logo-path { transition: none; }
}