/**
 * Sports Hero Builder - Core Stylesheet
 *
 * @package SportsHeroBuilder
 */

:root {
	--shb-hero-height: 580px;
	--shb-main-col-width: 66%;
	--shb-gap: 16px;
	--shb-radius: 12px;
	--shb-overlay-start: rgba(11, 15, 25, 0.15);
	--shb-overlay-end: rgba(7, 10, 18, 0.94);
	--shb-zoom: 1.06;
	--shb-transition-speed: 400ms;
}

/* ==========================================================================
   Base Container
   ========================================================================== */

.shb-hero-container {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.shb-hero-container *,
.shb-hero-container *::before,
.shb-hero-container *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Article Card
   ========================================================================== */

.shb-card {
	position: relative;
	border-radius: var(--shb-radius, 12px);
	overflow: hidden;
	background-color: #0f172a;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	transform: translateZ(0);
	transition: transform var(--shb-transition-speed, 400ms) cubic-bezier(0.2, 0.8, 0.2, 1),
	            box-shadow var(--shb-transition-speed, 400ms) cubic-bezier(0.2, 0.8, 0.2, 1);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.shb-card:hover {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
}

/* Full Card Clickable Overlay */
.shb-card-link-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	text-indent: -9999px;
	overflow: hidden;
	outline: none;
}

.shb-card-link-overlay:focus-visible {
	outline: 3px solid #38bdf8;
	outline-offset: -3px;
	border-radius: var(--shb-radius, 12px);
	z-index: 10;
}

/* ==========================================================================
   Media & Gradient Overlays
   ========================================================================== */

.shb-media-wrap {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 0;
}

.shb-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	transform: scale(1);
	transform-origin: center center;
	transition: transform var(--shb-transition-speed, 400ms) cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
}

.shb-card:hover .shb-image {
	transform: scale(var(--shb-zoom, 1.06));
}

.shb-image--placeholder {
	background-color: #0f172a;
}

.shb-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		var(--shb-overlay-start, rgba(11, 15, 25, 0.15)) 0%,
		rgba(7, 10, 18, 0.45) 45%,
		var(--shb-overlay-end, rgba(7, 10, 18, 0.94)) 100%
	);
	opacity: 0.85;
	transition: opacity var(--shb-transition-speed, 400ms) ease;
	z-index: 1;
	pointer-events: none;
}

.shb-card:hover .shb-overlay {
	opacity: 0.95;
}

/* ==========================================================================
   Content Wrapping
   ========================================================================== */

.shb-content-wrap {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	width: 100%;
	pointer-events: none;
}

.shb-card--main .shb-content-wrap {
	padding: 32px;
}

.shb-card--support .shb-content-wrap {
	padding: 20px;
}

.shb-badge-group,
.shb-subtitle,
.shb-title,
.shb-excerpt,
.shb-meta,
.shb-action-wrap {
	pointer-events: auto;
}

/* ==========================================================================
   Badges (Sports & Categories)
   ========================================================================== */

.shb-badge-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.shb-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	border-radius: 4px;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.25s ease, transform 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shb-badge:hover {
	transform: translateY(-1px);
}

/* Category Badge */
.shb-badge--category {
	background-color: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.shb-badge--category:hover {
	background-color: #0284c7;
	border-color: #0284c7;
	color: #ffffff;
}

/* Sports Specific Badges */
.shb-badge--breaking {
	background-color: #e11d48;
	color: #ffffff;
}

.shb-badge--live {
	background-color: #10b981;
	color: #ffffff;
}

.shb-badge--trending {
	background-color: #f59e0b;
	color: #000000;
}

.shb-badge--exclusive {
	background-color: #8b5cf6;
	color: #ffffff;
}

.shb-badge--featured {
	background-color: #0284c7;
	color: #ffffff;
}

.shb-badge--custom {
	background-color: #475569;
	color: #ffffff;
}

/* Live Animated Pulse Dot */
.shb-live-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background-color: #ffffff;
	margin-right: 6px;
	box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	animation: shbPulse 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes shbPulse {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	}
	70% {
		transform: scale(1.15);
		box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
	}
	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
	}
}

/* ==========================================================================
   Subtitles & Match Teasers
   ========================================================================== */

.shb-subtitle {
	font-size: 0.82rem;
	font-weight: 700;
	color: #38bdf8;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 6px;
	line-height: 1.3;
}

/* ==========================================================================
   Headlines / Titles
   ========================================================================== */

.shb-title {
	margin: 0 0 10px 0;
	color: #ffffff;
	font-weight: 800;
	text-rendering: optimizeLegibility;
}

.shb-card--main .shb-title {
	font-size: clamp(1.4rem, 2vw + 0.5rem, 2.4rem);
	line-height: 1.18;
	letter-spacing: -0.02em;
}

.shb-card--support .shb-title {
	font-size: clamp(1rem, 1.1vw + 0.3rem, 1.25rem);
	line-height: 1.26;
	letter-spacing: -0.01em;
	font-weight: 700;
}

.shb-title-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
	display: inline;
}

.shb-title-link:hover,
.shb-card:hover .shb-title-link {
	color: #38bdf8;
}

/* Optional Underline Effect */
.shb-has-underline-effect .shb-title-link {
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0% 100%;
	background-repeat: no-repeat;
	background-size: 0% 2px;
	transition: color 0.25s ease, background-size 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.shb-has-underline-effect .shb-card:hover .shb-title-link {
	background-size: 100% 2px;
}

/* ==========================================================================
   Excerpts
   ========================================================================== */

.shb-excerpt {
	color: #cbd5e1;
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 14px;
	max-width: 90%;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.shb-card--support .shb-excerpt {
	font-size: 0.85rem;
	line-height: 1.4;
	margin-bottom: 8px;
	-webkit-line-clamp: 2;
}

/* ==========================================================================
   Metadata
   ========================================================================== */

.shb-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: #94a3b8;
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.4;
}

.shb-card--support .shb-meta {
	font-size: 0.76rem;
}

.shb-meta-item a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.shb-meta-item a:hover {
	color: #38bdf8;
}

.shb-meta-by {
	color: #64748b;
	margin-right: 2px;
}

.shb-meta-separator {
	color: rgba(148, 163, 184, 0.4);
	user-select: none;
	font-size: 0.9em;
}

/* ==========================================================================
   Read More Button
   ========================================================================== */

.shb-action-wrap {
	margin-top: 16px;
}

.shb-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background-color: #0284c7;
	color: #ffffff;
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: 6px;
	transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
	box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.shb-read-more:hover,
.shb-card:hover .shb-read-more {
	background-color: #0369a1;
	transform: translateX(2px);
	box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45);
}

.shb-read-more-icon {
	transition: transform 0.25s ease;
}

.shb-read-more:hover .shb-read-more-icon,
.shb-card:hover .shb-read-more-icon {
	transform: translateX(3px);
}

/* ==========================================================================
   Style A: Editorial Sports Spotlight Layout
   ========================================================================== */

.shb-style-editorial .shb-editorial-wrap {
	display: flex;
	gap: var(--shb-gap, 16px);
	height: var(--shb-hero-height, 580px);
	width: 100%;
}

.shb-style-editorial .shb-col-main {
	flex: 0 0 calc(var(--shb-main-col-width, 66%) - (var(--shb-gap, 16px) / 2));
	width: calc(var(--shb-main-col-width, 66%) - (var(--shb-gap, 16px) / 2));
	height: 100%;
}

.shb-style-editorial .shb-col-main .shb-card--main {
	height: 100%;
	width: 100%;
}

.shb-style-editorial .shb-col-support {
	flex: 1 1 0%;
	display: flex;
	flex-direction: column;
	gap: var(--shb-gap, 16px);
	height: 100%;
	min-width: 0;
}

.shb-style-editorial .shb-col-support .shb-card--support {
	flex: 1 1 calc(50% - (var(--shb-gap, 16px) / 2));
	height: calc(50% - (var(--shb-gap, 16px) / 2));
	width: 100%;
}

/* ==========================================================================
   Style B: Modern Sports News Grid Layout
   ========================================================================== */

.shb-style-grid .shb-grid-wrap {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr 0.85fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--shb-gap, 16px);
	height: var(--shb-hero-height, 580px);
	width: 100%;
}

.shb-style-grid .shb-grid-item--primary {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
	height: 100%;
}

.shb-style-grid .shb-grid-item--sub-1 {
	grid-column: 2 / 4;
	grid-row: 1 / 2;
	height: 100%;
}

.shb-style-grid .shb-grid-item--sub-2 {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	height: 100%;
}

.shb-style-grid .shb-grid-item--sub-3 {
	grid-column: 3 / 4;
	grid-row: 2 / 3;
	height: 100%;
}
