/* =========================================================
   FLYOVER SCOUTING — HOMEPAGE VISUAL ENHANCEMENTS
   ========================================================= */

/* ---------- 1. Hero: gradient overlay on the header photo ---------- */
/* Adds real depth behind the text regardless of the Cover block's own
   overlay setting — dark on the left/bottom where the text sits, lighter
   toward the right so the players are still visible. */
.header-media {
	position: relative;
	overflow: hidden;
}
.header-media::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(0,0,0,0.92) 0%,
		rgba(0,0,0,0.75) 30%,
		rgba(0,0,0,0.35) 55%,
		rgba(0,0,0,0.05) 75%
	);
	z-index: 1;
	pointer-events: none;
}
.header-media .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* ---------- 2. Hero text: merge the three paragraphs into one clean panel ---------- */
.header-media-content .media-content {
	padding: 48px 40px !important;
}
.header-media-content .media-content p.has-black-background-color {
	background-color: transparent !important; /* the gradient above now does this job */
	margin: 0 0 20px 0 !important;
	padding: 0 !important;
	max-width: 560px;
	line-height: 1.6;
}
.header-media-content .media-content h2 {
	margin: 0 0 4px 0;
	line-height: 1.05;
}
.header-media-content .media-content h2:last-of-type {
	margin-bottom: 28px;
}

/* ---------- 3. Fix the CTA button so it's always visible ---------- */
.header-media .wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid #ffffff !important;
	color: #ffffff !important;
	background-color: transparent !important;
	padding: 14px 32px !important;
	font-weight: 700;
	letter-spacing: 0.5px;
	opacity: 1 !important;
	visibility: visible !important;
	display: inline-block !important;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.header-media .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: #e4232f !important; /* your existing red accent */
	border-color: #e4232f !important;
	color: #ffffff !important;
}

/* Any other buttons on the page get the same hover treatment for consistency */
.wp-block-button__link {
	transition: background-color 0.3s ease, transform 0.2s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
}

/* ---------- 4. Section spacing — more breathing room throughout ---------- */
.best-seller-price-section,
.review-section {
	padding-top: 90px !important;
	padding-bottom: 90px !important;
}

/* ---------- 5. Nav: animated underline on hover ---------- */
.wp-block-navigation-item > .wp-block-navigation-item__content {
	position: relative;
}
.wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 2px;
	background-color: #e4232f;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}
.wp-block-navigation-item > .wp-block-navigation-item__content:hover::after {
	transform: scaleX(1);
}

/* ---------- 6. Hero load-in animation (plays once, on page load) ---------- */
.header-media-content h2,
.header-media-content .media-content p {
	opacity: 0;
	transform: translateY(24px);
	animation: flyoverFadeUp 0.7s ease forwards;
}
.header-media-content h2:nth-of-type(1) { animation-delay: 0.1s; }
.header-media-content h2:nth-of-type(2) { animation-delay: 0.3s; }
.header-media-content .media-content p:nth-of-type(1) { animation-delay: 0.5s; }
.header-media-content .media-content p:nth-of-type(2) { animation-delay: 0.65s; }
.header-media-content .media-content p:nth-of-type(3) { animation-delay: 0.8s; }

/* The CTA button is intentionally NOT set to opacity:0 — it stays visible
   at all times and only its position animates. This guarantees it can
   never get stuck invisible if something interrupts the animation. */
.header-media-content .wp-block-buttons {
	opacity: 1;
	transform: translateY(24px);
	animation: flyoverSlideUpOnly 0.7s ease forwards;
	animation-delay: 0.95s;
}
@keyframes flyoverSlideUpOnly {
	to { transform: translateY(0); }
}

@keyframes flyoverFadeUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- 7. Scroll-triggered fade-up for sections below the hero ---------- */
/* Starting state — JS adds the "flyover-in-view" class when scrolled into view */
.flyover-scroll-fade {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.flyover-scroll-fade.flyover-in-view {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- 8. Scroll-down indicator (injected by JS into the hero) ---------- */
.flyover-scroll-indicator {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #ffffff;
	opacity: 0;
	animation: flyoverFadeUp 0.7s ease forwards;
	animation-delay: 1.3s;
	transition: opacity 0.4s ease;
	pointer-events: none;
	font-size: 0.75em;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.flyover-scroll-indicator.flyover-scrolled {
	opacity: 0 !important;
}
.flyover-scroll-indicator svg {
	animation: flyoverBounce 1.8s ease-in-out infinite;
}
@keyframes flyoverBounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
	.header-media-content h2,
	.header-media-content .media-content p,
	.header-media-content .wp-block-buttons,
	.flyover-scroll-fade,
	.flyover-scroll-indicator,
	.flyover-scroll-indicator svg {
		animation: none !important;
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}
