/* Hero carousel (rotating photos/video + special offers) */
.hero--carousel {
	padding: 0;
}

.hero-carousel {
	position: relative;
	overflow: hidden;
}

.hero-carousel__track {
	position: relative;
	min-height: 520px;
}

@media (min-width: 640px) {
	.hero-carousel__track {
		min-height: 560px;
	}
}

@media (min-width: 768px) {
	.hero-carousel__track {
		min-height: 600px;
	}
}

@media (min-width: 900px) {
	.hero-carousel__track {
		min-height: 640px;
	}
}

.hero-carousel__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
}

.hero-carousel__slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.hero-carousel__media {
	position: absolute;
	inset: 0;
}

.hero-carousel__image,
.hero-carousel__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-carousel__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(23, 21, 28, 0.15) 0%,
		rgba(23, 21, 28, 0.55) 45%,
		rgba(23, 21, 28, 0.92) 100%
	);
}

@media (min-width: 900px) {
	.hero-carousel__overlay {
		background: linear-gradient(
			100deg,
			var(--color-navy) 0%,
			rgba(23, 21, 28, 0.85) 35%,
			rgba(23, 21, 28, 0.35) 60%,
			rgba(23, 21, 28, 0) 85%,
			rgba(23, 21, 28, 0.92) 100%
		);
	}
}

.hero-carousel__content-wrap {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: flex-end;
	padding-block: var(--space-4) var(--space-5);
}

@media (min-width: 900px) {
	.hero-carousel__content-wrap {
		align-items: center;
		padding-block: var(--space-6);
	}
}

.hero-carousel__content {
	max-width: 560px;
}

.hero-carousel__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--color-yellow);
	color: var(--color-navy);
	font-weight: 700;
	font-size: 0.85rem;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	margin-bottom: var(--space-2);
}

.hero-carousel__headline {
	color: var(--color-white);
	margin-bottom: var(--space-2);
}

.hero-carousel__description {
	color: rgba(255, 255, 255, 0.88);
	font-size: 1rem;
	max-width: 480px;
	margin-bottom: var(--space-3);
}

@media (min-width: 640px) {
	.hero-carousel__description {
		font-size: 1.1rem;
	}
}

.hero-carousel__buttons {
	flex-direction: column;
}

@media (min-width: 480px) {
	.hero-carousel__buttons {
		flex-direction: row;
	}
}

/* Arrows */
.hero-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-pill);
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.hero-carousel__arrow:hover,
.hero-carousel__arrow:focus-visible {
	background: var(--color-primary);
}

.hero-carousel__arrow--prev {
	left: var(--space-2);
}

.hero-carousel__arrow--next {
	right: var(--space-2);
}

@media (min-width: 900px) {
	.hero-carousel__arrow--prev {
		left: var(--space-3);
	}

	.hero-carousel__arrow--next {
		right: var(--space-3);
	}
}

/* Pagination dots */
.hero-carousel__dots {
	position: absolute;
	bottom: var(--space-2);
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	gap: 8px;
}

.hero-carousel__dot {
	width: 44px;
	height: 44px;
	margin: -14px 0;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-carousel__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	transition: background 0.15s ease, transform 0.15s ease;
}

.hero-carousel__dot:hover::before,
.hero-carousel__dot:focus-visible::before {
	background: rgba(255, 255, 255, 0.7);
}

.hero-carousel__dot.is-active::before {
	background: var(--color-primary);
	transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
	.hero-carousel__slide {
		transition: none;
	}
}

.hero-carousel--reduced-motion .hero-carousel__slide {
	transition: none;
}

/* Testimonials carousel (real Google reviews). Real sliding-window track:
   .testimonials-carousel__viewport (overflow:hidden) clips a genuine flex
   row of sibling slides (.testimonials-carousel__track) — 1/2/3 of which
   are visible at once depending on viewport width, per the same 640px/
   1024px breakpoints layout.css already uses elsewhere (read via matchMedia
   in assets/js/testimonial-carousel.js, not duplicated as a formula here).
   Replaces the old is-active/opacity crossfade stacked in one grid-area:1/1
   cell — rewritten so 3 reviews are genuinely visible side by side (white
   cards, round dots below, round arrows pinned at the sides), not one
   review at a time. */
.testimonials-carousel {
	position: relative;
}

.testimonials-carousel__viewport {
	position: relative;
	overflow: hidden;
}

.testimonials-carousel__track {
	display: flex;
	gap: var(--space-3);
	transition: transform 0.5s ease;
}

.testimonials-carousel__slide {
	flex: 0 0 100%;
	min-width: 0;
}

@media (min-width: 640px) {
	.testimonials-carousel__slide {
		flex: 0 0 calc((100% - var(--space-3)) / 2);
	}
}

@media (min-width: 1024px) {
	.testimonials-carousel__slide {
		flex: 0 0 calc((100% - 2 * var(--space-3)) / 3);
	}
}

.testimonials-carousel__slide .testimonial-card {
	height: 100%;
}

/* template-parts/testimonial-card.php's own root div carries a hardcoded
   .reveal (that file is intentionally left untouched) — neutralised here so
   cards inside a slide always render at full opacity instead of relying on
   scroll-reveal.js's IntersectionObserver, which may never (re-)fire for a
   slide sitting outside the initial viewport in a real side-by-side track
   (translateX sliding is compositor-only and never triggers a re-check).
   The single .reveal that fades this whole component in once lives on
   .testimonials-carousel itself instead — see the long comment in
   template-parts/testimonial-carousel.php. */
.testimonials-carousel__slide .reveal {
	opacity: 1;
	transform: none;
}

.testimonials-carousel__controls {
	display: none;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	margin-top: var(--space-3);
}

.testimonials-carousel--has-controls .testimonials-carousel__controls {
	display: flex;
}

.testimonials-carousel__arrow {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-pill);
	border: none;
	background: var(--color-white);
	color: var(--color-navy);
	box-shadow: var(--shadow-sm);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.testimonials-carousel__arrow:hover,
.testimonials-carousel__arrow:focus-visible {
	background: var(--color-primary);
	color: var(--color-white);
	box-shadow: var(--shadow-md);
}

/* Below ~480px the arrows stay in normal flow, flanking the dots inside
   .testimonials-carousel__controls (the same row layout this component
   always used before this rewrite) — plenty of room next to a single
   full-width card. At and above 480px they pin to the component's own
   left/right edges instead, matching the reference layout; padding-inline
   (added only when controls exist) reserves the room so they never sit on
   top of card content. */
@media (min-width: 480px) {
	.testimonials-carousel--has-controls {
		padding-inline: calc(40px + var(--space-2));
	}

	.testimonials-carousel--has-controls .testimonials-carousel__arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}

	.testimonials-carousel--has-controls .testimonials-carousel__arrow--prev {
		left: 0;
	}

	.testimonials-carousel--has-controls .testimonials-carousel__arrow--next {
		right: 0;
	}
}

.testimonials-carousel__dots {
	display: flex;
	gap: 8px;
}

.testimonials-carousel__dot {
	width: 34px;
	height: 34px;
	margin: -12px 0;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.testimonials-carousel__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-border);
	transition: background 0.15s ease, transform 0.15s ease;
}

.testimonials-carousel__dot:hover::before,
.testimonials-carousel__dot:focus-visible::before {
	background: rgba(248, 121, 26, 0.5);
}

.testimonials-carousel__dot.is-active::before {
	background: var(--color-primary);
	transform: scale(1.2);
}

.testimonials-carousel__attribution {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: var(--space-2);
	font-size: 0.78rem;
	color: var(--color-text-muted);
}

.testimonials-carousel__attribution svg {
	flex: none;
	opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
	.testimonials-carousel__track {
		transition: none;
	}
}

.testimonials-carousel--reduced-motion .testimonials-carousel__track {
	transition: none;
}

/* Featured/popular Driving Tips carousel. Rebuilt as a full-bleed
   photo-card sliding track (reference: numbered-tab blog cycler), NOT the
   crossfade idiom the sections above use. Same viewport/track/slide
   sliding-window mechanic as the testimonials/instructor carousels in this
   file (real flex-row siblings, JS-measured translateX offset, 1/2/3
   visible at <640px/640-1023px/>=1024px) but under its own
   featured-posts-carousel__*/post-carousel-card__* class names, per this
   codebase's "every carousel gets its own files/classes" convention. */
.featured-posts-carousel {
	position: relative;
}

.featured-posts-carousel__stage {
	position: relative;
}

.featured-posts-carousel__viewport {
	overflow: hidden;
}

.featured-posts-carousel__track {
	display: flex;
	gap: var(--space-3);
	transition: transform 0.5s ease;
}

.featured-posts-carousel__slide {
	flex: 0 0 100%;
	min-width: 0;
}

@media (min-width: 640px) {
	.featured-posts-carousel__slide {
		flex: 0 0 calc((100% - var(--space-3)) / 2);
	}
}

@media (min-width: 1024px) {
	.featured-posts-carousel__slide {
		flex: 0 0 calc((100% - (2 * var(--space-3))) / 3);
	}
}

/* Full-bleed photo card: photo fills the box, a dark scrim + text block sit
   on top via position:absolute — same layering idea as .hero-carousel__media
   + .hero-carousel__overlay above, just in a tall per-card box instead of a
   full-width banner. */
.post-carousel-card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.15s ease;
}

.post-carousel-card:hover,
.post-carousel-card:focus-visible {
	box-shadow: var(--shadow-md);
}

.post-carousel-card:focus-visible {
	outline: 3px solid var(--color-focus-ring);
	outline-offset: 2px;
}

.post-carousel-card__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* rgba(23, 21, 28, …) is --color-navy's own rgb value written with alpha —
   same technique .hero-carousel__overlay above uses to blend a solid token
   stop with translucent stops of the identical color in one gradient. */
.post-carousel-card__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(23, 21, 28, 0) 0%,
		rgba(23, 21, 28, 0.05) 45%,
		var(--color-navy) 80%,
		var(--color-navy-deep) 100%
	);
}

.post-carousel-card__content {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 1;
	padding: var(--space-3);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.post-carousel-card__date {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.post-carousel-card__title {
	color: var(--color-white);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-carousel-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.post-carousel-card__tag {
	background: rgba(255, 255, 255, 0.2);
	color: var(--color-white);
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
}

/* Arrows: rounded-square, orange gloss gradient — the same
   --gloss-overlay + --color-primary/--color-primary-dark + bevel recipe
   .btn-primary uses (see components.css), just at button-control size and
   pinned to the stage's own edges (not the browser viewport) rather than
   flowing in the button row. Inset-from-edge idiom matches
   .hero-carousel__arrow above (floats over the photo, not the page
   background) since this is also a full-bleed photo component, unlike the
   white-card testimonials/instructor carousels. */
.featured-posts-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	border: none;
	background:
		var(--gloss-overlay),
		linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
	color: var(--color-white);
	box-shadow:
		var(--shadow-sm),
		var(--bevel-highlight),
		var(--bevel-shadow);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.featured-posts-carousel__arrow:hover,
.featured-posts-carousel__arrow:focus-visible {
	background:
		var(--gloss-overlay),
		linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 55%);
	box-shadow:
		var(--shadow-md),
		var(--bevel-highlight),
		inset 0 -2px 0 rgba(23, 21, 28, 0.24);
}

.featured-posts-carousel__arrow--prev {
	left: var(--space-2);
}

.featured-posts-carousel__arrow--next {
	right: var(--space-2);
}

@media (min-width: 900px) {
	.featured-posts-carousel__arrow--prev {
		left: var(--space-3);
	}

	.featured-posts-carousel__arrow--next {
		right: var(--space-3);
	}
}

.featured-posts-carousel__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	margin-top: var(--space-3);
}

.featured-posts-carousel__tabs {
	display: flex;
	gap: 8px;
}

/* Numbered rounded-square pagination tabs, not dots. Idle = white/navy/
   shadow-sm, active = solid --color-primary/white — same idle/active color
   pairing the dots elsewhere in this file use, just on a radius-sm box with
   visible text instead of a bare circle. */
.featured-posts-carousel__tab {
	flex: none;
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: var(--radius-sm);
	border: none;
	background: var(--color-white);
	color: var(--color-navy);
	box-shadow: var(--shadow-sm);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.featured-posts-carousel__tab[hidden] {
	display: none;
}

.featured-posts-carousel__tab:hover,
.featured-posts-carousel__tab:focus-visible {
	box-shadow: var(--shadow-md);
}

.featured-posts-carousel__tab.is-active {
	background: var(--color-primary);
	color: var(--color-white);
}

/* Hides arrows/tabs when there's nothing to slide toward at the current
   breakpoint (e.g. exactly 3 posts at >=1024px) — toggled by
   assets/js/featured-posts-carousel.js on load and on every resize. */
.featured-posts-carousel--single-page .featured-posts-carousel__arrow,
.featured-posts-carousel--single-page .featured-posts-carousel__controls {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.featured-posts-carousel__track {
		transition: none;
	}
}

.featured-posts-carousel--reduced-motion .featured-posts-carousel__track {
	transition: none;
}

/* Instructor carousel ("Meet the Team", About page). Brand-new,
   self-contained sliding-window carousel -- deliberately NOT sharing
   markup or class names with the testimonials/featured-posts carousels
   above, matching this codebase's established "every carousel gets its
   own files" convention (repeated in those two sections' own docblocks).
   A real flex track of sibling slides + a JS-measured translateX offset
   (assets/js/instructor-carousel.js), not a single-slide opacity
   crossfade: 1/2/3 instructors visible at once at <640px/640-1023px/
   >=1024px, the same breakpoints layout.css already uses for
   .grid-2/.grid-3. Round arrows + round dots intentionally reuse the
   exact recipe (sizes, colors, tokens) as the sibling carousels' controls
   above, just under instructor-carousel__* class names -- a small,
   deliberate duplication rather than a shared/imported rule. */
.instructor-carousel {
	position: relative;
}

.instructor-carousel__stage {
	position: relative;
}

.instructor-carousel__viewport {
	overflow: hidden;
}

.instructor-carousel__track {
	display: flex;
	gap: var(--space-3);
	transition: transform 0.45s ease;
}

.instructor-carousel__slide {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (min-width: 640px) {
	.instructor-carousel__slide {
		flex: 0 0 calc((100% - var(--space-3)) / 2);
		max-width: calc((100% - var(--space-3)) / 2);
	}
}

@media (min-width: 1024px) {
	.instructor-carousel__slide {
		flex: 0 0 calc((100% - (2 * var(--space-3))) / 3);
		max-width: calc((100% - (2 * var(--space-3))) / 3);
	}
}

.instructor-carousel__slide .instructor-card {
	height: 100%;
}

/* Arrows sit on .instructor-carousel__stage (not the overflow:hidden
   viewport itself), so their slight negative left/right offset isn't
   clipped -- .stage is sized to match the card row exactly, so top:50%
   centers correctly even though the dots row below is a separate sibling
   block outside .stage. */
.instructor-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-pill);
	border: none;
	background: var(--color-white);
	color: var(--color-navy);
	box-shadow: var(--shadow-sm);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.instructor-carousel__arrow:hover,
.instructor-carousel__arrow:focus-visible {
	background: var(--color-primary);
	color: var(--color-white);
	box-shadow: var(--shadow-md);
}

.instructor-carousel__arrow--prev {
	left: -14px;
}

.instructor-carousel__arrow--next {
	right: -14px;
}

@media (min-width: 900px) {
	.instructor-carousel__arrow--prev {
		left: -20px;
	}

	.instructor-carousel__arrow--next {
		right: -20px;
	}
}

.instructor-carousel__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: var(--space-3);
}

.instructor-carousel__dot {
	width: 34px;
	height: 34px;
	margin: -12px 0;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.instructor-carousel__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-border);
	transition: background 0.15s ease, transform 0.15s ease;
}

.instructor-carousel__dot:hover::before,
.instructor-carousel__dot:focus-visible::before {
	background: rgba(248, 121, 26, 0.5);
}

.instructor-carousel__dot.is-active::before {
	background: var(--color-primary);
	transform: scale(1.2);
}

/* Hides arrows/dots when there's nothing to slide toward at the current
   breakpoint (e.g. exactly 3 instructors at >=1024px) -- toggled by
   assets/js/instructor-carousel.js on load and on every resize. */
.instructor-carousel--single-view .instructor-carousel__arrow,
.instructor-carousel--single-view .instructor-carousel__dots {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.instructor-carousel__track {
		transition: none;
	}
}

.instructor-carousel--reduced-motion .instructor-carousel__track {
	transition: none;
}
