﻿/* Main Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    padding: 8px 0;
    list-style: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 6px;
    z-index: 1000;
}

.nav-item:hover > .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

    .submenu li a:hover {
        background: #f5f5f5;
    }

/* Nested Submenu */
.has-submenu {
    position: relative;
}

.nested-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: #fff;
    min-width: 280px;
    padding: 12px;
    list-style: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 6px;
    z-index: 1100;
    /* 1 column by default (mobile) */
    grid-template-columns: 1fr;
    gap: 4px 20px;
}

/* Open nested submenu on hover */
.has-submenu:hover > .nested-submenu {
    display: grid;
}

.nested-submenu li a {
    display: block;
    padding: 8px 14px;
    color: #333;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
}

    .nested-submenu li a:hover {
        background: #f0f0f0;
    }

/* Large screen → 2 columns */
@media (min-width: 992px) {
    .nested-submenu {
        min-width: 420px;
        grid-template-columns: 1fr 1fr;
    }
    .has-submenu > span {
        color: #ee8a32 !important;
    }
}

/* Mobile: open nested menu below instead of side */
@media (max-width: 767px) {
    .nested-submenu {
        left: 0;
        top: 100%;
        min-width: 100%;
    }
}
