/*
 * Home do sm.com.br — folha unica, carregada so na home.
 *
 * Paleta tirada da propria marca: o ambar #FFB600 e a cor do simbolo da logo,
 * o preto e o fundo do header. Nada de cor nova inventada.
 */

.smh {
	--ink: #0b0b0c;
	--ink-2: #17171a;
	--amber: #ffb600;
	--amber-txt: #8a5d00; /* ambar escurecido: no branco o #FFB600 nao passa em contraste */
	--paper: #fff;
	--muted: #6a6a70;
	--line: rgba(0, 0, 0, .12);
	--line-dark: rgba(255, 255, 255, .16);
	--wrap: 1240px;
	--font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

	font-family: var(--font);
	color: var(--ink);
	background: var(--paper);
}

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

.smh a {
	color: inherit;
	text-decoration: none;
}

.smh-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 20px;
}

/* ---------------------------------------------------------------- topo */

.smh-hero {
	background: var(--ink);
	color: #fff;
	padding-block: 36px 44px;
}

.smh-hero-grid {
	display: grid;
	grid-template-columns: 1.7fr 1fr;
	gap: 28px;
}

.smh-hero-side {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 24px;
	align-content: start;
}

/* ------------------------------------------------------------- imagens */

.smh-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 3px;
	background: #e9e9ec;
}

.smh-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .45s ease;
}

.smh-card a:hover .smh-thumb img {
	transform: scale(1.04);
}

/*
 * Tile grafico: entra quando nao existe foto pertinente para a materia.
 * E deliberado — repetir a mesma foto em dezenas de cards seria pior, e uma
 * foto sem relacao com o texto seria enganosa.
 */
.smh-thumb--tile {
	display: grid;
	place-items: center;
	padding: 12px;
	background:
		repeating-linear-gradient(
			135deg,
			rgba(255, 255, 255, .035) 0 2px,
			transparent 2px 9px
		),
		linear-gradient(140deg, var(--t1), var(--t2));
}

.smh-thumb--tile span {
	font-weight: 900;
	font-size: clamp(15px, 2.4vw, 30px);
	line-height: 1.05;
	letter-spacing: -.01em;
	text-transform: uppercase;
	text-align: center;
	color: rgba(255, 255, 255, .94);
	position: relative;
	padding-bottom: 12px;
}

.smh-thumb--tile span::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 34px;
	height: 3px;
	background: var(--amber);
	transform: translateX(-50%);
}

/* --------------------------------------------------------------- cards */

.smh-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--amber-txt);
	margin-bottom: 9px;
}

.smh-eyebrow::before {
	content: "";
	width: 12px;
	height: 3px;
	background: var(--amber);
	flex: none;
}

.smh-tit {
	margin: 0;
	font-weight: 800;
	letter-spacing: -.012em;
	line-height: 1.24;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.smh-data {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	color: var(--muted);
}

.smh-card-txt {
	padding-top: 14px;
}

.smh-card a:hover .smh-tit {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* manchete */
.smh-card--lead .smh-tit {
	font-size: clamp(24px, 3.2vw, 38px);
	line-height: 1.12;
	-webkit-line-clamp: 4;
}

.smh-card--lead .smh-data,
.smh-card--side .smh-data {
	color: rgba(255, 255, 255, .58);
}

.smh-card--lead .smh-eyebrow,
.smh-card--side .smh-eyebrow {
	color: var(--amber);
}

/* cards ao lado da manchete */
.smh-card--side .smh-tit {
	font-size: clamp(15px, 1.5vw, 18px);
	-webkit-line-clamp: 3;
}

.smh-card--side .smh-card-txt {
	padding-top: 11px;
}

/* card de grade */
.smh-card--card .smh-tit {
	font-size: 17px;
}

/* --------------------------------------------------------------- secao */

.smh-sec {
	padding-block: 34px;
}

.smh-sec-cab {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	border-top: 3px solid var(--ink);
	padding-top: 12px;
	margin-bottom: 22px;
}

.smh-sec-cab h2 {
	margin: 0;
	font-size: clamp(17px, 2vw, 21px);
	font-weight: 900;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.smh-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.smh-chips a {
	font-size: 12px;
	font-weight: 600;
	padding: 5px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.smh-chips a:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.smh-grid {
	display: grid;
	gap: 26px 24px;
}

.smh-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}

.smh-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

/* ----------------------------------------------------- corpo + lateral */

.smh-corpo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 44px;
	align-items: start;
}

.smh-col-principal .smh-sec:first-child {
	padding-top: 0;
}

.smh-sticky {
	position: sticky;
	top: 20px;
	display: grid;
	gap: 24px;
}

.smh-box {
	padding-top: 34px;
}

.smh-sec-cab--box {
	margin-bottom: 14px;
}

.smh-ranking {
	list-style: none;
	margin: 0;
	padding: 0;
}

.smh-ranking li {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 13px 0;
	border-bottom: 1px solid var(--line);
}

.smh-ranking li:last-child {
	border-bottom: 0;
}

.smh-num {
	font-size: 22px;
	font-weight: 900;
	line-height: 1;
	color: var(--amber);
	font-variant-numeric: tabular-nums;
}

.smh-linha .smh-eyebrow {
	margin-bottom: 5px;
	font-size: 10px;
}

.smh-linha-tit {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.34;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.smh-linha:hover .smh-linha-tit {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* -------------------------------------------------------------- anuncio */

/*
 * Se o wrapper da Etus nao preencher o slot, ele some em vez de deixar um
 * buraco no meio da pagina.
 */
.smh-ad {
	margin-block: 26px;
	display: flex;
	justify-content: center;
}

.smh-ad:empty {
	display: none;
}

/* ----------------------------------------------------------- responsivo */

@media (max-width: 1080px) {
	.smh-corpo {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.smh-sticky {
		position: static;
	}

	.smh-grid--4 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 860px) {
	.smh-hero-grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.smh-hero-side {
		grid-template-rows: none;
		grid-template-columns: 1fr 1fr;
	}

	.smh-grid--4,
	.smh-grid--3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.smh-hero-side,
	.smh-grid--4,
	.smh-grid--3 {
		grid-template-columns: 1fr;
	}

	.smh-sec {
		padding-block: 26px;
	}

	.smh-sec-cab {
		margin-bottom: 18px;
	}
}

/* ============================================================== materia */

.smp-cab {
	padding-block: 40px 36px;
}

.smp-cab-wrap {
	max-width: 820px;
}

.smp-cab .smh-eyebrow {
	color: var(--amber);
	margin-bottom: 14px;
}

.smp-tit {
	margin: 0;
	font-size: clamp(27px, 4.2vw, 46px);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.smp-sub {
	margin: 16px 0 0;
	font-size: clamp(16px, 1.7vw, 19px);
	line-height: 1.5;
	color: rgba(255, 255, 255, .74);
	max-width: 62ch;
}

.smp-meta {
	margin: 20px 0 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	color: rgba(255, 255, 255, .58);
}

.smp-fonte {
	font-weight: 700;
	color: #fff;
}

.smp-fonte::after {
	content: "·";
	margin-left: 10px;
	color: rgba(255, 255, 255, .4);
}

.smp-capa {
	margin: 0;
	transform: translateY(-26px);
}

.smp-capa .smh-thumb {
	aspect-ratio: 21 / 9;
	border-radius: 4px;
}

/* --------------------------------------------------------- corpo do texto */

.smp-corpo {
	max-width: 720px;
	font-size: 17.5px;
	line-height: 1.72;
}

.smp-corpo > p {
	margin: 0 0 1.15em;
}

.smp-corpo h2,
.smp-corpo h3 {
	margin: 1.7em 0 .55em;
	font-weight: 800;
	line-height: 1.28;
	letter-spacing: -.01em;
}

.smp-corpo h2 {
	font-size: 25px;
}

.smp-corpo h3 {
	font-size: 20px;
}

.smp-corpo a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.smp-corpo a:hover {
	background: var(--amber);
}

.smp-corpo ul,
.smp-corpo ol {
	margin: 0 0 1.15em;
	padding-left: 1.3em;
}

.smp-corpo li {
	margin-bottom: .4em;
}

.smp-corpo blockquote {
	margin: 1.6em 0;
	padding: 2px 0 2px 20px;
	border-left: 4px solid var(--amber);
	font-size: 19px;
	line-height: 1.55;
	font-weight: 600;
}

.smp-corpo img {
	max-width: 100%;
	height: auto;
	border-radius: 3px;
}

.smp-corpo figcaption {
	margin-top: 7px;
	font-size: 13px;
	color: var(--muted);
}

/* ------------------------------------------------------------- embeds */

.smp-embed {
	margin: 26px 0;
	display: flex;
	justify-content: center;
}

.smp-embed iframe {
	max-width: 100%;
	border: 0;
}

/* Video precisa de proporcao: o iframe vem do banco com width/height fixos. */
.smp-embed--youtube {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
}

.smp-embed--youtube iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.smp-embed--instagram blockquote,
.smp-embed--facebook iframe {
	margin: 0 auto !important;
}

/* ---------------------------------------------------------------- cta */

.smp-cta {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 30px 0;
	padding: 18px 22px;
	background: var(--ink);
	color: #fff;
	border-radius: 4px;
	transition: background .18s ease;
}

.smp-cta:hover {
	background: var(--ink-2);
}

.smp-cta-rot {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--amber);
}

.smp-cta-fonte {
	font-size: 17px;
	font-weight: 800;
	margin-right: auto;
}

.smp-cta-seta {
	font-size: 21px;
	color: var(--amber);
	transition: transform .18s ease;
}

.smp-cta:hover .smp-cta-seta {
	transform: translateX(4px);
}

.smp-vazio {
	color: var(--muted);
	font-style: italic;
}

@media (max-width: 560px) {
	.smp-capa {
		transform: none;
		margin-top: 18px;
	}

	.smp-capa .smh-thumb {
		aspect-ratio: 16 / 9;
	}

	.smp-corpo {
		font-size: 16.5px;
	}

	.smp-cta {
		flex-wrap: wrap;
		gap: 6px 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.smh-thumb img,
	.smh-chips a,
	.smp-cta,
	.smp-cta-seta {
		transition: none;
	}

	.smh-card a:hover .smh-thumb img {
		transform: none;
	}
}
