/**
 * Club months carousel.
 *
 * Every component rule is scoped under .hec-club, and every dialog rule under
 * .hec-club__dialog, because the Elementor kit ships (0,1,1) element rules
 * (`.elementor-kit-11 a { color }`, `.elementor-kit-11 h3 { font-size }`) that
 * beat a bare class. The dialog is moved to the end of <body> by the script
 * so print styles can isolate it, which is why it does not sit under .hec-club.
 *
 * Logical properties throughout: the site is Hebrew RTL. The one physical
 * property is the chevron mirror, which must flip with the page direction.
 *
 * Tokens reuse the vendor page palette (measured, WCAG AA on white).
 */

.hec-club {
	--hec-club-figure: #7A4A79;
	--hec-club-strong: #4A4761;
	--hec-club-muted: #6E6B85;
	--hec-club-rule: #E3E1EA;
	--hec-club-placeholder: #E9E6F0;
	--hec-club-tint: #F6F5F8;
	--hec-club-surface: #FFFFFF;
	--hec-club-gap: 16px;
	--hec-club-radius: 8px;
	/* Width of one slide: the viewport's inline padding carves this much space
	   out on each side, and the slide itself fills the remaining content box. */
	--hec-club-slide: 88%;

	max-inline-size: 1320px;
	margin-inline: auto;
	padding-inline: 16px;
	padding-block: 8px 32px;
	color: var(--hec-club-strong);
	font-family: "Heebo", "Segoe UI", system-ui, sans-serif;
}

.hec-club * {
	box-sizing: border-box;
}

/* ---------- Carousel ---------- */

.hec-club .hec-club__carousel {
	position: relative;
}

.hec-club .hec-club__viewport {
	display: flex;
	gap: var(--hec-club-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
	padding-block: 8px;
	padding-inline: calc((100% - var(--hec-club-slide)) / 2);
	scroll-padding-inline: calc((100% - var(--hec-club-slide)) / 2);
}

.hec-club .hec-club__viewport::-webkit-scrollbar {
	display: none;
}

.hec-club .hec-club__slide {
	flex: 0 0 100%;
	margin: 0;
	text-align: center;
	scroll-snap-align: center;
	opacity: 0.6;
	transform: scale(0.96);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.hec-club .hec-club__slide--active {
	opacity: 1;
	transform: none;
}

.hec-club .hec-club__open {
	display: block;
	inline-size: 100%;
	padding: 0;
	border: 1px solid var(--hec-club-rule);
	border-radius: var(--hec-club-radius);
	background: var(--hec-club-surface);
	box-shadow: 0 6px 24px rgba(74, 71, 97, 0.12);
	line-height: 0;
	overflow: hidden;
	cursor: zoom-in;
}

/* The Elementor kit's button:hover/:focus rule outranks this on specificity
   alone, so restate the resting look explicitly to keep it from winning. */
.hec-club .hec-club__open:hover,
.hec-club .hec-club__open:focus {
	background: var(--hec-club-surface);
	border-color: var(--hec-club-figure);
	color: inherit;
}

.hec-club .hec-club__open:focus-visible {
	outline: 3px solid var(--hec-club-figure);
	outline-offset: 3px;
}

.hec-club .hec-club__image {
	display: block;
	inline-size: 100%;
	block-size: auto;
}

.hec-club .hec-club__month {
	margin: 12px 0 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--hec-club-figure);
}

.hec-club .hec-club__arrow {
	position: absolute;
	top: calc(50% - 44px);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 40px;
	block-size: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(74, 71, 97, 0.75);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.hec-club .hec-club__arrow--prev {
	inset-inline-start: 4px;
}

.hec-club .hec-club__arrow--next {
	inset-inline-end: 4px;
}

.hec-club .hec-club__arrow svg {
	display: block;
	inline-size: 16px;
	block-size: 16px;
}

/* The chevrons point outward, so they mirror with the page direction. */
[dir="rtl"] .hec-club .hec-club__arrow svg {
	transform: scaleX(-1);
}

.hec-club .hec-club__arrow:hover,
.hec-club .hec-club__arrow:focus-visible {
	background: var(--hec-club-figure);
}

.hec-club .hec-club__arrow:focus-visible {
	outline: 3px solid var(--hec-club-figure);
	outline-offset: 2px;
}

.hec-club .hec-club__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.hec-club .hec-club__arrow[hidden],
.hec-club .hec-club__dots[hidden] {
	display: none;
}

.hec-club .hec-club__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-block: 12px 0;
	padding: 0;
}

.hec-club .hec-club__dot {
	inline-size: 10px;
	block-size: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hec-club-rule);
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.hec-club .hec-club__dot:hover,
.hec-club .hec-club__dot:focus {
	background: var(--hec-club-figure);
	border-color: transparent;
}

.hec-club .hec-club__dot[aria-current="true"] {
	background: var(--hec-club-figure);
	transform: scale(1.3);
}

.hec-club .hec-club__dot:focus-visible {
	outline: 2px solid var(--hec-club-figure);
	outline-offset: 2px;
}

/* ---------- Panels ---------- */

.hec-club .hec-club__panels {
	margin-block-start: 28px;
}

.hec-club .hec-club__panel[hidden] {
	display: none;
}

.hec-club .hec-club__panel-title {
	margin: 0 0 16px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--hec-club-figure);
	text-align: start;
}

/* ---------- Recommended vendors, drawn like the community page's cards ----------
   A copy of community.css's .hec-comm-card under the calendar's own names
   (inc/club/render.php, hec_club_vendor_tile()), with its colours. */

.hec-club .hec-club__card--vendor {
	padding-block-start: 10px;
}

.hec-club .hec-club-vc {
	--hec-club-vc-ink: #3C4F45;
	--hec-club-vc-muted: #617067;
	--hec-club-vc-accent: #7A4A79;
	--hec-club-vc-pill: #F3E9F3;
	--hec-club-vc-ground: #F8F8F6;

	position: relative;
	display: flex;
	flex-direction: column;
	inline-size: 100%;
	block-size: 100%;
	border-radius: 16px;
	/* The community page's face, so the lettering matches too. */
	font-family: "Noto Sans Hebrew", "Heebo", system-ui, sans-serif;
	background: #FFFFFF;
	box-shadow: 0 1px 2px rgba(60, 79, 69, 0.06), 0 6px 20px rgba(60, 79, 69, 0.08);
	color: inherit;
	text-decoration: none;
	text-align: start;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hec-club a.hec-club-vc:hover {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(60, 79, 69, 0.08), 0 14px 30px rgba(60, 79, 69, 0.14);
	color: inherit;
}

.hec-club a.hec-club-vc:focus-visible {
	transform: translateY(-3px);
	outline: 3px solid var(--hec-club-vc-accent);
	outline-offset: 3px;
}

.hec-club .hec-club-vc--static {
	cursor: default;
}

.hec-club .hec-club-vc__badge {
	position: absolute;
	top: -10px;
	inset-inline-end: -8px;
	z-index: 2;
	inline-size: 72px;
	block-size: auto;
	margin: 0;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
	pointer-events: none;
}

.hec-club .hec-club-vc__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 16px 16px 0 0;
	background: var(--hec-club-vc-ground);
}

.hec-club .hec-club-vc__media img {
	display: block;
	inline-size: 100%;
	max-inline-size: none;
	block-size: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
}

.hec-club .hec-club-vc__placeholder {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	background: linear-gradient(135deg, var(--hec-club-vc-ground), #F4E7DE);
}

.hec-club .hec-club-vc__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px 16px;
}

.hec-club .hec-club-vc__title {
	margin: 0;
	color: var(--hec-club-vc-ink);
	font-family: inherit;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.3;
}

.hec-club .hec-club-vc__text {
	display: -webkit-box;
	overflow: hidden;
	color: var(--hec-club-vc-muted);
	font-size: 14px;
	line-height: 1.55;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.hec-club .hec-club-vc__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-block-start: auto;
	padding-block-start: 4px;
}

.hec-club .hec-club-vc__pill {
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--hec-club-vc-pill);
	color: var(--hec-club-vc-accent);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}

.hec-club .hec-club-vc__go {
	margin-inline-start: auto;
	color: var(--hec-club-vc-accent);
	font-size: 13px;
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.hec-club .hec-club-vc {
		transition: none;
	}
}

/* ---------- The month's content blocks, above its recommendations ---------- */

.hec-club .hec-club__blocks {
	display: grid;
	gap: 14px;
	max-inline-size: 72ch;
	margin-block-end: 32px;
	text-align: start;
}

.hec-club .hec-club__b-heading {
	margin: 10px 0 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--hec-club-figure);
}

.hec-club .hec-club__b-p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.75;
	color: var(--hec-club-strong);
}

.hec-club .hec-club__b-p + .hec-club__b-p {
	margin-block-start: 10px;
}

.hec-club .hec-club__b-list-title {
	margin: 0 0 6px;
	font-weight: 700;
	color: var(--hec-club-strong);
}

.hec-club .hec-club__b-list ul {
	margin: 0;
	padding-inline-start: 22px;
	list-style: disc;
	line-height: 1.8;
	color: var(--hec-club-strong);
}

.hec-club .hec-club__b-list li::marker {
	color: var(--hec-club-figure);
}

.hec-club .hec-club__b-quote {
	margin: 0;
	padding-block: 4px;
	padding-inline: 18px 0;
	border-inline-start: 3px solid var(--hec-club-figure);
}

.hec-club .hec-club__b-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.0625rem;
	font-style: normal;
}

.hec-club .hec-club__b-quote figcaption {
	margin-block-start: 6px;
	font-size: 0.875rem;
	color: var(--hec-club-muted);
}

.hec-club .hec-club__b-tip {
	padding: 16px 18px;
	border-radius: var(--hec-club-radius);
	background: var(--hec-club-tint);
}

.hec-club .hec-club__b-tip-title {
	margin: 0 0 6px;
	font-weight: 700;
	color: var(--hec-club-figure);
}

.hec-club .hec-club__b-image {
	margin: 0;
}

.hec-club .hec-club__b-image img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	border-radius: var(--hec-club-radius);
}

.hec-club .hec-club__b-image figcaption {
	margin-block-start: 6px;
	font-size: 0.875rem;
	color: var(--hec-club-muted);
}

.hec-club .hec-club__b-button {
	margin: 4px 0 0;
}

.hec-club .hec-club__b-btn {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	padding: 10px 22px;
	border-radius: var(--hec-club-radius);
	background: var(--hec-club-figure);
	color: #FFFFFF;
	font-weight: 700;
	text-decoration: none;
}

.hec-club .hec-club__b-btn:hover,
.hec-club .hec-club__b-btn:focus {
	background: var(--hec-club-strong);
	color: #FFFFFF;
}

/* "לכל הספקים": under the month's vendor cards. */
.hec-club .hec-club__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-block-size: 44px;
	margin-block-start: 12px;
	padding: 10px 18px;
	border: 1px solid var(--hec-club-figure);
	border-radius: var(--hec-club-radius);
	color: var(--hec-club-figure);
	font-weight: 700;
	text-decoration: none;
}

.hec-club .hec-club__all:hover,
.hec-club .hec-club__all:focus {
	background: var(--hec-club-figure);
	color: #FFFFFF;
}

.hec-club .hec-club__b-btn:focus-visible,
.hec-club .hec-club__all:focus-visible {
	outline: 2px solid var(--hec-club-figure);
	outline-offset: 2px;
}

.hec-club .hec-club__group {
	margin-block-end: 28px;
}

.hec-club .hec-club__group-title {
	margin: 0 0 12px;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--hec-club-strong);
	text-align: start;
}

.hec-club .hec-club__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--hec-club-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hec-club .hec-club__card {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hec-club .hec-club__card--activity,
.hec-club .hec-club__card--vendor {
	min-inline-size: 0;
}

.hec-club .hec-club__card-link {
	display: flex;
	flex-direction: column;
	block-size: 100%;
	border: 1px solid var(--hec-club-rule);
	border-radius: var(--hec-club-radius);
	background: var(--hec-club-surface);
	color: var(--hec-club-strong);
	text-decoration: none;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hec-club .hec-club__card-link:hover,
.hec-club .hec-club__card-link:focus-visible {
	box-shadow: 0 8px 24px rgba(74, 71, 97, 0.16);
	transform: translateY(-2px);
}

.hec-club .hec-club__card-link:focus-visible {
	outline: 3px solid var(--hec-club-figure);
	outline-offset: 2px;
}

.hec-club .hec-club__card-media {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--hec-club-placeholder);
}

.hec-club .hec-club__card--vendor .hec-club__card-media {
	background: var(--hec-club-tint);
}

/* Hand-typed items share the card look; without a URL the card is inert. */
.hec-club .hec-club__card--custom .hec-club__card-media {
	background: var(--hec-club-placeholder);
}

.hec-club .hec-club__card-link--static {
	cursor: default;
}

.hec-club .hec-club__card-link--static:hover {
	box-shadow: none;
	transform: none;
}

.hec-club .hec-club__card-image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

/* Logos are not photographs: fit them whole, on the tint. */
.hec-club .hec-club__card--vendor .hec-club__card-image {
	object-fit: contain;
	padding: 12px;
}

.hec-club .hec-club__card-placeholder {
	display: block;
	inline-size: 100%;
	block-size: 100%;
}

.hec-club .hec-club__card-trade {
	display: block;
	padding: 10px 14px 0;
	font-size: 0.8125rem;
	color: var(--hec-club-figure);
	text-align: start;
}

.hec-club .hec-club__card-title {
	display: block;
	margin: 0;
	padding: 8px 14px 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--hec-club-strong);
	text-align: start;
}

.hec-club .hec-club__card-text {
	margin: 0;
	padding: 6px 14px 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--hec-club-muted);
	text-align: start;
}

.hec-club .hec-club__card-cta {
	display: block;
	margin-block-start: auto;
	padding: 12px 14px 14px;
	font-weight: 700;
	color: var(--hec-club-figure);
	text-align: start;
}

.hec-club .hec-club__empty {
	margin: 0;
	padding: 24px;
	border: 1px dashed var(--hec-club-rule);
	border-radius: var(--hec-club-radius);
	color: var(--hec-club-muted);
	text-align: center;
}

/* ---------- Dialog (lives at the end of <body> once opened) ---------- */

.hec-club__dialog {
	inline-size: min(96vw, 1400px);
	max-block-size: 96vh;
	padding: 12px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	overflow: auto;
}

.hec-club__dialog::backdrop {
	background: rgba(20, 18, 30, 0.7);
}

.hec-club__dialog .hec-club__dialog-title {
	margin: 0 0 8px;
	font: 700 1.25rem/1.3 "Heebo", "Segoe UI", system-ui, sans-serif;
	color: #7A4A79;
	text-align: start;
}

.hec-club__dialog .hec-club__dialog-image {
	display: block;
	inline-size: 100%;
	max-block-size: calc(96vh - 120px);
	block-size: auto;
	object-fit: contain;
}

.hec-club__dialog .hec-club__dialog-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin-block-start: 12px;
}

.hec-club__dialog .hec-club__dialog-button {
	display: inline-flex;
	align-items: center;
	padding: 10px 18px;
	border: 1px solid #7A4A79;
	border-radius: 999px;
	background: #7A4A79;
	color: #fff;
	font: 700 0.9375rem/1 "Heebo", "Segoe UI", system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
}

.hec-club__dialog .hec-club__dialog-button--print {
	order: 1;
}

.hec-club__dialog .hec-club__dialog-button--pdf {
	order: 2;
}

.hec-club__dialog .hec-club__dialog-button--close {
	order: 3;
	background: #fff;
	color: #7A4A79;
}

.hec-club__dialog .hec-club__dialog-button[hidden] {
	display: none;
}

.hec-club__dialog .hec-club__dialog-button:focus-visible {
	outline: 3px solid #4A4761;
	outline-offset: 2px;
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
	.hec-club {
		--hec-club-slide: 60%;
	}

	.hec-club .hec-club__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hec-club .hec-club__arrow {
		inline-size: 48px;
		block-size: 48px;
		top: calc(50% - 48px);
	}

	.hec-club .hec-club__arrow svg {
		inline-size: 20px;
		block-size: 20px;
	}
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.hec-club .hec-club__slide,
	.hec-club .hec-club__card-link,
	.hec-club .hec-club__dot,
	.hec-club .hec-club__arrow {
		transition: none;
	}
}

/* ---------- Print: the open month alone, one landscape page ---------- */

@media print {
	@page {
		size: A4 landscape;
		margin: 8mm;
	}

	html.hec-club-printing body > *:not(.hec-club__dialog) {
		display: none !important;
	}

	html.hec-club-printing .hec-club__dialog {
		display: block;
		position: static;
		inline-size: auto;
		max-inline-size: none;
		max-block-size: none;
		margin: 0;
		padding: 0;
		border: 0;
		box-shadow: none;
		overflow: visible;
	}

	html.hec-club-printing .hec-club__dialog::backdrop {
		display: none;
	}

	/* The calendar image (2000x1449, ratio 1.38) is narrower than the printable
	   area (281x194mm at ratio 1.45), so sizing by block-size instead of
	   inline-size keeps the whole image on one landscape page. */
	html.hec-club-printing .hec-club__dialog .hec-club__dialog-image {
		inline-size: auto;
		max-inline-size: 100%;
		max-block-size: 194mm;
		block-size: auto;
		margin-inline: auto;
		break-inside: avoid;
	}

	html.hec-club-printing .hec-club__dialog .hec-club__dialog-title,
	html.hec-club-printing .hec-club__dialog .hec-club__dialog-actions {
		display: none;
	}
}
