/* ============================================================
   WML Menu — navigation (nav bar + dropdown + mega)
   Colors are injected per-instance via a scoped <style> in render().
   This file owns layout, spacing, transitions and structure.
   ============================================================ */

.wml-menu {
    position: relative;
    width: 100%;
    z-index: 190;
    font-family: 'General Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wml-menu--sticky {
    position: sticky;
    top: 0;
}

/* Editor: keep static & low so it can be click-selected */
.wml-menu--builder {
    position: static !important;
    z-index: auto !important;
}

/* ---------------- Bar ---------------- */
.wml-menu-bar {
    width: 100%;
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background .4s, backdrop-filter .4s, border-color .4s, box-shadow .4s;
}

.wml-menu-bar.is-scrolled {
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 4px 40px rgba(0, 0, 0, .35);
}

.wml-menu-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
    padding: 18px 48px;
    box-sizing: border-box;
}

/* ---------------- Logo ---------------- */
.wml-menu-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

.wml-menu-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #22e58c;
    color: #06210f;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 8px 24px -6px rgba(34, 229, 140, .6);
}

.wml-menu-logo-text {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: .5px;
    color: #fff;
}

.wml-menu-logo-accent { color: #22e58c; }

.wml-menu-logo-img {
    display: block;
    height: 40px;          /* explicit height so SVGs (no intrinsic size) render */
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

/* ---------------- Nav ---------------- */
.wml-menu-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.wml-mn-item { position: relative; }

.wml-menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #aeb6c4;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 16px;
    transition: color .3s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.wml-menu-link:hover { color: #fff; }

.wml-menu-underline {
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    height: 1.5px;
    background: #22e58c;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.wml-menu-link:hover .wml-menu-underline,
.wml-mn-item.is-open .wml-menu-underline { transform: scaleX(1); }

.wml-mn-chev {
    display: inline-flex;
    color: inherit;
    transition: transform .3s, color .3s;
}
.wml-mn-chev svg { width: 12px; height: 12px; }

.wml-mn-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #06210f;
    background: #22e58c;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 2px;
}

/* ---------------- Actions ---------------- */
.wml-menu-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.wml-menu-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    background: #22e58c;
    color: #06210f;
    text-decoration: none;
    font-weight: 700;
    font-size: 14.5px;
    white-space: nowrap;
    box-shadow: 0 10px 30px -8px rgba(34, 229, 140, .5);
    transition: transform .25s, box-shadow .25s;
}
.wml-menu-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -8px rgba(34, 229, 140, .7); }

/* ============================================================
   PANELS (dropdown + mega) — hidden until .is-open on the item
   ============================================================ */
.wml-mn-panel {
    position: absolute;
    top: 100%;
    padding-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1), visibility .3s;
    z-index: 50;
}
.wml-mn-item.is-open .wml-mn-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown */
.wml-mn-drop { left: 50%; transform: translateX(-50%) translateY(10px); width: 340px; }
.wml-mn-item.is-open .wml-mn-drop { transform: translateX(-50%) translateY(0); }

.wml-mn-drop-card {
    border-radius: 18px;
    background: #12182a;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7);
    padding: 10px;
    overflow: hidden;
}

.wml-mn-drop-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: background .25s;
}

.wml-mn-drop-ico {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(34, 229, 140, .1);
    border: 1px solid rgba(34, 229, 140, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22e58c;
}
.wml-mn-drop-ico svg { width: 19px; height: 19px; }

.wml-mn-drop-text { display: flex; flex-direction: column; gap: 2px; }
.wml-mn-drop-title { font-size: 14.5px; font-weight: 600; color: #eef2f6; }
.wml-mn-drop-desc { font-size: 12.5px; color: #717a8b; line-height: 1.35; }

.wml-mn-drop-foot {
    margin-top: 6px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.wml-mn-drop-foot span { font-size: 12.5px; color: #717a8b; }
.wml-mn-drop-foot a { font-size: 12.5px; font-weight: 600; color: #22e58c; text-decoration: none; }

/* Mega */
.wml-mn-mega {
    left: 0;
    width: min(960px, 86vw);
}
/* center large mega under the bar */
.wml-mn-item--mega { position: static; }
.wml-mn-item--mega .wml-mn-mega {
    left: 24px;
    right: 24px;
    width: auto;
}

.wml-mn-mega-card {
    position: relative;
    border-radius: 22px;
    background: #12182a;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 36px 90px -24px rgba(0, 0, 0, .75);
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.1fr;
    gap: 14px;
    overflow: hidden;
}

.wml-mn-mega-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    right: -40px;
    top: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 229, 140, .1), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}

.wml-mn-mega-col { position: relative; }

.wml-mn-mega-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #5b6577;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.wml-mn-mega-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none;
    color: #aeb6c4;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.wml-mn-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #06210f;
    background: #22e58c;
    padding: 2px 6px;
    border-radius: 5px;
}

.wml-mn-mega-feat {
    position: relative;
    border-radius: 16px;
    padding: 22px;
    background: linear-gradient(160deg, rgba(34, 229, 140, .1), rgba(11, 16, 28, .6));
    border: 1px solid rgba(34, 229, 140, .2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}
.wml-mn-feat-eyebrow {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    color: #7df0b4;
    margin-bottom: 12px;
}
.wml-mn-feat-title { font-size: 21px; font-weight: 600; color: #fff; margin-bottom: 8px; line-height: 1.1; }
.wml-mn-feat-desc { font-size: 13.5px; color: #9aa3b3; line-height: 1.55; margin: 0; }
.wml-mn-feat-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 11px 18px;
    border-radius: 11px;
    background: #22e58c;
    color: #06210f;
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: 0 10px 26px -10px rgba(34, 229, 140, .7);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .wml-menu-inner { padding: 14px 24px; flex-wrap: wrap; }
    .wml-menu-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .wml-menu-link { padding: 8px 12px; font-size: 14px; }
}
