.sg-section {
	padding: var(--sg-space-2xl) var(--sg-page-gutter);
}

.sg-section-inner {
	margin-inline: auto;
	max-width: var(--sg-wide);
	width: 100%;
}

.sg-section-heading {
	align-items: end;
	display: flex;
	gap: var(--sg-space-md);
	justify-content: space-between;
	margin-bottom: var(--sg-space-lg);
}

.sg-section-heading h2 {
	margin: 0;
}

.sg-section-heading a {
	color: var(--sg-accent);
	font-weight: 750;
	text-decoration: none;
}

.sg-hero-feed {
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
	border-bottom: 1px solid var(--sg-border-soft);
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	overflow: hidden;
	padding-bottom: 4.5rem;
	padding-top: 4.25rem;
	width: 100vw;
}

.sg-hero-feed > .sg-section-inner {
	padding-left: var(--sg-page-gutter);
	padding-right: var(--sg-page-gutter);
}

.sg-hero-schoolwali-grid {
	align-items: center;
	display: grid;
	gap: 4.5rem;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
}

.sg-hero-copy-panel {
	max-width: 720px;
}

.sg-hero-badge {
	align-items: center;
	background: rgba(79, 100, 119, 0.08);
	border: 1px solid rgba(79, 100, 119, 0.08);
	border-radius: 999px;
	color: var(--sg-accent);
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 780;
	justify-content: center;
	margin-bottom: 1.15rem;
	min-height: 40px;
	padding: 0 1rem;
}

.sg-hero-copy-panel h1 {
	font-size: clamp(2.65rem, 5vw, 4.8rem);
	letter-spacing: -0.035em;
	line-height: 1;
	margin-bottom: 1.25rem;
}

.sg-hero-copy-panel p {
	color: var(--sg-muted);
	font-size: 1.1rem;
	line-height: 1.82;
	margin-bottom: 1.75rem;
	max-width: 680px;
}

.sg-hero-search {
	align-items: center;
	background: #ffffff;
	border: 1px solid var(--sg-border);
	border-radius: 18px;
	box-shadow: var(--sg-shadow);
	display: flex;
	gap: 0.65rem;
	max-width: 660px;
	padding: 0.5rem;
}

.sg-hero-search input {
	background: transparent;
	border: 0;
	color: var(--sg-ink);
	font: inherit;
	height: 52px;
	outline: 0;
	padding: 0 1rem;
	width: 100%;
}

.sg-hero-search input::placeholder {
	color: var(--sg-muted);
}

.sg-hero-search button {
	background: #111111;
	border: 0;
	border-radius: 12px;
	color: #ffffff;
	cursor: pointer;
	font-weight: 820;
	height: 52px;
	padding: 0 1.35rem;
}

.sg-hero-tags {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.1rem;
}

.sg-hero-tags span {
	color: var(--sg-muted);
	font-size: 0.82rem;
	font-weight: 720;
}

.sg-hero-tags a {
	align-items: center;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--sg-border);
	border-radius: 999px;
	color: var(--sg-ink);
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 680;
	min-height: 32px;
	padding: 0 0.85rem;
	text-decoration: none;
	transition: transform 180ms ease, border-color 180ms ease;
}

.sg-hero-tags a:hover {
	border-color: #d9d9d9;
	transform: translateY(-1px);
}

.sg-hero-proof {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 1.45rem;
	max-width: 620px;
}

.sg-hero-proof span {
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid var(--sg-border);
	border-radius: 16px;
	display: grid;
	gap: 0.15rem;
	padding: 0.9rem 1rem;
}

.sg-hero-proof strong {
	font-size: 0.96rem;
}

.sg-hero-proof small {
	color: var(--sg-muted);
	font-size: 0.78rem;
	line-height: 1.35;
}

.sg-hero-preview {
	align-items: flex-start;
	display: flex;
	gap: 1rem;
	justify-content: center;
	position: relative;
}

.sg-hero-preview-card {
	background: #ffffff;
	border: 1px solid var(--sg-border);
	border-radius: 20px;
	box-shadow: var(--sg-shadow);
	overflow: hidden;
	width: 245px;
}

.sg-hero-preview-main {
	margin-top: 0;
}

.sg-hero-preview-float {
	margin-top: 2.5rem;
	width: 205px;
}

.sg-hero-preview-card img,
.sg-hero-preview-placeholder {
	aspect-ratio: 4 / 3;
	background: #fafafa;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.sg-hero-preview-caption {
	display: grid;
	gap: 0.35rem;
	padding: 0.9rem;
}

.sg-hero-preview-caption span,
.sg-hero-map-card span {
	color: var(--sg-muted);
	font-size: 0.78rem;
	font-weight: 720;
}

.sg-hero-preview-caption strong {
	font-size: 0.98rem;
	line-height: 1.25;
}

.sg-hero-map-card {
	background: #ffffff;
	border: 1px solid var(--sg-border);
	border-radius: 18px;
	bottom: -1.25rem;
	box-shadow: var(--sg-shadow);
	display: grid;
	gap: 0.45rem;
	left: 50%;
	min-width: 190px;
	padding: 1rem;
	position: absolute;
	transform: translateX(-50%);
}

.sg-hero-map-card strong {
	font-size: 1.25rem;
}

.sg-hero-map-card em {
	border: 1px solid var(--sg-border-soft);
	border-radius: 999px;
	color: var(--sg-muted);
	font-size: 0.78rem;
	font-style: normal;
	padding: 0.3rem 0.55rem;
}

.sg-topic-row,
.sg-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sg-space-sm);
}

.sg-discover-strip {
	background: #ffffff;
	padding-block: var(--sg-space-xl);
}

.sg-swipe-row {
	-webkit-overflow-scrolling: touch;
	flex-wrap: nowrap;
	overflow-x: auto;
	padding-bottom: 0.2rem;
	scroll-snap-type: x proximity;
}

.sg-swipe-row .sg-topic-chip {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.sg-creators-band {
	background: #ffffff;
}

.sg-feed-grid-dense {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sg-creator-columns {
	display: grid;
	gap: var(--sg-space-lg);
	grid-template-columns: 1fr 1fr;
}

.sg-load-more {
	align-items: center;
	display: flex;
	justify-content: center;
	margin-top: var(--sg-space-xl);
}

@media (max-width: 860px) {
	.sg-hero-schoolwali-grid,
	.sg-creator-columns {
		grid-template-columns: 1fr;
	}

	.sg-hero-feed {
		padding-top: 3.5rem;
	}

	.sg-hero-preview {
		justify-content: flex-start;
	}

	.sg-feed-grid-dense {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.sg-section {
		padding-block: var(--sg-space-xl);
	}

	.sg-section-heading {
		align-items: start;
		flex-direction: column;
	}

	.sg-hero-copy-panel h1 {
		font-size: 2.5rem;
		letter-spacing: -0.02em;
	}

	.sg-hero-copy-panel p {
		font-size: 1rem;
	}

	.sg-hero-search {
		align-items: stretch;
		flex-direction: column;
	}

	.sg-hero-search button {
		width: 100%;
	}

	.sg-hero-proof {
		grid-template-columns: 1fr;
	}

	.sg-hero-preview {
		display: none;
	}

	.sg-feed-grid-dense {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Stable Front Page Hero
========================================================= */

.sg-home {
	overflow-x: clip;
}

.sg-hero-feed {
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 82%);
	border-bottom: 1px solid #f1f1f1;
	margin: 0 calc(50% - 50vw);
	padding: clamp(3.5rem, 7vw, 5.75rem) 0 clamp(3.25rem, 6vw, 5rem);
	width: 100vw;
}

.sg-hero-feed .sg-section-inner {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 1220px;
	padding: 0 var(--sg-page-gutter);
	width: 100%;
}

.sg-hero-schoolwali-grid {
	align-items: center;
	display: grid;
	gap: clamp(2.5rem, 6vw, 5rem);
	grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
}

.sg-hero-copy-panel {
	min-width: 0;
}

.sg-hero-badge {
	align-items: center;
	background: rgba(79, 100, 119, 0.08);
	border: 1px solid rgba(79, 100, 119, 0.1);
	border-radius: 999px;
	color: #4f6477;
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 760;
	line-height: 1;
	margin-bottom: 1.15rem;
	min-height: 38px;
	padding: 0 1rem;
}

.sg-hero-copy-panel h1 {
	color: #111111;
	font-size: clamp(2.55rem, 5vw, 4.65rem);
	font-weight: 820;
	letter-spacing: -0.035em;
	line-height: 1;
	margin: 0 0 1.2rem;
	max-width: 780px;
}

.sg-hero-copy-panel p {
	color: #555555;
	font-size: clamp(1rem, 1.5vw, 1.14rem);
	line-height: 1.8;
	margin: 0 0 1.7rem;
	max-width: 690px;
}

.sg-hero-search {
	align-items: center;
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 28px rgba(0, 0, 0, 0.035);
	display: flex;
	gap: 0.65rem;
	max-width: 680px;
	padding: 0.5rem;
}

.sg-hero-search input[type="search"] {
	appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #111111;
	flex: 1 1 auto;
	font: inherit;
	height: 52px;
	min-width: 0;
	outline: 0;
	padding: 0 1rem;
}

.sg-hero-search input[type="search"]::placeholder {
	color: #777777;
}

.sg-hero-search button {
	align-items: center;
	background: #111111;
	border: 0;
	border-radius: 12px;
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.92rem;
	font-weight: 800;
	height: 52px;
	justify-content: center;
	padding: 0 1.35rem;
	white-space: nowrap;
}

.sg-hero-tags {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.05rem;
}

.sg-hero-tags span {
	color: #777777;
	font-size: 0.82rem;
	font-weight: 720;
}

.sg-hero-tags a {
	align-items: center;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid #ececec;
	border-radius: 999px;
	color: #111111;
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 680;
	min-height: 32px;
	padding: 0 0.86rem;
	text-decoration: none;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sg-hero-tags a:hover {
	border-color: #dddddd;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	transform: translateY(-1px);
}

.sg-hero-proof {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 1.45rem;
	max-width: 640px;
}

.sg-hero-proof span {
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid #ececec;
	border-radius: 16px;
	display: grid;
	gap: 0.14rem;
	padding: 0.9rem 1rem;
}

.sg-hero-proof strong {
	color: #111111;
	font-size: 0.96rem;
	line-height: 1.2;
}

.sg-hero-proof small {
	color: #777777;
	font-size: 0.78rem;
	line-height: 1.35;
}

.sg-hero-preview {
	align-items: flex-start;
	display: flex;
	gap: 1rem;
	justify-content: center;
	min-height: 400px;
	min-width: 0;
	padding-bottom: 4.5rem;
	position: relative;
}

.sg-hero-preview-card {
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 28px rgba(0, 0, 0, 0.035);
	flex: 0 1 245px;
	overflow: hidden;
}

.sg-hero-preview-main {
	max-width: 255px;
}

.sg-hero-preview-float {
	margin-top: 2.5rem;
	max-width: 215px;
}

.sg-hero-preview-card img,
.sg-hero-preview-placeholder {
	aspect-ratio: 4 / 3;
	background: #fafafa;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.sg-hero-preview-caption {
	display: grid;
	gap: 0.35rem;
	padding: 0.92rem;
}

.sg-hero-preview-caption span,
.sg-hero-map-card span {
	color: #777777;
	font-size: 0.78rem;
	font-weight: 720;
}

.sg-hero-preview-caption strong {
	color: #111111;
	font-size: 0.98rem;
	line-height: 1.25;
}

.sg-hero-map-card {
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 18px;
	bottom: 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 28px rgba(0, 0, 0, 0.035);
	display: grid;
	gap: 0.45rem;
	left: 50%;
	min-width: 192px;
	padding: 1rem;
	position: absolute;
	transform: translateX(-50%);
	z-index: 2;
}

.sg-hero-map-card strong {
	color: #111111;
	font-size: 1.22rem;
	line-height: 1.2;
}

.sg-hero-map-card em {
	border: 1px solid #f1f1f1;
	border-radius: 999px;
	color: #777777;
	font-size: 0.78rem;
	font-style: normal;
	padding: 0.3rem 0.55rem;
}

@media (max-width: 1020px) {
	.sg-hero-schoolwali-grid {
		grid-template-columns: 1fr;
	}

	.sg-hero-preview {
		justify-content: flex-start;
		max-width: 560px;
	}
}

@media (max-width: 700px) {
	.sg-hero-feed {
		padding-top: 3rem;
	}

	.sg-hero-copy-panel h1 {
		font-size: clamp(2.15rem, 11vw, 3.1rem);
		letter-spacing: -0.025em;
	}

	.sg-hero-search {
		align-items: stretch;
		border-radius: 18px;
		flex-direction: column;
	}

	.sg-hero-search button {
		width: 100%;
	}

	.sg-hero-proof {
		grid-template-columns: 1fr;
	}

	.sg-hero-preview {
		display: none;
	}
}
