/*
 * Mobile / tablet menu. Reproduces the live hand-coded menu as it actually renders there,
 * including the Elementor kit styles that override parts of it (Gibson uppercase headings,
 * purple 60px Back/close buttons). Panels slide in from the right; deeper levels stack on top.
 */

.ew-mm[hidden] { display: none; }

.ew-mm { position: relative; z-index: 10002; font-family: Arial, sans-serif; }
.ew-mm__overlay { position: fixed; inset: 0; z-index: 990; background-color: rgba(0, 0, 0, .6); }

.ew-mm__panel {
	position: fixed;
	top: 0;
	right: -100%;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 380px;
	height: 100vh;
	overflow-y: auto;
	background-color: #2a1b3d;
	box-shadow: -5px 0 15px rgba(0, 0, 0, .2);
	color: #fff;
	font-family: Arial, sans-serif;
	visibility: hidden;
	transition: transform .4s cubic-bezier(.77, 0, .175, 1), visibility 0s .4s;
}
.ew-mm__panel.is-active { transform: translateX(-100%); visibility: visible; transition: transform .4s cubic-bezier(.77, 0, .175, 1); }

/* Header */
.ew-mm__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
	background-color: #221631;
}
.ew-mm__logo { flex-grow: 1; padding: 10px 0; text-align: left; line-height: 24px; }
.ew-mm__logo .ew-logo { display: inline; }
.ew-mm__logo .ew-logo img { width: auto; max-width: 180px; max-height: 40px; object-fit: contain; vertical-align: baseline; }
.ew-mm__back,
.ew-mm__close,
.ew-mm__back:hover,
.ew-mm__close:hover,
.ew-mm__back:focus,
.ew-mm__close:focus {
	display: block;
	padding: 20px 40px;
	background-color: var(--ew-purple);
	color: #fff;
	font-family: var(--ew-font-gibson);
	font-size: 20px;
	font-weight: 700;
	line-height: 1em;
	text-transform: uppercase;
}
.ew-mm__back { min-width: 80px; text-align: left; }
.ew-mm__back:hover,
.ew-mm__close:hover,
.ew-mm__back:focus-visible,
.ew-mm__close:focus-visible { background-color: var(--ew-off-white); color: var(--ew-purple); }

/* Level 1 */
.ew-mm__grid { display: grid; flex: 1; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 20px; }
.ew-mm__tile,
.ew-mm__tile:hover,
.ew-mm__tile:focus {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 120px;
	padding: 10px;
	overflow: hidden;
	border-radius: 10px;
	background-color: rgba(255, 255, 255, .1);
	box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
	color: #fff;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	transition: all .3s ease;
}
.ew-mm__tile:hover { transform: translateY(-5px); background-color: rgba(255, 255, 255, .2); box-shadow: 0 8px 15px rgba(0, 0, 0, .2); }
.ew-mm__tile-icon { display: flex; justify-content: center; align-items: center; margin-bottom: 10px; color: #f5a623; transition: all .3s ease; }
.ew-mm__tile-icon .ew-icon { width: 28px; height: 28px; vertical-align: baseline; }
.ew-mm__tile:hover .ew-mm__tile-icon { transform: scale(1.1); }
.ew-mm__tile-title {
	display: block;
	color: #fff;
	font-family: var(--ew-font-gibson);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.1em;
	text-transform: uppercase;
}

/* Level 2 */
.ew-mm__cats { display: grid; flex: 1; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 20px; }
.ew-mm__cat,
.ew-mm__cat:hover,
.ew-mm__cat:focus {
	display: block;
	height: 160px;
	min-height: 160px;
	padding: 0;
	overflow: hidden;
	border-radius: 10px;
	background: transparent center / cover no-repeat;
	box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
	cursor: pointer;
	transition: all .3s ease;
}
.ew-mm__cat:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, .2); }

/* Level 3 */
.ew-mm__sub { display: flex; flex: 1; flex-direction: column; padding: 15px 20px; }
.ew-mm__sub-title {
	margin: 0;
	color: #fff;
	font-family: var(--ew-font-gibson);
	font-size: 35px;
	font-weight: 900;
	line-height: 1.1em;
	text-transform: uppercase;
}
.ew-mm__sub-text { margin: 0 0 20px; color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.4; }
.ew-mm__view-all,
.ew-mm__view-all:hover {
	display: block;
	margin-bottom: 20px;
	padding: 12px;
	border-radius: 8px;
	background-color: #f5a623;
	color: #2a1b3d;
	font-family: var(--ew-font-gibson);
	font-weight: 600;
	text-align: center;
	transition: all .3s ease;
}
.ew-mm__view-all:hover { background-color: #e09416; transform: translateY(-2px); }
.ew-mm__subs { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.ew-mm__subtile {
	display: block;
	height: 120px;
	overflow: hidden;
	border-radius: 10px;
	background: center / cover no-repeat;
	box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
	transition: all .3s ease;
}
.ew-mm__subtile:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, .2); }

/* Help card */
.ew-mm__help {
	/* The live CSS sets margin-top:auto and then overrides it with this shorthand, so the card
	   follows the content rather than sitting at the bottom. */
	margin: 0 20px 20px;
	padding: 20px;
	border-radius: 10px;
	background-color: rgba(0, 0, 0, .15);
	text-align: center;
}
.ew-mm__help p { margin: 0 0 15px; color: rgba(255, 255, 255, .9); font-size: 14px; }
.ew-mm__call,
.ew-mm__call:hover {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 25px;
	border-radius: 25px;
	background-color: #f5a623;
	color: #2a1b3d;
	font-weight: 700;
	transition: all .3s ease;
}
.ew-mm__call:hover { background-color: #e09416; transform: translateY(-2px); }
.ew-mm__call-icon { display: block; margin-right: 8px; animation: ew-pulse 2s infinite; }
@keyframes ew-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

@media (max-width: 480px) {
	.ew-mm__panel { max-width: 100%; }
	.ew-mm__tile-title { font-size: 14px; }
	.ew-mm__help { padding: 15px; }
	.ew-mm__tile-icon .ew-icon { width: 24px; height: 24px; }
	.ew-mm__tile, .ew-mm__subtile { height: 100px; }
}

@media (max-height: 700px) {
	.ew-mm__grid, .ew-mm__cats { gap: 10px; padding: 15px; }
	.ew-mm__subs { gap: 15px; }
	.ew-mm__sub-text { margin-bottom: 15px; }
	.ew-mm__help { padding: 15px; margin-bottom: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.ew-mm__panel, .ew-mm__panel.is-active { transition: none; }
	.ew-mm__call-icon { animation: none; }
}

/* The menu is for mobile and tablet only. */
@media (min-width: 1025px) { .ew-mm { display: none !important; } }
