/**
 * Home hub (sports-hub): Futemax-inspired dark sports layout.
 */

.sac-hub {
	--sac-hub-bg: #070d0a;
	--sac-hub-surface: #0f1a14;
	--sac-hub-card: #121f18;
	--sac-hub-line: rgba(255, 255, 255, 0.07);
	--sac-hub-text: #e8f2ec;
	--sac-hub-muted: #8aa399;
	--sac-hub-accent: #22c55e;
	--sac-hub-accent-dim: rgba(34, 197, 94, 0.18);
	--sac-hub-live: #ef4444;
	--sac-hub-soon: #fbbf24;
}

.sac-hub.sac-shell {
	background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(34, 197, 94, 0.12), transparent 55%),
		var(--sac-hub-bg);
	color: var(--sac-hub-text);
}

.sac-hub .sac-shell-header.fmx-shell-header {
	background: linear-gradient(180deg, #0c1810 0%, #08120d 100%);
	border-bottom: 2px solid var(--fmx-lime, #dfff3a);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Hub: wide layout + optional narrow inner for intro only */
.sac-hub .sac-shell-main {
	max-width: min(1200px, 100%);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* Team logo marquee (header) */
.sac-team-strip {
	border-top: 1px solid var(--sac-hub-line);
	border-bottom: 1px solid var(--sac-hub-line);
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(34, 197, 94, 0.06), rgba(0, 0, 0, 0.35));
	overflow: hidden;
	padding: 0.55rem 0;
}

.sac-team-strip__viewport {
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.sac-team-strip__track {
	display: flex;
	align-items: center;
	gap: 1.35rem;
	width: max-content;
	animation: sac-hub-marquee 55s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.sac-team-strip__track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
		max-width: 1100px;
		margin: 0 auto;
		padding: 0 1rem;
	}
}

@keyframes sac-hub-marquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

.sac-team-strip__item {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--sac-hub-line);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sac-team-strip__item:hover {
	transform: scale(1.08);
	border-color: rgba(34, 197, 94, 0.45);
	box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
	text-decoration: none;
}

.sac-team-strip__img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	border-radius: 4px;
}

.sac-team-strip__fallback {
	font-size: 0.7rem;
	font-weight: 800;
	color: var(--sac-hub-accent);
	letter-spacing: 0.02em;
}

/* Main hub */
.sac-hub-lead {
	font-size: 1.05rem;
	color: var(--sac-hub-muted);
	margin: 0 auto 1.75rem;
	max-width: 42rem;
	line-height: 1.55;
}

.sac-hub-term-desc {
	font-size: 0.95rem;
	color: var(--sac-hub-muted);
	margin: -0.75rem auto 1.75rem;
	max-width: min(1200px, 46rem);
	line-height: 1.55;
}

.sac-hub-term-desc p:first-child {
	margin-top: 0;
}

/* Page description (replaces news ticker on taxonomy pages) */
.sac-hub-page-desc {
	margin: 0 auto 1.75rem;
	max-width: min(1200px, 100%);
	border-radius: 10px;
	padding: 0.9rem 1rem;
	border: 1px solid var(--sac-hub-line);
	background: rgba(0, 0, 0, 0.35);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.sac-hub-page-desc__title {
	margin: 0 0 0.25rem;
	font-size: clamp(1.1rem, 2.6vw, 1.35rem);
	font-weight: 900;
	letter-spacing: 0.02em;
	color: #fff;
}

.sac-hub-page-desc__subtitle {
	margin: 0;
	font-size: 0.9rem;
	color: var(--sac-hub-muted);
	line-height: 1.5;
}

.sac-hub-block {
	margin-bottom: 2.25rem;
}

.sac-hub-block__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.sac-hub-block__head h2 {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.35rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
}

.sac-hub-block__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.65rem;
	border-radius: 6px;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sac-hub-block__badge--live {
	background: rgba(239, 68, 68, 0.2);
	color: #fecaca;
	border: 1px solid rgba(239, 68, 68, 0.45);
}

.sac-hub-block__badge--soon {
	background: rgba(251, 191, 36, 0.12);
	color: #fde68a;
	border: 1px solid rgba(251, 191, 36, 0.35);
}

.sac-hub-block__badge--end {
	background: rgba(138, 163, 153, 0.15);
	color: var(--sac-hub-muted);
	border: 1px solid var(--sac-hub-line);
}

/* Lime pill + black type (Futemax reference) */
.sac-hub-block__badge--fmx {
	background: var(--fmx-lime, #dfff3a);
	color: #0a0a0a;
	border: 0;
	font-size: 0.62rem;
	letter-spacing: 0.1em;
	padding: 0.35rem 0.75rem;
	border-radius: 4px;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.sac-hub-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem 1.75rem;
	align-items: start;
}

@media (min-width: 960px) {
	.sac-hub-layout {
		grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
	}
}

.sac-hub-layout__aside .sac-hub-block {
	margin-bottom: 0;
}

.sac-hub-matches {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sac-hub-matches--poster {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

@media (min-width: 520px) {
	.sac-hub-matches--poster {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.sac-hub-matches--poster {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sac-hub-matches--compact {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

/* Poster card: gradient field + 3 logos + black info bar */
.sac-hub-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 168px;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none !important;
	color: inherit !important;
	border: 1px solid var(--sac-hub-line);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
	transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sac-hub-card:hover {
	transform: translateY(-3px);
	border-color: rgba(223, 255, 58, 0.35);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.sac-hub-card__bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		145deg,
		hsl(var(--sac-card-h, 142) 38% 14%) 0%,
		hsl(calc(var(--sac-card-h, 142) + 48) 32% 9%) 48%,
		hsl(var(--sac-card-h, 142) 36% 11%) 100%
	);
	opacity: 1;
}

.sac-hub-card__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 55%);
	pointer-events: none;
}

.sac-hub-card__logos {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.35rem;
	padding: 1rem 0.65rem 0.85rem;
	flex: 1 1 auto;
}

.sac-hub-card__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
}

.sac-hub-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.sac-hub-card__logo--fallback {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.78rem;
	font-weight: 900;
	color: #e8f2ec;
	align-items: center;
	justify-content: center;
}

.sac-hub-card__site {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
}

.sac-hub-card__site-img {
	width: 44px;
	height: auto;
	max-height: 48px;
	object-fit: contain;
	display: block;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.sac-hub-card__site-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: #000;
	border: 2px solid var(--fmx-lime, #dfff3a);
	color: var(--fmx-lime, #dfff3a);
	font-size: 0.65rem;
	font-weight: 900;
	letter-spacing: 0.02em;
}

.sac-hub-card__bar {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	padding: 0.65rem 0.75rem 0.75rem;
	background: #000;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sac-hub-card__title {
	font-weight: 800;
	font-size: 0.88rem;
	line-height: 1.35;
	color: #fff;
	margin: 0;
}

.sac-hub-card__date {
	font-size: 0.78rem;
	color: rgba(232, 242, 236, 0.72);
	margin: 0;
}

.sac-hub-card__date--live {
	font-weight: 800;
	color: #86efac;
	letter-spacing: 0.02em;
}

.sac-hub-card__kickoff {
	display: block;
	font-size: 0.72rem;
	color: rgba(232, 242, 236, 0.62);
	margin: 0.1rem 0 0;
	line-height: 1.35;
}

.sac-hub-card__league {
	font-size: 0.72rem;
	line-height: 1.35;
	color: rgba(138, 163, 153, 0.95);
	margin: 0.15rem 0 0;
	max-width: 100%;
}

.sac-hub-card__countdown {
	display: block;
	margin: 0.35rem 0 0;
	font-size: 0.72rem;
	font-weight: 700;
	color: #fde68a;
	line-height: 1.35;
}

.sac-hub-card__countdown--compact {
	margin-top: 0.25rem;
	font-size: 0.68rem;
}

.sac-hub-card--compact {
	min-height: 0;
	flex-direction: row;
	align-items: stretch;
	border-radius: 8px;
}

.sac-hub-card--compact .sac-hub-card__bg {
	opacity: 0.88;
	filter: saturate(0.65) brightness(0.92);
}

.sac-hub-card--compact .sac-hub-card__logos {
	flex: 0 0 38%;
	max-width: 160px;
	padding: 0.55rem 0.45rem;
	flex-direction: row;
	justify-content: space-between;
}

.sac-hub-card--compact .sac-hub-card__logo {
	width: 40px;
	height: 40px;
}

.sac-hub-card--compact .sac-hub-card__logo--fallback {
	width: 36px;
	height: 36px;
	font-size: 0.68rem;
}

.sac-hub-card--compact .sac-hub-card__site {
	width: 36px;
	height: 36px;
}

.sac-hub-card--compact .sac-hub-card__site-img {
	width: 32px;
	max-height: 36px;
}

.sac-hub-card--compact .sac-hub-card__site-fallback {
	width: 32px;
	height: 32px;
	font-size: 0.55rem;
}

.sac-hub-card--compact .sac-hub-card__bar {
	flex: 1 1 auto;
	justify-content: center;
	padding: 0.55rem 0.65rem;
	border-top: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.sac-hub-card__line--one {
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.4;
	color: #f1f5f9;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sac-hub-empty {
	color: var(--sac-hub-muted);
	font-size: 0.92rem;
	margin: 0;
	padding: 1rem 1.1rem;
	background: var(--sac-hub-surface);
	border-radius: 10px;
	border: 1px dashed var(--sac-hub-line);
}

.sac-hub-pagination {
	margin-top: 1.35rem;
}

.sac-hub-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sac-hub-pagination .page-numbers li {
	margin: 0;
}

.sac-hub-pagination a.page-numbers,
.sac-hub-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.35rem;
	padding: 0.4rem 0.65rem;
	border-radius: 8px;
	font-size: 0.82rem;
	font-weight: 600;
	border: 1px solid var(--sac-hub-line);
	background: var(--sac-hub-surface);
	color: var(--sac-hub-text);
	text-decoration: none;
}

.sac-hub-pagination span.page-numbers.current {
	background: var(--sac-hub-accent-dim);
	border-color: var(--sac-hub-accent);
	color: #ecfccb;
}

.sac-hub-pagination a.page-numbers:hover {
	border-color: var(--sac-hub-accent);
	color: var(--sac-hub-accent);
}

.sac-hub-foot {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--sac-hub-line);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: center;
}

.sac-hub-foot a {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--sac-hub-accent);
}

.sac-hub .fmx-site-footer {
	border-top: 1px solid var(--sac-hub-line);
}

.sac-hub .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.sac-hub-load-more-wrap {
	margin: 1rem 0 0;
	text-align: center;
}

.sac-hub-load-more.sac-hub-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.45rem 1.35rem;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--sac-hub-text);
	background: var(--sac-hub-surface);
	border: 1px solid var(--sac-hub-line);
	border-radius: 0.5rem;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.sac-hub-load-more.sac-hub-btn-secondary:hover:not(:disabled) {
	border-color: var(--sac-hub-accent);
	color: var(--sac-hub-accent);
}

.sac-hub-load-more.sac-hub-btn-secondary:disabled {
	opacity: 0.65;
	cursor: wait;
}

.sac-hub-load-more.sac-hub-btn-secondary[hidden] {
	display: none !important;
}
