/**
 * JMOTO Works — Services Stylesheet
 * Styles every Services-system element added in v1.1.0. Only enqueued
 * on Service singular/archive pages (see inc/enqueue.php) — never
 * site-wide, per the performance requirement.
 *
 * @package JMOTO_Works
 * @since   1.1.0
 */

/* ============================================================
   1. Dynamic Service Card (homepage + archive + related)
   The whole card is one real <a> stretched over it via ::after-style
   absolute positioning — a single valid anchor, not a clickable <div>.
   ============================================================ */
.jmoto-service-archive-grid,
.jmoto-related-services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.jmoto-service-card-dynamic {
	position: relative;
	background: var(--jmoto-color-surface-alt);
	border: 1px solid var(--jmoto-color-border);
	border-radius: var(--jmoto-radius-md);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform var(--jmoto-transition-base), border-color var(--jmoto-transition-base), box-shadow var(--jmoto-transition-base);
}

.jmoto-service-card-dynamic:hover {
	transform: translateY(-6px);
	border-color: rgba(215, 25, 32, 0.5);
	box-shadow: var(--jmoto-shadow-md);
}

.jmoto-service-card-dynamic__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--jmoto-color-surface);
}

.jmoto-service-card-dynamic__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jmoto-service-card-dynamic__media--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--jmoto-color-accent);
}

.jmoto-service-card-dynamic__body {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.jmoto-service-card-dynamic__category {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--jmoto-color-accent-text);
}

.jmoto-service-card-dynamic__title {
	font-family: var(--jmoto-font-heading);
	font-size: 19px;
	text-transform: uppercase;
	color: var(--jmoto-color-white);
}

.jmoto-service-card-dynamic__excerpt {
	font-size: 13.5px;
	color: var(--jmoto-color-ink-muted);
	font-weight: 300;
	flex: 1;
}

.jmoto-service-card-dynamic__cta {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--jmoto-color-accent-text);
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Stretched-link pattern: one real, full-card anchor, keyboard-focusable
   and screen-reader-friendly, with a visible focus outline. */
.jmoto-service-card-dynamic__link {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.jmoto-service-card-dynamic__link:focus-visible {
	outline: 2px solid var(--jmoto-color-accent);
	outline-offset: 2px;
}

.jmoto-services__view-all {
	text-align: center;
	margin-top: 40px;
}

/* ============================================================
   2. Single Service Page
   ============================================================ */
.jmoto-service-hero {
	padding: 64px 0 40px;
}

.jmoto-service-hero__title {
	font-size: clamp(36px, 5.5vw, 64px);
	color: var(--jmoto-color-white);
	margin-bottom: 14px;
}

.jmoto-service-hero__short-desc {
	color: var(--jmoto-color-ink-muted);
	max-width: 640px;
	font-size: 16.5px;
	margin-bottom: 20px;
}

.jmoto-service-hero__meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.jmoto-service-meta-pill {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--jmoto-color-border);
	border-radius: var(--jmoto-radius-pill);
	font-size: 12.5px;
	color: var(--jmoto-color-ink-muted);
}

.jmoto-service-featured-image {
	border-radius: var(--jmoto-radius-md);
	overflow: hidden;
	margin-bottom: 48px;
}

.jmoto-service-body {
	padding-bottom: 0;
	max-width: 900px;
}

.jmoto-service-content {
	color: var(--jmoto-color-ink);
	font-weight: 300;
	margin-bottom: 40px;
}

.jmoto-service-content p {
	margin-bottom: 20px;
}

.jmoto-service-included-benefits {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	margin-bottom: 48px;
}

.jmoto-service-included h2,
.jmoto-service-benefits h2,
.jmoto-service-brands h2,
.jmoto-service-gallery-section h2,
.jmoto-service-before-after h2,
.jmoto-service-faq-section h2,
.jmoto-related-services h2 {
	font-size: 24px;
	color: var(--jmoto-color-white);
	margin-bottom: 16px;
}

.jmoto-service-included ul,
.jmoto-service-benefits ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.jmoto-service-included li,
.jmoto-service-benefits li {
	position: relative;
	padding-left: 26px;
	color: var(--jmoto-color-ink);
	font-size: 14.5px;
}

.jmoto-service-included li::before,
.jmoto-service-benefits li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 7px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--jmoto-color-accent);
}

.jmoto-service-brands {
	margin-bottom: 48px;
}

/* v1.1.4: Recommended Interval / Replaced Parts / Warranty */
.jmoto-service-extra-info {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-bottom: 48px;
}

.jmoto-service-extra-info__item h3 {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--jmoto-color-white);
	margin-bottom: 8px;
}

.jmoto-service-extra-info__item p,
.jmoto-service-extra-info__item ul {
	font-size: 14px;
	color: var(--jmoto-color-ink-muted);
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmoto-service-extra-info__item li {
	padding: 3px 0;
}

/* v1.1.4: booking CTA map + back link */
.jmoto-service-booking-cta__map {
	margin-top: 32px;
	border-radius: var(--jmoto-radius-md);
	overflow: hidden;
	border: 1px solid var(--jmoto-color-border);
}

.jmoto-service-booking-cta__back {
	margin-top: 24px;
}

.jmoto-service-booking-cta__back a {
	color: var(--jmoto-color-ink-muted);
	font-size: 13px;
}

/* v1.1.4: ensure JS category filtering (which toggles the `hidden`
   attribute) always hides cards regardless of any other display rule
   that might otherwise apply to this wrapper. */
.jmoto-service-card-wrap[hidden] {
	display: none !important;
}

.jmoto-service-brands__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.jmoto-service-brands__list li {
	padding: 8px 16px;
	border: 1px solid var(--jmoto-color-border);
	border-radius: var(--jmoto-radius-pill);
	font-size: 13px;
	color: var(--jmoto-color-ink-muted);
}

/* ============================================================
   3. Gallery / Work Photos
   ============================================================ */
.jmoto-service-gallery-section {
	margin-bottom: 48px;
}

.jmoto-service-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

.jmoto-gallery-item {
	display: block;
	border-radius: var(--jmoto-radius-sm);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	transition: transform var(--jmoto-transition-base);
}

.jmoto-gallery-item:hover {
	transform: scale(1.03);
}

.jmoto-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
   4. Before & After
   ============================================================ */
.jmoto-service-before-after {
	margin-bottom: 48px;
}

.jmoto-before-after__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.jmoto-before-after__grid figure {
	margin: 0;
}

.jmoto-before-after__grid img {
	width: 100%;
	border-radius: var(--jmoto-radius-sm);
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.jmoto-before-after__grid figcaption {
	text-align: center;
	margin-top: 8px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--jmoto-color-ink-muted);
}

/* ============================================================
   5. FAQ Accordion
   ============================================================ */
.jmoto-service-faq-section {
	margin-bottom: 48px;
}

.jmoto-faq-item {
	border-bottom: 1px solid var(--jmoto-color-border);
}

.jmoto-faq-item h3 {
	margin: 0;
}

.jmoto-faq-item__question {
	width: 100%;
	background: none;
	border: none;
	color: var(--jmoto-color-white);
	font-family: var(--jmoto-font-body);
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	padding: 18px 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	cursor: pointer;
}

.jmoto-faq-item__icon {
	flex-shrink: 0;
	transition: transform var(--jmoto-transition-base);
}

.jmoto-faq-item__question[aria-expanded="true"] .jmoto-faq-item__icon {
	transform: rotate(180deg);
}

.jmoto-faq-item__answer {
	padding: 0 4px 18px;
	color: var(--jmoto-color-ink-muted);
	font-weight: 300;
	font-size: 14px;
}

.jmoto-faq-item__answer p {
	margin: 0;
}

/* ============================================================
   6. Booking CTA
   ============================================================ */
.jmoto-service-booking-cta {
	background: var(--jmoto-color-surface);
	border-top: 1px solid var(--jmoto-color-border);
	padding: 64px 0;
	margin-top: 24px;
}

.jmoto-service-booking-cta__inner {
	text-align: center;
}

.jmoto-service-booking-cta__inner h2 {
	font-size: clamp(28px, 4vw, 42px);
	color: var(--jmoto-color-white);
	margin-bottom: 24px;
}

.jmoto-service-booking-cta__actions {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

/* ============================================================
   7. Services Archive
   ============================================================ */
.jmoto-services-archive-header {
	max-width: 640px;
}

.jmoto-service-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 40px;
}

.jmoto-service-filter {
	padding: 8px 18px;
	border: 1px solid var(--jmoto-color-border);
	border-radius: var(--jmoto-radius-pill);
	font-size: 13px;
	color: var(--jmoto-color-ink-muted);
	transition: color var(--jmoto-transition-fast), border-color var(--jmoto-transition-fast), background var(--jmoto-transition-fast);
}

.jmoto-service-filter:hover,
.jmoto-service-filter.is-active {
	color: var(--jmoto-color-white);
	border-color: var(--jmoto-color-accent);
	background: rgba(215, 25, 32, 0.1);
}

.jmoto-services-archive-cta {
	margin-top: 64px;
	background: var(--jmoto-color-surface);
	border: 1px solid var(--jmoto-color-border);
	border-radius: var(--jmoto-radius-md);
	padding: 48px;
	text-align: center;
}

.jmoto-services-archive-cta__inner h2 {
	font-size: 26px;
	color: var(--jmoto-color-white);
	margin-bottom: 20px;
}

/* ============================================================
   8. Lightbox
   ============================================================ */
.jmoto-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

.jmoto-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--jmoto-radius-sm);
}

.jmoto-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--jmoto-color-white);
	border: none;
	font-size: 24px;
	cursor: pointer;
}

/* ============================================================
   9. Responsive
   ============================================================ */
@media (max-width: 980px) {
	.jmoto-service-archive-grid,
	.jmoto-related-services__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.jmoto-service-included-benefits,
	.jmoto-service-extra-info {
		grid-template-columns: 1fr;
	}

	.jmoto-service-gallery {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 640px) {
	.jmoto-service-archive-grid,
	.jmoto-related-services__grid {
		grid-template-columns: 1fr;
	}

	.jmoto-service-gallery {
		grid-template-columns: repeat(2, 1fr);
	}

	.jmoto-before-after__grid {
		grid-template-columns: 1fr;
	}

	.jmoto-service-booking-cta__actions {
		flex-direction: column;
	}

	.jmoto-services-archive-cta {
		padding: 32px 20px;
	}
}
