/**
 * Hamenagen - ארכיון הופעות ואירועים [hm_events_archive]
 * פונט: פולין | כפתורים/אינפוטים: !important
 */

.hm-events-archive {
	--hm-ea-brand: #cb1e53;
	--hm-ea-accent: #fa8504;
	--hm-ea-navy: #20215a;
	--hm-ea-radius: 18px;
	--hm-ea-radius-sm: 12px;
	--hm-ea-radius-pill: 999px;
	--hm-ea-transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	--hm-ea-font: "פולין", "Polin", sans-serif;
	--hm-ea-pad-x: 7%;

	direction: rtl;
	font-family: var(--hm-ea-font) !important;
	color: var(--hm-ea-text) !important;
	background:
		radial-gradient(ellipse 80% 50% at 100% 0%, rgba(203, 30, 83, 0.08), transparent 55%),
		radial-gradient(ellipse 60% 40% at 0% 20%, rgba(250, 133, 4, 0.07), transparent 50%),
		var(--hm-ea-page-bg);
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: clamp(1.5rem, 3.5vw, 3rem) var(--hm-ea-pad-x) 3.5rem !important;
	box-sizing: border-box;
	overflow-x: clip;
	transition: background var(--hm-ea-transition), color var(--hm-ea-transition);
}

.hm-events-archive *,
.hm-events-archive *::before,
.hm-events-archive *::after {
	box-sizing: border-box;
}

.hm-events-archive,
.hm-events-archive *,
.hm-events-archive *::before,
.hm-events-archive *::after,
.hm-events-archive input,
.hm-events-archive button,
.hm-events-archive a,
.hm-events-archive-notice {
	font-family: var(--hm-ea-font) !important;
}

html[data-hm-theme="light"] .hm-events-archive,
html:not([data-hm-theme]) .hm-events-archive {
	--hm-ea-page-bg: #f4f5f8;
	--hm-ea-heading: #20215a;
	--hm-ea-text: #333333;
	--hm-ea-text-muted: #666666;
	--hm-ea-surface: #ffffff;
	--hm-ea-surface-soft: #f7f6ff;
	--hm-ea-border: rgba(32, 33, 90, 0.12);
	--hm-ea-shadow: 0 12px 40px rgba(32, 33, 90, 0.1);
	--hm-ea-shadow-hover: 0 20px 48px rgba(32, 33, 90, 0.16);
	--hm-ea-chip-bg: #ffffff;
	--hm-ea-chip-active-bg: #20215a;
	--hm-ea-chip-active-text: #ffffff;
	--hm-ea-search-bg: #ffffff;
	--hm-ea-flyer-empty: linear-gradient(145deg, #26235a 0%, #cb1e53 55%, #fa8504 100%);
}

html[data-hm-theme="dark"] .hm-events-archive {
	--hm-ea-page-bg: #0b0b24;
	--hm-ea-heading: #ffffff;
	--hm-ea-text: #ffffff;
	--hm-ea-text-muted: #b3b3b3;
	--hm-ea-surface: rgba(255, 255, 255, 0.06);
	--hm-ea-surface-soft: rgba(255, 255, 255, 0.04);
	--hm-ea-border: rgba(255, 255, 255, 0.12);
	--hm-ea-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
	--hm-ea-shadow-hover: 0 24px 56px rgba(0, 0, 0, 0.5);
	--hm-ea-chip-bg: rgba(255, 255, 255, 0.08);
	--hm-ea-chip-active-bg: #ffffff;
	--hm-ea-chip-active-text: #0b0b24;
	--hm-ea-search-bg: rgba(255, 255, 255, 0.08);
	--hm-ea-flyer-empty: linear-gradient(145deg, #1a1838 0%, #8b1540 55%, #c46a00 100%);
}

/* === כפיית אינפוטים וכפתורים === */
.hm-events-archive input[type="search"],
.hm-events-archive .hm-events-archive__search {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	width: 100% !important;
	min-height: unset !important;
	height: auto !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	margin: 0 !important;
}

.hm-events-archive button,
.hm-events-archive .hm-events-archive__chip,
.hm-events-archive .hm-events-archive__load-more,
.hm-events-archive .hm-events-archive__btn,
.hm-events-archive .hm-events-archive__flyer,
.hm-events-archive .hm-events-archive__lightbox-close {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer !important;
	font-family: var(--hm-ea-font) !important;
}

/* === Header === */
.hm-events-archive__header {
	margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.hm-events-archive__title-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.hm-events-archive__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hm-ea-brand) !important;
}

.hm-events-archive__title {
	margin: 0 0 0.4rem;
	font-size: clamp(1.85rem, 4.5vw, 2.75rem);
	font-weight: 800;
	line-height: 1.12;
	color: var(--hm-ea-heading) !important;
	letter-spacing: -0.025em;
}

.hm-events-archive__subtitle {
	margin: 0;
	max-width: 36rem;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.45;
	color: var(--hm-ea-text-muted) !important;
}

.hm-events-archive__count {
	margin: 0;
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	padding: 0.65rem 1.1rem;
	border-radius: var(--hm-ea-radius-pill);
	background: var(--hm-ea-surface);
	border: 1px solid var(--hm-ea-border);
	box-shadow: var(--hm-ea-shadow);
	color: var(--hm-ea-text-muted) !important;
	font-size: 0.9rem;
	font-weight: 500;
}

.hm-events-archive__count-num {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--hm-ea-heading) !important;
	line-height: 1;
}

/* === Search === */
.hm-events-archive__search-wrap {
	position: relative;
	max-width: 520px;
	margin-bottom: 1.1rem;
}

.hm-events-archive__search-label {
	position: absolute;
	inset-inline-end: 1.1rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	pointer-events: none;
	color: var(--hm-ea-text-muted);
}

.hm-events-archive__search-icon {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.hm-events-archive__search {
	display: block !important;
	width: 100% !important;
	padding-block: 0.95rem !important;
	padding-inline-start: 1.15rem !important;
	padding-inline-end: 2.85rem !important;
	border: 1px solid var(--hm-ea-border) !important;
	border-radius: var(--hm-ea-radius-pill) !important;
	background: var(--hm-ea-search-bg) !important;
	color: var(--hm-ea-text) !important;
	font-size: 0.98rem !important;
	font-weight: 500 !important;
	transition: border-color var(--hm-ea-transition), box-shadow var(--hm-ea-transition), background var(--hm-ea-transition);
}

.hm-events-archive__search::placeholder {
	color: var(--hm-ea-text-muted) !important;
	opacity: 1 !important;
}

.hm-events-archive__search:focus {
	outline: none !important;
	border-color: var(--hm-ea-brand) !important;
	box-shadow: 0 0 0 3px rgba(203, 30, 83, 0.15) !important;
}

/* === Filters / Buttons === */
.hm-events-archive__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem 1.25rem;
}

.hm-events-archive__filters,
.hm-events-archive__sort {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hm-events-archive__chip {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0.58rem 1.15rem !important;
	border: 1px solid var(--hm-ea-border) !important;
	border-radius: var(--hm-ea-radius-pill) !important;
	background: var(--hm-ea-chip-bg) !important;
	color: var(--hm-ea-text) !important;
	font-size: 0.86rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	min-height: unset !important;
	height: auto !important;
	width: auto !important;
	transition:
		background var(--hm-ea-transition),
		color var(--hm-ea-transition),
		border-color var(--hm-ea-transition),
		transform var(--hm-ea-transition),
		box-shadow var(--hm-ea-transition);
}

.hm-events-archive__chip:hover {
	border-color: var(--hm-ea-brand) !important;
	transform: translateY(-1px);
}

.hm-events-archive__chip.is-active {
	background: var(--hm-ea-chip-active-bg) !important;
	color: var(--hm-ea-chip-active-text) !important;
	border-color: transparent !important;
	box-shadow: 0 4px 14px rgba(32, 33, 90, 0.2);
}

/* === Grid === */
.hm-events-archive__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

@media (min-width: 900px) {
	.hm-events-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}
}

.hm-events-archive__card {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	align-items: stretch;
	background: var(--hm-ea-surface);
	border: 1px solid var(--hm-ea-border);
	border-radius: var(--hm-ea-radius-sm);
	overflow: hidden;
	box-shadow: var(--hm-ea-shadow);
	transition: transform var(--hm-ea-transition), box-shadow var(--hm-ea-transition);
	animation: hm-ea-fade-up 0.45s ease both;
}

@media (min-width: 480px) {
	.hm-events-archive__card {
		grid-template-columns: 120px minmax(0, 1fr);
	}
}

.hm-events-archive__card:hover {
	transform: translateY(-3px);
	box-shadow: var(--hm-ea-shadow-hover);
}

@keyframes hm-ea-fade-up {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hm-events-archive__visual {
	position: relative;
	align-self: stretch;
	min-height: 132px;
	background: var(--hm-ea-surface-soft);
	overflow: hidden;
}

.hm-events-archive__flyer {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 132px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
	cursor: zoom-in !important;
}

.hm-events-archive__flyer img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 132px;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.45s ease;
}

.hm-events-archive__card:hover .hm-events-archive__flyer img {
	transform: scale(1.05);
}

.hm-events-archive__zoom {
	position: absolute;
	inset-inline-end: 0.45rem;
	bottom: 0.45rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(15, 15, 35, 0.72);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(4px);
	pointer-events: none;
	transition: transform var(--hm-ea-transition), background var(--hm-ea-transition);
}

.hm-events-archive__card:hover .hm-events-archive__zoom {
	background: var(--hm-ea-brand);
	transform: scale(1.08);
}

.hm-events-archive__flyer--empty {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: var(--hm-ea-flyer-empty) !important;
	cursor: default !important;
	min-height: 132px !important;
}

.hm-events-archive__flyer-icon {
	color: rgba(255, 255, 255, 0.85);
	opacity: 0.9;
}

.hm-events-archive__date-badge {
	position: absolute;
	top: 0.45rem;
	inset-inline-start: 0.45rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 2.55rem;
	padding: 0.28rem 0.35rem 0.3rem;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 4px 12px rgba(32, 33, 90, 0.16);
	line-height: 1;
	z-index: 2;
}

html[data-hm-theme="dark"] .hm-events-archive__date-badge {
	background: rgba(15, 15, 35, 0.92);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hm-events-archive__date-day {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--hm-ea-navy);
}

html[data-hm-theme="dark"] .hm-events-archive__date-day {
	color: #fff;
}

.hm-events-archive__date-month {
	margin-top: 0.1rem;
	font-size: 0.62rem;
	font-weight: 700;
	color: var(--hm-ea-brand);
	text-transform: uppercase;
}

.hm-events-archive__countdown {
	position: absolute;
	top: 0.45rem;
	inset-inline-end: 0.45rem;
	z-index: 2;
	padding: 0.18rem 0.5rem;
	border-radius: var(--hm-ea-radius-pill);
	background: rgba(203, 30, 83, 0.95);
	color: #fff !important;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.3;
	box-shadow: 0 3px 10px rgba(203, 30, 83, 0.35);
	max-width: calc(100% - 3.2rem);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hm-events-archive__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.75rem 0.85rem 0.85rem;
	min-width: 0;
}

.hm-events-archive__event-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.3;
	color: var(--hm-ea-heading) !important;
	letter-spacing: -0.015em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hm-events-archive__singer {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	text-decoration: none !important;
	color: var(--hm-ea-text) !important;
	max-width: 100%;
	transition: opacity 0.2s ease;
}

.hm-events-archive__artists {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.75rem;
}

a.hm-events-archive__singer:hover {
	opacity: 0.85;
}

.hm-events-archive__singer-avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 0 0 1.5px var(--hm-ea-border);
}

.hm-events-archive__singer-name {
	font-size: 0.82rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hm-events-archive__meta {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.hm-events-archive__meta-row {
	display: flex;
	align-items: flex-start;
	gap: 0.35rem;
	margin: 0;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--hm-ea-text-muted) !important;
}

.hm-events-archive__meta-icon {
	flex-shrink: 0;
	margin-top: 0.08rem;
	opacity: 0.7;
	color: var(--hm-ea-brand);
	width: 14px;
	height: 14px;
}

.hm-events-archive__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: auto;
	padding-top: 0.25rem;
}

.hm-events-archive__btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0.42rem 0.9rem !important;
	border-radius: var(--hm-ea-radius-pill) !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	min-height: unset !important;
	height: auto !important;
	width: auto !important;
	border: 1px solid transparent !important;
	transition: transform var(--hm-ea-transition), background var(--hm-ea-transition), color var(--hm-ea-transition), border-color var(--hm-ea-transition);
}

.hm-events-archive__btn--primary {
	background: var(--hm-ea-brand) !important;
	color: #fff !important;
	border-color: var(--hm-ea-brand) !important;
}

.hm-events-archive__btn--primary:hover {
	background: #b01948 !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.hm-events-archive__btn--ghost {
	background: transparent !important;
	color: var(--hm-ea-heading) !important;
	border-color: var(--hm-ea-border) !important;
}

.hm-events-archive__btn--ghost:hover {
	border-color: var(--hm-ea-brand) !important;
	color: var(--hm-ea-brand) !important;
	transform: translateY(-1px);
}

.hm-events-archive__empty {
	grid-column: 1 / -1;
	margin: 2.5rem 0;
	padding: 2.5rem 1.5rem;
	text-align: center;
	border-radius: var(--hm-ea-radius);
	background: var(--hm-ea-surface);
	border: 1px dashed var(--hm-ea-border);
	color: var(--hm-ea-text-muted) !important;
	font-size: 1.05rem;
	font-weight: 500;
}

/* === Load more === */
.hm-events-archive__footer {
	display: flex;
	justify-content: center;
	margin-top: 2.5rem;
}

.hm-events-archive__load-more {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 170px !important;
	padding: 0.9rem 2.1rem !important;
	border: 1px solid var(--hm-ea-border) !important;
	border-radius: var(--hm-ea-radius-pill) !important;
	background: var(--hm-ea-surface) !important;
	color: var(--hm-ea-text) !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	height: auto !important;
	width: auto !important;
	box-shadow: var(--hm-ea-shadow);
	transition: background var(--hm-ea-transition), border-color var(--hm-ea-transition), color var(--hm-ea-transition), transform var(--hm-ea-transition);
}

.hm-events-archive__load-more:hover:not(:disabled) {
	border-color: var(--hm-ea-brand) !important;
	color: var(--hm-ea-brand) !important;
	transform: translateY(-1px);
}

.hm-events-archive__load-more:disabled {
	opacity: 0.55;
	cursor: not-allowed !important;
}

.hm-events-archive.is-loading .hm-events-archive__grid {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity var(--hm-ea-transition);
}

/* === Lightbox === */
.hm-events-archive__lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(10, 10, 28, 0.88);
	backdrop-filter: blur(6px);
}

.hm-events-archive__lightbox[hidden] {
	display: none !important;
}

.hm-events-archive__lightbox-img {
	max-width: min(92vw, 720px);
	max-height: 88vh;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.hm-events-archive__lightbox-close {
	position: absolute !important;
	top: 1rem !important;
	inset-inline-end: 1rem !important;
	width: 44px !important;
	height: 44px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.12) !important;
	color: #fff !important;
	font-size: 1.75rem !important;
	line-height: 1 !important;
	padding: 0 !important;
}

.hm-events-archive__lightbox-close:hover {
	background: rgba(255, 255, 255, 0.22) !important;
}

body.hm-events-archive-lightbox-open {
	overflow: hidden;
}

.hm-events-archive-notice {
	direction: rtl;
	font-family: var(--hm-ea-font) !important;
	padding: 1rem;
}

/* === Elementor overrides === */
.elementor-widget-shortcode .hm-events-archive button.hm-events-archive__chip,
.elementor-element .hm-events-archive button.hm-events-archive__chip,
.elementor-widget-shortcode .hm-events-archive button.hm-events-archive__load-more,
.elementor-element .hm-events-archive button.hm-events-archive__load-more,
.elementor-widget-shortcode .hm-events-archive a.hm-events-archive__btn,
.elementor-element .hm-events-archive a.hm-events-archive__btn {
	width: auto !important;
	min-width: unset !important;
}

.elementor-widget-shortcode .hm-events-archive,
.elementor-widget-shortcode .hm-events-archive *,
.elementor-element .hm-events-archive,
.elementor-element .hm-events-archive * {
	font-family: "פולין", "Polin", sans-serif !important;
}

.hm-events-archive .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 639px) {
	.hm-events-archive {
		--hm-ea-pad-x: 5%;
	}

	.hm-events-archive__card {
		grid-template-columns: 92px minmax(0, 1fr);
	}

	.hm-events-archive__visual,
	.hm-events-archive__flyer,
	.hm-events-archive__flyer img,
	.hm-events-archive__flyer--empty {
		min-height: 118px !important;
	}
}