/*
 * Towing Marketers — frontend design system.
 * Native CSS only: custom properties, grid, flexbox, fluid type. No frameworks.
 */

:root {
	--tm-orange: #C0500F;
	--tm-orange-hover: #A5440C;
	--tm-orange-light: #FBEBDD;
	--tm-navy: #071A3E;
	--tm-blue-dark: #0C2B6B;
	--tm-ink: #0E1A2B;
	--tm-body: #384B63;
	--tm-body-light: #55677F;
	--tm-muted: #9AA9C0;
	--tm-border: #E4E9F2;
	--tm-border-light: #EDF1F7;
	--tm-white: #FFFFFF;
	--tm-surface: #F5F8FD;
	--tm-success: #1E9E6A;
	--tm-green: #58E29B;
	--tm-star: #F5A623;
	--tm-radius-s: 10px;
	--tm-radius-m: 14px;
	--tm-radius-l: 18px;
	--tm-shadow-card: 0 4px 16px rgba(7, 26, 62, 0.05);
	--tm-shadow-card-hover: 0 16px 40px rgba(7, 26, 62, 0.10);
	--tm-shadow-cta: 0 8px 24px rgba(192, 80, 15, 0.32);
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility ---------- */

.tm-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--tm-navy);
	color: var(--tm-white);
	padding: 12px 20px;
	border-radius: 0 0 10px 0;
	font-weight: 600;
}

.tm-skip-link:focus {
	left: 0;
	color: var(--tm-white);
}

:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 3px solid var(--tm-orange);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Buttons ---------- */

.wp-block-button__link {
	box-shadow: var(--tm-shadow-cta);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	min-height: 44px;
}

.is-style-outline-orange .wp-block-button__link {
	background: transparent;
	color: var(--tm-orange);
	border: 1.5px solid var(--tm-orange);
	box-shadow: none;
}

.is-style-outline-orange .wp-block-button__link:hover,
.is-style-outline-orange .wp-block-button__link:focus {
	background: var(--tm-orange);
	color: var(--tm-white);
}

.is-style-outline-light .wp-block-button__link {
	background: transparent;
	color: var(--tm-white);
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	box-shadow: none;
}

.is-style-outline-light .wp-block-button__link:hover,
.is-style-outline-light .wp-block-button__link:focus {
	border-color: var(--tm-white);
	background: rgba(255, 255, 255, 0.08);
	color: var(--tm-white);
}

/* Generic button class used by plugin fallbacks */
.tmc-button {
	display: inline-block;
	background: var(--tm-orange);
	color: var(--tm-white) !important;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 12px;
	min-height: 44px;
}

.tmc-button--outline {
	background: transparent;
	color: var(--tm-orange) !important;
	border: 1.5px solid var(--tm-orange);
}

/* ---------- Cards ---------- */

.is-style-card {
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-l);
	box-shadow: var(--tm-shadow-card);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.is-style-card:hover {
	box-shadow: var(--tm-shadow-card-hover);
	border-color: #F2CFB0;
}

.is-style-card-dark {
	background: linear-gradient(160deg, var(--tm-blue-dark), var(--tm-navy));
	border: 1px solid var(--tm-blue-dark);
	border-radius: var(--tm-radius-l);
	box-shadow: 0 12px 32px rgba(7, 26, 62, 0.25);
	color: #D7E0F0;
}

.is-style-card-dark :is(h2, h3, h4) {
	color: var(--tm-white);
}

/* Checkmark lists */
.is-style-checkmarks {
	list-style: none;
	padding-left: 0;
}

.is-style-checkmarks li {
	padding-left: 1.6em;
	position: relative;
	margin-bottom: 0.5em;
}

.is-style-checkmarks li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--tm-success);
	font-weight: 700;
}

/* Eyebrow label */
.tm-eyebrow {
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tm-orange);
	font-weight: 700;
}

/* Badge pill */
.tm-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--tm-orange-light);
	color: var(--tm-orange);
	font-size: 13px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
}

.tm-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--tm-success);
}

/* Price treatment */
.tm-price {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--tm-ink);
}

.tm-price-period {
	color: var(--tm-body-light);
	font-size: 0.875rem;
}

.tm-price-was {
	color: var(--tm-muted);
	text-decoration: line-through;
	font-size: 0.875rem;
	font-weight: 600;
}

.tm-price-off {
	background: #E7F6EF;
	color: var(--tm-success);
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 6px;
	white-space: nowrap;
}

.tm-price-setup {
	font-size: 12.5px;
	color: var(--tm-muted);
}

/* ---------- Promo bar ---------- */

.tm-promo-bar {
	background: var(--tm-navy);
	color: #B9C6DE;
	font-size: 13px;
	text-align: center;
	padding: 8px 24px;
}

.tm-promo-bar strong {
	color: var(--tm-white);
}

.tm-promo-bar a {
	color: var(--tm-white);
	font-weight: 600;
	margin-left: 18px;
	white-space: nowrap;
}

/* ---------- Header ---------- */

.tm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--tm-border);
}

.tm-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 6px 2px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.tm-logo-mark {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--tm-orange), #D06327);
	color: var(--tm-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: -0.03em;
	flex: none;
}

.tm-header-phone {
	font-size: 14px;
	font-weight: 600;
	color: var(--tm-ink);
	white-space: nowrap;
}

.tm-header-cta .wp-block-button__link {
	padding: 11px 20px;
	font-size: 14.5px;
	border-radius: 10px;
	box-shadow: 0 4px 14px rgba(192, 80, 15, 0.28);
}

/* Navigation submenus (mega-menu-ish panel) */
.tm-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--tm-border) !important;
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(7, 26, 62, 0.14);
	padding: 8px !important;
	min-width: 260px !important;
	background: var(--tm-white) !important;
}

.tm-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	border-radius: 8px;
	padding: 9px 12px;
	width: 100%;
}

.tm-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--tm-surface);
	color: var(--tm-orange);
}

/* ---------- Hero ---------- */

.tm-hero {
	background: linear-gradient(180deg, var(--tm-surface) 0%, var(--tm-white) 100%);
	overflow: hidden;
}

.tm-hero-note {
	display: flex;
	gap: 24px;
	font-size: 13.5px;
	color: var(--tm-body-light);
	flex-wrap: wrap;
}

/* Map graphic in hero */
.tm-map-card {
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(7, 26, 62, 0.12);
	overflow: hidden;
}

.tm-map-search {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--tm-border-light);
}

.tm-map-search-pill {
	flex: 1;
	background: #F2F5FA;
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 13.5px;
	color: #33445C;
}

.tm-map-canvas {
	position: relative;
	height: 240px;
	background: #EAF2EC;
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 1px, transparent 1px),
		linear-gradient(rgba(255, 255, 255, 0.85) 1px, transparent 1px);
	background-size: 42px 42px;
}

.tm-map-road-h {
	position: absolute;
	left: 0;
	right: 0;
	top: 88px;
	height: 18px;
	background: #FDFDFB;
	transform: rotate(-4deg);
	border-top: 1px solid #E3E7DE;
	border-bottom: 1px solid #E3E7DE;
}

.tm-map-road-v {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 48%;
	width: 14px;
	background: #FDFDFB;
	transform: rotate(8deg);
	border-left: 1px solid #E3E7DE;
	border-right: 1px solid #E3E7DE;
}

.tm-map-pin {
	position: absolute;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tm-white);
	font-weight: 700;
}

.tm-map-pin span {
	transform: rotate(45deg);
}

.tm-map-pin--primary {
	left: 44%;
	top: 58px;
	width: 44px;
	height: 44px;
	background: var(--tm-orange);
	box-shadow: 0 8px 18px rgba(192, 80, 15, 0.4);
	font-size: 16px;
}

.tm-map-pin--two {
	left: 20%;
	top: 140px;
	width: 30px;
	height: 30px;
	background: var(--tm-muted);
	font-size: 12px;
}

.tm-map-pin--three {
	left: 72%;
	top: 158px;
	width: 30px;
	height: 30px;
	background: var(--tm-muted);
	font-size: 12px;
}

.tm-map-results {
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tm-map-result {
	display: flex;
	align-items: center;
	gap: 12px;
	border-radius: 12px;
	padding: 12px 14px;
}

.tm-map-result--win {
	background: var(--tm-orange-light);
	border: 1px solid #F2CFB0;
}

.tm-map-result--lose {
	border: 1px solid var(--tm-border-light);
	opacity: 0.55;
}

.tm-map-result-rank {
	font-weight: 700;
	color: var(--tm-orange);
}

.tm-map-result--lose .tm-map-result-rank {
	color: var(--tm-muted);
}

.tm-map-result-name {
	font-weight: 600;
	font-size: 14px;
	color: var(--tm-ink);
}

.tm-map-result-sub {
	font-size: 12.5px;
	color: var(--tm-body-light);
}

.tm-map-result-cta {
	background: var(--tm-orange);
	color: var(--tm-white);
	font-size: 12px;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: 8px;
}

/* ---------- Section rhythm ---------- */

.tm-section {
	padding-top: clamp(56px, 8vw, 88px);
	padding-bottom: clamp(56px, 8vw, 88px);
}

/* ---------- FAQ accordion ---------- */

.tmc-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tmc-faq-item {
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-m);
	padding: 0 22px;
	background: var(--tm-white);
}

.tmc-faq-question {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font-weight: 600;
	font-size: 15.5px;
	padding: 18px 0;
	color: var(--tm-ink);
	min-height: 44px;
}

.tmc-faq-question::-webkit-details-marker {
	display: none;
}

.tmc-faq-chevron {
	color: var(--tm-orange);
	font-size: 18px;
	transition: transform 0.2s;
	flex: none;
}

.tmc-faq-item[open] .tmc-faq-chevron {
	transform: rotate(45deg);
}

.tmc-faq-item[open] .tmc-faq-question {
	color: var(--tm-orange);
}

.tmc-faq-answer {
	padding: 0 0 18px;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--tm-body-light);
}

.tmc-faq-answer p:first-child {
	margin-top: 0;
}

/* ---------- Reviews ---------- */

.tmc-review-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px;
}

.tmc-review-card {
	margin: 0;
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-l);
	padding: 28px;
	box-shadow: var(--tm-shadow-card);
}

.tmc-review-stars {
	color: var(--tm-star);
	font-size: 15px;
	margin-bottom: 14px;
	letter-spacing: 2px;
}

.tmc-review-card blockquote {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.65;
	color: #33445C;
}

.tmc-review-name {
	font-weight: 600;
	font-size: 14.5px;
	color: var(--tm-ink);
}

/* ---------- Related content ---------- */

.tmc-related {
	margin-top: 3rem;
}

.tmc-related-section h2 {
	font-size: 1.25rem;
	margin: 2rem 0 1rem;
}

.tmc-related-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.tmc-related-card a {
	display: block;
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-m);
	padding: 16px 18px;
	height: 100%;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tmc-related-card a:hover {
	box-shadow: var(--tm-shadow-card-hover);
	border-color: #F2CFB0;
}

.tmc-related-title {
	display: block;
	font-weight: 600;
	font-size: 15px;
	color: var(--tm-ink);
	margin-bottom: 4px;
}

.tmc-related-summary {
	display: block;
	font-size: 13.5px;
	color: var(--tm-body-light);
	line-height: 1.5;
}

/* ---------- Breadcrumbs ---------- */

.tmc-breadcrumbs {
	font-size: 13.5px;
	color: var(--tm-body-light);
	margin: 0 0 1rem;
}

.tmc-breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 0;
}

.tmc-breadcrumbs li + li::before {
	content: "›";
	margin-right: 6px;
	color: var(--tm-muted);
}

/* ---------- Sources / last reviewed / author ---------- */

.tmc-sources ul {
	font-size: 14px;
	color: var(--tm-body-light);
}

.tmc-last-reviewed {
	font-size: 13.5px;
	color: var(--tm-muted);
	border-top: 1px solid var(--tm-border-light);
	padding-top: 1rem;
	margin-top: 2rem;
}

.tm-author-box {
	display: flex;
	gap: 16px;
	align-items: center;
	background: var(--tm-surface);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-m);
	padding: 20px 22px;
}

/* ---------- Direct answer / key takeaways ---------- */

.tm-direct-answer {
	background: var(--tm-orange-light);
	border: 1px solid #F2CFB0;
	border-radius: var(--tm-radius-m);
	padding: 22px 26px;
}

.tm-direct-answer p {
	margin: 0;
	font-size: 1.0625rem;
	color: var(--tm-ink);
}

.tm-key-takeaways {
	background: var(--tm-surface);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-m);
	padding: 22px 26px;
}

/* ---------- Tables ---------- */

.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	border-collapse: collapse;
	min-width: 560px;
}

.wp-block-table th {
	background: var(--tm-surface);
	color: var(--tm-ink);
	font-weight: 700;
	text-align: left;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--tm-border);
	padding: 10px 14px;
}

/* ---------- Footer ---------- */

.tm-footer {
	background: #06122B;
	color: #8FA2C2;
	font-size: 14px;
}

.tm-footer a {
	color: #8FA2C2;
}

.tm-footer a:hover {
	color: var(--tm-white);
}

.tm-footer .tm-footer-heading {
	color: var(--tm-white);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.tm-footer .wp-block-navigation .wp-block-navigation-item__content {
	color: #8FA2C2;
	padding: 4px 0;
}

.tm-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--tm-white);
}

.tm-footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 13px;
}

/* ---------- Floating call button ---------- */

.tm-floating-call {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 60;
	background: var(--tm-orange);
	color: var(--tm-white) !important;
	font-weight: 700;
	font-size: 15px;
	padding: 15px 24px;
	border-radius: 999px;
	box-shadow: 0 12px 32px rgba(192, 80, 15, 0.45);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
}

.tm-floating-call:hover {
	background: var(--tm-orange-hover);
}

.tm-floating-call::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--tm-green);
}

/* ---------- Mobile navigation ---------- */

@media (max-width: 781px) {
	.tm-header-phone {
		display: none;
	}
	.tm-promo-bar a {
		display: block;
		margin: 4px 0 0;
	}
	.tm-floating-call {
		bottom: 16px;
		right: 16px;
		padding: 13px 18px;
		font-size: 14px;
	}
}

/* Modal overlay nav (core navigation block responsive mode) */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--tm-white);
	padding: 24px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.1rem;
	padding: 12px 0;
}

/* ---------- Archive grids ---------- */

.tm-archive-grid .wp-block-post {
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-l);
	padding: 24px;
	box-shadow: var(--tm-shadow-card);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tm-archive-grid .wp-block-post:hover {
	box-shadow: var(--tm-shadow-card-hover);
	border-color: #F2CFB0;
}

.tm-archive-grid .wp-block-post-title {
	font-size: 1.15rem;
	margin: 0 0 8px;
}

.tm-archive-grid .wp-block-post-title a {
	color: var(--tm-ink);
}

.tm-archive-grid .wp-block-post-title a:hover {
	color: var(--tm-orange);
}

.tm-archive-grid .wp-block-post-excerpt {
	font-size: 0.9rem;
	color: var(--tm-body-light);
}

/* ---------- Long-form content ---------- */

.tm-longform > * {
	margin-bottom: 1.1em;
}

.tm-longform h2 {
	margin-top: 2.2em;
}

.tm-longform h3 {
	margin-top: 1.6em;
}

/* Audit form container */
.tmc-audit-form {
	background: var(--tm-white);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-l);
	padding: 28px;
	box-shadow: var(--tm-shadow-card);
}

.tmc-audit-form--fallback {
	text-align: center;
}

/* HTML sitemap */
.tmc-html-sitemap ul {
	columns: 2;
	column-gap: 40px;
}

@media (max-width: 600px) {
	.tmc-html-sitemap ul {
		columns: 1;
	}
}

/* Search 404 helpers */
.tm-404-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

/* Images never shift layout */
img {
	max-width: 100%;
	height: auto;
}
