/* =========================================================
   FA Luxury Transport — Fleet grid ([fa_fleet] shortcode)
   Reuses color/font/container tokens from header-footer.css
   ========================================================= */

.fa-fleet,
.fa-fleet * {
	box-sizing: border-box;
}

/* This shortcode is dropped into normal page content, which sits in a
   centered, width-limited column — break out to the full viewport width
   (matching the header/footer/hero full-bleed sections) so the grid
   reaches its intended 1440px design width regardless of the hosting
   page's container width, while .fa-fleet__inner keeps the actual content
   padded and centered. This calc() is a no-JS fallback that only holds
   true one level deep; fleet.js measures the real offset at runtime and
   overrides it, which is what actually handles being nested inside a
   page-builder container. */
.fa-fleet {
	width: 100%;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	/* Astra applies a generic max-width:100% reset to direct children of
	   .entry-content (for responsive images/embeds), which would otherwise
	   silently cap this section back down to the page's normal content
	   width. */
	max-width: none;
}

.fa-fleet__inner {
	max-width: var(--fa-container-max);
	margin: 0 auto;
	padding: 0 var(--fa-container-pad);
}

/* -----------------------------------------------------------
   Filter tabs
   ----------------------------------------------------------- */

.fa-fleet__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 48px;
}

.fa-fleet__tab {
	padding: 12px 24px;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--fa-gray-300);
	font-family: var(--fa-font-sans);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: background var(--fa-dur-base) var(--fa-ease-out-quart),
		border-color var(--fa-dur-base) var(--fa-ease-out-quart),
		color var(--fa-dur-base) var(--fa-ease-out-quart),
		transform var(--fa-dur-fast) var(--fa-ease-out-quart);
}

.fa-fleet__tab:hover {
	border-color: var(--fa-gold);
	color: var(--fa-white);
	transform: translateY(-1px);
}

.fa-fleet__tab:active {
	transform: translateY(0);
}

.fa-fleet__tab:focus-visible {
	outline: 2px solid var(--fa-gold);
	outline-offset: 2px;
}

.fa-fleet__tab.is-active {
	background: var(--fa-gold);
	border-color: var(--fa-gold);
	color: var(--fa-black);
}

/* -----------------------------------------------------------
   Card grid
   ----------------------------------------------------------- */

.fa-fleet__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.fa-fleet__card {
	display: flex;
	flex-direction: column;
	background: var(--fa-bg-panel);
	border: 1px solid var(--fa-border);
	transition: border-color var(--fa-dur-base) var(--fa-ease-out-quart),
		transform var(--fa-dur-base) var(--fa-ease-out-quart),
		box-shadow var(--fa-dur-base) var(--fa-ease-out-quart);
}

.fa-fleet__card:hover {
	border-color: rgba(161, 124, 43, 0.4);
	transform: translateY(-6px);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

/* Entrance: cards fade+rise in with a stagger as the grid scrolls into
   view (fleet.js toggles .is-visible via IntersectionObserver, one-time
   only). Scoped behind .is-enhanced so a visitor without JS simply sees
   every card immediately — the same progressive-enhancement guard the
   FAQ accordion uses. Driven by a keyframe animation (its own timeline)
   rather than a transition, so the stagger delay never leaks into the
   hover-lift transition declared above once the entrance finishes. */
@keyframes fa-fleet-card-in {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}

.fa-fleet.is-enhanced .fa-fleet__card {
	opacity: 0;
}

.fa-fleet.is-enhanced .fa-fleet__card.is-visible {
	animation: fa-fleet-card-in var(--fa-dur-slow) var(--fa-ease-out-quart) both;
	animation-delay: calc(var(--i, 0) * 60ms);
}

/* Client-side filter transitions: cards fade+settle out before the grid
   reflows, and fade+rise back in once shown again. */
.fa-fleet__card.is-leaving {
	transition: opacity var(--fa-dur-fast) var(--fa-ease-out-quart),
		transform var(--fa-dur-fast) var(--fa-ease-out-quart);
	opacity: 0;
	transform: translateY(8px) scale(0.97);
}

.fa-fleet__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 377 / 221;
}

.fa-fleet__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--fa-dur-slow) var(--fa-ease-out-quart);
}

.fa-fleet__card:hover .fa-fleet__image {
	transform: scale(1.06);
}

.fa-fleet__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 4px 12px;
	background: rgba(0, 0, 0, 0.7);
	border: 1px solid rgba(161, 124, 43, 0.3);
	color: var(--fa-gold);
	font-family: var(--fa-font-sans);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.fa-fleet__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 28px;
}

.fa-fleet__title {
	margin: 0 0 12px;
	color: var(--fa-white);
	font-family: var(--fa-font-serif);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.3;
}

.fa-fleet__excerpt {
	margin: 0 0 24px;
	color: var(--fa-gray-400);
	font-family: var(--fa-font-sans);
	font-size: 14px;
	line-height: 1.6;
}

.fa-fleet__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	padding-bottom: 28px;
	margin-bottom: auto;
	border-bottom: 1px solid var(--fa-border);
}

.fa-fleet__spec {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--fa-gray-300);
	font-family: var(--fa-font-sans);
	font-size: 14px;
}

.fa-fleet__spec .fa-icon {
	width: 16px;
	height: 16px;
	color: var(--fa-gold);
}

.fa-fleet__actions {
	display: flex;
	gap: 12px;
	margin-top: 28px;
}

.fa-fleet__btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	font-family: var(--fa-font-sans);
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-align: center;
	transition: background var(--fa-dur-base) var(--fa-ease-out-quart),
		border-color var(--fa-dur-base) var(--fa-ease-out-quart),
		color var(--fa-dur-base) var(--fa-ease-out-quart);
}

.fa-fleet__btn:focus-visible {
	outline: 2px solid var(--fa-gold);
	outline-offset: 2px;
}

.fa-fleet__btn-icon {
	width: 14px;
	height: 14px;
	transition: transform var(--fa-dur-base) var(--fa-ease-out-quart);
}

.fa-fleet__btn:hover .fa-fleet__btn-icon {
	transform: translateX(3px);
}

.fa-fleet__btn--outline {
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--fa-white);
}

.fa-fleet__btn--outline:hover {
	border-color: var(--fa-gold);
	color: var(--fa-gold);
}

.fa-fleet__btn--solid {
	background: var(--fa-gold);
	color: var(--fa-black);
}

.fa-fleet__btn--solid:hover {
	background: #8f6c24;
}

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */

@media (max-width: 1279px) {
	.fa-fleet__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 767px) {
	.fa-fleet__tabs {
		justify-content: flex-start;
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
		margin-bottom: 32px;
		-webkit-overflow-scrolling: touch;
	}

	.fa-fleet__tab {
		flex-shrink: 0;
	}

	.fa-fleet__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.fa-fleet__body {
		padding: 24px;
	}

	.fa-fleet__actions {
		flex-direction: column;
	}
}
