/**
 * Hamenagen - מצעד שבועי
 * Scoped under .hm-weekly-chart - לא נדרס ע"י עיצוב גלובלי
 */

.hm-homepage .hm-weekly-chart {
	scroll-margin-top: 5rem;
	--hm-wc-brand: #cb1e53;
	--hm-wc-brand-2: #fa8504;
	--hm-wc-navy: #26235a;
	--hm-wc-gold: #f5c842;
	--hm-wc-radius: 18px;
	--hm-wc-shadow: 0 8px 32px rgba(32, 33, 90, 0.18);

	box-sizing: border-box;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 1rem 1rem;
	font-family: "פולין", Assistant, sans-serif !important;
	direction: rtl;
}

.hm-homepage .hm-weekly-chart *,
.hm-homepage .hm-weekly-chart *::before,
.hm-homepage .hm-weekly-chart *::after {
	box-sizing: border-box;
}

.hm-homepage .hm-weekly-chart__inner {
	position: relative;
	overflow: hidden;
	border-radius: var(--hm-wc-radius);
	padding: 1.25rem 1.15rem 1.1rem;
	background: linear-gradient(135deg, #26235a 0%, #3d1a4a 45%, #cb1e53 100%);
	box-shadow: var(--hm-wc-shadow);
}

.hm-homepage .hm-weekly-chart__inner::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 15% 20%, rgba(250, 133, 4, 0.28) 0%, transparent 42%),
		radial-gradient(circle at 85% 80%, rgba(203, 30, 83, 0.32) 0%, transparent 48%),
		radial-gradient(circle at 50% 0%, rgba(245, 200, 66, 0.18) 0%, transparent 40%);
	pointer-events: none;
}

/* נצנוצים חגיגיים ברקע */
.hm-homepage .hm-weekly-chart__inner::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.9;
	background-image:
		radial-gradient(1.5px 1.5px at 8% 18%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 18% 72%, rgba(245, 200, 66, 0.95) 50%, transparent 51%),
		radial-gradient(2px 2px at 28% 12%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 42% 88%, rgba(255, 255, 255, 0.85) 50%, transparent 51%),
		radial-gradient(2px 2px at 58% 22%, rgba(245, 200, 66, 0.9) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 72% 78%, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 86% 14%, rgba(255, 255, 255, 0.9) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 92% 62%, rgba(245, 200, 66, 0.85) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 12% 48%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
		radial-gradient(2px 2px at 66% 52%, rgba(255, 255, 255, 0.75) 50%, transparent 51%);
	animation: hm-wc-sparkle 3.6s ease-in-out infinite;
}

@keyframes hm-wc-sparkle {

	0%,
	100% {
		opacity: 0.55;
	}

	50% {
		opacity: 1;
	}
}

.hm-homepage .hm-weekly-chart__head {
	position: relative;
	z-index: 1;
	text-align: center;
	margin-bottom: 1rem;
}

.hm-homepage .hm-weekly-chart__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.28rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(245, 200, 66, 0.35);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	backdrop-filter: blur(6px);
	box-shadow: 0 0 16px rgba(245, 200, 66, 0.2);
}

.hm-homepage .hm-weekly-chart__title {
	margin: 0 0 0.4rem !important;
	padding: 0 !important;
	font-size: clamp(1.2rem, 2.6vw, 1.65rem) !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	color: #fff !important;
	font-family: inherit !important;
	border: none !important;
	background: none !important;
}

.hm-homepage .hm-weekly-chart__lead {
	margin: 0 auto 0.65rem !important;
	max-width: 580px;
	font-size: 0.92rem !important;
	line-height: 1.45 !important;
	color: rgba(255, 255, 255, 0.88) !important;
	font-family: inherit !important;
}

.hm-homepage .hm-weekly-chart__countdown {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: rgba(245, 200, 66, 0.2);
	border: 1px solid rgba(245, 200, 66, 0.45);
}

.hm-homepage .hm-weekly-chart__countdown-num {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--hm-wc-gold);
	line-height: 1;
}

.hm-homepage .hm-weekly-chart__countdown-label {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.9);
}

/* === Voting grid - 5 per row, compact === */

.hm-homepage .hm-weekly-chart__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.5rem;
}

.hm-homepage .hm-weekly-chart__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0.35rem 0.45rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	min-width: 0;
	text-align: center;
}

.hm-homepage .hm-weekly-chart__card-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	width: 100%;
	min-width: 0;
}

.hm-homepage .hm-weekly-chart__card:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.hm-homepage .hm-weekly-chart__card.is-voted {
	outline: 2px solid var(--hm-wc-brand);
	outline-offset: 1px;
	background: linear-gradient(180deg, #fff 0%, #fff5f8 100%);
}

.hm-homepage .hm-weekly-chart__card-media {
	position: relative;
	flex-shrink: 0;
	line-height: 0;
	margin-bottom: 2px;
}

.hm-homepage .hm-weekly-chart__card-thumb {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: cover;
}

/* עקיפת סגנונות גלובליים של cmp-play-btn / תבנית WP */
.hm-homepage .hm-weekly-chart button.hm-weekly-chart__play-btn.cmp-play-btn {
	position: absolute !important;
	bottom: 6px !important;
	right: -4px !important;
	left: auto !important;
	top: auto !important;
	inset: auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 22px !important;
	min-height: 22px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	background: var(--hm-wc-navy) !important;
	background-color: var(--hm-wc-navy) !important;
	background-image: none !important;
	color: #fff !important;
	font: inherit !important;
	font-size: 0 !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
	cursor: pointer !important;
	opacity: 1 !important;
	transform: none !important;
	transition: background 0.15s ease, transform 0.15s ease !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.hm-homepage .hm-weekly-chart button.hm-weekly-chart__play-btn.cmp-play-btn:hover,
.hm-homepage .hm-weekly-chart button.hm-weekly-chart__play-btn.cmp-play-btn:active,
.hm-homepage .hm-weekly-chart button.hm-weekly-chart__play-btn.cmp-play-btn:focus-visible {
	background: var(--hm-wc-brand) !important;
	background-color: var(--hm-wc-brand) !important;
	background-image: none !important;
	filter: none !important;
	transform: scale(1.08) !important;
	box-shadow: 0 2px 8px rgba(203, 30, 83, 0.4) !important;
}

.hm-homepage .hm-weekly-chart button.hm-weekly-chart__play-btn.cmp-play-btn .hm-weekly-chart__play-icon {
	display: block !important;
	width: 11px !important;
	height: 11px !important;
	fill: currentColor !important;
	pointer-events: none !important;
}

.hm-homepage .hm-weekly-chart__card-body {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.hm-homepage .hm-weekly-chart__card-title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	color: var(--hm-wc-navy) !important;
	line-height: 1.25 !important;
	font-family: inherit !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hm-homepage .hm-weekly-chart__card-artist {
	margin: 0.1rem 0 0 !important;
	padding: 0 !important;
	font-size: 0.7rem !important;
	color: #777 !important;
	line-height: 1.2 !important;
	font-family: inherit !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hm-homepage .hm-weekly-chart__vote-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.3rem 0.4rem;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--hm-wc-brand), #8a2254);
	color: #fff !important;
	font-family: inherit !important;
	font-size: 0.72rem;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease;
	white-space: nowrap;
}

.hm-homepage .hm-weekly-chart__vote-btn:hover:not(:disabled) {
	opacity: 0.9;
}

.hm-homepage .hm-weekly-chart__vote-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.hm-homepage .hm-weekly-chart__card.is-voted .hm-weekly-chart__vote-btn {
	background: linear-gradient(135deg, #16a34a, #15803d);
}

.hm-homepage .hm-weekly-chart__cta-note {
	position: relative;
	z-index: 1;
	margin: 0.85rem 0 0 !important;
	text-align: center;
	font-size: 0.82rem !important;
	color: rgba(255, 255, 255, 0.75) !important;
	font-family: inherit !important;
}

/* === Results podium === */

.hm-homepage .hm-weekly-chart__podium {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1.12fr 1fr;
	gap: 0.65rem;
	align-items: end;
}

.hm-homepage .hm-weekly-chart__podium-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.2rem;
	padding: 0.65rem 0.55rem 0.7rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
	min-width: 0;
}

.hm-homepage .hm-weekly-chart__podium-item--rank-1 {
	order: 2;
}

.hm-homepage .hm-weekly-chart__podium-item--rank-2 {
	order: 1;
}

.hm-homepage .hm-weekly-chart__podium-item--rank-3 {
	order: 3;
}

.hm-homepage .hm-weekly-chart__podium-item--winner {
	padding: 0.75rem 0.6rem 0.8rem;
	background: linear-gradient(180deg, #fffef8 0%, #fff4cc 100%);
	border: 2px solid var(--hm-wc-gold);
	box-shadow:
		0 6px 22px rgba(245, 200, 66, 0.35),
		0 0 0 1px rgba(245, 200, 66, 0.25) inset;
	transform: translateY(-8px);
}

.hm-homepage .hm-weekly-chart__podium-medal {
	font-size: 1.55rem;
	line-height: 1;
	margin: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.hm-homepage .hm-weekly-chart__podium-item--winner .hm-weekly-chart__podium-medal {
	font-size: 1.85rem;
	animation: hm-wc-medal-glow 2.2s ease-in-out infinite;
}

@keyframes hm-wc-medal-glow {

	0%,
	100% {
		filter: drop-shadow(0 2px 4px rgba(245, 200, 66, 0.35));
		transform: scale(1);
	}

	50% {
		filter: drop-shadow(0 3px 10px rgba(245, 200, 66, 0.7));
		transform: scale(1.06);
	}
}

.hm-homepage .hm-weekly-chart__podium-label {
	margin: 0 0 0.2rem !important;
	font-size: 0.72rem !important;
	font-weight: 700 !important;
	color: var(--hm-wc-brand) !important;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-family: inherit !important;
}

.hm-homepage .hm-weekly-chart__podium-cover {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	overflow: hidden;
	margin: 0 0 0.35rem;
	line-height: 0;
	background: #e8e8ef;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.hm-homepage .hm-weekly-chart__podium-item--winner .hm-weekly-chart__podium-cover {
	box-shadow: 0 4px 16px rgba(203, 30, 83, 0.22);
}

.hm-homepage .hm-weekly-chart__podium-cover img {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center !important;
}

.hm-homepage .hm-weekly-chart__podium-artist {
	display: block;
	width: 100%;
	font-size: 0.75rem;
	color: #777;
	margin: 0;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hm-homepage .hm-weekly-chart__podium-title {
	margin: 0 0 0.25rem !important;
	width: 100%;
	font-size: 0.9rem !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	font-family: inherit !important;
}

.hm-homepage .hm-weekly-chart__podium-item--winner .hm-weekly-chart__podium-title {
	font-size: 1rem !important;
}

.hm-homepage .hm-weekly-chart__podium-title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--hm-wc-navy) !important;
	text-decoration: none !important;
}

.hm-homepage .hm-weekly-chart__podium-title a:hover {
	color: var(--hm-wc-brand) !important;
}

.hm-homepage .hm-weekly-chart__podium-votes {
	margin: 0 0 0.35rem !important;
	font-size: 0.75rem !important;
	color: #888 !important;
	font-family: inherit !important;
}

.hm-homepage .hm-weekly-chart__podium-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	width: 100%;
	margin-top: 0.1rem;
}

.hm-homepage .hm-weekly-chart__podium-play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	width: 100%;
	padding: 0.45rem 0.7rem;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--hm-wc-brand), var(--hm-wc-brand-2));
	color: #fff !important;
	font-family: inherit !important;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(203, 30, 83, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hm-homepage .hm-weekly-chart__podium-play svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	flex-shrink: 0;
}

.hm-homepage .hm-weekly-chart__podium-play:hover {
	transform: scale(1.03);
	box-shadow: 0 4px 14px rgba(203, 30, 83, 0.4);
}

.hm-homepage .hm-weekly-chart__podium-link {
	font-size: 0.75rem;
	color: var(--hm-wc-navy) !important;
	text-decoration: underline !important;
	font-family: inherit !important;
}

.hm-homepage .hm-weekly-chart__empty {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 1.5rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.9);
	font-size: 1rem;
}

/* === Responsive === */

@media (max-width: 1100px) {
	.hm-homepage .hm-weekly-chart__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.hm-homepage .hm-weekly-chart__podium {
		grid-template-columns: 1fr;
		align-items: stretch;
		gap: 0.55rem;
		max-width: 320px;
		margin-inline: auto;
	}

	.hm-homepage .hm-weekly-chart__podium-item,
	.hm-homepage .hm-weekly-chart__podium-item--rank-1,
	.hm-homepage .hm-weekly-chart__podium-item--rank-2,
	.hm-homepage .hm-weekly-chart__podium-item--rank-3 {
		order: unset;
		transform: none;
	}

	.hm-homepage .hm-weekly-chart__podium-item--winner {
		order: -1;
	}
}

@media (max-width: 700px) {
	.hm-homepage .hm-weekly-chart__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.hm-homepage .hm-weekly-chart__inner {
		padding: 1rem 0.75rem 0.9rem;
	}

	.hm-homepage .hm-weekly-chart__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.4rem;
	}

	.hm-homepage .hm-weekly-chart__card-thumb {
		width: 42px;
		height: 42px;
	}

	.hm-homepage .hm-weekly-chart__podium {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {

	.hm-homepage .hm-weekly-chart__inner::after,
	.hm-homepage .hm-weekly-chart__podium-item--winner .hm-weekly-chart__podium-medal {
		animation: none;
	}
}

/* Light theme adjustments */
html[data-hm-theme="light"] .hm-homepage .hm-weekly-chart__inner {
	box-shadow: 0 8px 32px rgba(32, 33, 90, 0.12);
}