/* Desktop services menu: views/layouts/_mega-menu.php; behaviour in assets/js/mega-menu.js */
.mm-drop { position: absolute; top: 100%; left: 50%; z-index: 4444; width: min(1180px, calc(100vw - 48px)); padding-top: 16px; visibility: hidden; transform: translateX(-50%); transition: visibility .3s; }
.mm:hover .mm-drop, .mm:focus-within .mm-drop { visibility: visible; }
.mm-deck { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 200px minmax(0, 1fr) 480px; gap: 14px; height: min(470px, calc(100vh - 170px)); padding: 16px; border-radius: 30px; color: #fff; background: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.4px) 0 0 / 18px 18px, linear-gradient(160deg, #0B0920, #16123A 55%, #221A5C); box-shadow: 0 46px 80px -30px rgba(17, 14, 45, .85), 0 0 0 1px rgba(255, 255, 255, .07); clip-path: inset(0 0 100% 0 round 30px); opacity: 0; transition: clip-path .46s cubic-bezier(.2, .85, .2, 1), opacity .2s; }
.mm:hover .mm-deck, .mm:focus-within .mm-deck { clip-path: inset(-2px -2px -2px -2px round 30px); opacity: 1; }
.mm-stars { position: absolute; inset: 0; z-index: -1; background: radial-gradient(1.2px 1.2px at 14% 22%, #fff, transparent), radial-gradient(1px 1px at 34% 78%, rgba(255, 255, 255, .8), transparent), radial-gradient(1.4px 1.4px at 58% 16%, #fff, transparent), radial-gradient(1.2px 1.2px at 84% 64%, #fff, transparent); }
.mm-glow { position: absolute; z-index: -1; top: 8%; width: 520px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(238, 93, 56, .42), rgba(155, 123, 255, .16) 60%, transparent); }
[dir="rtl"] .mm-glow { left: -110px; }
[dir="ltr"] .mm-glow { right: -110px; }

.mm-rail { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 22px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.mm-ink { position: absolute; left: 8px; right: 8px; top: 8px; height: 68px; border-radius: 16px; background: linear-gradient(135deg, #EE5D38, #C8421F); box-shadow: 0 14px 26px -12px rgba(238, 93, 56, .9); transition: transform .34s cubic-bezier(.3, 1.3, .5, 1), height .3s; }
.mm-tab { position: relative; display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 12px; border-radius: 16px; color: rgba(255, 255, 255, .72); text-align: start; transition: color .2s; }
.mm-tab.is-on { color: #fff; }
.mm-tab > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .1); }
.mm-tab b { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
.mm-tab small { opacity: .6; font-size: 11px; }

.mm-lists { position: relative; min-width: 0; }
.mm-list { position: absolute; inset: 0; margin: 0; padding: 2px 4px; overflow-y: auto; list-style: none; visibility: hidden; opacity: 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.mm-list.is-on { visibility: visible; opacity: 1; }
.mm-list.is-on li { animation: mmIn .32s calc(var(--i) * 26ms) backwards; }
@keyframes mmIn { from { opacity: 0; transform: translateX(var(--mm-from, 14px)); } }
[dir="ltr"] .mm-list { --mm-from: -14px; }
.mm-list a { position: relative; display: block; padding: 8px 14px; border-radius: 13px; color: rgba(255, 255, 255, .78); font-size: 13px; font-weight: 600; line-height: 1.7; transition: background .18s, color .18s, padding .18s; }
.mm-list a.is-on { padding-inline-start: 24px; color: #fff; background: rgba(255, 255, 255, .1); }
.mm-list a::before { content: ""; position: absolute; top: 50%; inset-inline-start: 11px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #FF9A6B; box-shadow: 0 0 10px #EE5D38; opacity: 0; transition: opacity .18s; }
.mm-list a.is-on::before { opacity: 1; }

.mm-stage { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px 18px 16px; border-radius: 22px; color: #fff; text-align: center; background: linear-gradient(170deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.mm-orb { position: absolute; top: 10px; left: 50%; width: 170px; height: 170px; margin-left: -85px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 154, 107, .5), rgba(155, 123, 255, .14) 62%, transparent 72%); }
.mm-stage img { position: relative; display: block; align-self: center; width: auto; height: 210px; max-width: 100%; object-fit: contain; animation: mmFloat 4.5s ease-in-out infinite; }
.mm-stage img:not([src]), .mm-stage img[src=""] { visibility: hidden; }
@keyframes mmFloat { 50% { transform: translateY(-7px); } }
.mm-stage.is-swap img { animation: mmSwap .42s cubic-bezier(.2, 1.2, .4, 1), mmFloat 4.5s .42s ease-in-out infinite; }
@keyframes mmSwap { from { opacity: 0; transform: scale(.82) translateY(14px); } }
.mm-disc { align-self: center; width: 170px; height: 14px; margin-top: -4px; border-radius: 50%; background: radial-gradient(closest-side, rgba(238, 93, 56, .7), transparent); }
.mm-stage strong { margin-top: 10px; font-size: 19px; line-height: 1.6; }
.mm-text { flex: 1; min-height: 0; margin-top: 2px; overflow: hidden; color: rgba(255, 255, 255, .72); font-size: 12.5px; line-height: 1.9; }
.mm-stage.is-swap strong, .mm-stage.is-swap .mm-text { animation: mmText .34s .05s backwards; }
@keyframes mmText { from { opacity: 0; transform: translateY(8px); } }
.mm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mm-count { padding: 3px 10px; border-radius: 20px; font-size: 11px; background: rgba(255, 255, 255, .1); }
.mm-count:empty { background: none; }
.mm-go { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 12px; font-size: 12px; font-weight: 700; background: #EE5D38; transition: transform .2s; }
.mm-stage:hover .mm-go { transform: translateX(var(--mm-go, -3px)); }
[dir="ltr"] .mm-stage { --mm-go: 3px; }

.mm-beam { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.mm-beam path { fill: none; }
.mm-beam-line { stroke: rgba(255, 154, 107, .45); stroke-width: 1.4; stroke-dasharray: 4 6; }
.mm-beam-run { stroke: #FFD9C7; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 6px #EE5D38); stroke-dasharray: 26 1000; stroke-dashoffset: 26; opacity: 0; }
.mm-beam.is-run .mm-beam-run { animation: mmRun .55s ease-in forwards; }
@keyframes mmRun { 0% { opacity: 1; stroke-dashoffset: 26; } 90% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: calc(var(--len, 300) * -1px); } }

@media (max-width: 1100px) {
    .mm-deck { grid-template-columns: 180px minmax(0, 1fr); height: 420px; }
    .mm-stage, .mm-beam, .mm-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-deck { transition: opacity .15s; clip-path: none; }
    .mm-stage img, .mm-stage.is-swap img, .mm-list.is-on li { animation: none; }
    .mm-beam-run { display: none; }
}
