/* ── Mega-Menu Navigation ──────────────────────────────────────── */
header.site-header { overflow: visible !important; }
.nav-mega-item { position: static; display: flex; align-items: center; }
.nav-mega-trigger {
    background: none; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .6rem; font-size: .9rem; font-weight: 500;
    color: #475569; font-family: 'Inter', sans-serif;
    border-radius: 6px; transition: color .2s, background .2s; white-space: nowrap;
}
.nav-mega-trigger:hover, .nav-mega-trigger.mm-active { color: #4f46e5; background: rgba(99,102,241,.06); }
.nav-chevron { font-size: .6rem; transition: transform .2s; opacity: .55; margin-left: .15rem; }
.nav-mega-trigger.mm-active .nav-chevron { transform: rotate(180deg); }
[dir=rtl] .nav-chevron { margin-left: 0; margin-right: .15rem; }

/* ── Panel shell — transparent wrapper, creates inset from edges ── */
.mega-panel {
    position: absolute; top: 100%; left: 0; right: 0;
    background: transparent;
    border-top: none;
    box-shadow: none;
    z-index: 100; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
    pointer-events: none;
    padding: 0 2rem 1.5rem;
}
.mega-panel.mega-open {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility 0s 0s;
    pointer-events: auto;
}

/* ── Inner card — the actual floating card ───────────────────── */
.mega-inner {
    max-width: 1160px; margin: 0 auto;
    padding: 2.25rem 2.5rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 56px rgba(15,23,42,.11), 0 4px 16px rgba(15,23,42,.06);
    border: 1px solid #e8ecf4;
    margin-top: 4px;
}
/* Resources panel: 3 columns */
.mega-panel--sm .mega-inner {
    grid-template-columns: 1fr 1.1fr .85fr;
    max-width: 1060px;
}

/* Column separators via padding + left border */
.mega-col { padding: 0 2rem; }
.mega-col:first-child { padding-left: 0; }
.mega-col:last-child  { padding-right: 0; }
.mega-col + .mega-col { border-left: 1px solid #f1f5f9; }

/* ── Column label ─────────────────────────────────────────────── */
.mega-col-label {
    font-size: .64rem; font-weight: 700; letter-spacing: .1em;
    color: #94a3b8; text-transform: uppercase;
    margin-bottom: 1.1rem; padding: 0 .25rem;
}

/* ── Tool items ───────────────────────────────────────────────── */
.mega-item {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: .75rem .5rem; border-radius: 8px; text-decoration: none;
    transition: background .15s; margin-bottom: .05rem;
}
.mega-item:hover { background: #f8fafc; }

/* Icon — simple neutral, no colored circle backgrounds */
.mega-icon {
    width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; transition: color .15s;
}
.mega-item:hover .mega-icon { color: #4f46e5; }

/* Override old colored classes — all neutral now */
.mega-icon--indigo,
.mega-icon--violet,
.mega-icon--teal,
.mega-icon--sky,
.mega-icon--amber,
.mega-icon--rose,
.mega-icon--orange { background: none; color: #94a3b8; }
.mega-item:hover .mega-icon--indigo,
.mega-item:hover .mega-icon--violet,
.mega-item:hover .mega-icon--teal,
.mega-item:hover .mega-icon--sky,
.mega-item:hover .mega-icon--amber,
.mega-item:hover .mega-icon--rose,
.mega-item:hover .mega-icon--orange { color: #4f46e5; }

.mega-text { display: flex; flex-direction: column; gap: .2rem; }
.mega-text strong {
    font-size: .975rem; font-weight: 600; color: #0f172a; line-height: 1.3;
    transition: color .15s;
}
.mega-text span { font-size: .8rem; color: #64748b; line-height: 1.45; }
.mega-item:hover .mega-text strong { color: #4f46e5; }

/* ── Blog items (Resources panel) ────────────────────────────── */
.mega-blog-item {
    display: flex; flex-direction: column; gap: .28rem;
    padding: .85rem .75rem; border-radius: 9px; text-decoration: none;
    transition: background .15s, border-color .15s;
    border: 1px solid transparent; margin-bottom: .35rem;
}
.mega-blog-item:last-child { margin-bottom: 0; }
.mega-blog-item:hover { background: #f8fafc; border-color: #e2e8f0; }
.mega-blog-tag {
    font-size: .64rem; font-weight: 700; letter-spacing: .06em;
    color: #4f46e5; text-transform: uppercase; margin-bottom: .05rem;
}
.mega-blog-item > strong {
    font-size: .9rem; font-weight: 600; color: #0f172a; line-height: 1.4;
}
.mega-blog-item > span { font-size: .78rem; color: #64748b; line-height: 1.45; }

/* ── RTL ──────────────────────────────────────────────────────── */
[dir=rtl] .mega-inner { direction: rtl; }
[dir=rtl] .mega-item { flex-direction: row-reverse; }
[dir=rtl] .mega-col-label { text-align: right; }
[dir=rtl] .mega-col { padding: 0 2rem; }
[dir=rtl] .mega-col:first-child { padding-right: 0; padding-left: 2rem; }
[dir=rtl] .mega-col:last-child  { padding-left: 0; padding-right: 2rem; }
[dir=rtl] .mega-col + .mega-col { border-left: none; border-right: 1px solid #f1f5f9; }

/* ── Custom Plans CTA card (Resources 3rd col) ──────────────── */
.mega-cta-card {
    background: linear-gradient(145deg, #f0f2ff 0%, #f8fafc 100%);
    border: 1.5px solid rgba(99,102,241,.2);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.4rem;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}
.mega-cta-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 14px 14px 0 0;
}
.mega-cta-avatar {
    width: 50px; height: 50px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid #e2e8f0;
    margin-bottom: .85rem;
}
.mega-cta-card strong {
    display: block; font-size: .92rem; font-weight: 700;
    color: #1e293b; margin-bottom: .2rem;
}
.mega-cta-card > span {
    font-size: .78rem; color: #64748b; line-height: 1.45;
}
.mega-cta-desc {
    font-size: .82rem; color: #475569; line-height: 1.6;
    margin-top: .8rem; border-top: 1px solid #f1f5f9; padding-top: .8rem;
}
.mega-cta-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    margin-top: 1rem; font-size: .83rem; font-weight: 600;
    color: #4f46e5; text-decoration: none;
    transition: color .15s, gap .15s;
}
.mega-cta-btn:hover { color: #4338ca; gap: .5rem; }
[dir=rtl] .mobile-mega-header, [dir=rtl] .mobile-mega-link { flex-direction: row-reverse; }

/* ── Mobile accordion ─────────────────────────────────────────── */
.mobile-mega-section { width: 100%; }
.mobile-mega-header {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    background: none; border: none; border-bottom: 1px solid #f1f5f9; cursor: pointer;
    padding: .85rem 0; font-size: .95rem; font-weight: 600; color: #1e293b;
    font-family: 'Inter', sans-serif;
}
.mobile-mega-header .mmh-chevron { font-size: .7rem; color: #94a3b8; transition: transform .2s; }
.mobile-mega-header.mm-mob-open .mmh-chevron { transform: rotate(180deg); }
.mobile-mega-body { display: none; padding: .4rem 0 .6rem .5rem; }
.mobile-mega-body.mm-mob-open { display: block; }
.mobile-mega-link {
    display: flex; align-items: center; gap: .65rem; padding: .55rem .5rem;
    border-radius: 8px; text-decoration: none; color: #475569; font-size: .88rem;
    font-weight: 500; transition: background .15s, color .15s;
}
.mobile-mega-link:hover { background: #f1f5f9; color: #4f46e5; }
.mm-icon {
    width: 26px; height: 26px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8;
}

/* ── Mobile menu polish ───────────────────────────────────────── */
.mobile-mega-header:hover { background: #f8fafc; border-radius: 8px; padding-left: .5rem; padding-right: .5rem; }
.mobile-mega-header.mm-mob-open { color: #4f46e5; border-bottom-color: #e0e7ff; }
.mobile-mega-header.mm-mob-open .mmh-chevron { color: #4f46e5; }
.mobile-mega-section + .mobile-mega-section { margin-top: .15rem; }

/* Pricing tag icon — tinted indigo, not gray */
.mobile-nav-link .fa-tag { color: #4f46e5 !important; }

/* ── Solutions panel decorative bottom-right corner ──────────── */
#megaSolutionsPanel .mega-inner { position: relative; overflow: hidden; }
#megaSolutionsPanel .mega-inner::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background:
        radial-gradient(circle at 65% 65%, rgba(99,102,241,.13) 0%, transparent 60%),
        radial-gradient(circle 3px at 0 0, rgba(99,102,241,.25) 100%, transparent 100%);
    background-size: 100% 100%, 18px 18px;
    pointer-events: none;
    border-radius: 50%;
}

/* ── Mega panel footer "View all tools" strip ─────────────────── */
.mega-panel-footer {
    border-top: 1px solid #e2e8f0;
    padding: .6rem 2rem;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}
.mega-panel-footer-link {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .78rem; font-weight: 600; color: #4f46e5;
    text-decoration: none;
    transition: gap .15s;
}
.mega-panel-footer-link:hover { gap: .7rem; }
[dir=rtl] .mega-panel-footer { text-align: right; }

/* ── Mobile "View all tools" separator link ───────────────────── */
.mobile-mega-link--all {
    margin-top: .35rem;
    border-top: 1px solid #e2e8f0;
    padding-top: .55rem !important;
    font-weight: 600 !important;
    color: #4f46e5 !important;
}

/* ── Hide panels on mobile ────────────────────────────────────── */
@media (max-width: 768px) { .mega-panel { display: none !important; } }
