Jump to content

Template:Education/styles.css

From Meta, a Wikimedia project coordination wiki
/* Used for [[Education]] and subpages */
.portal-navigation {
	font-size: 0.85em;
	background: #f8f9fa;
	border-radius: 0 0 8px 8px;
	padding: 10px 14px 4px;
	margin-bottom: 20px;
}
.edu-info {
	font-size: 1.2em;
	color: #656565;
	font-family: Helvetica Neue, Helvetica, arial, sans-serif;
}
.edu-intro {
	font-size: 1.2em;
	margin-bottom: 2em;
}
a.extiw,
.edu-info a {
	color: #3498DB;
}
.edu-social ul {
	border: 1px solid #d1d0f5;
	text-align: center;
	font-size: 90%;
	margin: 2em 0 0;
	background-color: #F0F0F0;
	padding: 0.5em 1ex;
}
.edu-social li {
	display: inline-block;
	margin: 0 3px;
}

/* ===== Interactive nav additions ===== */

/* Remove the empty header strip left blank when portalname/portalicon aren't set */
.portal-navigation-header {
	display: none;
}

.portal-navigation a {
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-navigation > ul {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.portal-navigation > ul > li {
	list-style: none;
	flex: 1 1 0;
	box-sizing: border-box;
}

/* Style ONLY the outer wrapper as one unified tile — do NOT also box the
   inner <a>, or you get a double-box bug (icon box + separate label box) */
.portal-navigation > ul > li > span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	box-sizing: border-box;
	border-radius: 8px;
	border: 1px solid #dadde3;
	background: #fff;
	padding: 12px 14px;
}

.portal-navigation > ul > li > span a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	font-weight: bold;
	color: #1c3d5a;
	text-decoration: none;
}

.portal-navigation > ul > li > span:hover,
.portal-navigation > ul > li > span:hover a {
	background-color: #eaf1f5;
	box-shadow: 0 4px 10px rgba(28, 61, 90, 0.12);
	transform: translateY(-2px);
}

/* Icon gets a soft circular backdrop so it doesn't sit as a bare black glyph */
.portal-navigation-tabicon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #eaf1f5;
	border-radius: 50%;
	padding: 6px;
	transition: transform 0.15s ease;
}

/* Force icons to render navy regardless of the source SVG's own color —
   works around Codex icons that expect CSS variables we don't have here */
.portal-navigation-tabicon img {
	filter: invert(21%) sepia(46%) saturate(1200%) hue-rotate(165deg) brightness(95%) contrast(92%);
}

.portal-navigation > ul > li > span:hover .portal-navigation-tabicon {
	transform: scale(1.1);
}

.portal-navigation-subtabs {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 12px;
	padding: 10px 0 0;
	border-top: 1px solid #dadde3;
}

.portal-navigation-subtabs li {
	list-style: none;
}

.portal-navigation-subtabs li a {
	display: inline-block;
	background: #eaf1f5;
	color: #0f4c5c;
	padding: 5px 12px;
	border-radius: 14px;
	font-size: 0.85em;
	text-decoration: none;
}

.portal-navigation-subtabs li a:hover {
	background: #0f4c5c;
	color: #fff;
	transform: translateY(-1px);
}

.portal-navigation-entry-has-subtabs > span {
	position: relative;
	background: #1c3d5a !important;
	color: #fff !important;
	border-color: #1c3d5a !important;
}

.portal-navigation-entry-has-subtabs > span a {
	color: #fff !important;
}

.portal-navigation-entry-has-subtabs > span .portal-navigation-tabicon {
	background: rgba(255, 255, 255, 0.2) !important;
}

/* ===== Mobile: compact 2-column grid instead of full-width stacked tiles ===== */
@media (max-width: 600px) {
	.portal-navigation {
		box-sizing: border-box;
		overflow: hidden;
	}

	.portal-navigation > ul {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 8px;
		width: 100%;
		box-sizing: border-box;
	}

	.portal-navigation > ul > li {
		flex: none;
		max-width: none;
		width: 100%;
		box-sizing: border-box;
	}

	.portal-navigation > ul > li > span {
		flex-direction: row;
		justify-content: flex-start;
		padding: 8px 10px;
		gap: 8px;
		width: 100%;
		box-sizing: border-box;
	}

	.portal-navigation > ul > li > span a {
		flex-direction: row;
		align-items: center;
		gap: 8px;
		font-size: 0.85em;
	}

	.portal-navigation-tabicon {
		padding: 4px;
		flex-shrink: 0;
	}

	.portal-navigation-tabicon img {
		width: 16px !important;
		height: 16px !important;
	}

	.portal-navigation-subtabs {
		gap: 6px;
	}

	.portal-navigation-subtabs li a {
		font-size: 0.8em;
		padding: 4px 10px;
	}
}