/* Performance Hero Banner — front-end styles */

@import url('https://fonts.googleapis.com/css2?family=Yantramanav:wght@400;500;700&display=swap');

.phb-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	font-family: 'Yantramanav', Arial, sans-serif;
	box-sizing: border-box;
}
/* Positioning context for .phb-featured-panel — contains only the
   slider, not .phb-updates-bar, so the panel's top/bottom insets
   (see .phb-featured-panel) measure against the slider's height
   alone instead of slider+updates-bar combined (which is what
   caused the panel to overlap into the updates bar before). */
.phb-hero-stage {
	position: relative;
}
.phb-wrap *,
.phb-wrap *::before,
.phb-wrap *::after {
	box-sizing: border-box;
}

/* ---------- SLIDER ---------- */

.phb-slider {
	position: relative;
	width: 100%;
	height: clamp(13.75rem, 38vw, 28.75rem);
	overflow: hidden;
	background: #111;
}

.phb-slides {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	position: relative;
}

.phb-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease;
	z-index: 1;
}

.phb-slide.phb-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.phb-slide-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
}

.phb-slide-link {
	position: absolute;
	inset: 0;
	display: block;
	z-index: 3;
}

.phb-slide-text {
	position: relative;
	z-index: 3;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: 6%;
	padding-right: 30%;
	color: #fff;
	text-shadow: 0.0625rem 0.0625rem 0.0625rem rgba(0, 0, 0, 0.85), 0.125rem 0.125rem 0.1875rem rgba(0, 0, 0, 0.6);
	font-weight: 400;
	font-size: clamp(1.25rem, 3.6vw, 3.3125rem);
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.03125rem;
}

.phb-slide-line {
	display: block;
	opacity: 0;
	transform: translateX(5rem);
}

/* Slide-in-from-right animation, triggered per-line with a stagger when the
   slide becomes active (class + JS restart handled in hero-banner.js). */
.phb-slide.phb-active .phb-slide-line {
	animation: phb-slide-in 0.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.phb-slide.phb-active .phb-slide-line:nth-child(1) { animation-delay: 0.15s; }
.phb-slide.phb-active .phb-slide-line:nth-child(2) { animation-delay: 0.30s; }
.phb-slide.phb-active .phb-slide-line:nth-child(3) { animation-delay: 0.45s; }
.phb-slide.phb-active .phb-slide-line:nth-child(4) { animation-delay: 0.60s; }

@keyframes phb-slide-in {
	from { opacity: 0; transform: translateX(5rem); }
	to   { opacity: 1; transform: translateX(0); }
}

/* Dots */

.phb-dots {
	position: absolute;
	left: 1.5rem;
	bottom: 1rem;
	z-index: 5;
	display: flex;
	gap: 0.5rem;
}
.phb-dot {
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	border: 0.1875rem solid #e5e5e5;
	background: linear-gradient(to bottom, #999 0%, #e1e1e1 100%);
	cursor: pointer;
	padding: 0;
}
.phb-dot:hover,
.phb-dot.phb-dot-active {
	background: #666;
}

/* ---------- FEATURED "FROM THE BLOG" PANEL ---------- */

/* [performance_hero_posts] standalone version: hidden by default.
   Desktop already gets this content from [performance_hero]'s
   floating card, so this only ever appears below the mobile
   breakpoint (see the media query further down). */
.phb-featured-panel.phb-featured-standalone {
	display: none;
}
.phb-featured-standalone,
.phb-featured-standalone *,
.phb-featured-standalone *::before,
.phb-featured-standalone *::after {
	box-sizing: border-box;
}

.phb-featured-panel {
	position: absolute;
	top: 1.125rem;
	right: 1em;
	bottom: 1.125rem;
	z-index: 6;
	width: min(23.75rem, 32%);
	background: #fff;
	border-radius: 0.75rem 0 0.75rem 0.75rem;
	box-shadow: -0.75rem 0.875rem 1.875rem rgba(0, 0, 0, 0.3);
	overflow-y: auto;
	display: flex;
	flex-direction: column;

	/* Visible custom scrollbar (WebKit/Blink) */
	scrollbar-width: thin;              /* Firefox */
	scrollbar-color: #c7c7c7 #f2f2f2;   /* Firefox: thumb, track */
}
.phb-featured-panel::-webkit-scrollbar {
	width: 0.5rem;
}
.phb-featured-panel::-webkit-scrollbar-track {
	background: #f2f2f2;
}
.phb-featured-panel::-webkit-scrollbar-thumb {
	background-color: #c7c7c7;
	border-radius: 0.25rem;
}
.phb-featured-panel::-webkit-scrollbar-thumb:hover {
	background-color: #a8a8a8;
}

.phb-featured-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.phb-featured-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.625rem 1.75rem;
	border-bottom: 1px solid #ececec;
}

.phb-featured-date {
	flex: 0 0 auto;
	width: 3.375rem;
	text-align: center;
	background: #c7363a;
	color: #fff;
	padding: 0.5rem 0;
	line-height: 1.15;
	border-radius: 0.125rem;
}
.phb-featured-date .phb-day {
	display: block;
	font-size: 1.375rem;
	font-weight: 700;
}
.phb-featured-date .phb-month {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03125rem;
}

.phb-featured-content {
	flex: 1 1 auto;
	min-width: 0;
}
.phb-featured-content h3 {
	margin: 0 0 0.625rem;
	font-size: 1.1875rem;
	line-height: 1.3;
	font-weight: 700;
}
.phb-featured-content h3 a {
	color: #2b2b2b;
	text-decoration: none;
}
.phb-featured-content h3 a:hover {
	color: #c7363a;
}
.phb-comments {
	font-size: 0.875rem;
	color: #9b9b9b;
}

.phb-featured-thumb {
	flex: 0 0 auto;
}
.phb-featured-thumb img {
	width: 6.25rem;
	height: 5.5rem;
	object-fit: cover;
	display: block;
}

.phb-even-more {
	text-align: center;
	padding: 1.625rem;
	border-top: 1px solid #ececec;
}
.phb-even-more a {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.15625rem;
	color: #2b2b2b;
	text-decoration: none;
	font-weight: 500;
}
.phb-even-more a:hover {
	color: #c7363a;
}

/* ---------- UPDATES TICKER BAR ---------- */

.phb-updates-bar {
	display: flex;
	align-items: stretch;
	width: 100%;
}

.phb-updates-label {
	flex: 0 0 auto;
	background: #c7363a;
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.0625rem;
	font-size: 0.8125rem;
	display: flex;
	align-items: center;
	padding: 0 1.375rem;
}

.phb-updates-content {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	background: #eceeef;
	min-width: 0;
}

.phb-updates-feed {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.375rem;
	padding: 0 1rem;
	font-size: 0.875rem;
	color: #444;
	min-height: 2.75rem;
	position: relative;
}

.phb-update-item {
	display: none;
	color: #444;
}
.phb-update-item.phb-update-active {
	display: inline;
}
.phb-update-item a {
	color: #444;
	text-decoration: none;
}
.phb-update-item a:hover {
	color: #c7363a;
	text-decoration: underline;
}

.phb-updates-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0 0.875rem;
}
.phb-updates-nav button {
	background: none;
	border: none;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 0.25rem 0.375rem;
}
.phb-updates-nav button:hover {
	color: #c7363a;
}

/* ==========================================================================
   MOBILE — everything below this line only applies at narrow widths.
   Desktop layout above is untouched.
   ========================================================================== */

@media (max-width: 700px) {

	/* Main inline panel (part of [performance_hero] itself) goes back
	   to hidden on mobile — that's now [performance_hero_posts]'s job,
	   placed wherever needed on the page instead of being locked to
	   sit right after the slider. */
	.phb-hero-stage > .phb-featured-panel {
		display: none;
	}

	/* Standalone [performance_hero_posts] panel: hidden above this
	   breakpoint (desktop already gets this content from
	   [performance_hero]'s floating card), shown full-width here,
	   stacked wherever the shortcode was placed on the page. Reuses
	   the same .phb-featured-item row structure (date badge,
	   title+comments, thumbnail) — just without the absolute
	   positioning, shadow, and scroll area the desktop card uses. */
	.phb-featured-panel.phb-featured-standalone {
		display: block;
		position: static;
		width: 100%;
		max-height: none;
		background: #ffffff;
		border-radius: 0;
		box-shadow: none;
		overflow-y: visible;
		padding: 0 clamp(1rem, 4vw, 2rem);
	}
	.phb-featured-item {
		padding: 1.25rem 0;
	}
	.phb-featured-date {
		width: 3.25rem;
	}
	.phb-featured-thumb img {
		width: 4.75rem;
		height: 4.75rem;
	}

	/* Slide is taller relative to its width on mobile (matches the
	   reference: ~56% of viewport width instead of the desktop clamp). */
	.phb-slider {
		height: 55vw;
		min-height: 12rem;
		max-height: 28rem;
	}

	/* Headline moves from left-aligned/vertically-centered to centered,
	   sitting in the upper-middle area of the slide, single block instead
	   of flush-left with a wide right gutter for the panel. */
	.phb-slide-text {
		position: absolute;
		top: 40%;
		left: 50%;
		transform: translate(-50%, -50%);
		height: auto;
		width: 88%;
		display: block;
		text-align: center;
		padding: 0;
		font-size: clamp(1.125rem, 5.2vw, 1.5rem);
	}

	/* Dots move from bottom-left to horizontally centered, sitting lower
	   in the slide below the headline. */
	.phb-dots {
		left: 50%;
		right: auto;
		bottom: auto;
		top: 71%;
		transform: translateX(-50%);
	}

	/* Updates bar becomes two stacked full-width rows: a red "UPDATES"
	   header row, then a lighter row with the message + nav arrows. */
	.phb-updates-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.phb-updates-label {
		width: 100%;
		padding: 1rem 1.25rem;
		font-size: clamp(0.75rem, 0.7321rem + 0.0893vw, 0.8125rem);
	}
	.phb-updates-content {
		width: 100%;
		padding: 1.125rem 1.25rem;
		align-items: center;
	}
	.phb-updates-feed {
		padding: 0;
		min-height: 0;
		font-size: clamp(1.0625rem, 4.8vw, 1.375rem);
		line-height: 1.35;
	}
	.phb-updates-nav {
		padding: 0 0 0 0.75rem;
		align-self: center;
	}
	.phb-updates-nav button {
		font-size: 1.625rem;
	}
}
