/*
Theme Name: MacMechanic
Description: Clean rebuild of the MacMechanic site (2026). Written from scratch; only artwork carried over from the 2018 design.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: macmechanic
*/

:root {
	--mm-blue: #5b8bbd;
	--mm-blue-dark: #2c5d87;
	--mm-navy: #0b3a4f;
	--mm-orange: #d8612e;
	--mm-orange-dark: #b94c1f;
	--mm-grey: #6d6e70;
	--mm-text: #3d3f42;
	--mm-light: #f3f4f5;
	--mm-footer: #d9d9d9;
	--mm-width: 1100px;
	--mm-heading: "Open Sans", Arial, sans-serif;
	--mm-body: Raleway, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--mm-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--mm-text);
	background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--mm-blue-dark); }
a:hover { color: var(--mm-orange); }
h1, h2, h3, h4, h5 { font-family: var(--mm-heading); color: #233746; line-height: 1.25; margin: 1.4em 0 .6em; }
h1 { font-size: 2rem; text-transform: uppercase; font-weight: 700; }
h2 { font-size: 1.6rem; text-transform: uppercase; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
.wrap { max-width: var(--mm-width); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 8px 12px; }

/* Header */
.site-header { border-bottom: 1px solid #ddd; background: #fff; position: relative; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 10px; }
.site-logo img { width: 210px; display: block; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.header-contact { display: flex; align-items: center; gap: 14px; }
.header-phone { font-size: 1.15rem; color: var(--mm-grey); text-decoration: none; white-space: nowrap; }
.header-livehelp img { width: 120px; display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.main-nav a { text-decoration: none; text-transform: uppercase; font-size: .9rem; color: #333; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { border-bottom-color: var(--mm-grey); color: #000; }
.nav-toggle { display: none; background: none; border: 1px solid #ccc; border-radius: 4px; padding: 6px 10px; font-size: 1rem; cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: 380px; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--mm-blue) center / cover no-repeat; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.35)); }
.hero-inner { position: relative; padding: 60px 20px; max-width: 900px; }
.hero h1, .hero .hero-title { font-family: var(--mm-heading); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; text-transform: uppercase; color: #fff; margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.hero .hero-sub { display: inline-block; margin-top: 22px; background: rgba(91,139,189,.9); color: #fff; font-family: var(--mm-heading); font-weight: 700; padding: 6px 14px; font-size: 1rem; }
.hero-front { min-height: 520px; }
.hero-slides .hero-slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; }
.hero-slides .hero-slide.is-active { opacity: 1; }

/* Content */
.breadcrumbs { font-size: .78rem; color: #888; padding: 14px 0 0; }
.breadcrumbs a { color: #888; text-decoration: none; }
.site-main { padding: 20px 0 50px; }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.layout-sidebar .sidebar { border-left: 1px solid #ccc; padding-left: 30px; text-align: center; }
.entry-content > :first-child { margin-top: .6em; }
.entry-content h2.rule { border-bottom: 1px solid #000; padding-bottom: 4px; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 40%; }
.alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 40%; }
.aligncenter { max-width: 100%; }
.aligncenter { display: block; margin: 1em auto; }
.clear { clear: both; }
.center { text-align: center; }
hr, .divider { border: 0; border-top: 1px solid #ddd; margin: 2.5em 0; clear: both; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

.button, .entry-content .button, .wp-block-button__link {
	display: inline-block; background: var(--mm-orange); color: #fff; text-decoration: none; text-transform: uppercase; font-family: var(--mm-heading);
	font-weight: 700; font-size: .85rem; letter-spacing: .03em; padding: 11px 22px; border: 0; border-radius: 3px; box-shadow: 0 3px 8px rgba(0,0,0,.25); cursor: pointer;
}
.button:hover, .entry-content .button:hover { background: var(--mm-orange-dark); color: #fff; }
.button.navy { background: linear-gradient(var(--mm-navy), #1e5672); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 30px 0; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 300px; padding: 22px 24px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); background: #fff center / cover no-repeat; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.92) 60%, rgba(255,255,255,.1)); }
.card > * { position: relative; }
.card h2 { margin: 0; font-size: 1.35rem; }
.card p { margin: 0; font-weight: 600; }
.card > :last-child { margin-top: auto; }
.card-repairs { background-image: var(--mm-img-repairs); }
.card-upgrades { background-image: var(--mm-img-upgrades); }
.card-recovery { background-image: var(--mm-img-recovery); }

.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; margin: 30px 0; }
.cols-2 > :first-child > :first-child { margin-top: 0; }

.map { position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 280px; border: 0; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Forms (Fluent Forms + Live Help) */
.live-help-form { max-width: 600px; margin: 0 auto; }
.live-help-form label { display: block; font-weight: 600; margin-top: 12px; }
.live-help-form input[type=text] { width: 100%; padding: 9px 10px; border: 1px solid #bbb; border-radius: 3px; font: inherit; }
.live-help-form .button { margin-top: 16px; }
.fluentform .ff-btn-submit { background: var(--mm-orange) !important; border-radius: 3px !important; text-transform: uppercase; font-weight: 700; }

/* Footer */
.site-footer { background: var(--mm-footer); padding: 40px 0 20px; font-size: .95rem; margin-top: 20px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.site-footer h3 { margin: 0 0 .5em; font-size: 1.2rem; color: #222; }
.site-footer .phone { font-size: 1.1rem; font-weight: 700; color: var(--mm-blue-dark); text-decoration: none; }
.footer-award { display: flex; gap: 24px; align-items: center; }
.footer-award img { width: 130px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid #c4c4c4; margin-top: 30px; padding-top: 16px; font-size: .85rem; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.footer-bottom a { color: var(--mm-orange); text-decoration: none; text-transform: uppercase; }

@media (max-width: 860px) {
	.cards, .cols-2, .footer-cols, .layout-sidebar { grid-template-columns: 1fr; }
	.layout-sidebar .sidebar { border-left: 0; padding-left: 0; border-top: 1px solid #ccc; padding-top: 20px; }
	.site-header .wrap { flex-wrap: wrap; }
	.nav-toggle { display: inline-block; }
	.main-nav { width: 100%; display: none; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { display: block; padding: 10px 0; border-bottom: 1px solid #eee; }
	.site-logo img { width: 170px; }
	.header-right { width: 100%; align-items: stretch; }
	.header-contact { justify-content: space-between; gap: 8px; }
	.header-livehelp img { width: 100px; }
	.hero { min-height: 260px; }
	.hero-front { min-height: 340px; }
	.alignleft, .alignright { float: none; margin: 1em auto; display: block; }
}
