/* ==========================================================================
   ГОЛОВНЕ МЕНЮ
   ========================================================================== */

:root {
    --green: #4CAF50;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --text-main: #333;
}

.nav {
    position: relative;
    width: 100%;
}

/* --- ОСНОВА --- */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--green);
}

.nav-list li {
    position: relative;
    flex: 1;
}

.nav-list li.home-icon,
.nav-list li.search-container {
    flex: 0 0 auto;
}

/* --- ЛІНКИ --- */
.nav-list li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 15px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
}

/* HOVER */
.nav-list li:hover > a,
.nav-list li.current-menu-item > a {
    background-color: var(--green);
    color: #fff !important;
}

/* --- СТРІЛКА --- */
.menu-item-has-children > a::after {
    content: "\f347";
    font-family: "dashicons";
    margin-left: 8px;
    font-size: 14px;
    transition: 0.2s;
}

.nav-list li:hover > a::after {
    transform: rotate(180deg);
}

/* --- HOME --- */
.home-icon a {
    background-color: var(--green);
    color: #fff !important;
    width: 60px;
    font-size: 20px;
}

/* ==========================================================================
   ПІДМЕНЮ (ГОЛОВНЕ)
   ========================================================================== */

.nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background: #212529;
    display: none;
    z-index: 10000;
}

/* 🔥 ПОКАЗ */
.nav-list li:hover > .sub-menu {
    display: block;
}

/* --- ПУНКТИ --- */
.nav-list .sub-menu li {
    width: 100%;
    border-bottom: 1px solid #2c3136;
}

.nav-list .sub-menu li a {
    height: auto;
    padding: 12px 20px;
    justify-content: flex-start;
    text-align: left;
    text-transform: none;
    font-weight: 400;
    color: #fff;
    font-size: 13px;
}

.nav-list .sub-menu li a:hover {
    padding-left: 25px;
    color: var(--green) !important;
    background-color: #2c3136;
}

/* ==========================================================================
   MOBILE (БЕЗ JS = ПРОСТО СПИСОК)
   ========================================================================== */

@media screen and (max-width: 1000px) {

    .menu-toggle {
        display: none; /* бо без JS він не працює */
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-list li a {
        justify-content: space-between;
        padding: 15px 20px;
        text-transform: none;
    }

    /* 🔥 НА МОБІЛЦІ ПРОСТО ПОКАЗУЄМО ВСЕ */
    .nav-list .sub-menu {
        position: static;
        display: block;
        width: 100%;
        background: #f4f4f4;
    }

    .nav-list .sub-menu li a {
        color: var(--text-main);
        padding-left: 40px;
    }
}