/*
Theme Name: Roseey 4x4 Recovery
Author: Nathan Farrugia
Description: Local starter theme for Roseey 4x4 Recovery.
Version: 0.2.9
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: roseey
*/

:root {
	--roseey-black: #090909;
	--roseey-ink: #1d1d1d;
	--roseey-red: #d71920;
	--roseey-orange: #ff6a00;
	--roseey-white: #ffffff;
	--roseey-muted: #f4f2ef;
	--roseey-line: #d8d3cc;
	--roseey-max: 1180px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--roseey-white);
	color: var(--roseey-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	line-height: 1.55;
}

a {
	color: inherit;
	text-decoration-color: var(--roseey-red);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

img {
	height: auto;
	max-width: 100%;
}

.site-header {
	background: var(--roseey-black);
	color: var(--roseey-white);
	position: sticky;
	top: 0;
	z-index: 20;
}

.site-header__inner,
.site-footer__inner,
.content-wrap {
	margin: 0 auto;
	max-width: var(--roseey-max);
	padding: 0 22px;
}

.site-header__inner {
	align-items: center;
	display: flex;
	gap: 22px;
	justify-content: space-between;
	min-height: 76px;
}

.site-brand {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
	text-decoration: none;
}

.site-brand__logo {
	display: block;
	height: 64px;
	max-width: 170px;
	object-fit: contain;
	width: auto;
}

.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav a {
	color: var(--roseey-white);
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
	color: var(--roseey-orange);
}

.call-button,
.wp-block-button__link,
.button-link {
	background: var(--roseey-red);
	border: 0;
	border-radius: 6px;
	color: var(--roseey-white);
	display: inline-flex;
	font-weight: 800;
	padding: 13px 18px;
	text-decoration: none;
	text-transform: uppercase;
}

.call-button {
	background: var(--roseey-orange);
	color: var(--roseey-black);
	white-space: nowrap;
}

.hero {
	background:
		linear-gradient(110deg, rgba(9, 9, 9, .95), rgba(9, 9, 9, .75) 46%, rgba(215, 25, 32, .86)),
		radial-gradient(circle at 80% 20%, rgba(255, 106, 0, .32), transparent 30%),
		var(--roseey-black);
	background-position: center;
	background-size: cover;
	color: var(--roseey-white);
}

.hero--home {
	background-image:
		linear-gradient(110deg, rgba(9, 9, 9, .92), rgba(9, 9, 9, .55) 46%, rgba(215, 25, 32, .55)),
		url("assets/images/gallery/roseey-4x4-recovery-off-road-assistance.jpg");
}

.hero__inner {
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
	margin: 0 auto;
	max-width: var(--roseey-max);
	min-height: 430px;
	padding: 52px 22px 42px;
}

.hero h1 {
	font-size: clamp(2.35rem, 5.6vw, 5rem);
	line-height: .95;
	margin: 0 0 18px;
	max-width: 900px;
	text-transform: uppercase;
}

.hero p {
	font-size: clamp(1.05rem, 1.7vw, 1.28rem);
	margin: 0 0 22px;
	max-width: 760px;
}

.hero-card {
	align-self: end;
	background: var(--roseey-white);
	border-top: 8px solid var(--roseey-orange);
	color: var(--roseey-black);
	padding: 28px;
}

.hero-card h2 {
	font-size: 1.35rem;
	margin: 0 0 12px;
}

.hero-card p {
	font-size: 1rem;
	margin: 0 0 16px;
}

.section {
	padding: 66px 0;
}

.section--dark {
	background: var(--roseey-black);
	color: var(--roseey-white);
}

.section--muted {
	background: var(--roseey-muted);
}

.section h2,
.entry-content h2 {
	font-size: clamp(2rem, 4vw, 3.4rem);
	line-height: 1;
	margin: 0 0 22px;
	text-transform: uppercase;
}

.section h3,
.entry-content h3 {
	font-size: 1.35rem;
	margin: 0 0 10px;
}

.grid {
	display: grid;
	gap: 22px;
}

.grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
	background: var(--roseey-white);
	border: 1px solid var(--roseey-line);
	border-radius: 8px;
	color: var(--roseey-ink);
	padding: 24px;
}

.feature-image {
	border-radius: 8px;
	display: block;
	margin: 28px 0;
	width: 100%;
}

/* “Built around RUBEEY”: wider rig column + shorter photo so row height tracks the intro copy */
.section--dark .grid--2 {
	align-items: start;
	grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.section--dark .grid--2 .panel figure {
	margin: 14px 0 0;
}

.section--dark .grid--2 .panel img {
	display: block;
	max-height: 180px;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.section--dark .grid--2 .panel > img {
	margin: 14px auto 0;
}

.section--dark .grid--2 .panel figure img {
	margin: 0 auto;
}

/* Rig photos: force a horizontal row (WP often wraps each img in <p>, which breaks plain CSS grid) */
.section--dark .grid--2 .panel .rig-photos {
	align-items: center;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 10px 12px;
	justify-content: center;
	margin-top: 14px;
	width: 100%;
}

.section--dark .grid--2 .panel .rig-photos > p,
.section--dark .grid--2 .panel .rig-photos > figure {
	flex: 1 1 0;
	margin: 0;
	min-width: 0;
	display: flex;
	justify-content: center;
}

.section--dark .grid--2 .panel .rig-photos > img {
	flex: 1 1 0;
	margin: 0;
	min-width: 0;
}

.section--dark .grid--2 .panel .rig-photos img {
	border-radius: 8px;
	display: block;
	height: auto;
	margin: 0 auto;
	max-height: 180px;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.roseey-icon {
	fill: none;
	height: 32px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 32px;
}

.icon-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 28px 0;
}

.icon-card {
	background: linear-gradient(180deg, #171717, #0b0b0b);
	border: 1px solid #303030;
	border-radius: 8px;
	color: var(--roseey-white);
	padding: 22px;
	position: relative;
	overflow: hidden;
}

.icon-card::after {
	background: var(--roseey-orange);
	bottom: 0;
	content: "";
	height: 4px;
	left: 0;
	position: absolute;
	width: 100%;
}

.icon-card .roseey-icon {
	color: var(--roseey-orange);
	height: 38px;
	margin-bottom: 18px;
	width: 38px;
}

.icon-card h3 {
	font-size: 1.12rem;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.icon-card p {
	font-size: .95rem;
	margin: 0;
}

.visual-strip {
	background:
		linear-gradient(120deg, rgba(215, 25, 32, .96), rgba(255, 106, 0, .9)),
		var(--roseey-red);
	border-radius: 8px;
	color: var(--roseey-black);
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 32px 0;
	overflow: hidden;
}

.visual-strip > div {
	align-items: center;
	background: rgba(255, 255, 255, .1);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 12px;
	padding: 18px;
}

.visual-strip .roseey-icon {
	grid-row: span 2;
	height: 34px;
	width: 34px;
}

.visual-strip strong {
	font-size: 1.12rem;
	line-height: 1;
	text-transform: uppercase;
}

.visual-strip span {
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.2;
}

.contact-steps {
	counter-reset: contact-step;
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 28px 0;
}

.contact-steps > div {
	background: var(--roseey-muted);
	border-left: 6px solid var(--roseey-red);
	border-radius: 8px;
	padding: 24px;
	position: relative;
}

.contact-steps > div::after {
	color: rgba(9, 9, 9, .12);
	content: counter(contact-step, decimal-leading-zero);
	counter-increment: contact-step;
	font-size: 3.8rem;
	font-weight: 900;
	line-height: 1;
	position: absolute;
	right: 18px;
	top: 14px;
}

.contact-steps .roseey-icon {
	color: var(--roseey-red);
	height: 38px;
	margin-bottom: 16px;
	width: 38px;
}

.contact-steps h3 {
	margin-right: 58px;
}

.section--dark .panel {
	background: #171717;
	border-color: #333;
	color: var(--roseey-white);
}

.badge-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 0;
	padding: 0;
}

.badge-list li {
	background: var(--roseey-black);
	border-radius: 999px;
	color: var(--roseey-white);
	font-size: .9rem;
	font-weight: 700;
	list-style: none;
	padding: 9px 13px;
}

.section--dark .badge-list li {
	background: var(--roseey-red);
}

.entry-content {
	margin: 0 auto;
	max-width: var(--roseey-max);
	padding: 54px 22px 160px;
}

.entry-content > * {
	max-width: 880px;
}

body.home main {
	overflow: visible;
	padding-bottom: clamp(88px, 13vw, 168px);
}

.entry-content > .alignwide,
.entry-content > .wp-block-columns {
	max-width: var(--roseey-max);
}

/* Service Areas page */
.entry-content > .areas-page {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--roseey-max);
	width: 100%;
}

.page-service-areas .entry-content > h1 {
	border-bottom: 4px solid var(--roseey-orange);
	display: inline-block;
	margin-bottom: 28px;
	padding-bottom: 12px;
}

.areas-lede {
	background: linear-gradient(135deg, rgba(215, 25, 32, .07), rgba(255, 106, 0, .05));
	border: 1px solid rgba(215, 25, 32, .2);
	border-radius: 10px;
	font-size: clamp(1.1rem, 2.2vw, 1.22rem);
	line-height: 1.55;
	margin: 0 0 32px;
	max-width: 52rem;
	padding: 22px 26px;
	position: relative;
}

.areas-lede::before {
	background: linear-gradient(180deg, var(--roseey-red), var(--roseey-orange));
	border-radius: 4px;
	bottom: 16px;
	content: "";
	left: 0;
	position: absolute;
	top: 16px;
	width: 4px;
}

.areas-summary {
	margin-bottom: 48px;
}

.areas-highlight {
	position: relative;
	transition: box-shadow .22s ease, transform .22s ease;
}

.areas-highlight:hover {
	box-shadow: 0 14px 36px rgba(9, 9, 9, .1);
	transform: translateY(-3px);
}

.areas-highlight h3 {
	color: var(--roseey-ink);
	font-size: 1.15rem;
	letter-spacing: .02em;
	margin: 0 0 12px;
	text-transform: uppercase;
}

.areas-highlight--accent {
	background: linear-gradient(165deg, #fff 0%, #faf8f6 100%);
	border-color: rgba(255, 106, 0, .45);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.areas-highlight--accent::after {
	background: linear-gradient(90deg, var(--roseey-red), var(--roseey-orange));
	border-radius: 8px 8px 0 0;
	content: "";
	height: 4px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.areas-section-head {
	margin: 0 0 22px;
	max-width: 40rem;
}

.areas-section-title {
	letter-spacing: .04em;
	margin-bottom: 12px;
}

.areas-section-sub {
	color: #444;
	font-size: 1.05rem;
	line-height: 1.45;
	margin: 0;
}

.areas-grid {
	margin-bottom: 40px;
}

.area-tile {
	background: linear-gradient(180deg, #fff, #fbfaf8);
	border: 1px solid var(--roseey-line);
	overflow: hidden;
	padding: 0;
	position: relative;
	transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.area-tile::before {
	background: linear-gradient(90deg, var(--roseey-red), var(--roseey-orange));
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.area-tile:nth-child(3n + 2)::before {
	background: linear-gradient(90deg, var(--roseey-orange), var(--roseey-red));
}

.area-tile:nth-child(3n)::before {
	background: linear-gradient(90deg, #c41419, var(--roseey-orange));
}

.area-tile h3 {
	font-size: 1.18rem;
	letter-spacing: .03em;
	margin: 0;
	padding: 18px 20px 0;
	text-transform: uppercase;
}

.area-tile p {
	margin: 0;
	padding: 10px 20px 22px;
}

.area-tile:hover {
	border-color: rgba(215, 25, 32, .35);
	box-shadow: 0 12px 32px rgba(9, 9, 9, .09);
	transform: translateY(-2px);
}

.areas-cta {
	align-items: center;
	background: var(--roseey-black);
	border-radius: 10px;
	color: var(--roseey-white);
	display: flex;
	flex-wrap: wrap;
	gap: 18px 28px;
	justify-content: space-between;
	margin-top: 8px;
	padding: 24px 28px;
}

.areas-cta__text {
	flex: 1 1 280px;
	font-size: 1.05rem;
	line-height: 1.5;
	margin: 0;
	max-width: 38rem;
}

.areas-cta__action {
	margin: 0;
}

.areas-cta .button-link {
	box-shadow: 0 4px 18px rgba(215, 25, 32, .35);
}

.areas-cta .button-link:hover {
	filter: brightness(1.06);
}

.site-footer {
	background: var(--roseey-black);
	color: var(--roseey-white);
	overflow: visible;
	padding: clamp(32px, 4.5vw, 56px) 0 20px;
	position: relative;
	z-index: 2;
}

.site-footer__inner {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	justify-content: space-between;
	overflow: visible;
}

.site-footer__brand {
	align-items: flex-end;
	display: flex;
	gap: 22px;
	overflow: visible;
}

.site-footer__brand > a {
	display: inline-block;
	line-height: 0;
	position: relative;
	transform: translateY(calc(-1 * clamp(96px, 14vw, 180px)));
	z-index: 3;
}

.site-footer__brand p {
	margin: 0;
	max-width: 420px;
	padding-bottom: 2px;
}

.site-footer__logo {
	display: block;
	filter: drop-shadow(0 16px 36px rgba(0, 0, 0, .4));
	height: auto;
	max-height: clamp(168px, 22vw, 248px);
	max-width: clamp(190px, 26vw, 300px);
	object-fit: contain;
	width: auto;
}

.site-footer__social {
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 8px 0 0;
}

.site-footer__social a:hover,
.site-footer__social a:focus-visible {
	color: var(--roseey-orange);
}

.site-footer__social .site-footer__handle {
	font-weight: 700;
}

.roseey-gallery__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 24px;
}

.roseey-gallery__toolbar button,
.roseey-lightbox button {
	background: var(--roseey-black);
	border: 0;
	border-radius: 6px;
	color: var(--roseey-white);
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	padding: 10px 14px;
}

.roseey-gallery__toolbar button.is-active {
	background: var(--roseey-orange);
	color: var(--roseey-black);
}

.roseey-gallery__grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	max-width: var(--roseey-max);
}

.roseey-gallery__item {
	background: var(--roseey-black);
	border: 0;
	border-radius: 8px;
	color: var(--roseey-white);
	cursor: pointer;
	overflow: hidden;
	padding: 0;
	text-align: left;
}

.roseey-gallery__item[hidden] {
	display: none;
}

.roseey-gallery__item img {
	aspect-ratio: 4 / 3;
	display: block;
	object-fit: cover;
	width: 100%;
}

.roseey-gallery__item span {
	display: block;
	font-size: .85rem;
	font-weight: 700;
	line-height: 1.25;
	padding: 10px 12px 12px;
}

.roseey-lightbox {
	align-items: center;
	background: rgba(0, 0, 0, .92);
	color: var(--roseey-white);
	display: grid;
	gap: 18px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	inset: 0;
	padding: 34px;
	position: fixed;
	z-index: 1000;
}

.roseey-lightbox[hidden] {
	display: none;
}

.roseey-lightbox img {
	grid-column: 2;
	justify-self: center;
	max-height: 78vh;
	object-fit: contain;
	width: auto;
}

.roseey-lightbox p {
	grid-column: 2;
	margin: 0;
	text-align: center;
}

.roseey-lightbox__close {
	position: absolute;
	right: 22px;
	top: 22px;
}

.roseey-lightbox__nav--prev {
	grid-column: 1;
}

.roseey-lightbox__nav--next {
	grid-column: 3;
}

@media (max-width: 820px) {
	.site-header__inner,
	.site-footer__inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.hero__inner,
	.grid--3,
	.grid--2,
	.icon-grid,
	.visual-strip,
	.contact-steps {
		grid-template-columns: 1fr;
	}

	.hero__inner {
		min-height: auto;
		padding-bottom: 34px;
		padding-top: 42px;
	}

	.site-header {
		position: static;
	}

	.site-brand__logo {
		height: 58px;
		max-width: 150px;
	}

	.site-footer__brand {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-footer__brand > a {
		transform: translateY(calc(-1 * clamp(56px, 16vw, 120px)));
	}

	.site-footer__brand p {
		padding-bottom: 0;
		padding-top: 4px;
	}

	.site-footer__logo {
		max-height: clamp(128px, 42vw, 200px);
		max-width: min(280px, 88vw);
	}

	.roseey-lightbox {
		grid-template-columns: 1fr 1fr;
		padding: 70px 18px 24px;
	}

	.roseey-lightbox img,
	.roseey-lightbox p {
		grid-column: 1 / -1;
	}

	.roseey-lightbox__nav--prev,
	.roseey-lightbox__nav--next {
		grid-column: auto;
	}

	.areas-cta {
		align-items: flex-start;
		flex-direction: column;
	}
}
