/*
Theme Name: Northern City Towing
Description: Rebuilt 2026 by Black Sheep Creative from the 2013 Insight Digital theme. Same look; responsive, accessible, PHP 8 safe, no jQuery.
Author: Black Sheep Creative
Author URI: https://blacksheepcreative.com.au/
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nct
License: Proprietary
*/

/* ---------- Tokens ---------- */
@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter-latin-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--red: #ba2d33;
	--red-dark: #962228;
	--grey: #f2f2f2;
	--grey-2: #e4e4e4;
	--ink: #1c1c1c;
	--muted: #555;
	--white: #fff;
	--wrap: 1080px;
	--gap: clamp(1rem, 3vw, 1.75rem);
	--section: clamp(2.5rem, 6vw, 3.5rem);
	--serif: "Bitter", "Rockwell", Georgia, Cambria, "Times New Roman", serif;
	--sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	--radius: 3px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--red); text-underline-offset: 0.15em; }
a:hover { color: var(--red-dark); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 0.75em;
	text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); color: var(--red); }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
h3 { font-size: 1.2rem; }

p, ul, ol, dl { margin: 0 0 1em; }

.wrap {
	width: min(100% - 2 * var(--gap), var(--wrap));
	margin-inline: auto;
}

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

.skip-link:focus {
	position: fixed !important;
	top: 0.5rem; left: 0.5rem;
	z-index: 1000;
	width: auto; height: auto;
	clip: auto;
	padding: 0.75rem 1rem;
	background: var(--white);
	color: var(--ink);
	font-weight: 700;
}

.icon { width: 1.2em; height: 1.2em; flex: none; }

.site-main:focus { outline: none; }

/* ---------- Buttons ---------- */
.button,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0.7rem 1.4rem;
	border: 2px solid var(--red);
	border-radius: var(--radius);
	background: var(--red);
	color: var(--white);
	font: 600 1rem/1.2 var(--serif);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.button:hover,
.wpcf7-submit:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }

.button--ghost { background: transparent; color: var(--red); }
.button--ghost:hover { background: var(--red); color: var(--white); }
.button--ghost-dark { background: transparent; border-color: var(--ink); color: var(--ink); }
.button--ghost-dark:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Header ---------- */
.topbar { background: var(--grey); }

.nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--serif);
}
.nav a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 0.75rem;
	color: var(--muted);
	text-decoration: none;
}
.nav a:hover,
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--red); }
.nav .icon { width: 22px; height: 22px; }

.nav .sub-menu {
	position: absolute;
	display: none;
	margin: 0; padding: 0;
	list-style: none;
	background: var(--grey);
	z-index: 50;
}
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu { display: block; }

.brandbar { background: var(--red); color: var(--white); }
.brandbar .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	min-height: 105px;
	padding-block: 1rem;
	background: url("assets/img/nct-towing-hook.png") no-repeat right top;
	padding-right: 48px;
}
.logo { display: block; flex: none; }
.logo img { width: 114px; height: 53px; }

.tagline {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.4em;
}
.tagline span { color: rgba(255, 255, 255, 0.85); }
.tagline-phone {
	color: var(--white);
	font-size: 1.35rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.tagline-phone:hover { color: var(--white); text-decoration: underline; }

@media (max-width: 599px) {
	.brandbar .wrap { justify-content: center; text-align: center; background: none; padding-right: 0; }
	.tagline { justify-content: center; }
	.nav { justify-content: center; }
}

/* ---------- Hero slider ---------- */
.hero { background: var(--grey); }
.hero-inner { position: relative; max-width: 1140px; margin-inline: auto; }

.slides { display: grid; }
.slide {
	grid-area: 1 / 1;
	margin: 0;
	aspect-ratio: 1124 / 338;
	min-height: 180px;
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide:not(.is-active) { display: none; }

.slides.is-enhanced .slide { display: block; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s 0.8s; }
.slides.is-enhanced .slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease; }

.slider-controls {
	position: absolute;
	right: 0.75rem;
	bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.5rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.45);
}
.slider-controls[hidden] { display: none; }
.slider-toggle {
	display: grid;
	place-items: center;
	width: 32px; height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--white);
	cursor: pointer;
}
.slider-toggle .icon { width: 18px; height: 18px; }
.slider-toggle .icon-play,
.slider-toggle.is-paused .icon-pause { display: none; }
.slider-toggle.is-paused .icon-play { display: block; }
.slider-dots { display: flex; gap: 0.15rem; }
.slider-dots button {
	position: relative;
	width: 24px; height: 32px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.slider-dots button::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: 10px; height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
}
.slider-dots button[aria-current="true"]::after { background: var(--white); }

/* ---------- Intro ---------- */
.intro { padding-block: var(--section) 1.5rem; }
.intro .entry-content { max-width: 46rem; }
.intro-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Lists in content use the red chevron, as in 2013. */
.entry-content ul { padding: 0; list-style: none; }
.entry-content ul li { position: relative; padding-left: 1.4em; margin-bottom: 0.35em; }
.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0.1em; top: 0.45em;
	width: 0.45em; height: 0.45em;
	border-top: 2px solid var(--red);
	border-right: 2px solid var(--red);
	transform: rotate(45deg);
}
.entry-content img { height: auto; }
.lead { font-family: var(--serif); font-size: 1.25rem; }
.entry-content h1 + .lead { margin-top: -0.25rem; }

/* ---------- Services grid ---------- */
.services { padding-block: 1rem var(--section); }

.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1.25rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.service-card {
	position: relative;
	overflow: hidden;
	aspect-ratio: 481 / 282;
	background: var(--grey);
}
.service-card img { width: 100%; height: 100%; object-fit: cover; }

.service-caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 0.65rem 1rem;
	background: rgba(150, 34, 40, 0.9);
	color: var(--white);
}
.service-caption h3 { margin: 0; font-size: 1.05rem; }
.service-caption p { margin: 0.35rem 0 0; font-size: 0.9rem; line-height: 1.4; }

/* On devices that can hover, the description slides up like the 2013 site. */
@media (hover: hover) {
	.service-caption { transform: translateY(calc(100% - 2.6rem)); transition: transform 0.4s ease; }
	.service-caption p { opacity: 0; transition: opacity 0.3s ease; }
	.service-card:hover .service-caption,
	.service-card:focus-within .service-caption { transform: none; }
	.service-card:hover .service-caption p,
	.service-card:focus-within .service-caption p { opacity: 1; }
}

.services-more {
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--red);
	background: var(--grey);
	font-family: var(--serif);
	font-size: 1.1rem;
}

/* ---------- Why choose us ---------- */
.reasons { padding-block: var(--section); background: var(--grey); }
.reasons h2 { text-align: center; }
.reason-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 2rem;
}
.reason h3 { display: flex; align-items: center; gap: 0.5rem; }
.reason .icon { color: var(--red); }
.reason p { margin: 0; color: var(--muted); }

/* ---------- Booking ---------- */
.booking {
	padding-block: var(--section);
	color: var(--white);
	background:
		linear-gradient(rgba(20, 20, 20, 0.62), rgba(20, 20, 20, 0.72)),
		url("assets/img/road.jpg") center / cover no-repeat;
	background:
		linear-gradient(rgba(20, 20, 20, 0.62), rgba(20, 20, 20, 0.72)),
		image-set(url("assets/img/road.webp") type("image/webp"), url("assets/img/road.jpg") type("image/jpeg")) center / cover no-repeat;
}
.booking a { color: var(--white); }
.booking-inner { display: grid; gap: 1.5rem 3rem; }
.booking h2 { margin: 0; }
.booking-notes p { display: flex; gap: 0.75rem; }
.booking-notes .icon { width: 28px; height: 28px; margin-top: 0.1em; }
@media (min-width: 800px) {
	.booking-inner { grid-template-columns: 2fr 1fr; }
	.booking h2 { grid-column: 1 / -1; }
}

/* ---------- Content pages ---------- */
.with-sidebar {
	display: grid;
	gap: 2.5rem;
	padding-block: var(--section);
}
@media (min-width: 900px) {
	.with-sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3.5rem; }
}
.page-title { margin-bottom: 1rem; }

.accordion { margin: 1.5rem 0 2.5rem; border-top: 1px solid var(--grey-2); }
.accordion-item { border-bottom: 1px solid var(--grey-2); }
.accordion-item summary {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 52px;
	padding: 0.5rem 0;
	font: 600 1.15rem/1.3 var(--serif);
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .icon { color: var(--red); width: 18px; height: 18px; transition: transform 0.2s; }
.accordion-item[open] summary .icon { transform: rotate(90deg); }
.accordion-item summary:hover { color: var(--red); }
.accordion-body { display: grid; gap: 1rem; padding: 0 0 1.25rem; }
@media (min-width: 600px) { .accordion-body { grid-template-columns: 220px 1fr; align-items: start; } }
.accordion-thumb { width: 100%; height: auto; }
.accordion-text p:last-child { margin: 0; }

.how-to-book { padding: 1.5rem; background: var(--grey); }
.how-to-book h2 { color: var(--red); }

/* Contact details */
.contact-list { display: grid; gap: 0.6rem; margin: 0 0 2rem; }
.contact-list div { display: flex; align-items: baseline; gap: 0.75rem; }
.contact-list dt {
	min-width: 5.5rem;
	padding: 0.15rem 0.6rem;
	background: var(--red);
	color: var(--white);
	font-size: 0.9rem;
	text-align: center;
}
.contact-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.contact-list a { color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--red); text-decoration: underline; }

/* Sidebar */
.sidebar-title { color: var(--red); font-size: 1.3rem; }
.sidebar-reasons { background: var(--grey) center / cover no-repeat; }
.sidebar-reasons ul {
	margin: 0;
	padding: 1.25rem 1.5rem;
	list-style: none;
	background: rgba(255, 255, 255, 0.85);
	font-family: var(--serif);
}
.sidebar-reasons li { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; }
.sidebar-reasons .icon { color: var(--red); }
.sidebar-call { margin-top: 1.5rem; padding: 1.5rem; background: var(--red); color: var(--white); text-align: center; }
.sidebar-call p { margin: 0 0 0.75rem; font: 600 1.15rem/1.3 var(--serif); }
.sidebar-call .button { background: var(--white); border-color: var(--white); color: var(--red); }
.sidebar-call .button:hover { background: var(--grey); border-color: var(--grey); color: var(--red-dark); }
.sidebar-call .sidebar-small { margin: 0.75rem 0 0; font: 400 0.9rem/1.4 var(--sans); opacity: 0.9; }
.widget { margin-top: 2rem; }

/* ---------- Contact Form 7 ---------- */
.nct-form { display: grid; gap: 0.85rem; }
@media (min-width: 600px) {
	.nct-form:not(.nct-form--stacked) { grid-template-columns: 1fr 1fr; }
	.nct-field--full { grid-column: 1 / -1; }
}
.nct-field label { display: block; }
.wpcf7 p { margin: 0; }
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7-form-control-wrap { display: block; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	min-height: 52px;
	padding: 0.85rem 1rem;
	border: 1px solid #bdbdbd;
	border-radius: var(--radius);
	background: var(--white);
	color: var(--ink);
	font: inherit;
}
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 ::placeholder { color: #6b6b6b; opacity: 1; }
.wpcf7 input:focus,
.wpcf7 textarea:focus { border-color: var(--red); outline: 3px solid rgba(186, 45, 51, 0.35); outline-offset: 0; }

.booking .wpcf7-submit { background: transparent; border-color: var(--white); }
.booking .wpcf7-submit:hover { background: rgba(255, 255, 255, 0.15); }

.wpcf7-not-valid-tip { display: block; margin-top: 0.3rem; font-size: 0.9rem; color: var(--red); }
.booking .wpcf7-not-valid-tip { color: #ffd6d8; }
.wpcf7 .screen-reader-response {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); border: 0;
}
.wpcf7-response-output { margin: 1rem 0 0; padding: 0.75rem 1rem; border: 2px solid currentColor; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-spinner { display: none; }
.wpcf7 form.submitting .wpcf7-submit { opacity: 0.6; cursor: progress; }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--section) 2rem; background: var(--grey); }
.footer-alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2.5rem;
	padding: 0.5rem 0.5rem 0.5rem 1rem;
	background: var(--white);
}
.footer-alert p { display: flex; align-items: center; gap: 0.6rem; margin: 0; font: 600 1.1rem/1.3 var(--serif); }
.footer-alert p .icon { color: var(--red); }
.to-top {
	display: grid;
	place-items: center;
	width: 48px; height: 48px;
	background: var(--red);
	color: var(--white);
}
.to-top:hover { background: var(--red-dark); color: var(--white); }

.footer-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 2rem;
}
.footer-title { font-size: 1.15rem; color: var(--red); }
.footer-list { margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.footer-list li { margin-bottom: 0.35rem; }
.footer-list li a { display: inline-block; padding: 0.2rem 0; color: var(--ink); text-decoration: none; }
.footer-list li a:hover { color: var(--red); text-decoration: underline; }
.footer-list div { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.footer-list dt { min-width: 5.5rem; color: var(--muted); }
.footer-list dd { margin: 0; overflow-wrap: anywhere; }
.footer-list dd a { color: var(--ink); }

.copyright {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	margin: 3rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

/* Sticky call button on phones */
.call-fab { display: none; }
@media (max-width: 599px) {
	.call-fab {
		position: fixed;
		right: 1rem; bottom: 1rem;
		z-index: 90;
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		min-height: 52px;
		padding: 0 1.2rem;
		border-radius: 999px;
		background: var(--red);
		color: var(--white);
		font: 700 1rem/1 var(--serif);
		text-decoration: none;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	}
	.call-fab:hover { color: var(--white); background: var(--red-dark); }
	.site-footer { padding-bottom: 6rem; }
}

/* ---------- Print ---------- */
@media print {
	.topbar, .hero, .booking, .call-fab, .to-top, .sidebar { display: none !important; }
	.brandbar { background: none; color: #000; }
}
