/* ============================================================
   GRID + LAYOUT SHIM  (replaces bootstrap.min.css, ~140KB)
   Implements exactly the Bootstrap-4 class contract the markup
   already uses — container / row / col-* / navbar / a small set
   of flex, spacing and text utilities — so no template markup
   had to change. Breakpoints match Bootstrap 4 (sm576/md768/lg992).
   ============================================================ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* ---------- Containers ---------- */
.container,
.container-fluid {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding-right: 15px;
	padding-left: 15px;
}
@media (min-width: 576px) {
	.container {
		max-width: 540px;
	}
}
@media (min-width: 768px) {
	.container {
		max-width: 720px;
	}
}
@media (min-width: 992px) {
	.container {
		max-width: 960px;
	}
}
@media (min-width: 1200px) {
	.container {
		max-width: 1140px;
	}
}

/* ---------- Row + columns ---------- */
.row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -15px;
	margin-left: -15px;
}

[class^='col-'],
[class*=' col-'],
.col {
	position: relative;
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
}

.col {
	flex: 1 0 0%;
}

/* base (xs) columns 1–12 */
.col-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
.col-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 576px) {
	.col-sm-6 { flex: 0 0 50%; max-width: 50%; }
	.col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
	.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.col-md-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
	.col-md-6 { flex: 0 0 50%; max-width: 50%; }
	.col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
	.col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
	.col-lg-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
	.col-lg-3 { flex: 0 0 25%; max-width: 25%; }
	.col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.col-lg-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
	.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
	.col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
	.col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* row vertical gutter (gy-5 used on coordinator grids) */
.gy-5 {
	row-gap: 3rem;
}

/* ---------- Flex / alignment utilities ---------- */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.flex-column { flex-direction: column !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }

/* ---------- Spacing utilities ---------- */
.mx-auto { margin-right: auto !important; margin-left: auto !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

@media (min-width: 992px) {
	.ml-lg-auto { margin-left: auto !important; }
	.ml-lg-3 { margin-left: 1rem !important; }
}

/* ---------- Text utilities ---------- */
.text-center { text-align: center !important; }
.text-white { color: #fff !important; }

/* ---------- Images ---------- */
.img-fluid {
	max-width: 100%;
	height: auto;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	border: 1px solid transparent;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	border-radius: 0.25rem;
	cursor: pointer;
	transition: all 0.15s ease-in-out;
}

/* ---------- Forms ---------- */
.form-control {
	display: block;
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	color: #495057;
	background-color: #fff;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
}

/* ============================================================
   NAVBAR (navbar-expand-lg) + collapse behaviour
   ============================================================ */
.navbar {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}

.navbar .container,
.navbar .container-fluid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}

.navbar-brand {
	display: inline-block;
	margin-right: 1rem;
	white-space: nowrap;
}

.navbar-nav {
	display: flex;
	flex-direction: column;
	padding-left: 0;
	margin-bottom: 0;
	list-style: none;
}

.fixed-top {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1030;
}

.navbar-toggler {
	display: inline-block;
	background: transparent;
	border: 1px solid transparent;
}

/* collapse: hidden until .show (JS toggles it) */
.collapse:not(.show) {
	display: none;
}

/* expand-lg: horizontal nav at ≥992, toggler hidden */
@media (min-width: 992px) {
	.navbar-expand-lg {
		flex-flow: row nowrap;
		justify-content: flex-start;
	}
	.navbar-expand-lg .navbar-nav {
		flex-direction: row;
	}
	.navbar-expand-lg .navbar-toggler {
		display: none;
	}
	.navbar-expand-lg .navbar-collapse {
		display: flex !important;
		flex-basis: auto;
		flex-grow: 1;
		align-items: center;
	}
}

.navbar-collapse {
	flex-basis: 100%;
	flex-grow: 1;
	align-items: center;
}
