/*
 * Blog — listagem e cards. design/Blog.dc.html e design/BlogCard.dc.html.
 *
 * O corte de mobile é 880px, o do blog.dc.js.
 */

/* ---------- hero ---------- */

.ec-blog-hero {
	position: relative;
	overflow: hidden;
	min-height: 340px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
	align-items: flex-start;
	isolation: isolate;
	padding: 80px 48px;
}

.ec-hero-veil-blog {
	background: linear-gradient(90deg, rgba(8, 16, 28, .9) 0%, rgba(8, 16, 28, .78) 34%, rgba(8, 16, 28, .45) 58%, rgba(8, 16, 28, .18) 100%);
}

.ec-blog-hero-inner {
	position: relative;
	z-index: 5;
	max-width: var(--ec-max);
	margin: 0 auto;
	width: 100%;
}

.ec-badge-sky {
	display: inline-block;
	font-weight: 800;
	font-size: var(--ec-size-label);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ec-blue-400);
	background: rgba(111, 179, 224, .14);
	border: 1px solid rgba(111, 179, 224, .35);
	padding: 6px 16px;
	border-radius: var(--ec-radius-pill);
}

.ec-blog-hero-title {
	margin: 16px 0 0;
	font-family: var(--ec-font-display);
	font-weight: 900;
	font-size: 44px;
	line-height: 1.08;
	color: var(--ec-white);
	max-width: 640px;
}

.ec-blog-hero-lead {
	margin: 12px 0 0;
	font-size: 17px;
	line-height: 27px;
	color: rgba(255, 255, 255, .8);
	max-width: 600px;
}

/* ---------- área dos posts ---------- */

.ec-posts-wrap {
	max-width: var(--ec-max);
	margin: 0 auto;
	width: 100%;
	padding: 70px 48px;
	display: flex;
	flex-direction: column;
	gap: 72px;
}

/* ---------- cabeçalho da lista ---------- */

.ec-posts-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.ec-posts-header-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ec-posts-title {
	font-family: var(--ec-font-display);
	font-weight: 900;
	font-size: 30px;
	color: var(--ec-navy);
	margin: 0;
}

.ec-posts-lead {
	font-size: 14.5px;
	line-height: 22px;
	color: var(--ec-ink);
	max-width: 560px;
	margin: 0;
}

.ec-view-switch {
	display: flex;
	gap: 4px;
	background: var(--ec-gray-50);
	border: 1px solid var(--ec-hairline);
	border-radius: var(--ec-radius-pill);
	padding: 4px;
}

.ec-view-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	border: none;
	background: transparent;
	font-family: var(--ec-font-body);
	font-weight: 700;
	font-size: 13px;
	padding: 9px 16px;
	border-radius: var(--ec-radius-pill);
	cursor: pointer;
	color: var(--ec-mute);
	transition: background .2s ease, color .2s ease;
}

.ec-view-btn i {
	font-size: 13px;
}

.ec-view-btn.is-active {
	background: var(--ec-white);
	color: var(--ec-navy);
	box-shadow: 0 2px 6px rgba(18, 35, 61, .12);
}

/* ---------- grades ---------- */

.ec-posts[data-view="grid"] {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.ec-posts[data-view="compact"] {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.ec-posts[data-view="list"] {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 760px;
	margin: 0 auto;
	width: 100%;
}

/*
 * Uma marcação só para as três vistas. O protótipo troca o componente inteiro
 * a cada clique; aqui o mesmo card é reestilizado, que é o que mantém o
 * seletor instantâneo e sem recarregar nada.
 */
.ec-posts[data-view="compact"] .ec-card-excerpt,
.ec-posts[data-view="compact"] .ec-card-more,
.ec-posts[data-view="compact"] .ec-card-num,
.ec-posts[data-view="compact"] .ec-card-bar,
.ec-posts[data-view="compact"] .ec-card-meta .ec-dot,
.ec-posts[data-view="compact"] .ec-card-meta span:last-child,
.ec-posts[data-view="list"] .ec-card-excerpt,
.ec-posts[data-view="list"] .ec-card-more,
.ec-posts[data-view="list"] .ec-card-num,
.ec-posts[data-view="list"] .ec-card-bar,
.ec-posts[data-view="list"] .ec-card-watermark,
.ec-posts[data-view="list"] .ec-card-meta .ec-dot,
.ec-posts[data-view="list"] .ec-card-meta span:last-child {
	display: none;
}

/* ---------- card: compacto ---------- */

.ec-posts[data-view="compact"] .ec-card-media {
	aspect-ratio: 16 / 9;
}

.ec-posts[data-view="compact"] .ec-card-body {
	gap: 8px;
	padding: 16px 18px;
}

.ec-posts[data-view="compact"] .ec-card-title {
	font-size: 15px;
	line-height: 1.3;
}

.ec-posts[data-view="compact"] .ec-card-meta {
	font-size: 10.5px;
}

.ec-posts[data-view="compact"] .ec-card-ribbon {
	top: 10px;
	font-size: 10px;
	padding: 4px 12px 4px 16px;
}

/* ---------- card: lista ---------- */

.ec-posts[data-view="list"] .ec-card-link {
	flex-direction: row;
	align-items: center;
	gap: 18px;
	padding: 14px 4px;
	border: none;
	border-bottom: 1px solid var(--ec-hairline);
	border-radius: 8px;
}

.ec-posts[data-view="list"] .ec-card-link:hover {
	transform: none;
	box-shadow: 0 16px 32px rgba(0, 0, 0, .25);
}

.ec-posts[data-view="list"] .ec-card-media {
	width: 76px;
	height: 76px;
	aspect-ratio: auto;
	flex: none;
	border-radius: 10px;
	overflow: visible;
}

.ec-posts[data-view="list"] .ec-card-media img,
.ec-posts[data-view="list"] .ec-card-hatch {
	border-radius: 10px;
}

.ec-posts[data-view="list"] .ec-card-ribbon {
	top: -6px;
	left: -8px;
	font-size: 8px;
	letter-spacing: .05em;
	padding: 2px 7px 2px 9px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}

.ec-posts[data-view="list"] .ec-card-body {
	flex: 1;
	flex-direction: column;
	gap: 4px;
	padding: 0;
	min-width: 0;
}

.ec-posts[data-view="list"] .ec-card-title {
	font-size: 15px;
	line-height: 1.3;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ec-posts[data-view="list"] .ec-card-meta {
	font-size: 10.5px;
}

.ec-posts[data-view="list"] .ec-card-arrow {
	display: block;
	color: #c9481f;
	font-size: 15px;
	flex: none;
	align-self: center;
}

/* ---------- paginação ---------- */

.ec-posts-wrap .navigation.pagination {
	margin-top: 20px;
}

.ec-posts-wrap .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.ec-posts-wrap .page-numbers {
	width: 36px;
	height: 36px;
	border-radius: var(--ec-radius-pill);
	border: 1px solid rgba(18, 35, 61, .15);
	background: var(--ec-white);
	color: var(--ec-navy);
	font-weight: 600;
	font-size: 13.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.ec-posts-wrap .page-numbers.current {
	border: none;
	background: var(--ec-blue-600);
	color: var(--ec-white);
	font-weight: 700;
}

.ec-posts-wrap .page-numbers:hover:not(.current) {
	border-color: var(--ec-blue-600);
	color: var(--ec-blue);
}

.ec-posts-empty {
	color: var(--ec-mute);
	font-size: 15px;
}

/* ---------- mobile ---------- */

@media (max-width: 879px) {
	.ec-blog-hero {
		min-height: auto;
		padding: 56px 20px 44px;
	}

	.ec-blog-hero-title {
		font-size: 32px;
	}

	.ec-posts-wrap {
		padding: 44px 20px;
		gap: 44px;
	}

	.ec-posts-header {
		align-items: flex-start;
	}

	.ec-posts[data-view="grid"],
	.ec-posts[data-view="compact"] {
		grid-template-columns: 1fr;
	}

	.ec-posts[data-view="grid"] {
		gap: 20px;
	}

	.ec-posts[data-view="compact"] {
		gap: 14px;
	}
}

/* ================= post individual — design/BlogPost.dc.html ================= */

.ec-article {
	max-width: 940px;
	margin: 0 auto;
	width: 100%;
	padding: 64px 48px 100px;
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 32px;
	align-items: start;
}

/* ---------- trilho de compartilhar ---------- */

.ec-share-rail {
	position: sticky;
	top: 72px;
	margin-top: 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.ec-share-label {
	font-weight: 800;
	font-size: 10.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #9aa3af;
}

.ec-share-sep {
	width: 1px;
	height: 20px;
	background: var(--ec-hairline-strong);
}

.ec-share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--ec-radius-pill);
	background: var(--ec-gray-50);
	color: var(--ec-ink);
	border: 1px solid var(--ec-hairline);
	text-decoration: none;
	transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.ec-share-btn i {
	font-size: 16px;
}

.ec-share-x:hover   { background: #1da1f2; color: #fff; box-shadow: 0 10px 20px rgba(29, 161, 242, .35); }
.ec-share-fb:hover  { background: #3b5998; color: #fff; box-shadow: 0 10px 20px rgba(59, 89, 152, .35); }
.ec-share-li:hover  { background: #0077b5; color: #fff; box-shadow: 0 10px 20px rgba(0, 119, 181, .35); }
.ec-share-wpp:hover { background: #25d366; color: #fff; box-shadow: 0 10px 20px rgba(37, 211, 102, .35); }

/* ---------- corpo do artigo ---------- */

.ec-article-main {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
}

.ec-article-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ec-article-title {
	font-family: var(--ec-font-display);
	font-weight: 900;
	font-size: 42px;
	line-height: 1.15;
	color: var(--ec-navy);
	margin: 0;
}

.ec-article-date {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ec-mute);
	margin: 0;
}

.ec-article-figure {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 16px;
	box-shadow: 0 24px 48px rgba(18, 35, 61, .18);
	margin: 0;
}

.ec-article-figure img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 16px;
}

.ec-article-ribbon {
	position: absolute;
	top: 18px;
	left: -6px;
	background: linear-gradient(120deg, #f7b073, #e0533f);
	color: var(--ec-white);
	font-weight: 800;
	font-size: 12.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 7px 18px 7px 22px;
	transform: rotate(-3deg);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}

.ec-article-body {
	display: flex;
	flex-direction: column;
	gap: 22px;
	font-size: 16.5px;
	line-height: 29px;
	color: var(--ec-ink-700);
}

.ec-article-body > * {
	margin: 0;
}

.ec-article-body h2,
.ec-article-body h3 {
	font-family: var(--ec-font-display);
	font-weight: 800;
	color: var(--ec-navy);
	line-height: 1.3;
}

.ec-article-body h2 { font-size: 26px; }
.ec-article-body h3 { font-size: 20px; }

.ec-article-body img {
	border-radius: 12px;
	height: auto;
}

.ec-article-body blockquote {
	border-left: 3px solid var(--ec-orange);
	padding-left: 18px;
	color: var(--ec-navy);
	font-style: italic;
}

.ec-article-body ul,
.ec-article-body ol {
	padding-left: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ---------- cartão do autor ---------- */

.ec-author-card {
	margin-top: 12px;
	position: relative;
	background: linear-gradient(135deg, #1f5f95, #2f80c9);
	border-radius: 20px;
	padding: 36px;
	display: flex;
	align-items: center;
	gap: 28px;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(31, 95, 149, .3);
}

.ec-author-deco {
	position: absolute;
	top: 50%;
	right: -60px;
	transform: translateY(-50%);
	height: 280px;
	width: auto;
	opacity: .22;
	pointer-events: none;
}

.ec-author-mark {
	position: relative;
	z-index: 1;
	flex: none;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: var(--ec-white);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.ec-author-mark img {
	height: 42px;
	width: auto;
}

.ec-author-text {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ec-author-name {
	font-family: var(--ec-font-display);
	font-weight: 900;
	font-size: 20px;
	color: var(--ec-white);
	margin: 0;
}

.ec-author-bio {
	font-size: 14.5px;
	line-height: 23px;
	color: rgba(255, 255, 255, .85);
	max-width: 480px;
	margin: 0;
}

.ec-author-card .ec-follow {
	margin-top: 8px;
}

.ec-social-sm {
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, .14);
}

.ec-social-sm i {
	font-size: 14px;
}

/* ---------- mobile: 880px, do blogpost.dc.js ---------- */

@media (max-width: 879px) {
	.ec-article {
		display: flex;
		flex-direction: column;
		padding: 40px 20px 70px;
		gap: 24px;
	}

	.ec-share-rail {
		position: static;
		flex-direction: row;
		align-items: center;
		gap: 10px;
		margin-top: 0;
	}

	.ec-share-label,
	.ec-share-sep {
		display: none;
	}

	.ec-share-btn {
		width: 40px;
		height: 40px;
	}

	.ec-share-btn i {
		font-size: 15px;
	}

	.ec-article-title {
		font-size: 28px;
	}

	.ec-author-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
		padding: 26px 22px;
	}
}
