/**
 * Fullscreen dropdown menu styles.
 *
 * @package Hamechadesh
 */

/* ==========================================================================
   Category Color Palette (cycled for dynamic categories)
   ========================================================================== */

:root {
	--hm-cat-palette-0: #E8505B;
	--hm-cat-palette-1: #4CAF50;
	--hm-cat-palette-2: #9E6E4C;
	--hm-cat-palette-3: #EC4899;
	--hm-cat-palette-4: #EAB308;
	--hm-cat-palette-5: #10B981;
	--hm-cat-palette-6: #F97316;
	--hm-cat-palette-7: #8B5CF6;
	--hm-cat-palette-8: #3B82F6;
	--hm-cat-palette-9: #EF4444;
	--hm-cat-palette-10: #06B6D4;
	--hm-cat-palette-11: #84CC16;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.hm-fullscreen-menu {
	position: fixed;
	inset: 0;
	z-index: var(--hm-z-mobile-menu);
	background-color: var(--hm-color-bg);
	overflow-y: auto;
	overflow-x: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--hm-transition-base), visibility var(--hm-transition-base);
}

.hm-fullscreen-menu.is-open {
	opacity: 1;
	visibility: visible;
}

/* Scroll lock on body */
body.hm-menu-open {
	overflow: hidden;
}

/* ==========================================================================
   Header State — Menu Open
   Header always above overlay (no z-index toggle = no flash).
   ========================================================================== */

.hm-header {
	z-index: calc(var(--hm-z-mobile-menu) + 1);
}

/* Fade-out nav and actions smoothly */
.hm-navbar__nav,
.hm-navbar__actions {
	transition: opacity var(--hm-transition-base), visibility var(--hm-transition-base);
}

.hm-menu-open .hm-navbar__nav,
.hm-menu-open .hm-navbar__actions {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* ==========================================================================
   Mail Button — inline in navbar flex flow, collapsed by default
   ========================================================================== */

.hm-navbar__mail-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background-color: var(--hm-color-accent);
	color: #ffffff;
	border-radius: 6px;
	text-decoration: none;
	font-family: var(--hm-font-primary);
	font-size: 16px;
	font-weight: 300;
	line-height: 22px;
	white-space: nowrap;
	padding: 5px 10px;
	/* Hidden by default — not in flex layout */
	display: none;
}

.hm-menu-open .hm-navbar__mail-btn {
	display: inline-flex;
}

.hm-navbar__mail-btn:hover {
	color: #ffffff;
}

.hm-menu-open .hm-navbar__mail-btn:hover {
	opacity: 0.85;
}

.hm-navbar__mail-btn svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* ==========================================================================
   Menu Body (content area below header)
   ========================================================================== */

.hm-fullscreen-menu__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 130px;
	padding-inline: var(--hm-container-padding);
	min-height: 100vh;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.hm-fullscreen-menu__search {
	width: 100%;
	max-width: 1325px;
	padding-block: 30px;
	border-bottom: 1px solid rgba(33, 33, 33, 0.25);
}

.hm-fullscreen-menu__search-form {
	display: flex;
	align-items: center;
	width: 100%;
}

.hm-fullscreen-menu__search-input {
	flex: 1;
	border: none;
	background: none;
	outline: none;
	font-family: var(--hm-font-primary);
	font-size: 20px;
	font-weight: 300;
	line-height: 22px;
	letter-spacing: 1.2px;
	color: var(--hm-color-text);
	text-align: right;
}

.hm-fullscreen-menu__search-input::placeholder {
	color: var(--hm-color-text);
	opacity: 0.5;
}

/* Hide browser-default clear button */
.hm-fullscreen-menu__search-input::-webkit-search-cancel-button,
.hm-fullscreen-menu__search-input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

/* Search action button (submit / clear share the same slot) */
.hm-fullscreen-menu__search-submit,
.hm-fullscreen-menu__search-clear {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	color: var(--hm-color-text);
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__search-submit:hover,
.hm-fullscreen-menu__search-clear:hover {
	opacity: 0.7;
}

.hm-fullscreen-menu__search-icon {
	display: block;
	width: 20px;
	height: 20px;
}

/* ==========================================================================
   Content — Main Flex Container
   ========================================================================== */

.hm-fullscreen-menu__content {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
	max-width: 1350px;
	margin-top: 59px;
	padding-bottom: 60px;
	gap: 40px;
}

/* ==========================================================================
   Navigation Area (flex-wrap container for all category groups)
   ========================================================================== */

.hm-fullscreen-menu__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 39px;
	align-content: flex-start;
	flex: 1;
	min-width: 0;
}

/* ==========================================================================
   Category Group
   ========================================================================== */

.hm-fullscreen-menu__category {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	width: 222px;
}

/* Category Header — dot + name + chevron (RTL: dot right, chevron left) */
.hm-fullscreen-menu__cat-header {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--hm-color-text);
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__cat-header:hover {
	opacity: 0.7;
	color: var(--hm-color-text);
}

.hm-fullscreen-menu__cat-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.hm-fullscreen-menu__cat-name {
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 700;
	line-height: 22px;
	color: var(--hm-color-text);
	white-space: nowrap;
}

.hm-fullscreen-menu__cat-chevron {
	width: 14px;
	height: 9px;
	flex-shrink: 0;
	color: var(--hm-color-text);
	transition: transform var(--hm-transition-fast);
}

/* Category Items (subcategories) */
.hm-fullscreen-menu__cat-items {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hm-fullscreen-menu__cat-item a {
	font-family: var(--hm-font-primary);
	font-size: 20px;
	font-weight: 300;
	line-height: 22px;
	color: var(--hm-color-text);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__cat-item a:hover {
	opacity: 0.7;
	color: var(--hm-color-text);
}

/* ==========================================================================
   Media Column (leftmost — news flashes, VOD, gallery, video)
   Sticky so it stays visible while scrolling long category lists.
   ========================================================================== */

.hm-fullscreen-menu__media {
	display: flex;
	flex-direction: column;
	gap: 39px;
	width: 541px;
	flex-shrink: 0;
	position: sticky;
	top: 140px;
	align-self: flex-start;
}

/* Row containers — items on same row share equal height */
.hm-fullscreen-menu__media-row {
	display: flex;
	gap: 39px;
	align-items: stretch;
}

/* --- Section Heading --- */
.hm-fullscreen-menu__section-title {
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 700;
	line-height: 22px;
	color: var(--hm-color-text);
}

/* --- Section Header Row (title right, badge left) --- */
.hm-fullscreen-menu__section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
}

/* --- Section arrow badge (SVG double-chevron) --- */
.hm-fullscreen-menu__section-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 8px 5px;
	border-radius: 6px;
	text-decoration: none;
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__section-badge:hover {
	opacity: 0.85;
}

.hm-fullscreen-menu__section-badge svg {
	width: 16px;
	height: 12px;
}

/* Badge color variants */
.hm-fullscreen-menu__section-badge--accent {
	background-color: var(--hm-color-accent);
	color: #ffffff;
}

.hm-fullscreen-menu__section-badge--vod {
	background: linear-gradient(110.98deg, var(--hm-color-vod-start) 9.08%, var(--hm-color-vod-end) 85.42%);
	color: #ffffff;
}

.hm-fullscreen-menu__section-badge--green {
	background-color: #55EBB1;
	color: var(--hm-color-text);
}

.hm-fullscreen-menu__section-badge--yellow {
	background-color: #F4C811;
	color: var(--hm-color-text);
}

/* Dynamic variant — color comes from the linked category's ACF setting via
   the --hm-cat-color CSS variable set inline on the badge in fullscreen-menu.php.
   Replaces the legacy --yellow (video) and --green (galleries) hardcoded
   variants while keeping a sensible legacy fallback. */
.hm-fullscreen-menu__section-badge--dynamic {
	background-color: var(--hm-cat-color, #F4C811);
	color: var(--hm-color-text);
}

/* ==========================================================================
   News Flashes Section (כל המבזקים) — first in media column (rightmost)
   ========================================================================== */

.hm-fullscreen-menu__flashes {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	width: 306px;
	position: relative;
}

.hm-fullscreen-menu__flashes-container {
	background-color: #ffffff;
	border-radius: var(--hm-radius-xl);
	width: 100%;
	flex: 1;
	min-height: 0;
	overflow: hidden;
	position: relative;
}

.hm-fullscreen-menu__flashes-scroll {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding-block: 15px;
	padding-inline-start: 15px;
	padding-inline-end: 15px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--hm-color-text) #ececec;
}

/* Flash Card */
.hm-fullscreen-menu__flash-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	padding: 14px;
	background-color: #ffffff;
	border: 0.5px solid rgba(33, 33, 33, 0.25);
	border-radius: 10px;
	position: relative;
	text-decoration: none;
	flex-shrink: 0;
}

.hm-fullscreen-menu__flash-card:hover {
	background-color: #fafafa;
}

/* Flash Meta — dot then time (RTL: dot right, time left) */
.hm-fullscreen-menu__flash-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
}

.hm-fullscreen-menu__flash-time {
	font-family: var(--hm-font-primary);
	font-size: 10px;
	font-weight: 300;
	line-height: 19px;
	color: var(--hm-color-accent);
	white-space: nowrap;
}

.hm-fullscreen-menu__flash-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
}

.hm-fullscreen-menu__flash-dot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hm-fullscreen-menu__flash-title {
	font-family: var(--hm-font-primary);
	font-size: 14px;
	font-weight: 300;
	line-height: 21px;
	color: #191730;
	text-align: right;
	width: 240px;
	min-width: 100%;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.hm-fullscreen-menu__flash-title:hover {
	color: var(--hm-color-link) !important;
}

/* Share button — top-left corner of card (inset-inline-end = left in RTL) */
.hm-fullscreen-menu__flash-share {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	width: 12px;
	height: 12px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--hm-color-text);
	opacity: 0.5;
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__flash-share:hover {
	opacity: 1;
}

.hm-fullscreen-menu__flash-share svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Flashes arrow badge — absolute top-left of flashes section */
.hm-fullscreen-menu__flashes-arrow {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
}

/* ==========================================================================
   VOD Section
   ========================================================================== */

.hm-fullscreen-menu__vod {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 15px;
	width: 196px;
	position: relative;
}

/* VOD heading — identical to .hm-nav-vod > a in header.css */
.hm-fullscreen-menu__vod-link {
	position: relative;
	display: inline-block;
	font-family: var(--hm-font-primary);
	font-size: 32px;
	font-weight: 900;
	line-height: 1;
	background: linear-gradient(110.12deg, var(--hm-color-vod-start) 9.08%, var(--hm-color-vod-end) 85.42%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-box-trim: both;
	text-box-edge: cap alphabetic;
	text-decoration: none;
	transition: opacity var(--hm-transition-fast);
}

.hm-fullscreen-menu__vod-link:hover {
	opacity: 0.85;
}

/* Override dot position for fullscreen menu (top: 0 instead of 4px) */
.hm-fullscreen-menu__vod .hm-nav-vod__dot {
	top: 0;
}

/* VOD Video Card */
.hm-fullscreen-menu__vod-card {
	position: relative;
	width: 196px;
	height: 158px;
	border-radius: var(--hm-radius-xl);
	background-color: var(--hm-color-primary);
	overflow: hidden;
}

.hm-fullscreen-menu__vod-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
}

.hm-fullscreen-menu__vod-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 47px;
	height: 49px;
	color: rgba(255, 255, 255, 0.9);
	pointer-events: none;
}

.hm-fullscreen-menu__vod-badge {
	position: absolute;
	bottom: 14px;
	inset-inline-end: 13px;
	display: inline-flex;
	align-items: center;
	padding: 0 9px;
	border-radius: 6px;
	background: linear-gradient(134.94deg, var(--hm-color-vod-start) 9.08%, var(--hm-color-vod-end) 85.42%);
	font-family: var(--hm-font-primary);
	font-size: 12px;
	font-weight: 300;
	line-height: 22px;
	letter-spacing: 0.72px;
	color: var(--hm-color-text);
}

/* VOD arrow badge */
.hm-fullscreen-menu__vod-arrow {
	position: absolute;
	top: 0px;
	inset-inline-end: 0;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */

.hm-fullscreen-menu__gallery {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 13px;
	width: 249px;
	position: relative;
}

.hm-fullscreen-menu__gallery-card {
	position: relative;
	width: 100%;
	height: 158px;
	border-radius: var(--hm-radius-xl);
	background-color: var(--hm-color-primary);
	overflow: hidden;
}

.hm-fullscreen-menu__gallery-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
}

.hm-fullscreen-menu__gallery-icon {
	position: absolute;
	top: 6px;
	inset-inline-start: 9px;
	width: 25px;
	height: 26px;
	color: rgba(255, 255, 255, 0.9);
	pointer-events: none;
}

/* ==========================================================================
   Video Section
   ========================================================================== */

.hm-fullscreen-menu__video {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 13px;
	width: 249px;
	position: relative;
}

.hm-fullscreen-menu__video-card {
	position: relative;
	width: 100%;
	height: 158px;
	border-radius: var(--hm-radius-xl);
	background-color: var(--hm-color-primary);
	overflow: hidden;
}

.hm-fullscreen-menu__video-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
}

.hm-fullscreen-menu__video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 46px;
	height: 48px;
	color: rgba(255, 255, 255, 0.9);
	pointer-events: none;
}

.hm-fullscreen-menu__video-badge {
	position: absolute;
	bottom: 12px;
	inset-inline-end: 13px;
	display: inline-flex;
	align-items: center;
	padding: 0 9px;
	border-radius: 6px;
	background-color: #F4C811;
	font-family: var(--hm-font-primary);
	font-size: 12px;
	font-weight: 300;
	line-height: 22px;
	letter-spacing: 0.72px;
	color: var(--hm-color-text);
}

/* ==========================================================================
   Mobile Flashes — horizontal swipe (hidden on desktop)
   ========================================================================== */

.hm-fullscreen-menu__mobile-flashes {
	display: none;
}

/* ==========================================================================
   Responsive: Mobile (up to 1023px)
   ========================================================================== */

/* Mobile nav hidden on desktop, desktop nav hidden on mobile */
.hm-fullscreen-menu__nav--mobile {
	display: none;
}

@media (max-width: 1023px) {

	/* --- Header: fixed on top when menu is open so X button is always reachable --- */
	.hm-menu-open .hm-header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
	}

	/* --- Overlay --- */
	.hm-fullscreen-menu {
		overflow-y: auto;
	}

	.hm-fullscreen-menu__body {
		padding-top: 127px;
		padding-inline: 20px;
		padding-bottom: 50px;
		min-height: auto;
		gap: 32px;
	}

	/* --- Toggle desktop/mobile nav --- */
	.hm-fullscreen-menu__nav--desktop {
		display: none;
	}

	.hm-fullscreen-menu__nav--mobile {
		display: flex;
	}

	/* --- Mail button: inside dark bar, icon on right (row-reverse in RTL) --- */
	.hm-navbar__mail-prefix {
		display: none;
	}

	.hm-navbar__brand {
		transition: gap var(--hm-transition-base);
	}

	.hm-menu-open .hm-navbar__brand {
		gap: 0;
	}

	.hm-menu-open .hm-navbar__mail-btn {
		flex-direction: row-reverse;
		padding: 5px 15px;
	}

	/* --- Search: smaller font --- */
	.hm-fullscreen-menu__search {
		padding-block: 17px;
	}

	.hm-fullscreen-menu__search-input {
		font-size: 16px;
		letter-spacing: 0.96px;
	}

	/* --- Mobile flashes: horizontal scroll between search and categories --- */
	.hm-fullscreen-menu__mobile-flashes {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 11px;
		width: 100%;
		max-width: 1325px;
		overflow: hidden;
	}

	.hm-fullscreen-menu__mobile-flashes-track {
		display: flex;
		gap: 15px;
		width: 100%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		cursor: grab;
	}

	.hm-fullscreen-menu__mobile-flashes-track::-webkit-scrollbar {
		display: none;
	}

	.hm-fullscreen-menu__mobile-flash-card {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 3px;
		padding: 14px;
		background-color: #ffffff;
		border: 0.5px solid rgba(33, 33, 33, 0.25);
		border-radius: 10px;
		position: relative;
		flex-shrink: 0;
		width: 290px;
		height: 134px;
		scroll-snap-align: start;
	}

	.hm-fullscreen-menu__mobile-flash-card .hm-fullscreen-menu__flash-meta {
		align-self: flex-start;
	}

	.hm-fullscreen-menu__mobile-flash-card .hm-fullscreen-menu__flash-title {
		font-size: 16px;
		width: auto;
		min-width: 0;
		flex: 1;
	}

	.hm-fullscreen-menu__mobile-flash-card .hm-fullscreen-menu__flash-share {
		top: 14px;
		inset-inline-end: 14px;
	}

	/* --- Content: single column, no media --- */
	.hm-fullscreen-menu__content {
		flex-direction: column;
		margin-top: 0;
		gap: 0;
		padding-bottom: 50px;
	}

	/* --- Nav: single column, right-aligned --- */
	.hm-fullscreen-menu__nav {
		flex-direction: column;
		gap: 0;
		width: 100%;
		padding-inline: 34px;
	}

	/* --- Category group: full width, accordion behavior --- */
	.hm-fullscreen-menu__category {
		width: 100%;
		gap: 0;
		padding-block: 20px;
	}

	/* Subcategories hidden by default on mobile (accordion) */
	.hm-fullscreen-menu__cat-items {
		display: none;
		padding-top: 20px;
	}

	.hm-fullscreen-menu__category.is-expanded .hm-fullscreen-menu__cat-items {
		display: flex;
	}

	/* Chevron rotates when expanded */
	.hm-fullscreen-menu__category.is-expanded .hm-fullscreen-menu__cat-chevron {
		transform: rotate(180deg);
	}

	/* --- Hide desktop media column --- */
	.hm-fullscreen-menu__media {
		display: none;
	}
}

/* ==========================================================================
   Responsive: Small Desktop (1024px – 1349px)
   ========================================================================== */

@media (min-width: 1024px) and (max-width: 1349px) {
	.hm-fullscreen-menu__body {
		padding-top: 110px;
	}

	.hm-fullscreen-menu__content {
		margin-top: 40px;
		gap: 24px;
	}

	.hm-fullscreen-menu__category {
		width: 180px;
	}

	.hm-fullscreen-menu__cat-name {
		font-size: 19px;
	}

	.hm-fullscreen-menu__cat-item a {
		font-size: 17px;
	}

	.hm-fullscreen-menu__media {
		width: 420px;
		gap: 20px;
		top: 120px;
	}

	.hm-fullscreen-menu__media-row {
		gap: 20px;
	}

	.hm-fullscreen-menu__vod {
		width: 170px;
	}

	.hm-fullscreen-menu__vod-card {
		width: 170px;
		height: 137px;
	}

	.hm-fullscreen-menu__flashes {
		width: 246px;
	}

	.hm-fullscreen-menu__flashes-container {
		height: 300px;
	}

	.hm-fullscreen-menu__flash-title {
		width: 200px;
	}

	.hm-fullscreen-menu__gallery,
	.hm-fullscreen-menu__video {
		width: 208px;
	}

	.hm-fullscreen-menu__gallery-card,
	.hm-fullscreen-menu__video-card {
		height: 137px;
	}

}

/* ==========================================================================
   Responsive: Desktop (1350px+) — Matches Figma
   ========================================================================== */

@media (min-width: 1350px) {
	.hm-fullscreen-menu__body {
		padding-top: 130px;
	}
}
