/*
Theme Name: CHC Modern
Theme URI: https://criminalhistorycleaners.com/
Author: Criminal History Cleaners
Description: Responsive theme for Criminal History Cleaners. Keeps the original
  logo, the services-and-prices sidebar and the 17 live PayPal order forms
  exactly as they were, and rebuilds everything around them: readable type,
  a real mobile layout, and a phone number that stays reachable on every screen.
  No build step, no dependencies, no external assets.
  v1.1.0 carries the 2026 prices: $599 for every service except Certificate of
  Rehabilitation / Pardon at $1599.
  v1.2.0 restores the old site's per-page SEO titles and meta descriptions,
  which fix-seo-meta.php loads into post meta. No SEO plugin required.
  v1.3.0 swaps the home page banner watermark from the old fingerprint to a
  scales of justice. The original is kept as images/ad-fingerprint.jpg.
  v1.4.0 points the seven sidebar service names that have a "Learn More"
  article at that article, the way the old site did, instead of sending every
  one of them to the contact form. Falls back to /intake/ if the article page
  is not there, so it is safe to install in any order.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chc-modern
Tags: two-columns, left-sidebar, custom-menu, accessibility-ready
*/

/* ==========================================================================
   1. TOKENS
   Colours come from the existing logo and the old navy/red/sand palette so
   the site still looks like itself. Change them here, nowhere else.
   ========================================================================== */

:root {
	--navy:        #152b4e;
	--navy-dark:   #0d1c34;
	--navy-soft:   #2c4570;
	--red:         #c0142c;
	--red-dark:    #9c0f22;
	--ink:         #1b2430;
	--muted:       #55616f;
	--line:        #dde2e9;
	--sand:        #f0efe9;   /* echoes the old #E6E5E1 sidebar */
	--page:        #f3f5f7;
	--white:       #ffffff;
	--link:        #123a6d;

	--radius:      6px;
	--shadow:      0 1px 2px rgba(19, 33, 56, .06), 0 4px 14px rgba(19, 33, 56, .05);

	--font-body:   "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-head:   Georgia, "Times New Roman", "Liberation Serif", serif;
}

/* ==========================================================================
   2. BASE
   Deliberately light. Page bodies are 2010 nested tables with <font> tags;
   an aggressive reset would break them. See section 6.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--page);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
}

img { border: 0; }

a { color: var(--link); }
a:hover { color: var(--red); }

:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.wrap {
	width: min(1180px, 100% - 32px);
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--white);
	color: var(--navy);
	padding: 12px 18px;
	font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ==========================================================================
   3. HEADER
   ========================================================================== */

.site-head {
	background: var(--white);
	border-bottom: 3px solid var(--navy);
}

.head-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 28px;
	flex-wrap: wrap;
	padding: 16px 0;
}

.brand { display: block; line-height: 0; }
.brand img {
	display: block;
	width: 100%;
	max-width: 340px;
	height: auto;
}

.cta-phone {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-decoration: none;
	color: var(--navy);
}
.cta-kicker {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--red);
}
.cta-num {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.1;
}
.cta-sub { font-size: .78rem; color: var(--muted); }
.cta-phone:hover .cta-num { color: var(--red); }

@media (max-width: 719px) {
	.head-in { justify-content: center; text-align: center; padding: 14px 0; }
	.cta-phone { align-items: center; }
	.brand img { max-width: 290px; margin-inline: auto; }
	.cta-num { font-size: 1.7rem; }
}

/* ==========================================================================
   4. NAVIGATION
   The mobile menu is a checkbox, not JavaScript. It works with scripts
   blocked and ships nothing to download.
   ========================================================================== */

.site-nav { background: var(--navy); }

.nav-in { position: relative; }

.nav-check {
	position: absolute;
	width: 1px; height: 1px;
	opacity: 0;
	top: 18px; left: 2px;
	margin: 0;
}

.nav-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	padding: 4px 0;
	color: var(--white);
	font-weight: 700;
	letter-spacing: .02em;
	cursor: pointer;
	user-select: none;
}
.nav-check:focus-visible + .nav-btn {
	outline: 3px solid var(--white);
	outline-offset: -3px;
}

.nav-bars {
	position: relative;
	display: inline-block;
	width: 22px; height: 2px;
	background: currentColor;
}
.nav-bars::before, .nav-bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 22px; height: 2px;
	background: currentColor;
}
.nav-bars::before { top: -7px; }
.nav-bars::after  { top:  7px; }

.nav-list {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
}
.nav-check:checked ~ .nav-list { display: block; }

.nav-list a {
	display: block;
	padding: 13px 2px;
	min-height: 46px;
	color: var(--white);
	text-decoration: none;
	font-weight: 600;
	border-top: 1px solid rgba(255, 255, 255, .15);
}
.nav-list a:hover { color: var(--white); text-decoration: underline; }

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a,
.nav-list .is-current > a { color: #ffd9a0; }

@media (min-width: 900px) {
	.nav-btn, .nav-check { display: none; }
	.nav-list { display: flex; flex-wrap: wrap; padding: 0; }
	.nav-list li { display: block; }
	.nav-list a {
		border-top: 0;
		padding: 15px 18px;
		min-height: 0;
	}
	.nav-list a:hover { background: var(--navy-soft); text-decoration: none; }
	.nav-list .current-menu-item > a,
	.nav-list .current_page_item > a,
	.nav-list .is-current > a {
		color: var(--white);
		box-shadow: inset 0 -4px 0 var(--red);
	}
}

/* ==========================================================================
   5. LAYOUT
   Source order is content-then-sidebar so phones get the page they asked
   for first. On desktop the sidebar moves back to the left with order: -1.
   ========================================================================== */

.layout { padding: 26px 0 48px; }

@media (min-width: 900px) {
	.layout {
		display: grid;
		grid-template-columns: 286px minmax(0, 1fr);
		gap: 34px;
		align-items: start;
	}
	.col-side { order: -1; }
}

.col-main {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 26px 30px 34px;
	min-width: 0;
}

@media (max-width: 639px) {
	.layout { padding: 0 0 32px; }
	.wrap.layout { width: 100%; }
	.col-main,
	.side-card {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}
	.col-main { padding: 20px 16px 26px; }
	.side-card { padding: 4px 16px 18px; }
}

.page-title {
	font-family: var(--font-head);
	font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.15rem);
	line-height: 1.2;
	color: var(--navy);
	margin: 0 0 4px;
}
.title-rule {
	width: 68px;
	height: 4px;
	background: var(--red);
	border: 0;
	margin: 0 0 22px;
}

/* ==========================================================================
   6. LEGACY PAGE CONTENT
   Page bodies are nested tables, fixed pixel widths and <font> tags inside
   wp:html blocks. Nothing here rewrites that markup - it only gives it
   modern type and stops it overflowing a phone.
   ========================================================================== */

.chc-content {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.chc-content,
.chc-content td,
.chc-content p,
.chc-content li,
.chc-content div {
	font-family: var(--font-body);
	color: var(--ink);
}

.chc-content p, .chc-content li { line-height: 1.65; }
.chc-content li { margin-bottom: .35em; }

.chc-content h1, .chc-content h2, .chc-content h3 {
	font-family: var(--font-head);
	color: var(--navy);
	line-height: 1.25;
}

/* <font face="Verdana..."> loses the face but keeps its colour and its
   relative size, so the page's own hierarchy survives. */
.chc-content font { font-family: inherit; }
.chc-content font[size="1"] { font-size: .8125rem; }
.chc-content font[size="2"] { font-size: 1rem; }
.chc-content font[size="3"] { font-size: 1.15rem; }
.chc-content font[size="4"] { font-size: 1.35rem; }
.chc-content font[size="5"] { font-size: 1.6rem; }
.chc-content font[size="6"] { font-size: 1.9rem; }
.chc-content font[size="7"] { font-size: 2.2rem; }

.chc-content a { color: var(--link); text-decoration: underline; }
.chc-content a:hover { color: var(--red); }

.chc-content img { max-width: 100%; height: auto; }

/* Fixed widths the 2010 markup hard-codes. Releasing them lets most pages
   reflow on a phone instead of side-scrolling; .chc-content's overflow-x
   catches anything that still will not fit. */
.chc-content table { max-width: 100%; }
.chc-content td[width="650"],
.chc-content td[width="643"],
.chc-content table[width="650"],
.chc-content table[width="640"],
.chc-content .scrollArea {
	width: auto !important;
	max-width: 100% !important;
}
.chc-content .scrollArea {
	height: auto !important;
	float: none !important;
	overflow: visible !important;
	padding: 0 !important;
}

.chc-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 22px 0;
}

/* ==========================================================================
   7. SERVICES SIDEBAR
   The 17 <form> blocks are byte-for-byte copies of the live PayPal forms.
   Everything below styles them from the outside. Do not tidy the markup to
   suit the CSS - change the CSS.
   ========================================================================== */

.col-side { min-width: 0; }

.side-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 4px 18px 18px;
	margin-bottom: 20px;
}

@media (max-width: 899px) {
	.side-card { margin-top: 20px; margin-bottom: 0; }
}

.side-title {
	font-family: var(--font-head);
	font-size: 1.22rem;
	color: var(--navy);
	margin: 16px 0 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--red);
}

.state-list { list-style: none; margin: 0; padding: 0; }
.state-list a {
	display: block;
	padding: 9px 0;
	font-weight: 700;
	color: var(--navy);
	text-decoration: none;
}
.state-list a:hover { color: var(--red); text-decoration: underline; }

.svc-list { list-style: none; margin: 0; padding: 0; }

.svc {
	padding: 12px 0;
	border-top: 1px solid var(--line);
}
.svc:first-child { border-top: 0; padding-top: 4px; }

.svc form { margin: 0; }

/* Neutralise the inherited Verdana/size-2 <font> wrappers inside the forms. */
.svc font {
	font-family: inherit;
	font-size: .95rem;
	line-height: 1.4;
}
.svc a {
	color: var(--navy);
	font-weight: 700;
	text-decoration: none;
}
.svc a:hover { color: var(--red); text-decoration: underline; }

/* The price is the only red <font> in these blocks. */
.svc font[color="#FF0000"],
.svc .svc-price {
	display: inline-block;
	color: var(--red);
	font-weight: 700;
	white-space: nowrap;
}

/* The PayPal submit button. The <input> carries no width or height
   attribute, so its size is set entirely here. */
.svc input[type="image"] {
	display: inline-block;
	height: 28px;
	width: auto;
	margin: 6px 0 0 4px;
	vertical-align: middle;
	cursor: pointer;
}
.svc input[type="image"]:hover { filter: brightness(1.08); }

.svc-noform .svc-name {
	display: block;
	color: var(--navy);
	font-weight: 700;
	font-size: .95rem;
}
.svc-noform a.svc-name { text-decoration: none; }
.svc-noform a.svc-name:hover { color: var(--red); text-decoration: underline; }
.svc-note { display: block; font-size: .82rem; color: var(--muted); }

.svc-foot {
	margin: 16px 0 0;
	font-size: .78rem;
	line-height: 1.5;
	color: var(--muted);
}

.svc-paypal { margin: 16px 0 0; }
.svc-paypal img { display: block; max-width: 118px; height: auto; }

.side-help { background: var(--sand); }
.side-help p { font-size: .92rem; margin: 0 0 12px; }

/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

.btn {
	display: block;
	text-align: center;
	min-height: 48px;
	padding: 13px 18px;
	border-radius: var(--radius);
	font-weight: 700;
	text-decoration: none;
	border: 2px solid transparent;
}
.btn-call {
	background: var(--red);
	border-color: var(--red);
	color: var(--white);
}
.btn-call:hover {
	background: var(--red-dark);
	border-color: var(--red-dark);
	color: var(--white);
}

.btn-ghost {
	background: var(--white);
	border-color: var(--navy);
	color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); }

/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.site-foot {
	margin-top: auto;
	background: var(--navy-dark);
	color: #c4d0e2;
	padding: 30px 0;
	font-size: .86rem;
	line-height: 1.6;
}
.foot-in { display: grid; gap: 18px 40px; }

@media (min-width: 800px) {
	.foot-in { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
}

.site-foot a { color: var(--white); }
.site-foot p { margin: 0 0 10px; }
.foot-disclaimer { color: #9fb0c8; }
.foot-phone {
	display: inline-block;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--white);
	text-decoration: none;
	letter-spacing: -.01em;
}
.foot-phone:hover { color: #ffd9a0; }
.foot-legal { color: #8fa1ba; font-size: .78rem; }

/* ==========================================================================
   10. STICKY CALL BAR (phones only)
   The phone is the conversion path. Delete this block and the matching
   markup in footer.php if it is ever unwanted.
   ========================================================================== */

.call-bar { display: none; }

@media (max-width: 899px) {
	.call-bar {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 60;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 56px;
		background: var(--red);
		color: var(--white);
		font-weight: 700;
		font-size: 1.05rem;
		text-decoration: none;
		box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
	}
	.call-bar:hover { color: var(--white); }
	body { padding-bottom: 56px; }
}

/* ==========================================================================
   11. FORMS (WPForms Lite on /intake/, and anything else)
   16px inputs stop iOS zooming the page on focus; 46px targets meet WCAG.
   ========================================================================== */

.chc-content input[type="text"],
.chc-content input[type="email"],
.chc-content input[type="tel"],
.chc-content input[type="url"],
.chc-content input[type="date"],
.chc-content input[type="number"],
.chc-content select,
.chc-content textarea,
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="date"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
	max-width: 100%;
	min-height: 46px;
	font-size: 16px;
	font-family: var(--font-body);
	color: var(--ink);
	border: 1px solid #b9c2cd;
	border-radius: 4px;
	padding: 10px 12px;
	background: var(--white);
}
.wpforms-container textarea { min-height: 120px; }

.wpforms-container .wpforms-field-label {
	display: block !important;
	margin-bottom: 6px !important;
	font-family: var(--font-body) !important;
	font-weight: 700 !important;
	color: var(--navy) !important;
}
.wpforms-container .wpforms-field { margin-bottom: 18px; }

.wpforms-container .wpforms-submit,
.chc-content input[type="submit"],
.chc-content button[type="submit"] {
	background: var(--red) !important;
	border: 2px solid var(--red) !important;
	color: var(--white) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	min-height: 50px;
	padding: 13px 28px !important;
	border-radius: var(--radius) !important;
	cursor: pointer;
}
.wpforms-container .wpforms-submit:hover,
.chc-content input[type="submit"]:hover,
.chc-content button[type="submit"]:hover {
	background: var(--red-dark) !important;
	border-color: var(--red-dark) !important;
}

/* ==========================================================================
   12. 404 / index fallback list
   ========================================================================== */

.simple-list { list-style: none; padding: 0; margin: 18px 0 0; }
.simple-list li { border-top: 1px solid var(--line); }
.simple-list li:first-child { border-top: 0; }
.simple-list a {
	display: block;
	padding: 12px 0;
	font-weight: 600;
	text-decoration: none;
}
.simple-list a:hover { text-decoration: underline; }

.entry-summary { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
