/*
 * Azeb Trucks — homepage (index.php).
 * Loaded after site-chrome.css on the front page only. Uses the --az-* tokens from refresh.css.
 */

.hm {
	--hm-line: #e3e6df;
	--hm-tint: #eef0ea;
	--hm-wa: #1f9d55;
	--hm-display: 'Barlow Semi Condensed', 'Arial Narrow', 'Inter', system-ui, sans-serif;
	--hm-shadow: 0 1px 2px rgba(20, 25, 28, .04), 0 10px 30px rgba(20, 25, 28, .07);
	clear: both; /* the header's Bootstrap columns are floated */
	background: #f5f6f2;
	color: var(--az-ink);
	font: 400 15px/1.6 var(--az-font);
}
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
.hm h1, .hm h2, .hm h3, .hm p, .hm ul { margin: 0; }
.hm h1, .hm h2, .hm h3 { text-transform: none; color: var(--az-ink); }

.hm-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hm-i-fill { fill: currentColor; stroke: none; }

.hm-eyebrow { margin-bottom: 12px !important; font: 600 12px/1 var(--az-font); letter-spacing: .12em; text-transform: uppercase; color: var(--az-brand-ink); }
.hm .hm-h2,
.hm .hm-section-head h2 { font: 700 clamp(26px, 3.2vw, 38px)/1.08 var(--hm-display); letter-spacing: -.005em; text-wrap: balance; }

.hm-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; font: 600 14.5px/1 var(--az-font); color: var(--az-ink); white-space: nowrap; }
.hm-link:hover, .hm-link:focus { color: var(--az-ink); text-decoration: none; }
.hm-link .hm-i { transition: transform .15s ease; }
.hm-link:hover .hm-i { transform: translateX(3px); }

.hm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 15px 22px; border: 1px solid transparent; border-radius: 10px;
	font: 600 15px/1 var(--az-font); white-space: nowrap; cursor: pointer; text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
.hm-btn:hover, .hm-btn:focus { text-decoration: none; }
.hm-btn-sm { padding: 11px 16px; font-size: 14px; }
.hm-btn-primary, .hm-btn-primary:focus { background: var(--az-brand); color: #14191c; }
.hm-btn-primary:hover { background: var(--az-brand-hover); color: #14191c; }
.hm-btn-dark, .hm-btn-dark:focus { background: var(--az-ink); color: #fff; }
.hm-btn-dark:hover { opacity: .9; color: #fff; }
.hm-btn-ghost, .hm-btn-ghost:focus { background: #fff; color: var(--az-ink); border-color: var(--hm-line); }
.hm-btn-ghost:hover { border-color: var(--az-ink-2); color: var(--az-ink); }
.hm-btn-wa, .hm-btn-wa:focus { background: #fff; color: var(--hm-wa); border-color: rgba(31, 157, 85, .45); }
.hm-btn-wa:hover { background: rgba(31, 157, 85, .07); color: var(--hm-wa); }

/* ---------- Top: truck-type shortcuts, search by make ---------- */

.hm-top { padding: 28px 0 8px; }

.hm-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.hm-quick a {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 16px 10px 14px; text-align: center;
	background: #fff; border: 1px solid var(--hm-line); border-radius: 14px;
	transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease;
}
.hm-quick a:hover, .hm-quick a:focus { border-color: var(--az-ink-2); box-shadow: var(--hm-shadow); transform: translateY(-2px); text-decoration: none; }
/* The PNG silhouettes are used as masks so their colour follows the palette */
.hm-quick-icon {
	display: block; width: 80px; height: 50px; margin-bottom: 8px;
	background-color: var(--az-ink-2);
	-webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
	transition: background-color .15s ease;
}
.hm-quick a:hover .hm-quick-icon, .hm-quick a:focus .hm-quick-icon { background-color: var(--az-ink); }
.hm-quick b { font: 600 14.5px/1.25 var(--az-font); color: var(--az-ink); }
.hm-quick small { font-size: 12.5px; color: var(--az-muted); font-variant-numeric: tabular-nums; }

.hm-finder {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end;
	margin-top: 20px; padding: 20px;
	background: #fff; border: 1px solid var(--hm-line); border-radius: 14px; box-shadow: var(--hm-shadow);
}
.hm-finder label { display: grid; gap: 6px; margin: 0; min-width: 0; font: 500 12.5px/1.3 var(--az-font); color: var(--az-ink-2); }
.hm-finder select {
	width: 100%; height: 48px; padding: 0 12px;
	font: 400 15px var(--az-font); color: var(--az-ink);
	background-color: #fff; border: 1px solid var(--hm-line); border-radius: 10px; box-shadow: none;
}
.hm-finder select:focus { outline: none; border-color: var(--az-brand-ink); box-shadow: 0 0 0 3px rgba(184, 193, 20, .3); }
.hm-finder .hm-btn { height: 48px; padding-top: 0; padding-bottom: 0; }

/* ---------- Latest stock ---------- */

.hm-stock { padding: 40px 0 0; }
.hm-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.hm-stock-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
/* Trim the heading's box to its capital letters, so the pill centres on the text and not on the line box */
.hm .hm-stock-title h2 { text-box: trim-both cap alphabetic; }
.hm-count {
	display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
	background: #fff; border: 1px solid var(--hm-line); border-radius: 999px;
	font: 400 13px/1 var(--az-font); color: var(--az-ink-2); white-space: nowrap;
}
.hm-count b { font-weight: 600; color: var(--az-ink); font-variant-numeric: tabular-nums; }
.hm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hm-wa); box-shadow: 0 0 0 3px rgba(31, 157, 85, .15); }
.hm-stock-more { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- Proof numbers ---------- */

.hm-proof { padding: 64px 0; }
.hm-proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hm-line); border-bottom: 1px solid var(--hm-line); }
.hm-proof-grid > div { padding: 28px 24px; min-width: 0; }
.hm-proof-grid > div + div { border-left: 1px solid var(--hm-line); }
.hm-proof b { display: block; font: 700 42px/1 var(--hm-display); letter-spacing: -.01em; color: var(--az-ink); overflow-wrap: anywhere; }
.hm-proof b sup { top: -.8em; font-size: .5em; color: var(--az-brand-hover); margin-left: 2px; }
.hm-proof span { display: block; margin-top: 10px; max-width: 26ch; font-size: 14px; line-height: 1.45; color: var(--az-ink-2); }

/* ---------- Makes ---------- */

.hm-makes { padding: 72px 0; background: #fff; border-top: 1px solid var(--hm-line); border-bottom: 1px solid var(--hm-line); }
.hm-makes-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; }
.hm-makes-grid::before, .hm-makes-grid::after { display: none; } /* Bootstrap clearfix would become grid items */
.hm-makes-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.hm .hm-makes-cols h3 { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--hm-line); font: 600 12px/1 var(--az-font); letter-spacing: .12em; text-transform: uppercase; color: var(--az-muted); }
.hm-makes-cols ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.hm-makes-cols li { font: 600 21px/1.25 var(--hm-display); color: var(--az-ink); }
.hm-makes-cols li.hm-and-more { margin-top: 4px; font: 400 14px/1.4 var(--az-font); color: var(--az-muted); }

/* ---------- UK / export ---------- */

.hm-markets-wrap { padding: 72px 0; }
.hm-markets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hm-market { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; }
.hm-market-photo { aspect-ratio: 16 / 7; overflow: hidden; background: var(--hm-tint); }
.hm-market-photo img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.hm-market-body { display: flex; flex: 1; flex-direction: column; gap: 18px; padding: 32px; }
.hm .hm-market h3 { font: 700 28px/1.1 var(--hm-display); }
.hm-market ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.hm-market li { display: flex; gap: 12px; color: var(--az-ink-2); }
.hm-market li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--az-brand); }
.hm-market .hm-btn { align-self: flex-start; margin-top: auto; }

/* ---------- Closing band ---------- */

.hm-band-wrap { padding: 0 0 72px; }
.hm-band {
	display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
	padding: 44px 48px; background: #fff; border: 1px solid var(--hm-line); border-radius: 18px; box-shadow: var(--hm-shadow);
}
.hm .hm-band h2 { font: 700 clamp(26px, 3vw, 34px)/1.1 var(--hm-display); }
.hm-band p { margin-top: 8px; color: var(--az-ink-2); }
.hm-band-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- More about (the full text from WordPress, kept for search engines) ---------- */

.hm-more-wrap { padding: 0 0 64px; }
.hm-more { border-top: 1px solid var(--hm-line); border-bottom: 1px solid var(--hm-line); }
.hm-more summary { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; list-style: none; font: 600 18px/1.2 var(--hm-display); color: var(--az-ink); }
.hm-more summary::-webkit-details-marker { display: none; }
.hm-more summary .hm-i { transition: transform .2s ease; }
.hm-more[open] summary .hm-i { transform: rotate(180deg); }
.hm-more-text { columns: 2; column-gap: 48px; padding-bottom: 28px; font-size: 14.5px; line-height: 1.7; color: var(--az-ink-2); }
.hm-more-text p { margin: 0 0 12px; break-inside: avoid; color: inherit; font: inherit; text-align: left; }
.hm-more-text p:empty { display: none; }
.hm .hm-more-text h3 { margin: 6px 0 8px; font: 600 17px/1.3 var(--hm-display); break-after: avoid; }

/* ---------- Tablet and phone ---------- */

@media (max-width: 1080px) {
	.hm-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hm-makes-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 767px) {
	.hm-top { padding-top: 20px; }
	.hm-quick { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -15px; padding: 2px 15px 6px; }
	.hm-quick::-webkit-scrollbar { display: none; }
	.hm-quick a { flex: 0 0 132px; }
	.hm-quick-icon { width: 68px; height: 42px; }
	.hm-finder { gap: 10px; padding: 14px; }
	.hm-finder select { height: 44px; font-size: 14.5px; }
	.hm-finder .hm-btn { height: 44px; }
	.hm-section-head .hm-link { display: none; } /* the button under the grid does the same job */
	.hm-proof { padding: 48px 0; }
	.hm-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-proof-grid > div { padding: 22px 16px; }
	.hm-proof-grid > div:nth-child(3) { border-left: 0; }
	.hm-proof-grid > div:nth-child(n+3) { border-top: 1px solid var(--hm-line); }
	.hm-proof b { font-size: 32px; }
	.hm-makes, .hm-markets-wrap { padding: 48px 0; }
	.hm-makes-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.hm-markets { grid-template-columns: minmax(0, 1fr); }
	.hm-market-body { padding: 24px; }
	.hm-band { padding: 28px 24px; }
	.hm-more-text { columns: 1; }
}

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