/*!
 * Hikari Exposições — front
 * Tudo sob .hkx-*; cores com !important (cascade .light/.dark do Salient).
 * Grid sem media query (seguro com "Remove Unused CSS" do WP Rocket).
 */

.hkx-grid {
	--hkx-cols: 3;
	--hkx-min: 300px;
	--hkx-gap: 40px;
	--hkx-radius: 24px;
	--hkx-ratio: 7/5;
	--hkx-card-bg: #2e3138;
	--hkx-title: #ffffff;
	--hkx-text: #cbcbcd;
	--hkx-btn-bg: #3e4148;
	--hkx-btn-border: #56595e;
	--hkx-btn-color: #ffffff;
	--hkx-btn-hover: #4a4e56;
	--hkx-tag-bg: rgba(30, 31, 34, .55);
	--hkx-tag-color: #ffffff;

	display: grid !important;
	/* Nunca mais que --hkx-cols colunas; abaixo de --hkx-min reduz sozinho. */
	grid-template-columns: repeat(
		auto-fill,
		minmax(min(100%, max(var(--hkx-min), calc((100% - (var(--hkx-cols) - 1) * var(--hkx-gap)) / var(--hkx-cols)))), 1fr)
	) !important;
	gap: var(--hkx-gap) !important;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.hkx-grid--single {
	max-width: 560px;
}

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

/* ------------------------------------------------------------------ Card */

.hkx-grid .hkx-card {
	container-type: inline-size;
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 !important;
	overflow: hidden;
	border-radius: var(--hkx-radius);
	background: var(--hkx-card-bg) !important;
	box-shadow: 0 1px 2px rgba(15, 17, 22, .06), 0 10px 30px -18px rgba(15, 17, 22, .45);
	isolation: isolate;
}

/* ----------------------------------------------------------------- Mídia */

.hkx-grid .hkx-card__media {
	position: relative;
	aspect-ratio: var(--hkx-ratio);
	overflow: hidden;
	background: #3a3d44 !important;
	flex: 0 0 auto;
}

.hkx-grid .hkx-card__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.hkx-grid .hkx-card:hover .hkx-card__img {
	transform: scale(1.04);
}

/* Tag transparente (topo-esquerda) */
.hkx-grid .hkx-card__tag {
	position: absolute;
	z-index: 2;
	top: 18px;
	left: 18px;
	top: clamp(14px, 5cqi, 28px);
	left: clamp(14px, 5cqi, 28px);
	display: inline-flex;
	align-items: center;
	padding: .62em 1.25em;
	font-size: 14px;
	font-size: clamp(13px, 3cqi, 17px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: .01em;
	color: var(--hkx-tag-color) !important;
	background: var(--hkx-tag-bg) !important;
	-webkit-backdrop-filter: blur(10px) saturate(140%);
	backdrop-filter: blur(10px) saturate(140%);
	border-radius: .75em;
	white-space: nowrap;
}

/* Selo do tipo (base-direita) */
.hkx-grid .hkx-card__type {
	position: absolute;
	z-index: 2;
	right: 18px;
	bottom: 18px;
	right: clamp(14px, 5cqi, 28px);
	bottom: clamp(14px, 5cqi, 28px);
	display: inline-flex;
	align-items: center;
	padding: .85em 1.5em;
	font-size: 15px;
	font-size: clamp(13px, 3.2cqi, 18px);
	font-weight: 500;
	line-height: 1;
	color: var(--hkx-type-fg, #fff) !important;
	background: var(--hkx-type-bg, #8972f7) !important;
	border-radius: 999px;
	white-space: nowrap;
	box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45);
}

/* ------------------------------------------------------------------ Corpo */

.hkx-grid .hkx-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	padding: 24px 24px 30px;
	padding: clamp(20px, 5.8cqi, 34px) clamp(20px, 5.8cqi, 34px) clamp(26px, 7cqi, 40px);
}

.hkx-grid .hkx-card__title {
	margin: 0 0 .62em !important;
	padding: 0 !important;
	font-family: inherit;
	font-size: 22px !important;
	font-size: clamp(19px, 5cqi, 30px) !important;
	font-weight: 500 !important;
	line-height: 1.18 !important;
	letter-spacing: -.005em !important;
	text-transform: none !important;
	color: var(--hkx-title) !important;
}

.hkx-grid .hkx-card__subtitle {
	margin: 0 0 1.5em;
	font-size: 15px !important;
	font-size: clamp(14.5px, 3.25cqi, 18px) !important;
	font-weight: 400;
	line-height: 1.6 !important;
	color: var(--hkx-text) !important;
}

.hkx-grid .hkx-card__subtitle a {
	color: var(--hkx-title) !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hkx-grid .hkx-card__subtitle strong,
.hkx-grid .hkx-card__subtitle b {
	color: var(--hkx-title) !important;
}

/* ------------------------------------------------------------------ Botão */

.hkx-grid .hkx-card__btn,
.hkx-grid .hkx-card__btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: .85em 1.4em !important;
	font-family: inherit;
	font-size: 15px !important;
	font-size: clamp(14px, 3.2cqi, 18px) !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	color: var(--hkx-btn-color) !important;
	background: var(--hkx-btn-bg) !important;
	border: 1px solid var(--hkx-btn-border) !important;
	border-radius: .67em !important;
	box-shadow: none !important;
	transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.hkx-grid .hkx-card__btn:hover,
.hkx-grid .hkx-card__btn:focus-visible {
	color: var(--hkx-btn-color) !important;
	background: var(--hkx-btn-hover) !important;
	transform: translateY(-1px);
}

.hkx-grid .hkx-card__btn:focus-visible {
	outline: 2px solid var(--hkx-btn-color);
	outline-offset: 3px;
}

/* Sem imagem: mantém o espaço com fundo neutro */
.hkx-grid .hkx-card--no-image .hkx-card__media {
	background: linear-gradient(135deg, #3a3d44, #2a2c31) !important;
}

/* Aviso só para editores */
.hkx-empty {
	padding: 16px 20px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	color: #50575e;
	font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.hkx-grid .hkx-card__img,
	.hkx-grid .hkx-card__btn {
		transition: none;
	}
	.hkx-grid .hkx-card:hover .hkx-card__img {
		transform: none;
	}
}
