/**
 * Minimal Bootstrap 4 grid shim. Replaces the 160KB bootstrap.min.css with the
 * specific classes still used by footer.php and a handful of legacy markup
 * sections that survive on modern templates. Audit produced this exact set:
 *   container, row, col-md-3..12, col-lg-3..8, col-md-offset-1, offset-md-1/2,
 *   my-auto, mt-5, text-center, btn / btn-success.
 * Anything not on this list shouldn't appear on modern templates.
 */
.container {
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
	margin-right: auto;
	margin-left: auto;
	box-sizing: border-box;
}
@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 {
	display: flex;
	flex-wrap: wrap;
	margin-right: -15px;
	margin-left: -15px;
}

/* Bootstrap 4 .form-row — tighter-gutter variant used by CF7 form layouts
 * (quoteModal "New City Page Form" wraps each label/input in col-md-6). */
.form-row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -5px;
	margin-left: -5px;
}
.form-row > [class^="col-"],
.form-row > [class*=" col-"] {
	padding-right: 5px;
	padding-left: 5px;
}

[class^="col-"], [class*=" col-"] {
	position: relative;
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
	box-sizing: border-box;
}

/* md breakpoint (≥768px) — used by all col-md-* */
@media (min-width: 768px) {
	.col-md-3  { flex: 0 0 25%;       max-width: 25%; }
	.col-md-4  { flex: 0 0 33.3333%;  max-width: 33.3333%; }
	.col-md-6  { flex: 0 0 50%;       max-width: 50%; }
	.col-md-8  { flex: 0 0 66.6667%;  max-width: 66.6667%; }
	.col-md-10 { flex: 0 0 83.3333%;  max-width: 83.3333%; }
	.col-md-12 { flex: 0 0 100%;      max-width: 100%; }
	.col-md-offset-1,
	.offset-md-1 { margin-left: 8.3333%; }
	.offset-md-2 { margin-left: 16.6667%; }
}

/* lg breakpoint (≥992px) — used by col-lg-3 / 4 / 8 */
@media (min-width: 992px) {
	.col-lg-3 { flex: 0 0 25%;      max-width: 25%; }
	.col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}

/* Utility classes still referenced in legacy markup. */
.text-center { text-align: center; }
.my-auto    { margin-top: auto; margin-bottom: auto; }
.mt-5       { margin-top: 3rem; }

/* btn / btn-success — only legacy CTA buttons. Modern templates use their
 * own button styles so we keep this footprint tiny. */
.btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	vertical-align: middle;
	border: 1px solid transparent;
	border-radius: 0.25rem;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-success {
	color: #fff;
	background-color: #28a745;
	border-color: #28a745;
}
.btn-success:hover {
	background-color: #218838;
	border-color: #1e7e34;
}

/* Bootstrap 4 .modal — hidden by default, shown when JS adds .show.
 * Used by footer.php for #newsletterModal and #quoteModal. */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1050;
	width: 100%;
	height: 100%;
	overflow: hidden;
	outline: 0;
}
.modal.show {
	display: block;
	overflow-y: auto;
}
.modal-open { overflow: hidden; }
.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1040;
	background-color: #000;
	opacity: 0.5;
}
.modal-dialog {
	position: relative;
	width: auto;
	margin: 0.5rem;
	pointer-events: none;
}
.modal.show .modal-dialog { pointer-events: auto; }
@media (min-width: 576px) {
	.modal-dialog { max-width: 500px; margin: 1.75rem auto; }
}
.modal-content {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	pointer-events: auto;
	background-color: #fff;
	border-radius: 0.3rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}
.modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 1rem;
	border-bottom: 1px solid #dee2e6;
}
.modal-body {
	position: relative;
	padding: 1rem;
}
.modal-title {
	margin: 0;
	line-height: 1.5;
	font-size: 1.25rem;
}
.modal .close {
	position: absolute;
	right: 1rem;
	top: 1rem;
	background: transparent;
	border: 0;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.5;
}
.modal .close:hover { opacity: 0.85; }
