/**
 * TechBBQ Resources Grid — filterable resource cards.
 *
 * Figma Resources:
 * - 1440: node 7482:83330
 * - 1024: node 7482:83601
 * - 768:  node 7482:83788
 * - 375:  node 7482:83947
 * - Dropdown trigger: node 7571:85190
 * - Dropdown menu: node 7571:85436
 *
 * Breakpoints (mobile-first): 0–767 (base), 768–1023, 1024–1439, 1440+.
 */

.techbbq-resources-grid {
	--techbbq-resources-grid-gap: var(--techbbq-space-1);
	--techbbq-resources-grid-columns: 1;
	--techbbq-resources-grid-toolbar-gap: var(--techbbq-space-1);
	--techbbq-resources-grid-inner-gap: var(--techbbq-space-4);
	--techbbq-resources-grid-card-min-height: 296px;
	--techbbq-resources-grid-card-hover-bg: var(--techbbq-bg-surface-alt);
	--techbbq-resources-type-reports: var(--techbbq-content-accent-1);
	--techbbq-resources-type-news: var(--techbbq-content-accent-3);
	--techbbq-resources-type-interviews: var(--techbbq-color-accent-dark-blue);
	--techbbq-resources-type-marketing-kit: #34d399;

	box-sizing: border-box;
	width: 100%;
	color: var(--techbbq-content-primary);
	background-color: var(--techbbq-bg-main);
}

.techbbq-resources-grid__inner {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-resources-grid-inner-gap);
	width: 100%;
}

.techbbq-resources-grid__toolbar {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-resources-grid-toolbar-gap);
	width: 100%;
}

.techbbq-resources-grid__search {
	width: 100%;
}

/* ── Search (shared .techbbq-input — default 52px; see components/input.css) ── */

.techbbq-resources-grid__search-input::-webkit-search-cancel-button {
	display: none;
}

.techbbq-resources-grid .techbbq-filter-dropdown__option--reports {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-reports);
}

.techbbq-resources-grid .techbbq-filter-dropdown__option--news {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-news);
}

.techbbq-resources-grid .techbbq-filter-dropdown__option--interviews {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-interviews);
}

.techbbq-resources-grid .techbbq-filter-dropdown__option--marketing-kit {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-marketing-kit);
}

.techbbq-resources-grid__grid {
	display: grid;
	grid-template-columns: repeat(var(--techbbq-resources-grid-columns), minmax(0, 1fr));
	gap: var(--techbbq-resources-grid-gap);
	width: 100%;
}

.techbbq-resources-grid__card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--techbbq-space-3);
	min-height: var(--techbbq-resources-grid-card-min-height);
	padding: 20px;
	border-radius: 12px;
	background-color: var(--techbbq-bg-surface);
	color: inherit;
	text-decoration: none;
}

.techbbq-resources-grid__card--linked {
	transition: background-color 0.2s ease;
}

.techbbq-resources-grid__card--linked:hover,
.techbbq-resources-grid__card--linked:focus-visible {
	background-color: var(--techbbq-resources-grid-card-hover-bg);
	color: inherit;
	text-decoration: none;
}

.techbbq-resources-grid__card--linked:hover *,
.techbbq-resources-grid__card--linked:focus-visible * {
	text-decoration: none;
}

.techbbq-resources-grid__card--linked:focus-visible {
	outline: 2px solid var(--techbbq-content-accent-1);
	outline-offset: 2px;
}

.techbbq-resources-grid__card-body {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-3);
	width: 100%;
}

.techbbq-resources-grid__card--reports {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-reports);
}

.techbbq-resources-grid__card--news {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-news);
}

.techbbq-resources-grid__card--interviews {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-interviews);
}

.techbbq-resources-grid__card--marketing-kit {
	--techbbq-eyebrow-dot-color: var(--techbbq-resources-type-marketing-kit);
}

.techbbq-resources-grid__type {
	margin: 0;
}

.techbbq-resources-grid__title {
	margin: 0;
	width: 100%;
}

.techbbq-resources-grid__card-footer {
	display: flex;
	gap: var(--techbbq-space-1);
	align-items: flex-end;
	width: 100%;
}

.techbbq-resources-grid__date {
	flex: 1 1 auto;
	margin: 0;
	min-width: 0;
	font-family: var(--techbbq-font-family-body);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--techbbq-content-tertiary);
}

.techbbq-resources-grid__download-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

.techbbq-resources-grid__download-icon img {
	display: block;
	width: 100%;
	height: 100%;
}

.techbbq-resources-grid__no-results {
	margin: 0;
	width: 100%;
	font-family: var(--techbbq-font-family-body);
	font-size: var(--techbbq-text-paragraph-s-size);
	line-height: 1.4;
	letter-spacing: var(--techbbq-text-paragraph-letter-spacing);
	color: var(--techbbq-content-secondary);
	text-align: center;
}

.techbbq-resources-grid__card[hidden] {
	display: none;
}

/* ── Tablet (768–1023) ── */
@media (min-width: 768px) {
	.techbbq-resources-grid {
		--techbbq-resources-grid-columns: 2;
	}
}

/* ── Desktop (1024–1439) ── */
@media (min-width: 1024px) {
	.techbbq-resources-grid {
		--techbbq-resources-grid-columns: 3;
	}

	.techbbq-resources-grid__toolbar {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.techbbq-resources-grid .techbbq-filter-dropdown,
	.techbbq-resources-grid__search {
		width: 260px;
		max-width: 260px;
	}
}
