/* 
 * Category Showcase Section Styles
 */

/* ─── Variables & Helpers ───────────────────────────────── */
:root {
	--t16-catcard-radius: 8px;
	--t16-catcard-border: rgba( 255, 255, 255, 0.15 );
	--t16-catcard-overlay: linear-gradient( to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 80% );
	--t16-catcard-overlay-hover: linear-gradient( to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 80% );
}

/* ─── Section ───────────────────────────────────────────── */
.t16-section--catshow {
	background-color: transparent;
	padding: 40px 0 20px;
	color: #fff;
}

.t16-catshow {
	display: flex;
	flex-direction: column;
	gap: 64px;
}

/* ─── Header ────────────────────────────────────────────── */
.t16-catshow__header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto;
}

.t16-catshow__eyebrow {
	color: var( --t16-color-primary );
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.t16-catshow__heading {
	font-family: var( --t16-font-heading );
	font-size: clamp( 2rem, 4vw, 3rem );
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	margin-bottom: 16px;
	color: #fff;
}

.t16-catshow__desc {
	font-size: 1rem;
	line-height: 1.6;
	color: rgba( 255, 255, 255, 0.7 );
	margin: 0;
}

/* ─── Grid ──────────────────────────────────────────────── */
.t16-catshow__grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 16px;
	width: 100%;
}

/* ─── Card ──────────────────────────────────────────────── */
.t16-catcard {
	position: relative;
	border-radius: var( --t16-catcard-radius );
	border: 1px solid var( --t16-catcard-border );
	background: #0f0f0f;
	overflow: hidden;
	min-height: 540px;
	height: 100%;
	min-width: 0; /* Prevent grid blowout */
	display: flex;
	transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.t16-catcard:hover,
.t16-catcard:focus-within {
	border-color: rgba( 255, 255, 255, 0.3 );
	box-shadow: 0 16px 40px rgba( 0, 0, 0, 0.6 );
	transform: translateY(-4px);
}

.t16-catcard__link {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	text-decoration: none !important;
	color: inherit;
	z-index: 2;
}

/* Focus state for accessibility */
.t16-catcard__link:focus-visible {
	outline: 2px solid var( --t16-color-primary );
	outline-offset: -2px;
	border-radius: var( --t16-catcard-radius );
}

/* ─── Card Background & Overlay ─────────────────────────── */
/* Force image to cover card, overriding global .t16-page img */
.t16-page .t16-catcard__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center 20%;
	transition: transform 0.8s cubic-bezier( 0.25, 1, 0.5, 1 );
	z-index: 0;
}

.t16-catcard__img--placeholder {
	background: linear-gradient( 135deg, #1c1c1c, #0c0c0c );
}

.t16-catcard__overlay {
	position: absolute;
	inset: 0;
	background: var( --t16-catcard-overlay );
	transition: background 0.4s ease;
	z-index: 1;
	pointer-events: none;
}

/* Hover effects */
.t16-catcard:hover .t16-catcard__img {
	transform: scale(1.04);
}

.t16-catcard:hover .t16-catcard__overlay {
	background: var( --t16-catcard-overlay-hover );
}

/* ─── Card Content ──────────────────────────────────────── */
.t16-catcard__content {
	position: relative;
	z-index: 2;
	padding: 32px 24px;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	justify-content: flex-end;
}

/* ─── Icon ──────────────────────────────────────────────── */
.t16-catcard__icon-wrap {
	position: relative;
	width: 44px;
	height: 50px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var( --t16-color-primary );
	transition: transform 0.4s ease;
}

.t16-catcard__hex {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.t16-catcard__icon-inner {
	position: relative;
	z-index: 1;
	display: flex;
}

/* Icon lift on hover */
.t16-catcard:hover .t16-catcard__icon-wrap {
	transform: translateY(-4px);
}

/* ─── Text & CTA ────────────────────────────────────────── */
.t16-catcard__title {
	font-family: var( --t16-font-heading );
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0 0 12px 0;
	color: #fff;
	line-height: 1.2;
	word-wrap: break-word;
}

.t16-catcard__desc {
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba( 255, 255, 255, 0.65 );
	margin: 0 0 24px 0;
	transition: color 0.3s ease;
	word-wrap: break-word; /* Prevent text from overflowing */
}

.t16-catcard:hover .t16-catcard__desc {
	color: rgba( 255, 255, 255, 0.9 );
}

.t16-catcard__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --t16-color-primary );
	transition: gap 0.3s ease;
}

.t16-catcard:hover .t16-catcard__cta {
	gap: 12px;
}

/* ─── Responsive ────────────────────────────────────────── */

/* Tablet landscape / smaller desktop */
@media ( max-width: 1100px ) {
	.t16-catshow__grid {
		gap: 12px;
	}
	.t16-catcard__content {
		padding: 24px 16px;
	}
	.t16-catcard__title {
		font-size: 1.125rem;
	}
	.t16-catcard__desc {
		font-size: 0.8125rem;
	}
	.t16-catcard__icon-wrap {
		width: 40px;
		height: 46px;
		margin-bottom: 16px;
	}
	.t16-catcard {
		min-height: 450px;
	}
}

/* Tablet portrait */
@media ( max-width: 900px ) {
	.t16-section--catshow {
		padding: 40px 0 20px;
	}
	.t16-catshow__grid {
		grid-template-columns: repeat( 2, 1fr );
		gap: 20px;
	}
	.t16-catcard__content {
		padding: 32px 24px;
	}
	.t16-catcard__title {
		font-size: 1.375rem;
	}
	.t16-catcard__desc {
		font-size: 0.9375rem;
	}
	.t16-catcard {
		min-height: 480px;
	}
}

/* Mobile */
@media ( max-width: 580px ) {
	.t16-section--catshow {
		padding: 32px 0 16px;
	}
	.t16-catshow__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.t16-catcard {
		min-height: 380px;
	}
	.t16-catcard__content {
		padding: 24px;
	}
	.t16-catcard__icon-wrap {
		width: 48px;
		height: 54px;
		margin-bottom: 16px;
	}
	.t16-catcard__icon-inner svg {
		width: 20px;
		height: 20px;
	}
	.t16-catcard__title {
		font-size: 1.375rem;
	}
	.t16-catcard__desc {
		margin-bottom: 16px;
	}
}
