/* Mega Menu Toggle – Public CSS */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ── Toggle Button ────────────────────────────────────────────── */
.mm-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: background .2s, transform .15s;
    position: relative;
    z-index: 10001;
    flex-shrink: 0;
}
.mm-toggle-btn:hover { background: rgba(255,255,255,.2); }
.mm-toggle-btn.mm-open { background: #fff; color: #0B1220; border-color: #fff; }
.mm-toggle-btn .ti { line-height: 1; }

/* ── Backdrop ─────────────────────────────────────────────────── */
.mm-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9998;
    /* top set by JS to match navbar bottom */
}
.mm-backdrop.mm-visible { display: block; }

/* ── Panel ────────────────────────────────────────────────────── */
.mm-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #0B1220;
    transform: translateY(-110%);
    transition: transform .35s cubic-bezier(.4,0,.2,1), top .2s ease;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'DM Sans', sans-serif;
    /* top + max-height set dynamically by JS */
    max-height: calc(100vh - 70px);
    height: auto;
}
.mm-panel.mm-open { transform: translateY(0); }
.mm-panel-inner { padding: 0; }

/* ── Columns grid ─────────────────────────────────────────────── */
.mm-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mm-col {
    padding: 28px var(--mm-side-padding, 24px);
    border-right: 1px solid rgba(255,255,255,.08);
}
.mm-col:last-child { border-right: none; }

/* Column title */
.mm-col-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mm-col-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.mm-col-icon img { width: 20px; height: 20px; object-fit: contain; }
.mm-col-icon .ti { font-size: 16px; color: #60a5fa; }
.mm-col-title > span { font-size: 14px; font-weight: 600; color: #fff; }

/* Category row */
.mm-cat-wrap { margin-bottom: 2px; }
.mm-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    gap: 8px;
}
.mm-cat-row:last-of-type { border-bottom: none; }
.mm-cat-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    flex: 1;
    transition: color .15s;
}
a.mm-cat-name:hover { color: #60a5fa; }
.mm-cat-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color .2s;
}
.mm-cat-toggle .ti { font-size: 14px; transition: transform .25s; }
.mm-cat-toggle.mm-cat-open .ti { transform: rotate(180deg); }
.mm-cat-toggle:hover { color: rgba(255,255,255,.8); }

/* Sub items */
.mm-items-wrap { padding: 4px 0 4px 12px; border-left: 1px solid rgba(255,255,255,.1); }
.mm-items-wrap[hidden] { display: none; }
.mm-item {
    display: block;
    padding: 5px 0;
    font-size: 12px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    transition: color .15s;
    line-height: 1.5;
}
.mm-item:hover { color: rgba(255,255,255,.9); }

/* ── Footer ───────────────────────────────────────────────────── */
.mm-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px var(--mm-side-padding, 24px);
    background: rgba(0,0,0,.2);
}
.mm-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.mm-footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.mm-footer-text { min-width: 0; }
.mm-footer-tagline {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}
.mm-footer-desc {
    font-size: 12px;
    color: rgba(255,255,255,.45);
    margin: 0;
    line-height: 1.5;
}
.mm-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.mm-footer-badge {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
}
.mm-footer-badge img { height: 36px; width: auto; object-fit: contain; }
.mm-footer-badge span { font-size: 12px; color: #4ade80; font-weight: 600; }
.mm-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1B6EF3;
    color: #fff !important;
    text-decoration: none !important;
    padding: 9px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}
.mm-footer-btn:hover { background: #1557cc; }
.mm-footer-btn .ti { font-size: 14px; }

/* ── Responsive ───────────────────────────────────────────────── */

/* Tablet — 2 columns */
@media (max-width: 1024px) {
    .mm-columns { grid-template-columns: repeat(2, 1fr); }
    .mm-col { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
    .mm-col:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.08); }
    .mm-col:nth-last-child(-n+2) { border-bottom: none; }
}

/* Mobile — 1 column, full accordion */
@media (max-width: 640px) {
    .mm-columns { grid-template-columns: 1fr; }
    .mm-col { padding: 0; border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.08) !important; }
    .mm-col:last-child { border-bottom: none !important; }
    .mm-col-title {
        padding: 14px 16px 14px;
        margin-bottom: 0;
        border-bottom: none;
        cursor: pointer;
        justify-content: space-between;
    }
    .mm-col-title::after {
        content: '\ea5e';
        font-family: 'tabler-icons';
        font-size: 16px;
        color: rgba(255,255,255,.4);
        transition: transform .25s;
    }
    .mm-col-title.mm-col-open::after { transform: rotate(180deg); }
    .mm-col-body { display: none; padding: 0 16px 14px; }
    .mm-col-body.mm-col-body-open { display: block; }
    .mm-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 16px; }
    .mm-footer-right { width: 100%; justify-content: space-between; }
}
