/*
 * Blog e arquivos de categoria.
 * O componente usa apenas CSS e os recursos nativos de imagem do WordPress.
 */

body.blog,
body.category,
body.search {
	background: #f1f6fe;
}

body.blog #page,
body.category #page {
	max-width: none;
	background: #f1f6fe;
}

body.blog #content,
body.category #content {
	display: block;
	padding: 0;
}

.bt-blog-main,
.bt-blog-main *,
.bt-blog-main *::before,
.bt-blog-main *::after {
	box-sizing: border-box;
}

.bt-blog-main {
	--bt-blog-purple: #5d00e8;
	--bt-blog-purple-dark: #4e00c8;
	--bt-blog-orange: #e96737;
	--bt-blog-page: #f1f6fe;
	--bt-blog-card: #f4f8fe;
	--bt-blog-copy: #778396;
	--bt-blog-border: #d7e0ec;
	width: 100%;
	background: var(--bt-blog-page);
	color: #292d35;
	font-family: var(--bt-font-family-base, "DM Sans", sans-serif);
}

.bt-blog {
	width: 100%;
	max-width: 1080px;
	margin-inline: auto;
	padding: 74px 30px 88px;
}

.bt-blog__title {
	margin: 0 0 25px;
	color: var(--bt-blog-purple);
	font-family: "Rubik", var(--bt-font-family-base, "DM Sans", sans-serif);
	font-size: clamp(2.75rem, 4.5vw, 3.25rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
}

/* Filtro de categorias */
.bt-blog-category-nav {
	width: 100%;
	margin: 0 0 24px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scrollbar-width: thin;
}

.bt-blog-category-nav__list {
	display: flex;
	align-items: center;
	width: max-content;
	min-width: min(100%, 630px);
	padding: 4px;
	margin: 0;
	border-radius: 999px;
	background: var(--bt-blog-purple);
	list-style: none;
}

.bt-blog-category-nav__item {
	flex: 1 0 auto;
	margin: 0;
}

.bt-blog-category-nav__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 36px;
	padding: 7px 18px;
	border-radius: 999px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.bt-blog-category-nav__link:hover,
.bt-blog-category-nav__link:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
}

.bt-blog-category-nav__link.is-active {
	color: var(--bt-blog-purple);
	background: #fff;
}

.bt-blog-category-nav__link.is-active:hover,
.bt-blog-category-nav__link.is-active:focus-visible {
	color: var(--bt-blog-purple-dark);
	background: #fff;
}

.bt-blog-category-nav__link:focus-visible,
.bt-featured-post a:focus-visible,
.bt-post-card a:focus-visible,
.bt-blog-pagination a:focus-visible {
	outline: 2px solid var(--bt-blog-orange);
	outline-offset: 3px;
}

/* Destaque da primeira pagina */
.bt-featured-post {
	display: grid;
	grid-template-columns: minmax(280px, 31%) minmax(0, 1fr);
	min-height: 350px;
	margin: 0;
	overflow: hidden;
	border-radius: 37px 37px 16px 37px;
	background: var(--bt-blog-purple);
}

.bt-featured-post__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 38px 35px 39px 38px;
	color: #fff;
}

.bt-featured-post__title {
	margin: 0;
	font-family: "Rubik", var(--bt-font-family-base, "DM Sans", sans-serif);
	font-size: clamp(1.8rem, 3vw, 2.15rem);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.24;
}

.bt-featured-post__title a {
	color: inherit;
	text-decoration: none;
}

.bt-featured-post__title a:hover,
.bt-featured-post__title a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.bt-featured-post__excerpt {
	margin: 19px 0 0;
	color: rgba(255, 255, 255, 0.92);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.32;
}

.bt-featured-post__link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: 25px;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.bt-featured-post__link:hover,
.bt-featured-post__link:focus-visible {
	color: #fff;
}

.bt-featured-post__link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 29px;
	height: 29px;
	border-radius: 50%;
	background: var(--bt-blog-orange);
	font-size: 1rem;
	line-height: 1;
	transition: transform 180ms ease;
}

.bt-featured-post__link:hover .bt-featured-post__link-icon,
.bt-featured-post__link:focus-visible .bt-featured-post__link-icon {
	transform: translateX(3px);
}

.bt-featured-post__media {
	display: block;
	min-width: 0;
	min-height: 350px;
	overflow: hidden;
	background: #dce4ef;
	text-decoration: none;
}

.bt-featured-post__image,
.bt-featured-post__image-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 350px;
	object-fit: cover;
}

.bt-featured-post__image {
	transition: transform 240ms ease;
}

.bt-featured-post:hover .bt-featured-post__image {
	transform: scale(1.015);
}

.bt-featured-post__image-placeholder {
	background: linear-gradient(135deg, #d8dfe9, #bfcbdc);
}

/* Grade de artigos */
.bt-blog-posts {
	width: 100%;
	margin-top: 44px;
}

.bt-blog-posts--without-featured {
	margin-top: 0;
}

.bt-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px clamp(34px, 5.7vw, 78px);
	width: 100%;
}

.bt-post-card {
	display: flex;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border: 1px solid rgba(166, 177, 192, 0.52);
	border-radius: 8px;
	background: var(--bt-blog-card);
	box-shadow: 0 6px 12px rgba(34, 48, 70, 0.16);
	flex-direction: column;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.bt-post-card:hover {
	border-color: rgba(93, 0, 232, 0.26);
	box-shadow: 0 12px 24px rgba(34, 48, 70, 0.18);
	transform: translateY(-3px);
}

.bt-post-card__thumb-link {
	display: block;
	overflow: hidden;
	background: #dce4ef;
	text-decoration: none;
}

.bt-post-card__image,
.bt-post-card__image-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1.44 / 1;
}

.bt-post-card__image {
	height: auto;
	object-fit: cover;
	transition: transform 240ms ease;
}

.bt-post-card__image-placeholder {
	background: linear-gradient(135deg, #dfe5ee, #c7d2e1);
}

.bt-post-card:hover .bt-post-card__image {
	transform: scale(1.025);
}

.bt-post-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 11px 9px 16px;
}

.bt-post-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	margin-bottom: 12px;
}

.bt-post-card__category {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	max-width: 48%;
	padding: 4px 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #ffdacb;
	color: var(--bt-blog-orange);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bt-post-card__category:hover,
.bt-post-card__category:focus-visible {
	background: #ffcdb9;
	color: #bd4820;
}

.bt-post-card__publication {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	margin-left: auto;
	overflow: hidden;
	color: #707884;
	font-size: 0.625rem;
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
}

.bt-post-card__site,
.bt-post-card__date {
	overflow: hidden;
	text-overflow: ellipsis;
}

.bt-post-card__title {
	margin: 0 0 21px;
	color: var(--bt-blog-purple);
	font-family: "Rubik", var(--bt-font-family-base, "DM Sans", sans-serif);
	font-size: 1.1875rem;
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.28;
}

.bt-post-card__title-link {
	color: inherit;
	text-decoration: none;
}

.bt-post-card__title-link:hover,
.bt-post-card__title-link:focus-visible {
	color: var(--bt-blog-purple-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.bt-post-card__excerpt {
	margin: 0;
	color: var(--bt-blog-copy);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: -0.015em;
	line-height: 1.24;
}

/* Paginacao e estados auxiliares */
.bt-blog-pagination {
	margin-top: 90px;
}

.bt-blog-pagination__list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.bt-blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #c7d3e3;
	border-radius: 50%;
	background: transparent;
	color: #8793a5;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.bt-blog-pagination a.page-numbers:hover,
.bt-blog-pagination a.page-numbers:focus-visible,
.bt-blog-pagination .page-numbers.current {
	border-color: var(--bt-blog-orange);
	background: var(--bt-blog-orange);
	color: #fff;
}

.bt-blog-pagination a.page-numbers:hover {
	transform: translateY(-2px);
}

.bt-blog-empty {
	width: min(100%, 760px);
	margin: 36px auto 0;
	padding: 52px 24px;
	border: 1px solid var(--bt-blog-border);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.5);
	text-align: center;
}

.bt-blog-empty__title {
	margin: 0 0 12px;
	color: var(--bt-blog-purple);
	font-family: "Rubik", var(--bt-font-family-base, "DM Sans", sans-serif);
	font-size: 1.5rem;
	font-weight: 700;
}

.bt-blog-empty__text {
	margin: 0;
	color: var(--bt-blog-copy);
	font-size: 1rem;
	line-height: 1.5;
}

.bt-search-header {
	width: 100%;
	max-width: 1020px;
	margin: 0 auto 36px;
}

.bt-search-title {
	margin: 0;
	color: var(--bt-blog-purple);
	font-family: "Rubik", var(--bt-font-family-base, "DM Sans", sans-serif);
	font-size: clamp(2rem, 3.4vw, 3rem);
	font-weight: 600;
	line-height: 1.15;
}

.bt-search-empty__form {
	width: min(100%, 460px);
	margin: 28px auto 0;
}

.bt-search-empty__form .search-form {
	display: flex;
	gap: 10px;
}

.bt-search-empty__form label {
	flex: 1 1 auto;
	margin: 0;
}

.bt-search-empty__form .search-field {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--bt-blog-border);
	border-radius: 999px;
	background: #fff;
	color: #292d35;
	font: inherit;
}

.bt-search-empty__form .search-submit {
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--bt-blog-purple);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 980px) {
	.bt-blog {
		max-width: 820px;
	}

	.bt-featured-post {
		grid-template-columns: minmax(250px, 40%) minmax(0, 1fr);
	}

	.bt-featured-post__content {
		padding-inline: 30px;
	}

	.bt-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 38px;
	}
}

@media (max-width: 767px) {
	.bt-blog {
		max-width: 470px;
		padding: 38px 20px 58px;
	}

	.bt-blog__title {
		margin-bottom: 22px;
		font-size: clamp(2.4rem, 12vw, 2.8rem);
	}

	.bt-blog-category-nav {
		width: calc(100% + 20px);
		margin-right: -20px;
		margin-bottom: 24px;
		padding-right: 20px;
		scrollbar-width: none;
	}

	.bt-blog-category-nav::-webkit-scrollbar {
		display: none;
	}

	.bt-blog-category-nav__list {
		min-width: 0;
	}

	.bt-blog-category-nav__link {
		min-height: 34px;
		padding-inline: 15px;
		font-size: 0.75rem;
	}

	.bt-featured-post {
		grid-template-columns: 1fr;
		min-height: 0;
		border-radius: 24px 24px 14px 24px;
	}

	.bt-featured-post__content {
		grid-row: 2;
		min-height: 0;
		padding: 28px 24px 30px;
	}

	.bt-featured-post__title {
		font-size: clamp(1.5rem, 7vw, 1.85rem);
		line-height: 1.2;
	}

	.bt-featured-post__excerpt {
		margin-top: 15px;
		font-size: 0.9375rem;
	}

	.bt-featured-post__link {
		margin-top: 22px;
	}

	.bt-featured-post__media {
		grid-row: 1;
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.bt-featured-post__image,
	.bt-featured-post__image-placeholder {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.bt-blog-posts {
		margin-top: 32px;
	}

	.bt-blog-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.bt-post-card__body {
		padding: 12px 12px 18px;
	}

	.bt-post-card__publication {
		font-size: 0.6875rem;
	}

	.bt-post-card__title {
		margin-bottom: 16px;
		font-size: 1.25rem;
	}

	.bt-post-card__excerpt {
		font-size: 0.875rem;
		line-height: 1.35;
	}

	.bt-blog-pagination {
		margin-top: 54px;
	}

	.bt-search-empty__form .search-form {
		flex-direction: column;
	}

	.bt-search-empty__form .search-submit {
		width: 100%;
	}
}

@media (max-width: 390px) {
	.bt-blog {
		padding-inline: 16px;
	}

	.bt-blog-category-nav {
		width: calc(100% + 16px);
		margin-right: -16px;
		padding-right: 16px;
	}

	.bt-post-card__meta {
		align-items: flex-start;
		flex-direction: column;
	}

	.bt-post-card__category {
		max-width: 100%;
	}

	.bt-post-card__publication {
		justify-content: flex-start;
		width: 100%;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bt-blog-main a,
	.bt-featured-post__image,
	.bt-post-card,
	.bt-post-card__image {
		transition: none;
	}

	.bt-featured-post:hover .bt-featured-post__image,
	.bt-post-card:hover,
	.bt-post-card:hover .bt-post-card__image,
	.bt-blog-pagination a.page-numbers:hover {
		transform: none;
	}
}
