/* =========================================================
   mod_megamenu — wow effects (pres. + features)
   ========================================================= */

/* ── Aurora Borealis: смещающийся фиолетово-зелёный градиент ── */
.mm-fx-aurora {
    position: relative;
    overflow: hidden;
}
.mm-fx-aurora::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(94,234,212,.15), transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(168,85,247,.18), transparent 60%);
    background-size: 200% 200%;
    animation: mmFxAurora 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.mm-fx-aurora .mm-container { position: relative; z-index: 1; }
@keyframes mmFxAurora {
    0%,100% { background-position: 0% 50%, 100% 50%; }
    50%     { background-position: 100% 50%, 0% 50%; }
}

/* ── Cyberpunk 2077: неоновый розово-голубой + сканлайны ── */
.mm-fx-cyber { position: relative; }
.mm-fx-cyber::after {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent 0, transparent 2px,
        rgba(255,44,223,.025) 2px, rgba(255,44,223,.025) 3px
    );
    pointer-events: none;
    z-index: 0;
}
.mm-fx-cyber .mm-container { position: relative; z-index: 1; }
.mm-fx-cyber .mm-link:hover {
    text-shadow: 0 0 8px rgba(255,44,223,.7), 0 0 16px rgba(255,44,223,.4);
}
.mm-fx-cyber .mm-cta,
.mm-fx-cyber .mm-vc-btn {
    box-shadow: 0 0 20px rgba(255,44,223,.4), 0 0 40px rgba(124,58,237,.25);
}

/* ── Liquid Glass: настоящий glassmorphism с цветным размытием ── */
.mm-fx-liquid {
    background: linear-gradient(135deg,
        rgba(167,139,250,.08) 0%,
        rgba(96,165,250,.08) 50%,
        rgba(52,211,153,.08) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.mm-fx-liquid .mm-megadrop,
.mm-fx-liquid .mm-subdrop {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ── Vintage Newsprint: газетный кремовый с засечками ── */
.mm-fx-vintage {
    background: #f4ead7 !important;
    box-shadow: inset 0 -3px 0 #d4c4a3, 0 1px 0 #1c1916;
}
.mm-fx-vintage .mm-link {
    font-family: Georgia, 'Times New Roman', serif !important;
    font-style: italic;
    letter-spacing: .02em;
}
.mm-fx-vintage .mm-link:hover {
    text-decoration: underline;
    text-decoration-style: double;
    text-underline-offset: 4px;
}

/* ── Holographic: переливающийся радужный акцент ── */
.mm-fx-holo .mm-link::after {
    background: linear-gradient(90deg,
        #ff00cc, #ff8800, #ffff00, #00ff88, #00ccff, #aa44ff, #ff00cc) !important;
    background-size: 400% 100% !important;
    animation: mmFxHoloShift 4s linear infinite !important;
}
.mm-fx-holo .mm-cta,
.mm-fx-holo .mm-vc-btn {
    background: linear-gradient(90deg, #ff00cc, #00ccff, #aa44ff, #ff00cc) !important;
    background-size: 300% 100% !important;
    animation: mmFxHoloShift 6s linear infinite !important;
}
@keyframes mmFxHoloShift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* ── Mercury: жидкий металл, серебристые блики ── */
.mm-fx-mercury {
    background: linear-gradient(180deg,
        #404048 0%, #2c2c33 50%, #1a1a1f 100%) !important;
}
.mm-fx-mercury::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(105deg,
        transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: mmFxMercurySheen 6s ease-in-out infinite;
    pointer-events: none;
}
.mm-fx-mercury .mm-container { position: relative; z-index: 1; }
@keyframes mmFxMercurySheen {
    0%,100% { background-position: -100% 0; }
    50%     { background-position: 200% 0; }
}

/* ── Sakura: нежно-розовый с лепестками ── */
.mm-fx-sakura {
    background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%) !important;
}
.mm-fx-sakura .mm-link:hover {
    background: rgba(225,29,72,.08);
    border-radius: 6px;
}

/* ── Deep Ocean: градиент бирюза → темносиний ── */
.mm-fx-ocean {
    background: linear-gradient(180deg, #0a3d5c 0%, #062a4c 100%) !important;
}
.mm-fx-ocean .mm-link::after {
    box-shadow: 0 0 8px rgba(103,232,249,.6);
}
.mm-fx-ocean::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% -50%, rgba(103,232,249,.15), transparent 60%);
    pointer-events: none;
}
.mm-fx-ocean .mm-container { position: relative; z-index: 1; }

/* ── Solar Flare: чёрный с оранжевым свечением вокруг активного ── */
.mm-fx-solar .mm-level-1 > .mm-link:hover,
.mm-fx-solar .mm-level-1.mm-open > .mm-link,
.mm-fx-solar .mm-link.mm-active {
    box-shadow: 0 0 24px rgba(249,115,22,.45), inset 0 0 12px rgba(249,115,22,.15);
    border-radius: 8px;
}

/* ── Carbon Fiber: текстура карбона + золотой акцент ── */
.mm-fx-carbon {
    background:
        repeating-linear-gradient(45deg,
            #1c1c1c 0, #1c1c1c 2px,
            #232323 2px, #232323 4px),
        #1c1c1c !important;
}
.mm-fx-carbon .mm-link::after {
    background: linear-gradient(90deg, #fbbf24, #f59e0b) !important;
    box-shadow: 0 0 12px rgba(251,191,36,.5);
}
.mm-fx-carbon .mm-cta,
.mm-fx-carbon .mm-vc-btn {
    box-shadow: 0 4px 16px rgba(251,191,36,.3),
                inset 0 1px 0 rgba(255,255,255,.15);
}

/* ========================================================= */
/* ── Living NEW badge ── */
.mm-fx-living-badge .mm-badge-new {
    transform-origin: center;
    animation: mmFxBadgeWiggle 10s ease-in-out infinite;
    backface-visibility: hidden;
}
@keyframes mmFxBadgeWiggle {
    0%, 88%, 100% { transform: rotateY(0deg); }
    92%           { transform: rotateY(180deg); }
    96%           { transform: rotateY(360deg); }
}

/* ── Progress bar ── */
.mm-progress {
    position: fixed; left: 0; top: 0;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--mm-acc, #2EC4A0), var(--mm-cta, #4EEBC4));
    box-shadow: 0 0 8px var(--mm-acc, #2EC4A0);
    z-index: 9999;
    transition: width .12s ease-out;
    pointer-events: none;
}

/* ── Command palette ── */
.mm-cmdk-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: flex-start; justify-content: center;
    padding-top: 12vh;
}
.mm-cmdk-backdrop.open { display: flex; animation: mmCmdkFade .15s ease-out; }
@keyframes mmCmdkFade { from {opacity:0} to {opacity:1} }

.mm-cmdk {
    width: 92%; max-width: 580px;
    background: var(--mm-ddbg, #111827);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    overflow: hidden;
    font-family: var(--mm-font, system-ui), sans-serif;
    color: var(--mm-txt, #e5e7eb);
    animation: mmCmdkSlide .2s cubic-bezier(.4,0,.2,1);
}
@keyframes mmCmdkSlide { from { transform: translateY(-12px); opacity:0 } to { transform: translateY(0); opacity:1 } }

.mm-cmdk-input-wrap {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mm-cmdk-input-wrap svg { width: 18px; height: 18px; color: var(--mm-acc, #2EC4A0); flex-shrink: 0; }
.mm-cmdk-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: inherit; font-size: 16px; font-family: inherit;
}
.mm-cmdk-input::placeholder { color: rgba(255,255,255,.35); }
.mm-cmdk-kbd {
    font-size: 11px; font-family: ui-monospace, monospace;
    padding: 3px 7px; border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.5);
    border: 1px solid rgba(255,255,255,.1);
}

.mm-cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.mm-cmdk-list::-webkit-scrollbar { width: 6px; }
.mm-cmdk-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.mm-cmdk-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 8px;
    cursor: pointer;
    transition: background .1s;
    color: inherit; text-decoration: none;
}
.mm-cmdk-item:hover, .mm-cmdk-item.active {
    background: rgba(255,255,255,.06);
}
.mm-cmdk-item.active { background: var(--mm-acc, #2EC4A0); color: #000; }
.mm-cmdk-item-path { flex: 1; font-size: 14px; }
.mm-cmdk-item-path mark {
    background: var(--mm-acc, #2EC4A0); color: #000;
    padding: 0 2px; border-radius: 2px;
}
.mm-cmdk-item.active mark { background: rgba(0,0,0,.3); color: inherit; }
.mm-cmdk-item-arrow { opacity: .4; font-size: 12px; }
.mm-cmdk-empty { padding: 32px; text-align: center; color: rgba(255,255,255,.4); font-size: 14px; }

.mm-cmdk-footer {
    display: flex; align-items: center; gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 11px; color: rgba(255,255,255,.45);
}
.mm-cmdk-footer span { display: inline-flex; align-items: center; gap: 4px; }

/* ── Ролевой переключатель ── */
.mm-role-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.mm-role-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    color: var(--mm-txt, #e5e7eb);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s;
}
.mm-role-btn:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.25);
}
.mm-role-icon { font-size: 16px; line-height: 1; }
.mm-role-arrow { font-size: 10px; opacity: .6; margin-left: 2px; }
@media (max-width: 992px) { .mm-role-label { display: none; } }

.mm-role-dd {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--mm-ddbg, #111827);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,.35);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 200;
}
.mm-role-dd.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mm-role-dd-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--mm-txt, #e5e7eb);
    transition: background .12s;
}
.mm-role-dd-item:hover { background: rgba(255,255,255,.06); }
.mm-role-dd-item .em { font-size: 22px; line-height: 1; flex-shrink: 0; }
.mm-role-dd-item .tx strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.mm-role-dd-item .tx span    { display: block; font-size: 12px; opacity: .65; line-height: 1.35; }
.mm-role-dd-sep {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 4px 8px;
}
.mm-role-dd-hint {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    padding: 6px 12px 8px;
    line-height: 1.4;
}

/* Фильтрация пунктов по роли */
.mm-role-patient .mm-item[data-mm-role="doctor"]   { display: none !important; }
.mm-role-doctor  .mm-item[data-mm-role="patient"]  { display: none !important; }

/* CTA: режим скрыт у врачей */
.mm-role-doctor .mm-cta[data-mm-cta-mode="hide-doctor"],
.mm-role-doctor .mm-vc-btn[data-mm-vc-mode="hide-doctor"] { display: none !important; }
