/* ============================================================
   Nyco Mega Menu — Front-end styles
   The panel lives inside the nav widget's <li>, so the widget's own
   "ul.menu li / li a" rules (flex, padding, colors) also match our markup.
   The resets below use !important where needed to win over widget CSS
   generated by Elementor (which carries a high-specificity wrapper class).
   ============================================================ */

.nyco-mm-panel {
    --nyco-mm-green: #8DC54A;
    --nyco-mm-bullet: #a4db68;
    --nyco-mm-text: #555;
    --nyco-mm-heading-font: "Roboto Condensed", "Arial Narrow", "Segoe UI", Roboto, Arial, sans-serif;
    --nyco-mm-body-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
    text-align: left;
    cursor: default;
    font-family: var(--nyco-mm-body-font);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
}

.nyco-mm-panel li,
.nyco-mm-panel a,
.nyco-mm-panel span {
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: 1.5 !important;
}

.nyco-mm-panel *,
.nyco-mm-panel *::before,
.nyco-mm-panel *::after {
    box-sizing: border-box;
}

/* ── Reset nav-widget rules that leak into the panel ─────────────────── */
.nyco-mm-panel ul,
.nyco-mm-panel li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: 0 !important;
    background: none !important;
    position: static !important;
}

.nyco-mm-panel a {
    display: inline !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    border: 0 !important;
}

.nyco-mm-panel a,
.nyco-mm-panel a:hover,
.nyco-mm-panel a:focus {
    background: none !important;
    text-decoration: none !important;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.nyco-mm-inner {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px 36px;
}

.nyco-mm-heading {
    margin-bottom: 36px;
    text-align: center;
    font-family: var(--nyco-mm-body-font);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--nyco-mm-text);
}

.nyco-mm-grid {
    display: grid;
    grid-template-columns: repeat(var(--nyco-mm-cols, 5), minmax(0, 1fr));
}

.nyco-mm-col {
    padding: 0 22px;
    border-left: 2px solid var(--nyco-mm-green);
}

.nyco-mm-col:first-child {
    border-left: 0;
}

/* Column head: icon + title */
.nyco-mm-panel .nyco-mm-col-head {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px !important;
    color: var(--nyco-mm-text) !important;
}

.nyco-mm-col-icon {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 72px;
    margin-bottom: 14px;
}

.nyco-mm-col-icon img {
    display: block;
    max-width: 100%;
    height: auto;
}

.nyco-mm-panel .nyco-mm-col-title {
    font-family: var(--nyco-mm-heading-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25 !important;
    letter-spacing: .5px !important;
    text-align: center;
    text-transform: uppercase !important;
    color: var(--nyco-mm-text);
}

a.nyco-mm-col-head:hover .nyco-mm-col-title {
    color: var(--nyco-mm-green);
}

/* Category (green bullet) */
.nyco-mm-panel .nyco-mm-cat {
    position: relative !important;
    padding-left: 22px !important;
}

.nyco-mm-panel .nyco-mm-cat + .nyco-mm-cat {
    margin-top: 16px !important;
}

.nyco-mm-cat::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--nyco-mm-bullet);
    border: 1px solid var(--nyco-mm-green);
}

.nyco-mm-panel .nyco-mm-cat-link {
    font-family: var(--nyco-mm-body-font);
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    color: #333 !important;
}

.nyco-mm-panel a.nyco-mm-cat-link:hover {
    color: var(--nyco-mm-green) !important;
}

/* Links (➤) */
.nyco-mm-panel .nyco-mm-links {
    margin-top: 6px !important;
}

.nyco-mm-panel .nyco-mm-links li + li {
    margin-top: 4px !important;
}

.nyco-mm-panel .nyco-mm-link {
    font-family: var(--nyco-mm-body-font);
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    color: var(--nyco-mm-text) !important;
    transition: color .2s ease;
}

.nyco-mm-panel a.nyco-mm-link:hover,
.nyco-mm-panel a.nyco-mm-link:focus-visible {
    color: var(--nyco-mm-green) !important;
}

.nyco-mm-arrow {
    font-size: 13px;
}

/* ── Desktop: dropdown panel ─────────────────────────────────────────── */
@media (min-width: 1025px) {
    .nyco-mm-trigger {
        position: relative !important;
    }

    .nyco-mm-panel {
        position: absolute;
        top: 100%;
        left: 50%;
        z-index: 99999;
        width: min(1300px, calc(100vw - 32px));
        padding-top: 12px; /* hover bridge between the link and the panel */
        transform: translateX(-50%) translateY(10px);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
    }

    /* JS positions the panel centred in the viewport; drop the CSS centring */
    .nyco-mm-panel.is-positioned {
        transform: translateY(10px);
    }

    .nyco-mm-inner {
        max-width: none;
        background: #fff;
        border-top: 3px solid var(--nyco-mm-green);
        box-shadow: 0 15px 30px rgba(0, 0, 0, .1);
    }

    .nyco-mm-trigger:hover > .nyco-mm-panel,
    .nyco-mm-trigger:focus-within > .nyco-mm-panel,
    .nyco-mm-trigger.is-open > .nyco-mm-panel {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .nyco-mm-trigger:hover > .nyco-mm-panel.is-positioned,
    .nyco-mm-trigger:focus-within > .nyco-mm-panel.is-positioned,
    .nyco-mm-trigger.is-open > .nyco-mm-panel.is-positioned {
        transform: translateY(0);
    }

    .nyco-mm-trigger.is-closed > .nyco-mm-panel {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

/* ── Tablet & mobile: inline accordion ───────────────────────────────── */
@media (max-width: 1024px) {
    .nyco-mm-trigger {
        flex-wrap: wrap;
    }

    .nyco-mm-panel {
        display: none;
        flex: 0 0 100%;
        width: 100%;
        background: #fff;
    }

    .nyco-mm-trigger.is-open > .nyco-mm-panel {
        display: block;
    }

    .nyco-mm-inner {
        padding: 16px 12px 20px;
    }

    .nyco-mm-heading {
        margin-bottom: 20px;
        font-size: 18px;
    }

    .nyco-mm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 0;
    }

    .nyco-mm-col,
    .nyco-mm-col:first-child {
        border-left: 0;
        padding: 0 12px;
    }

    .nyco-mm-col-icon {
        min-height: 0;
    }

    .nyco-mm-col-icon img {
        max-width: 52px;
    }
}

@media (max-width: 767px) {
    .nyco-mm-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .nyco-mm-col {
        padding: 18px 4px !important;
        border-top: 1px solid #eaeaea !important;
    }

    .nyco-mm-col:first-child {
        border-top: 0 !important;
    }

    .nyco-mm-panel .nyco-mm-col-head {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 14px !important;
    }

    .nyco-mm-col-icon {
        margin-bottom: 0;
    }

    .nyco-mm-col-icon img {
        max-width: 40px;
    }
}
