/*
 * Grade de categorias de associação (widget do Elementor).
 *
 * As divisórias são desenhadas por regra, não card a card. O truque: TODO card
 * tem borda à esquerda, o grid é deslocado para fora pela espessura dessa borda
 * e o wrapper corta o que sobra. Assim a linha da primeira coluna desaparece
 * sozinha, em qualquer número de colunas e em qualquer breakpoint — sem
 * :nth-child por layout e sem JS. Era esse cálculo que a versão manual fazia à
 * mão em cada card, e que quebrava assim que entrava uma categoria nova.
 *
 * Cores e medidas daqui são só o ponto de partida: o que o webdesigner ajusta no
 * painel do Elementor entra por custom property e sobrescreve tudo abaixo.
 */

.brc-cats-wrap {
	overflow: hidden;
	width: 100%;
}

.brc-cats {
	--brc-cats-cols: 3;
	--brc-cats-line: #cccccc;
	--brc-cats-line-w: 1px;

	display: grid;
	grid-template-columns: repeat(var(--brc-cats-cols), minmax(0, 1fr));
	margin-left: calc(-1 * var(--brc-cats-line-w));
}

.brc-cat {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
	padding: 35px;
	border-top: var(--brc-cats-line-w) solid var(--brc-cats-line);
	border-left: var(--brc-cats-line-w) solid var(--brc-cats-line);
}

.brc-cat__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.brc-cat__media {
	--brc-cat-rx: 30%;
	--brc-cat-ry: 46%;

	position: relative;
	width: 100%;
	padding-top: 64%;
	margin-bottom: 29px;
	overflow: hidden;
	border-radius: var(--brc-cat-rx) / var(--brc-cat-ry);
}

/* Categoria sem foto: mancha neutra, no lugar de um buraco no meio da linha. */
.brc-cat__media--empty {
	background-image: linear-gradient(160deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .11));
}

.brc-cat__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.brc-cat__title {
	margin: 0 0 14px;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.4;
	color: #000;
}

.brc-cat__desc {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #666;
}

.brc-cat__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 24px;
}

.brc-cat__pricing {
	min-width: 0;
}

.brc-cat__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin: 0;
}

.brc-cat__amount {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	color: #000;
}

.brc-cat__per,
.brc-cat__tba {
	font-size: 17px;
	line-height: 1.2;
	color: #999;
}

.brc-cat__tba {
	margin: 0;
}

.brc-cat__addon {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #999;
}

.brc-cat__go {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #000;
	color: #fff;
	text-decoration: none;
	transition: transform .18s ease, background-color .18s ease;
}

.brc-cat__go:hover,
.brc-cat__go:focus-visible {
	color: #fff;
	transform: translateY(-2px);
}

.brc-cat__go:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.brc-cat__go svg {
	width: 42%;
	height: 42%;
}

.brc-cats__empty {
	margin: 0;
	padding: 24px;
	border: 1px dashed #cccccc;
	font-size: 14px;
	color: #666;
}

@media (prefers-reduced-motion: reduce) {
	.brc-cat__go {
		transition: none;
	}

	.brc-cat__go:hover,
	.brc-cat__go:focus-visible {
		transform: none;
	}
}

/* Linha da documentação institucional, abaixo da grade (pedido B.32). */
.brc-cats__docs {
	margin: 28px auto 0;
	max-width: 760px;
	text-align: center;
	font-size: 15px;
	line-height: 1.6;
	color: inherit;
}
.brc-cats__docs .brc-link {
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
