/* ==========================================================================
   StatChasers Featured Articles — editorial grid.
   Every rule is scoped under .scfa-section and every class is scfa- prefixed,
   so nothing leaks into the surrounding Divi / WordPress page.

   Layout: one full-width featured card (image left / content right) with two
   (or more) secondary cards below (image on top / content beneath).

   NOTE FOR EDITORS: the containing Divi row must be given a wide "Max Width"
   (e.g. 1200–1400px) for the intended desktop presentation. This section is
   transparent and inherits the page's dark background — it does not draw its
   own large background panel.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. SECTION WRAPPER + LOCAL COLOR TOKENS
   -------------------------------------------------------------------------- */

.scfa-section {
	/* Color system — scoped custom properties (do not leak globally). */
	--scfa-card: #131b28;
	--scfa-alt: #162131;
	--scfa-border: rgba(148, 163, 184, 0.14);
	--scfa-border-hover: rgba(148, 163, 184, 0.30);
	--scfa-title: #ffffff;
	--scfa-body: #89a2c2;
	--scfa-muted: #7890ad;
	--scfa-gold: #f3c623;
	--scfa-gold-border: rgba(243, 198, 35, 0.35);

	box-sizing: border-box;
	width: 100%;
	max-width: 1400px;
	margin-right: auto;
	margin-left: auto;
	padding: 0;
	background: transparent;
	border: 0;
	font-family: inherit;
}

.scfa-section *,
.scfa-section *::before,
.scfa-section *::after {
	box-sizing: border-box;
}

/* Featured on top, secondary grid beneath. */
.scfa-section .scfa-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

/* --------------------------------------------------------------------------
   1. SHARED CARD ANCHOR (one anchor per card — no nested links)
   -------------------------------------------------------------------------- */

.scfa-section .scfa-card-link,
.scfa-section .scfa-card-link:visited,
.scfa-section .scfa-card-link:hover,
.scfa-section .scfa-card-link:focus {
	display: flex;
	text-decoration: none;
	color: inherit;
	border: 0;
	outline: none;
}

.scfa-section .scfa-card-link:focus-visible {
	outline: 2px solid var(--scfa-gold);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   2. SHARED MEDIA + PLACEHOLDER
   -------------------------------------------------------------------------- */

.scfa-section .scfa-media {
	position: relative;
	overflow: hidden;
	background-color: var(--scfa-alt);
	line-height: 0;
}

/* Real images (wp_get_attachment_image outputs a plain <img>). The !important
   flags defend only against Divi hiding / resizing images inside our scope. */
.scfa-section .scfa-media img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover;
	border: 0;
	transition: transform 220ms ease;
}

/* Restrained dark placeholder — only rendered when a post has no image. */
.scfa-section .scfa-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-color: var(--scfa-alt);
	background-image: linear-gradient(155deg, #182437 0%, #0f1826 100%);
}

.scfa-section .scfa-placeholder-label {
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scfa-muted);
}

/* --------------------------------------------------------------------------
   3. META ROW (category badge + date + optional author)
   -------------------------------------------------------------------------- */

.scfa-section .scfa-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.scfa-section .scfa-category {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 10px;
	border: 1px solid var(--scfa-gold-border);
	border-radius: 999px;
	background-color: rgba(243, 198, 35, 0.08);
	color: var(--scfa-gold);
	font-family: inherit;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.scfa-section .scfa-date,
.scfa-section .scfa-byline {
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--scfa-muted);
}

/* Restrained per-category accents. Dynasty / trades keep the gold default. */
.scfa-section .scfa-category--redraft {
	border-color: rgba(59, 130, 246, 0.40);
	background-color: rgba(59, 130, 246, 0.10);
	color: #7cb1ff;
}

.scfa-section .scfa-category--nfl {
	border-color: rgba(34, 197, 94, 0.40);
	background-color: rgba(34, 197, 94, 0.10);
	color: #5fd08a;
}

.scfa-section .scfa-category--picks {
	border-color: rgba(249, 115, 22, 0.40);
	background-color: rgba(249, 115, 22, 0.10);
	color: #f7a765;
}

/* --------------------------------------------------------------------------
   4. CTA
   -------------------------------------------------------------------------- */

.scfa-section .scfa-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto; /* pushes the CTA to the bottom of the flex column */
	padding-top: 16px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	color: var(--scfa-gold);
}

.scfa-section .scfa-cta-arrow {
	transition: transform 220ms ease;
}

.scfa-section .scfa-card-link:hover .scfa-cta-arrow,
.scfa-section .scfa-card-link:focus-visible .scfa-cta-arrow {
	transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. FEATURED CARD (image left / content right)
   -------------------------------------------------------------------------- */

.scfa-section .scfa-featured {
	width: 100%;
	background-color: var(--scfa-card);
	border: 1px solid var(--scfa-border);
	border-radius: 16px;
	overflow: hidden;
	transition: border-color 220ms ease;
}

.scfa-section .scfa-featured-link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
	min-height: 390px;
}

.scfa-section .scfa-featured-media {
	min-height: 390px;
}

.scfa-section .scfa-featured-body {
	display: flex;
	flex-direction: column;
	padding: 30px;
	background-color: var(--scfa-card);
}

.scfa-section .scfa-featured-title {
	margin: 10px 0 0 !important;
	padding: 0;
	font-family: inherit !important;
	font-size: clamp(26px, 2.4vw, 36px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.12;
	color: var(--scfa-title);
	text-transform: none !important;
	/* Up to three lines. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.scfa-section .scfa-featured-excerpt {
	margin: 12px 0 0 !important;
	padding: 0;
	max-width: 600px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	color: var(--scfa-body);
	/* Up to four lines. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.scfa-section .scfa-featured:hover {
	border-color: var(--scfa-border-hover);
}

.scfa-section .scfa-featured-link:hover .scfa-media img {
	transform: scale(1.015);
}

/* --------------------------------------------------------------------------
   6. SECONDARY GRID + CARDS (image on top / content beneath)
   -------------------------------------------------------------------------- */

.scfa-section .scfa-secondary-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
}

.scfa-section .scfa-secondary {
	background-color: var(--scfa-card);
	border: 1px solid var(--scfa-border);
	border-radius: 14px;
	overflow: hidden;
	transition: border-color 220ms ease;
}

.scfa-section .scfa-secondary-link {
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.scfa-section .scfa-secondary-media {
	width: 100%;
	aspect-ratio: 16 / 6;
	min-height: 185px;
}

.scfa-section .scfa-secondary-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 17px;
	background-color: var(--scfa-card);
}

.scfa-section .scfa-secondary-title {
	margin: 10px 0 0 !important;
	padding: 0;
	font-family: inherit !important;
	font-size: clamp(17px, 1.5vw, 21px);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.25;
	color: var(--scfa-title);
	text-transform: none !important;
	/* Up to two lines. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.scfa-section .scfa-secondary-excerpt {
	margin: 8px 0 0 !important;
	padding: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--scfa-body);
	/* Up to two lines — keeps card heights even. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.scfa-section .scfa-secondary:hover {
	border-color: var(--scfa-border-hover);
}

.scfa-section .scfa-secondary-link:hover .scfa-media img {
	transform: scale(1.015);
}

/* --------------------------------------------------------------------------
   7. DIVI RESET OVERRIDES (scoped — never global)
   -------------------------------------------------------------------------- */

.scfa-section img {
	max-width: 100% !important;
}

.scfa-section p {
	margin-top: 0;
	margin-bottom: 0;
}

.scfa-section a,
.scfa-section a:visited,
.scfa-section a:hover,
.scfa-section a:focus {
	color: inherit;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.scfa-section .scfa-media img,
	.scfa-section .scfa-cta-arrow {
		transition: none;
	}
	.scfa-section .scfa-card-link:hover .scfa-media img {
		transform: none;
	}
	.scfa-section .scfa-card-link:hover .scfa-cta-arrow,
	.scfa-section .scfa-card-link:focus-visible .scfa-cta-arrow {
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   9. TABLET — 980px and below
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
	.scfa-section .scfa-featured-link {
		min-height: 340px;
	}
	.scfa-section .scfa-featured-media {
		min-height: 340px;
	}
	.scfa-section .scfa-featured-body {
		padding: 24px;
	}
}

/* --------------------------------------------------------------------------
   10. MOBILE — 767px and below (single column everywhere)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.scfa-section {
		overflow-x: hidden;
	}

	.scfa-section .scfa-grid {
		gap: 14px;
	}

	/* Featured becomes one column; image above content. */
	.scfa-section .scfa-featured-link {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.scfa-section .scfa-featured-media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}
	.scfa-section .scfa-featured-body {
		padding: 18px;
	}
	.scfa-section .scfa-featured {
		border-radius: 14px;
	}

	/* Secondary grid becomes one column. */
	.scfa-section .scfa-secondary-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.scfa-section .scfa-secondary-media {
		aspect-ratio: 16 / 9;
	}
	.scfa-section .scfa-secondary-body {
		padding: 15px;
	}
	.scfa-section .scfa-secondary {
		border-radius: 12px;
	}
}

/* --------------------------------------------------------------------------
   11. SMALL MOBILE — 480px and below
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
	.scfa-section .scfa-featured-title {
		font-size: 24px;
	}
	.scfa-section .scfa-secondary-title {
		font-size: 17px;
	}
	.scfa-section .scfa-meta {
		gap: 8px;
	}
}
