/*
Theme Name: J Martin & Co
Theme URI: https://jmartinandcompany.com/
Description: Child theme for J Martin & Co — built on Cleaning Lite.
Author: J Martin & Co
Template: cleaning-lite
Version: 1.1.2
*/

html {
	color-scheme: light dark;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

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

body {
	font-size: 16px;
	line-height: 1.6;
	color: #3a3a3a;
	overflow-x: hidden;
}

img,
video {
	max-width: 100%;
	height: auto;
}

.entry-title {
	font-size: 30px;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.custom-logo {
	max-width: 220px;
	height: auto;
}

/* Parent theme uses a fixed 1170px width. Keep it as a max so phones are not cropped. */
.top-inner,
.header-inner,
.container,
.content-area,
.site-footer-inner {
	width: 100% !important;
	max-width: 1170px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px;
	padding-right: 16px;
}

body.home .site-main,
body.page-template-full-width .site-main,
body.page-template-full-width-php .site-main {
	width: auto !important;
	float: none;
}

.entry-content p,
.entry-content li {
	font-size: 16px;
	line-height: 1.65;
}

.entry-content h2 {
	font-size: 26px;
	margin: 32px 0 14px;
}

.entry-content h3 {
	font-size: 20px;
	margin: 24px 0 10px;
}

#topbar a {
	color: #111;
	font-weight: 600;
}

#topbar a:hover {
	color: #0b8fb8;
}

.top-left p,
.top-right p {
	margin: 0;
}

.header-cta {
	float: right;
	margin: 18px 0 0 16px;
}

.header-cta a {
	display: inline-block;
	background: #27c6f2;
	color: #fff !important;
	font: 700 13px/1 'Montserrat', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 12px 16px;
	border-radius: 3px;
}

.header-cta a:hover {
	background: #1299c2;
	color: #fff !important;
}

@media screen and (min-width: 1000px) {
	.main-nav ul li a {
		padding: 13px 9px;
		font-size: 13px;
	}
}

/* Page content helpers */
.jmc-lead {
	font-size: 18px !important;
	line-height: 1.6;
	color: #222;
	margin-bottom: 18px !important;
}

.jmc-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 8px 0 28px;
}

.jmc-btn,
a.jmc-btn {
	display: inline-block;
	background: #27c6f2;
	color: #fff !important;
	font: 700 14px/1.2 'Montserrat', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 14px 18px;
	border-radius: 3px;
}

.jmc-btn:hover,
a.jmc-btn:hover {
	background: #1299c2;
	color: #fff !important;
}

.jmc-btn-outline,
a.jmc-btn-outline {
	background: transparent;
	color: #1299c2 !important;
	border: 2px solid #27c6f2;
}

.jmc-btn-outline:hover,
a.jmc-btn-outline:hover {
	background: #27c6f2;
	color: #fff !important;
}

.jmc-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 32px;
}

.jmc-trust span {
	background: #eef9fd;
	border: 1px solid #c7ebf6;
	color: #155a70;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 3px;
}

.jmc-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 16px 0 28px;
}

.jmc-card {
	background: #fff;
	border: 1px solid #e4e4e4;
	padding: 20px 18px 16px;
	border-top: 3px solid #27c6f2;
}

.jmc-card h3 {
	margin-top: 0 !important;
	font-size: 18px !important;
}

.jmc-card p,
.jmc-card li {
	font-size: 15px !important;
}

.jmc-card a {
	font-weight: 700;
}

.jmc-cta-band {
	background: #155a70;
	color: #fff;
	padding: 28px 24px;
	margin: 36px 0 16px;
	border-radius: 4px;
}

.jmc-cta-band h2,
.jmc-cta-band p {
	color: #fff !important;
}

.jmc-cta-band h2 {
	margin-top: 0 !important;
}

.jmc-photo-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
	margin: 16px 0 28px;
}

.jmc-photo-row figure {
	margin: 0;
}

.jmc-photo-row img {
	width: 100%;
	height: 170px;
	object-fit: cover;
	display: block;
	border-radius: 3px;
}

.jmc-photo-row figcaption {
	font-size: 12px;
	color: #666;
	padding-top: 6px;
}

.jmc-cities {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 24px;
}

.jmc-cities a {
	background: #fff;
	border: 1px solid #d9d9d9;
	padding: 8px 12px;
	font-weight: 700;
	font-size: 14px;
	color: #155a70;
}

.jmc-cities a:hover {
	border-color: #27c6f2;
	color: #0b8fb8;
}

.jmc-faq details {
	border-bottom: 1px solid #e6e6e6;
	padding: 12px 0;
}

.jmc-faq summary {
	font-weight: 700;
	cursor: pointer;
	color: #222;
}

.jmc-faq details p {
	margin: 8px 0 4px !important;
}

.jmc-list-tight li {
	margin-bottom: 6px;
}

.site-footer-inner {
	width: 1170px;
	max-width: 95%;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 28px;
	padding: 36px 0 20px;
	color: #ddd;
	font-size: 14px;
}

.site-footer-inner h3 {
	color: #fff;
	font-size: 15px;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.site-footer-inner a {
	color: #cfeff8;
}

.site-footer-inner a:hover {
	color: #fff;
}

.site-footer-inner ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer-inner li {
	margin: 0 0 6px;
}

.copyright-wrapper {
	padding-bottom: 18px;
}

.copyright p {
	color: #bbb;
	font-size: 13px;
}

.wpcf7 label {
	display: block;
	margin: 12px 0;
	font-weight: 600;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	max-width: 520px;
	padding: 12px 12px;
	border: 1px solid #ccc;
	font-size: 16px; /* keeps iOS from zooming the page on focus */
	line-height: 1.4;
	border-radius: 4px;
	background: #fff;
	color: #222;
}

.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
	min-height: 48px;
	padding: 12px 20px;
	font-size: 16px;
}

.jmc-mobile-bar {
	display: none;
}

@media screen and (max-width: 999px) {
	html {
		scroll-padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	body {
		padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}

	/* Sticky Call/Text/Contact bar already covers this on phones */
	.header-cta {
		display: none;
	}

	#header {
		padding: 6px 0 4px;
	}

	#header .logo {
		float: none !important;
		width: 100% !important;
		text-align: center;
		margin: 0 auto;
	}

	.custom-logo {
		margin: 4px auto 0;
		display: block;
		background: none;
		padding: 0;
		max-width: 150px;
	}

	#topbar {
		padding: 4px 0;
	}

	#topbar .top-inner {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 0 8px;
	}

	#topbar .top-left,
	#topbar .top-right {
		float: none !important;
		width: auto !important;
		text-align: center !important;
		margin: 0;
	}

	#topbar a {
		display: inline-block;
		padding: 4px 8px;
		min-height: 36px;
		line-height: 22px;
		font-size: 14px;
	}

	.main-container {
		padding: 16px 0 !important;
	}

	h1.entry-title,
	h1.page-title {
		font-size: 20px !important;
		line-height: 1.25 !important;
		padding-bottom: 8px !important;
		margin: 0 0 8px;
	}

	.toggle a {
		min-height: 44px;
		padding: 10px 16px;
		margin-top: 6px;
		font-size: 16px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.main-nav ul li a {
		padding: 14px 16px !important;
		min-height: 44px;
		font-size: 16px !important;
		line-height: 1.3;
	}

	.entry-title {
		font-size: 22px;
	}

	.entry-content h2 {
		font-size: 20px;
	}

	.jmc-lead {
		font-size: 16px !important;
	}

	.jmc-cta-row {
		flex-direction: column;
	}

	.jmc-btn,
	a.jmc-btn,
	.jmc-btn-outline,
	a.jmc-btn-outline {
		text-align: center;
		width: 100%;
		padding: 16px 18px;
		min-height: 48px;
	}

	.jmc-cards,
	.jmc-photo-row {
		grid-template-columns: 1fr;
	}

	.jmc-photo-row img {
		height: 200px;
	}

	.jmc-cities a {
		padding: 12px 14px;
		min-height: 44px;
	}

	.jmc-faq summary {
		padding: 10px 0;
		min-height: 44px;
	}

	.site-footer-inner {
		grid-template-columns: 1fr;
		width: 95%;
		padding-bottom: 12px;
	}

	.site-footer-inner a {
		display: inline-block;
		padding: 6px 0;
		min-height: 40px;
	}

	.jmc-mobile-bar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		background: #155a70;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.jmc-mobile-bar a {
		flex: 1;
		text-align: center;
		color: #fff !important;
		padding: 14px 8px;
		font-weight: 700;
		font-size: 14px;
		min-height: 48px;
	}

	.jmc-mobile-bar a + a {
		border-left: 1px solid rgba(255,255,255,0.2);
	}

	.wpcf7 input,
	.wpcf7 select,
	.wpcf7 textarea {
		max-width: 100%;
	}

	img.alignleft,
	img.alignright,
	.alignleft,
	.alignright {
		float: none;
		display: block;
		margin: 0 0 16px;
		max-width: 100%;
	}

	.wp-block-columns {
		flex-wrap: wrap !important;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.site-main,
	#sidebar {
		width: 100% !important;
		float: none !important;
	}

	#sidebar {
		margin-top: 32px;
	}
}

/* Dark mode — follows the phone's appearance setting */
@media (prefers-color-scheme: dark) {
	html {
		color-scheme: dark;
		background: #121417;
	}

	body {
		background-color: #121417 !important;
		color: #e6e8eb;
	}

	.entry-title,
	.entry-content h1,
	.entry-content h2,
	.entry-content h3,
	.entry-content h4,
	.entry-content h5,
	.entry-content h6,
	.wp-block-heading {
		color: #f3f5f7 !important;
	}

	a {
		color: #5ed6f5;
	}

	a:hover {
		color: #8ae3f8;
	}

	/* Keep the header light so the navy/cyan logo stays readable. */
	#topbar,
	#header {
		background-color: #ffffff !important;
		color: #111;
	}

	#topbar a {
		color: #111;
	}

	.custom-logo {
		background: none;
		padding: 0;
		filter: none;
	}

	.jmc-lead {
		color: #e6e8eb !important;
	}

	.jmc-card,
	.jmc-cities a {
		background: #1c232c;
		border-color: #33404c;
	}

	.jmc-cities a {
		color: #8ae3f8;
	}

	.jmc-trust span {
		background: #16313b;
		border-color: #2a5a6a;
		color: #b9ecf8;
	}

	.jmc-photo-row figcaption,
	.jmc-faq summary {
		color: #d5dbe1;
	}

	.jmc-faq details {
		border-bottom-color: #33404c;
	}

	.jmc-btn-outline,
	a.jmc-btn-outline {
		color: #8ae3f8 !important;
		border-color: #5ed6f5;
	}

	.entry-content,
	.entry-content p,
	.entry-content li {
		color: #e6e8eb;
	}

	/* Gutenberg leftover light-theme text that would vanish on a dark page */
	.entry-content .has-very-dark-gray-color,
	.entry-content .has-black-color {
		color: #e6e8eb !important;
	}

	.entry-content .has-vivid-red-color {
		color: #ff8a8a !important;
	}

	.wp-block-separator {
		border-color: #33404c;
	}

	#sidebar,
	#sidebar .widget,
	#sidebar .widget-title,
	#sidebar h2,
	#sidebar h3,
	#sidebar p,
	#sidebar li,
	#sidebar a {
		color: #e6e8eb;
	}

	#sidebar a:hover {
		color: #5ed6f5;
	}

	#sidebar .widget {
		background: transparent;
	}

	.wpcf7 label {
		color: #e6e8eb;
	}

	.wpcf7 input[type="text"],
	.wpcf7 input[type="email"],
	.wpcf7 input[type="tel"],
	.wpcf7 select,
	.wpcf7 textarea {
		background: #161b22;
		color: #f3f5f7;
		border-color: #3d4a57;
	}

	.wpcf7 input[type="text"]::placeholder,
	.wpcf7 textarea::placeholder {
		color: #9aa4ae;
	}

	.wpcf7 input:-webkit-autofill,
	.wpcf7 textarea:-webkit-autofill {
		-webkit-box-shadow: 0 0 0 30px #161b22 inset;
		-webkit-text-fill-color: #f3f5f7;
	}

	.copyright-wrapper {
		background-color: #0e1116 !important;
	}

	.jmc-mobile-bar {
		background: #0f3d4d;
	}

	/* Keep the quote buttons readable */
	.jmc-btn,
	a.jmc-btn,
	.header-cta a {
		color: #072028 !important;
		background: #3dd4f5;
	}

	.jmc-btn:hover,
	a.jmc-btn:hover,
	.header-cta a:hover {
		background: #7ae3f8;
		color: #072028 !important;
	}
}
