/* SUVPedia homepage v1.5 */

/* Hero sits between header/nav and #page — naturally full-width */
.sp-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	width: 100%;
	padding: 5rem 0 4.5rem;
	background-color: #0a0c12;
	background-image:
		linear-gradient(105deg,
			rgba(8, 10, 16, 0.96) 0%,
			rgba(8, 10, 16, 0.88) 32%,
			rgba(8, 10, 16, 0.55) 58%,
			rgba(8, 10, 16, 0.20) 100%
		),
		var(--sp-hero-bg-image);
	background-size: cover;
	background-position: center 35%;
	background-repeat: no-repeat;
}

.sp-hero::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #f08442, #ff8800, #f08442);
	z-index: 3;
}

/*
 * GP outputs .site-content.grid-container with inline max-width from Customizer.
 * We must beat that specificity so the homepage sections go full-width.
 * Each sp-section uses its own .grid-container inside to keep text centred.
 */
body.suvpedia-home #content.grid-container,
body.suvpedia-home .site-content.grid-container {
	max-width: 100vw !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.suvpedia-home #primary.content-area {
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
}

/* Strip GP separate-containers box from each section */
body.suvpedia-home .site-main > section,
body.suvpedia-home .suvpedia-home-main > section {
	margin: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	max-width: 100% !important;
	width: 100% !important;
}

/* Hero keeps its own background */
body.suvpedia-home .site-main .sp-hero,
body.suvpedia-home .suvpedia-home-main .sp-hero {
	background-color: #0a0c12 !important;
	background-image: linear-gradient(105deg, rgba(8,10,16,.96) 0%, rgba(8,10,16,.88) 32%, rgba(8,10,16,.55) 58%, rgba(8,10,16,.2) 100%), var(--sp-hero-bg-image) !important;
	background-size: cover !important;
	background-position: center 35% !important;
	background-repeat: no-repeat !important;
}

body.suvpedia-home .footer-widgets,
body.suvpedia-home #footer-widgets {
	display: none !important;
}

body.suvpedia-home .sp-section > .grid-container {
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1.5rem, 3vw, 3rem);
	padding-right: clamp(1.5rem, 3vw, 3rem);
}

.sp-hero__inner {
	position: relative;
	max-width: 880px;
	z-index: 2;
	padding-left: 2rem;
	padding-right: 2rem;
}

.sp-hero__eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #f08442;
	margin: 0 0 1.25rem;
	background: rgba(240, 132, 66, 0.08);
	padding: 0.35rem 0.85rem;
	border-radius: 4px;
	border: 1px solid rgba(240, 132, 66, 0.15);
}

.sp-hero__title {
	font-size: clamp(2.25rem, 5.5vw, 3.5rem);
	line-height: 1.15;
	font-weight: 800;
	color: #fff;
	margin: 0 0 1.5rem;
	text-transform: none;
	letter-spacing: -0.02em;
}

.sp-hero__lead {
	font-size: 1.2rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 2.5rem;
	max-width: 680px;
}

.sp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 3.5rem;
}

/* Buttons */
.sp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.95rem 1.75rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-btn--primary {
	background: #f08442;
	color: #fff;
	border: 2px solid #f08442;
	box-shadow: 0 4px 18px rgba(240, 132, 66, 0.3);
}

.sp-btn--primary:hover,
.sp-btn--primary:focus {
	background: #e07535;
	border-color: #e07535;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(240, 132, 66, 0.45);
}

.sp-btn--ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.sp-btn--ghost:hover,
.sp-btn--ghost:focus {
	border-color: #f08442;
	color: #f08442;
	background: rgba(240, 132, 66, 0.05);
	transform: translateY(-2px);
}

.sp-btn--outline {
	background: #fff;
	color: #f08442;
	border: 2px solid #f08442;
	padding: 0.7rem 1.4rem;
	font-size: 0.9rem;
}

.sp-btn--outline:hover,
.sp-btn--outline:focus {
	background: #f08442;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(240, 132, 66, 0.25);
}

.sp-btn--small {
	padding: 0.6rem 1.15rem;
	font-size: 0.85rem;
	border-radius: 6px;
}

/* Trending bar in hero */
.sp-hero__trending {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 2rem;
}

.sp-hero__trending-label {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.5);
}

.sp-hero__trending-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.sp-hero__trending-pills a {
	color: rgba(255, 255, 255, 0.85);
	background: rgba(255, 255, 255, 0.06);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 0.45rem 1rem;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	transition: all 0.2s ease;
}

.sp-hero__trending-pills a:hover {
	color: #fff;
	background: #f08442;
	border-color: #f08442;
	transform: translateY(-1px);
}

/* Sections General */
.sp-section {
	padding: 5rem 0;
}

.sp-section:nth-child(even) {
	background: #f8fafc;
}

.sp-section__head {
	margin-bottom: 2.75rem;
}

.sp-section__head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
}

.sp-section__title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 0.5rem;
	color: #0f172a;
	text-transform: none;
}

.sp-section__title::after {
	content: "";
	display: block;
	width: 54px;
	height: 4px;
	background: linear-gradient(90deg, #f08442, #ff8800);
	border-radius: 4px;
	margin-top: 0.75rem;
}

.sp-section__subtitle {
	margin: 0;
	color: #64748b;
	font-size: 1.05rem;
	line-height: 1.6;
}

/* Category cards (3x2 Grid) */
.sp-categories {
	background: #fff !important;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 6rem;
}

.sp-categories__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
}

.sp-category-card {
	display: flex;
	flex-direction: column;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 2.25rem 2rem 2rem;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
	position: relative;
	overflow: hidden;
}

.sp-category-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #f08442, #ff8800);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sp-category-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	transform: translateY(-4px);
}

.sp-category-card:hover::before {
	opacity: 1;
}

.sp-category-card__icon-wrapper {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: linear-gradient(135deg, #fff5ec 0%, #ffeada 100%);
	color: #f08442;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.5rem;
	transition: transform 0.3s ease;
}

.sp-category-card:hover .sp-category-card__icon-wrapper {
	transform: scale(1.08) rotate(3deg);
}

.sp-category-card__title {
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #0f172a;
	text-transform: none;
}

.sp-category-card__desc {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #475569;
	margin: 0 0 1.5rem;
	flex: 1;
}

.sp-category-card__link {
	font-weight: 700;
	color: #f08442;
	font-size: 0.9rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	transition: gap 0.2s ease;
}

.sp-category-card:hover .sp-category-card__link {
	gap: 0.6rem;
}

/* ─── Post Cards ──────────────────────────────────────────────────────────── */
.sp-post-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-post-card:hover {
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
	transform: translateY(-4px);
	border-color: #cbd5e1;
}

.sp-post-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	position: relative;
	background: #cbd5e1;
}

.sp-post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.sp-post-card:hover .sp-post-card__image img {
	transform: scale(1.04);
}

.sp-post-card__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.sp-post-card__cat {
	display: inline-flex;
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #f08442;
	background: #fff5ec;
	padding: 0.35rem 0.75rem;
	border-radius: 6px;
	margin-bottom: 0.85rem;
	text-decoration: none;
	transition: all 0.2s;
}

.sp-post-card__cat:hover {
	background: #f08442;
	color: #fff;
}

.sp-post-card__title {
	font-size: 1.2rem;
	line-height: 1.4;
	margin: 0 0 0.85rem;
	font-weight: 700;
	text-transform: none;
}

.sp-post-card__title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sp-post-card__title a:hover {
	color: #f08442;
}

.sp-post-card__excerpt {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #475569;
	margin: 0 0 1.25rem;
	flex: 1;
}

.sp-post-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid #f1f5f9;
}

.sp-post-card__meta {
	font-size: 0.85rem;
	color: #64748b;
}

.sp-post-card__read {
	font-weight: 700;
	font-size: 0.9rem;
	color: #f08442;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: gap 0.2s ease;
}

.sp-post-card:hover .sp-post-card__read {
	gap: 0.5rem;
}

/* Force featured/editorial section white — nth-child(even) gives it #f8fafc */
.sp-featured.sp-section,
body.suvpedia-home .site-main > .sp-featured.sp-section,
body.suvpedia-home .suvpedia-home-main > .sp-featured.sp-section {
	background: #fff !important;
	padding: 6rem 0 6.5rem !important;
	border-top: 0;
	border-bottom: 0;
}

body.suvpedia-home .sp-featured > .grid-container,
body.suvpedia-home .sp-featured .grid-container {
	background: #fff !important;
}

/* Editorial Layout (Featured Section) */
.sp-editorial-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.95fr);
	gap: clamp(1.75rem, 3vw, 3rem);
	align-items: stretch;
}

.sp-editorial-grid .sp-post-card {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.sp-editorial-col-main,
.sp-post-card--hero {
	min-width: 0;
	height: 100%;
}

.sp-post-card--hero .sp-post-card__title {
	font-size: clamp(1.45rem, 2.1vw, 2rem);
	line-height: 1.35;
	margin-bottom: 1rem;
}

.sp-post-card--hero .sp-post-card__image {
	aspect-ratio: 16 / 8.6;
}

.sp-post-card--hero .sp-post-card__body {
	padding: clamp(1.65rem, 2.5vw, 2.4rem);
}

/* Editorial Right Column: Trending List */
.sp-editorial-col-sidebar {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: clamp(1.5rem, 2.4vw, 2rem);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.sp-sidebar-title {
	font-size: 1.15rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #0f172a;
	margin: 0 0 1.5rem;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 0.75rem;
}

.sp-sidebar-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sp-sidebar-item {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	padding: 1.15rem 0;
	border-bottom: 1px solid #f1f5f9;
}

.sp-sidebar-item:first-child {
	padding-top: 0;
}

.sp-sidebar-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.sp-sidebar-item__image {
	width: 84px;
	height: 84px;
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
	background: #cbd5e1;
	border: 1px solid #e2e8f0;
}

.sp-sidebar-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.sp-sidebar-item:hover .sp-sidebar-item__image img {
	transform: scale(1.05);
}

.sp-sidebar-item__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sp-sidebar-item__cat {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #f08442;
}

.sp-sidebar-item__title {
	font-size: 0.95rem;
	line-height: 1.4;
	margin: 0;
	font-weight: 700;
	text-transform: none;
}

.sp-sidebar-item__title a {
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s;
}

.sp-sidebar-item__title a:hover {
	color: #f08442;
}

.sp-sidebar-item__date {
	font-size: 0.8rem;
	color: #64748b;
}

/* ─── Post Grid base ──────────────────────────────────────────────────────── */
.sp-post-grid {
	display: grid;
	gap: 1.75rem;
}

/* Latest articles — 3-col grid, cards don't stretch to match row height */
.sp-post-grid--latest {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: start;
}

/* ─── Latest Articles section ─────────────────────────────────────────────── */
.sp-latest.sp-section {
	background: #fff !important;
	padding-top: 7rem;
}

.sp-latest .sp-section__head--row {
	align-items: center;
	margin-bottom: 2.5rem;
}

/* ─── Individual card ─────────────────────────────────────────────────────── */
/*
 * GP injects grid-50 / tablet-grid-50 classes that force width to 50%.
 * Override those entirely so our CSS grid controls the layout.
 */
.sp-post-grid--latest .sp-post-card--latest {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.sp-post-card--latest {
	background: #fff;
	border-radius: 12px;
	border: 1px solid #e8edf3;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	align-self: start; /* don't stretch height to fill grid row */
}

.sp-post-card--latest:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
	transform: translateY(-3px);
}

/* Image: fixed 16:9, always present */
.sp-post-card--latest .sp-post-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e2e8f0;
	flex-shrink: 0;
	border-radius: 12px 12px 0 0;
}

.sp-post-card__image--placeholder {
	display: block;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.sp-post-card--latest .sp-post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.sp-post-card--latest:hover .sp-post-card__image img {
	transform: scale(1.05);
}

/* Body */
.sp-post-card--latest .sp-post-card__body {
	padding: 1.25rem 1.4rem 1.4rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Category pill */
.sp-post-card--latest .sp-post-card__cat {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #f08442;
	background: #fff5ec;
	padding: 0.28rem 0.65rem;
	border-radius: 5px;
	margin-bottom: 0.75rem;
	align-self: flex-start;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.sp-post-card--latest .sp-post-card__cat:hover {
	background: #f08442;
	color: #fff;
}

/* Title */
.sp-post-card--latest .sp-post-card__title {
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 700;
	margin: 0 0 auto;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-transform: none;
}

.sp-post-card--latest .sp-post-card__title a {
	color: #0f172a;
	text-decoration: none;
}

.sp-post-card--latest .sp-post-card__title a:hover {
	color: #f08442;
}

/* Footer row: date left, read right — no wrapping */
.sp-post-card--latest .sp-post-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid #f1f5f9;
}

.sp-post-card--latest .sp-post-card__meta {
	font-size: 0.78rem;
	color: #94a3b8;
	white-space: nowrap;
}

.sp-post-card--latest .sp-post-card__read {
	font-size: 0.82rem;
	font-weight: 700;
	color: #f08442;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: gap 0.2s;
}

/* sp-trust footer styles live in footer.css (loaded globally) */

/* Responsive Styles */
@media (max-width: 1024px) {
	.sp-editorial-grid {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.sp-categories__grid,
	.sp-post-grid--latest {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.sp-post-grid--latest {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.sp-hero {
		padding: 5rem 0 4rem;
		background-position: 70% center;
	}

	.sp-section {
		padding: 3.5rem 0;
	}

	body.suvpedia-home .sp-section > .grid-container {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.sp-categories__grid,
	.sp-post-grid--latest {
		grid-template-columns: 1fr;
	}

	.sp-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.sp-btn {
		width: 100%;
	}

	.sp-section__head--row {
		flex-direction: column;
		align-items: stretch;
	}

	.sp-section__head--row .sp-btn--outline {
		width: 100%;
		text-align: center;
	}

	.sp-category-card {
		padding: 1.75rem 1.5rem;
	}
}
