/*
 * HSH Event Spaces.
 *
 * Tabbed venue showcase: underlined tab buttons + split panels (image left,
 * content right). Scoped under .hsh-events; colors and sizes via custom
 * properties overridable from the widget's Style tab.
 */

.hsh-events {
	--hsh-e-tab: #2f4b3f;
	--hsh-e-tab-line: #2f4b3f;
	--hsh-e-tab-active: #eec95c;
	--hsh-e-title: #2f4b3f;
	--hsh-e-text: #5b5b5b;
	--hsh-e-badge-bg: #ffffff;
	--hsh-e-badge: #2f4b3f;
	--hsh-e-btn-bg: #eec95c;
	--hsh-e-btn-color: #3a3a1f;
	--hsh-e-ratio: 7 / 5;
	--hsh-e-radius: 16px;
}

/* ---- Tabs ---- */

.hsh-events__tabs {
	display: flex;
	justify-content: center;
	gap: clamp(18px, 4vw, 44px);
	margin-bottom: 44px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hsh-events__tabs::-webkit-scrollbar {
	display: none;
}

.hsh-events button.hsh-events__tab {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	flex: 0 0 auto;
	margin: 0;
	padding: 0 2px 10px;
	border: 0;
	border-bottom: 2px solid var(--hsh-e-tab-line);
	/* Kit button styles round <button> corners, which curves the underline. */
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--hsh-e-tab);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.2s ease, opacity 0.2s ease;
	opacity: 0.85;
}

.hsh-events button.hsh-events__tab:hover {
	opacity: 1;
}

.hsh-events button.hsh-events__tab.is-active {
	border-bottom-color: var(--hsh-e-tab-active);
	opacity: 1;
}

.hsh-events button.hsh-events__tab:focus-visible {
	outline: 2px solid var(--hsh-e-tab-active);
	outline-offset: 4px;
}

/* ---- Panel ---- */

.hsh-events__panel {
	display: grid;
	grid-template-columns: 46% minmax(0, 1fr);
	gap: clamp(28px, 5vw, 64px);
	align-items: center;
}

/* display:grid would defeat the hidden attribute without this. */
.hsh-events__panel[hidden] {
	display: none;
}

.hsh-events__media {
	position: relative;
	aspect-ratio: var(--hsh-e-ratio); /* reserves space: zero CLS */
	border-radius: var(--hsh-e-radius);
	overflow: hidden;
	background: #e8e4da;
}

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

/* ---- Body ---- */

.hsh-events__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.hsh-events__badge {
	display: inline-block;
	background: var(--hsh-e-badge-bg);
	color: var(--hsh-e-badge);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid rgba(47, 75, 63, 0.18);
	margin-bottom: 20px;
}

.hsh-events__title {
	margin: 0 0 18px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 500;
	line-height: 1.15;
	color: var(--hsh-e-title);
}

.hsh-events__desc {
	margin: 0 0 16px;
	color: var(--hsh-e-text);
	font-size: 16px;
	line-height: 1.7;
	max-width: 60ch;
}

.hsh-events__details {
	margin: 4px 0 26px;
	padding-left: 20px;
	color: var(--hsh-e-text);
	font-size: 15px;
	line-height: 1.75;
}

.hsh-events__btn {
	display: inline-block;
	background: var(--hsh-e-btn-bg);
	color: var(--hsh-e-btn-color);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 999px;
	padding: 16px 32px;
	transition: filter 0.2s ease;
}

.hsh-events__btn:hover,
.hsh-events__btn:focus-visible {
	filter: brightness(0.94);
	color: var(--hsh-e-btn-color);
}

/* ---- Tablet & mobile: stack image over content, tabs scroll ---- */

@media (max-width: 900px) {
	.hsh-events__panel {
		grid-template-columns: 1fr;
		gap: 26px;
		align-items: start;
	}

	.hsh-events__tabs {
		justify-content: flex-start;
		margin-bottom: 32px;
	}

	.hsh-events__media {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 640px) {
	.hsh-events button.hsh-events__tab {
		font-size: 13px;
	}

	.hsh-events__btn {
		align-self: stretch;
		text-align: center;
	}
}
