/*
Theme Name: Best Repair Shop
Theme URI: https://bestrepairshop.com
Author: Best Repair Shop
Description: A clean, trustworthy block theme for BestRepairShop.com, the guide to finding honest, expert auto repair. Blue-and-white palette, strong typography, and conversion-focused patterns.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestrepairshop
Tags: blog, one-column, custom-colors, custom-logo, block-patterns, full-site-editing
*/

/* Smooth anchors + small refinements beyond theme.json */
html {
	scroll-behavior: smooth;
}

a {
	text-underline-offset: 0.15em;
}

.wp-block-button__link {
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(15, 31, 61, 0.18);
}

.brs-card {
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.brs-card:hover {
	box-shadow: 0 10px 28px rgba(15, 31, 61, 0.10);
	transform: translateY(-2px);
}

.brs-sticky-header {
	box-shadow: 0 1px 0 rgba(15, 31, 61, 0.08);
}

/* Card headings: no underline, brand navy, blue on hover */
.brs-card h3 a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #0F1F3D);
}
.brs-card h3 a:hover,
.brs-card h3 a:focus {
	color: var(--wp--preset--color--primary, #1D4ED8);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.brs-card {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.brs-card:hover {
	box-shadow: 0 8px 24px rgba(15, 31, 61, 0.10);
	transform: translateY(-2px);
}
/* Post-title links elsewhere (Start here, Keep reading, archives) */
h2.wp-block-post-title a, h3.wp-block-post-title a, .wp-block-post-title a {
	text-decoration: none;
}
.wp-block-post-title a:hover, .wp-block-post-title a:focus {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Header search: blue rounded icon button (approved brand board) */
.brs-header-search .wp-block-search__button {
	background: var(--wp--preset--color--primary, #1D4ED8);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 0.55rem 0.7rem;
	cursor: pointer;
	transition: background 0.15s ease;
}
.brs-header-search .wp-block-search__button:hover {
	background: #0F1F3D;
}
.brs-header-search .wp-block-search__button svg {
	width: 1.15em;
	height: 1.15em;
	fill: currentColor;
}
.brs-header-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
	border: none;
	padding: 0;
}

/* Hero background image with left-side legibility overlay */
.brs-hero {
	background:
		linear-gradient(90deg, rgba(15,31,61,0.94) 0%, rgba(15,31,61,0.74) 38%, rgba(15,31,61,0.28) 68%, rgba(15,31,61,0.06) 100%),
		#0F1F3D url('assets/hero-bg.webp') right center / cover no-repeat;
}
.brs-hero .brs-hero-inner > * {
	margin-left: 0 !important;
	margin-right: auto !important;
}
@media (max-width: 781px) {
	.brs-hero {
		background:
			linear-gradient(rgba(15,31,61,0.85), rgba(15,31,61,0.85)),
			#0F1F3D url('assets/hero-bg-mobile.webp') right center / cover no-repeat;
	}
}

/* ============================================================
   v1.1.8 Guide components (answer box, cost table, trust box,
   byline, severity chips, breadcrumbs). Classes match published
   content: brs-answer, brs-byline, brs-cost-table, brs-dont.
   ============================================================ */

/* Answer-first block: the quotable direct answer under every H1 */
p.brs-answer {
	background: #F4F7FB;
	border-left: 4px solid #1D4ED8;
	border-radius: 0 10px 10px 0;
	padding: 1.1rem 1.35rem;
	font-size: 1.0625rem;
	line-height: 1.6;
}
p.brs-answer strong {
	color: #1D4ED8;
}

/* Byline / reviewed-by line */
p.brs-byline {
	font-size: 0.85rem;
	color: #5E6E85;
	border-bottom: 1px solid #E3E9F2;
	padding-bottom: 1rem;
	margin-top: 0.5rem;
}

/* Cost tables */
figure.brs-cost-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
	border: 1px solid #E3E9F2;
	border-radius: 12px;
	overflow: hidden;
}
figure.brs-cost-table thead th {
	background: #0F1F3D;
	color: rgba(255,255,255,0.9);
	text-align: left;
	padding: 0.7rem 0.9rem;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 0;
}
figure.brs-cost-table tbody td {
	padding: 0.7rem 0.9rem;
	border: 0;
	border-top: 1px solid #E3E9F2;
}
figure.brs-cost-table tbody tr:nth-child(even) {
	background: #F4F7FB;
}
figure.brs-cost-table td strong {
	color: #0F1F3D;
}

/* "When you don't need this repair" trust box */
p.brs-dont {
	border: 1px solid #CDE7D6;
	background: #F2FAF5;
	border-radius: 12px;
	padding: 1rem 1.25rem;
}

/* Severity chips (symptom cards and inline use) */
.brs-sev {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2rem 0.6rem;
	border-radius: 99px;
	vertical-align: middle;
}
.brs-sev-ok   { background: #EAF7EE; color: #16A34A; }
.brs-sev-cau  { background: #FFF7E8; color: #8A5A00; }
.brs-sev-stop { background: #FDECEC; color: #DC2626; }

/* Breadcrumbs */
.brs-breadcrumbs {
	font-size: 0.82rem;
	color: #5E6E85;
	margin-bottom: 0.75rem;
}
.brs-breadcrumbs a {
	color: #1D4ED8;
	text-decoration: none;
}
.brs-breadcrumbs .sep {
	margin: 0 0.4rem;
	color: #A8B4C6;
}

/* v1.2.0 On-page table of contents */
p.brs-toc {
	background: #F4F7FB;
	border: 1px solid #E3E9F2;
	border-radius: 12px;
	padding: 0.85rem 1.1rem;
	font-size: 0.92rem;
	line-height: 2.1;
}
p.brs-toc strong {
	color: #5E6E85;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.75rem;
	margin-right: 0.35rem;
}
p.brs-toc a {
	display: inline-block;
	background: #fff;
	border: 1px solid #E3E9F2;
	border-radius: 99px;
	padding: 0.25rem 0.8rem;
	margin: 0.15rem 0.25rem 0.15rem 0;
	color: #1D4ED8;
	font-weight: 600;
	text-decoration: none;
}
p.brs-toc a:hover {
	border-color: #1D4ED8;
}

/* v1.2.0 Explainer figures */
figure.brs-figure {
	margin: 1.75rem 0;
}
figure.brs-figure img {
	border-radius: 12px;
	border: 1px solid #E3E9F2;
	width: 100%;
	height: auto;
	/* reserves layout space without width/height attributes, so no CLS
	   and the block stays valid in the editor */
	aspect-ratio: 1200 / 630;
}

/* Anchor offset so TOC jumps do not hide headings under sticky UI */
:where(h2[id], h3[id]) {
	scroll-margin-top: 1.5rem;
}


/* ---------------------------------------------------------------
 * v1.2.2 Accessibility: contrast and tap targets
 * Fixes Lighthouse a11y findings recorded 2026-07-25.
 * ------------------------------------------------------------ */

/* Links on the dark footer were brand blue #1D4ED8 on navy #0F1F3D,
   a contrast ratio of 2.44. #588FFF is the reversed-logo blue and
   measures 5.29 against the same navy, so it passes AA and stays on brand. */
.brs-footer a {
	color: #588FFF;
}
.brs-footer a:hover,
.brs-footer a:focus {
	color: #A5C4FF;
}

/* Footer link lists were stacked tighter than the 24px minimum tap target. */
.brs-footer .wp-block-list li {
	margin-bottom: 0.35rem;
}
.brs-footer .wp-block-list a {
	display: inline-block;
	padding: 0.35rem 0;
	line-height: 1.35;
}
