/*
 * MIPA Knowledge Hub - theme styles
 * Version 1.0 - by Darby
 *
 * 1:1 port of the Lovable "legacy" layout (mipanet.org replica):
 * fixed 170px sidebar with logo + menu, 784px banner, Times serif text.
 */

/* ---------- Base (same reset the original app used) ---------- */
html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.mipa {
	margin: 0;
	background: #fff;
}

.legacy,
.legacy *,
.legacy *::before,
.legacy *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0 solid;
}

.legacy {
	font-family: "Times New Roman", Times, serif;
	font-size: 16px;
	line-height: 1.5;
	color: #000;
	background: #fff;
	padding: 8px;
	min-height: 100vh;
}

.legacy h1,
.legacy h2,
.legacy h3,
.legacy h4,
.legacy h5,
.legacy h6 {
	font-size: inherit;
	font-weight: inherit;
}

.legacy b,
.legacy strong {
	font-weight: bolder;
}

.legacy em,
.legacy i {
	font-style: italic;
}

.legacy a {
	color: #00e;
	text-decoration: underline;
}

.legacy a:focus-visible {
	outline: 2px solid #3c2a7c;
	outline-offset: 2px;
}

.legacy img {
	display: inline-block;
	vertical-align: middle;
	max-width: 100%;
	height: auto;
}

.legacy table {
	border-collapse: collapse;
	text-indent: 0;
	border-color: inherit;
}

.legacy .mipa-layout > tbody > tr > td {
	vertical-align: top;
	padding: 0;
}

/* Accessibility helpers */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.mipa-skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	left: 8px;
	top: 8px;
	z-index: 100000;
	padding: 8px 12px;
	background: #fff;
	color: #00e;
	font: 16px "Times New Roman", Times, serif;
	box-shadow: 0 0 0 2px #3c2a7c;
}

/* ---------- Layout ---------- */
.legacy td.side {
	width: 170px;
}

.legacy .mnav {
	display: none;
}

.legacy .bannerimg {
	display: block;
	width: 784px;
	height: auto;
}

.legacy .mipa-main {
	display: block;
}

/* ---------- Sidebar menu: purple buttons (editable in Appearance > Menus) ---------- */
.legacy .mipa-menu {
	display: block;
	width: 140px;
	margin: 2px 0 2px 3px;
	padding: 28px 0 28px;
	background: #c3c3c3;
	border: 5px solid #3c2a7c;
	border-radius: 14px;
}

.legacy .mipa-menu a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 31px;
	margin-bottom: 9px;
	padding: 2px 9px 0 9px;
	color: #fff;
	text-decoration: none;
	text-align: center;
	font-family: "Times New Roman", Times, serif;
	font-size: 22px;
	line-height: 1;
}

.legacy .mipa-menu a:last-child {
	margin-bottom: 0;
}

.legacy .mipa-menu a::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 8.75px;
	right: 9px;
	background: #3c2a7c;
	border-radius: 6px;
	transform: skewX(-17deg);
	transition: background-color 0.15s ease;
}

.legacy .mipa-menu a span {
	position: relative;
	white-space: nowrap;
	letter-spacing: -0.1px;
	-webkit-text-stroke: 0.3px currentColor;
}

.legacy .mipa-menu a.is-small span {
	white-space: normal;
	max-width: 96px;
	font-weight: bold;
	font-size: 14px;
	line-height: 13px;
	letter-spacing: 0.3px;
	-webkit-text-stroke: 0;
}

.legacy .mipa-menu a:hover::before,
.legacy .mipa-menu a:focus-visible::before {
	background: #54409f;
}

.legacy .mipa-menu a:focus-visible {
	outline: none;
}

.legacy .mipa-menu a:focus-visible::before {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3c2a7c;
}

/* Classic menu image (optional, chosen on the Home page settings) */
.legacy .menuimg {
	display: block;
}

/* ---------- Home ---------- */
.legacy td.main.has-bg {
	background-repeat: no-repeat;
	background-position: center 40px;
	background-size: 640px auto;
}

.legacy .mipa-home {
	width: 490px;
	margin-top: 26px;
}

.legacy .mipa-home .mission {
	font-size: 16px;
	line-height: 18px;
}

.legacy .mipa-home .hero {
	text-align: center;
	margin-top: 40px;
}

.legacy .mipa-home .heroimg {
	width: 490px;
	height: auto;
}

/* ---------- Text pages (Join, Job Postings) ---------- */
.legacy .mipa-text ul,
.legacy .mipa-entry ul {
	list-style: disc;
	padding-left: 1.5em;
}

.legacy .mipa-text ol,
.legacy .mipa-entry ol {
	list-style: decimal;
	padding-left: 1.5em;
}

.legacy .mipa-join {
	padding-left: 120px;
	padding-top: 10px;
	width: 410px;
	font-size: 16px;
	line-height: 16px;
}

.legacy .mipa-jobs {
	padding-left: 120px;
	padding-top: 30px;
	width: 420px;
	font-size: 16px;
	line-height: 17px;
}

/* ---------- Contact ---------- */
.legacy .mipa-contact {
	padding-left: 116px;
	padding-top: 10px;
	font-size: 16px;
	line-height: 17px;
}

.legacy .mipa-contact-extra {
	margin-top: 17px;
}

/* ---------- Links ---------- */
.legacy .linkswrap {
	margin-left: 370px;
	width: 600px;
	text-align: center;
	font-size: 16px;
}

.legacy .linkswrap h2 {
	color: #000080;
	font-size: 24px;
	margin: 14px 0;
}

.legacy .linkswrap .mipa-link-section p {
	margin: 0 0 18px;
}

.legacy .mipa-links-intro {
	margin-top: 14px;
}

/* ---------- Technician Exam ---------- */
.legacy .mipa-tech {
	padding-top: 10px;
	width: 1100px;
}

.legacy .mipa-tech-heading {
	font-size: 13px;
	font-weight: bold;
}

.legacy .mipa-tech-body {
	font-size: 16px;
	margin: 14px 0 50px;
}

.legacy .mipa-tech-body p + p {
	margin-top: 1em;
}

.legacy .mipa-tech-download {
	font-size: 16px;
}

.legacy .mipa-file {
	display: inline-block;
	text-align: center;
	font-size: 12px;
}

.legacy .mipa-file-badge {
	display: inline-block;
	background: #d00;
	color: #fff;
	font-size: 8px;
	font-family: Arial, sans-serif;
	padding: 4px 2px;
	margin-left: 60px;
}

.legacy .mipa-admin-hint {
	font-size: 14px;
	color: #a00;
	border: 1px dashed #a00;
	padding: 8px 10px;
	display: inline-block;
}

/* ---------- Other pages (default template, posts, 404) ---------- */
.legacy .mipa-page {
	padding-left: 120px;
	padding-top: 10px;
	max-width: 720px;
	font-size: 16px;
}

.legacy .mipa-page-title {
	color: #000080;
	font-size: 24px;
	margin: 4px 0 14px;
}

.legacy .mipa-entry p,
.legacy .mipa-entry ul,
.legacy .mipa-entry ol,
.legacy .mipa-entry blockquote,
.legacy .mipa-entry figure,
.legacy .mipa-entry table {
	margin-bottom: 1em;
}

.legacy .mipa-entry h2 {
	font-size: 20px;
	font-weight: bold;
	margin: 1.2em 0 0.5em;
}

.legacy .mipa-entry h3 {
	font-size: 18px;
	font-weight: bold;
	margin: 1em 0 0.5em;
}

.legacy .mipa-entry blockquote {
	padding-left: 1em;
	border-left: 3px solid #c3c3c3;
}

.legacy .mipa-entry table td,
.legacy .mipa-entry table th {
	border: 1px solid #c3c3c3;
	padding: 4px 8px;
}

.legacy .mipa-entry .wp-block-button__link {
	display: inline-block;
	background: #3c2a7c;
	color: #fff;
	padding: 6px 14px;
	border-radius: 6px;
	text-decoration: none;
}

.legacy .mipa-summary {
	margin-bottom: 1.5em;
}

.legacy .mipa-summary h2 {
	font-size: 18px;
	font-weight: bold;
}

/* ---------- Small screens (same behaviour as the original) ---------- */
@media (max-width: 900px) {
	.legacy {
		overflow-x: hidden;
	}

	.legacy .mipa-layout,
	.legacy .mipa-layout > tbody,
	.legacy .mipa-layout > tbody > tr,
	.legacy td.side,
	.legacy td.main {
		display: block;
		width: 100% !important;
	}

	.legacy td.side {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.legacy .mipa-menu,
	.legacy .menuimg,
	.legacy .mipa-menu-map {
		display: none !important;
	}

	.legacy .mnav {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 14px;
		margin: 6px 0 10px;
		font-size: 16px;
	}

	.legacy .bannerimg,
	.legacy .heroimg {
		width: 100% !important;
		max-width: 100%;
		height: auto !important;
	}

	.legacy td.main {
		background-size: 90% auto !important;
		overflow-wrap: anywhere;
	}

	.legacy .main * {
		max-width: 100%;
	}

	.legacy .mipa-main > div,
	.legacy .mipa-main > article,
	.legacy .mipa-home,
	.legacy .linkswrap,
	.legacy .mipa-tech {
		width: auto !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.legacy .mipa-contact,
	.legacy .mipa-join,
	.legacy .mipa-jobs,
	.legacy .mipa-page {
		padding-left: 4px;
		padding-right: 4px;
	}
}
