/**
 * TechBBQ Volunteer Areas — filter tabs, icon card grid, mobile show-all.
 *
 * Figma refs in widget PHP (1440 / 1024 / 768 / 360).
 * Section vertical spacing lives on .techbbq-volunteer-areas-wrap (Elementor container).
 *
 * Breakpoints (mobile-first): 0–767 (base), 768–1023, 1024–1439, 1440+.
 */

.techbbq-volunteer-areas {
	--techbbq-volunteer-areas-gap: var(--techbbq-space-3);
	--techbbq-volunteer-areas-intro-gap: var(--techbbq-space-2);
	--techbbq-volunteer-areas-title-size: 30px;
	--techbbq-volunteer-areas-desc-max-width: 576px;
	--techbbq-volunteer-areas-filter-height: 44px;
	--techbbq-volunteer-areas-filter-size: var(--techbbq-text-paragraph-s-size);
	--techbbq-volunteer-areas-grid-gap: var(--techbbq-space-1);
	--techbbq-volunteer-areas-card-height: auto;
	--techbbq-volunteer-areas-card-title-size: 20px;

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--techbbq-volunteer-areas-gap);
	width: 100%;
	padding: 0;
	color: var(--techbbq-content-primary);
	background-color: var(--techbbq-bg-main);
}

.techbbq-volunteer-areas__header,
.techbbq-volunteer-areas__filters-wrap,
.techbbq-volunteer-areas__grid-wrap {
	width: 100%;
}

.techbbq-volunteer-areas__intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	width: 100%;
	text-align: center;
}

.techbbq-volunteer-areas__title {
	margin: 0;
	font-size: var(--techbbq-volunteer-areas-title-size);
}

.techbbq-volunteer-areas__description {
	max-width: var(--techbbq-volunteer-areas-desc-max-width);
	margin: 0;
	color: var(--techbbq-content-secondary);
}

.techbbq-volunteer-areas__filters-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	text-align: center;
}

.techbbq-volunteer-areas__filters-wrap::-webkit-scrollbar {
	display: none;
}

.techbbq-volunteer-areas__filters {
	display: inline-flex;
	flex-wrap: nowrap;
	gap: var(--techbbq-space-1);
	align-items: center;
	justify-content: flex-start;
	vertical-align: top;
}

.techbbq-volunteer-areas__filter {
	box-sizing: border-box;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	min-height: var(--techbbq-volunteer-areas-filter-height);
	padding: 8px 24px;
	border: 1px solid var(--techbbq-border-tertiary);
	border-radius: var(--techbbq-radius-pill);
	background: transparent;
	color: var(--techbbq-content-primary);
	font-family: inherit;
	font-size: var(--techbbq-volunteer-areas-filter-size);
	line-height: 1.4;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.techbbq-volunteer-areas__filter.is-active {
	border-color: var(--techbbq-btn-primary-fill-default);
	background-color: var(--techbbq-btn-primary-fill-default);
	color: var(--techbbq-content-oncolor-primary);
}

.techbbq-volunteer-areas__filter:focus-visible {
	outline: 2px solid var(--techbbq-content-primary);
	outline-offset: 2px;
}

.techbbq-volunteer-areas__grid-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-3);
	align-items: stretch;
}

.techbbq-volunteer-areas__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--techbbq-volunteer-areas-grid-gap);
	width: 100%;
}

.techbbq-volunteer-areas__card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-3);
	justify-content: space-between;
	min-height: var(--techbbq-volunteer-areas-card-height);
	padding: 20px;
	border-radius: 12px;
	background-color: var(--techbbq-bg-surface);
}

.techbbq-volunteer-areas__card.is-filter-hidden,
.techbbq-volunteer-areas__card.is-mobile-collapsed {
	display: none;
}

.techbbq-volunteer-areas__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	align-self: flex-start;
	width: fit-content;
	padding: 4px;
}

.techbbq-volunteer-areas__icon-image {
	display: block;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
}

.techbbq-volunteer-areas__card-body {
	display: flex;
	flex-direction: column;
	gap: var(--techbbq-space-1);
	align-items: flex-start;
	width: 100%;
}

.techbbq-volunteer-areas__card-title {
	margin: 0;
	font-size: var(--techbbq-volunteer-areas-card-title-size);
	line-height: 1.2;
}

.techbbq-volunteer-areas__card-text {
	margin: 0;
	color: var(--techbbq-content-primary);
	opacity: 0.4;
}

.techbbq-volunteer-areas__toggle {
	width: 100%;
}

.techbbq-volunteer-areas__toggle[hidden] {
	display: none;
}

/* ── Tablet (768–1023) ── */
@media (min-width: 768px) {
	.techbbq-volunteer-areas {
		--techbbq-volunteer-areas-gap: var(--techbbq-space-5);
		--techbbq-volunteer-areas-title-size: 41px;
		--techbbq-volunteer-areas-desc-max-width: 660px;
		--techbbq-volunteer-areas-card-height: 256px;
		--techbbq-volunteer-areas-card-title-size: 24px;
	}

	.techbbq-volunteer-areas__card {
		gap: 0;
	}

	.techbbq-volunteer-areas__card.is-mobile-collapsed {
		display: flex;
	}

	.techbbq-volunteer-areas__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.techbbq-volunteer-areas__card--wide {
		grid-column: span 2;
	}

	.techbbq-volunteer-areas__toggle {
		display: none;
	}
}

/* ── Desktop (1024–1439) ── */
@media (min-width: 1024px) {
	.techbbq-volunteer-areas {
		--techbbq-volunteer-areas-title-size: 44px;
		--techbbq-volunteer-areas-filter-size: var(--techbbq-text-paragraph-l-size);
	}

	.techbbq-volunteer-areas__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ── Wide screen (1440+) ── */
@media (min-width: 1440px) {
	.techbbq-volunteer-areas {
		--techbbq-volunteer-areas-title-size: var(--techbbq-text-h3-size);
	}

	.techbbq-volunteer-areas__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
