/* ===== TOP BAR ===== */
.top-bar {
    background: var(--purple);
    color: white;
    font-size: 14px;
}

.top-bar-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 25px;

}

.top-links a {
    display: flex;
    gap: 5px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
   
}
.top-icon {
    width: 20px;
    height: auto;
}

.top-links a:hover {
    opacity: 0.8;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.contacts {
    display: flex;
    align-items: center;
}

.contacts span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.contacts i {
    font-size: 16px;
    opacity: 0.9;
}

.social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social a {
    color: white;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
}

.social a:hover {
    background: white;
    color: var(--purple);
    border-color: white;
}

@media (max-width: 992px) {
    .top-bar-container {
        flex-direction: column;
        text-align: center;
    }

    .top-links {
        gap: 15px;
        margin-bottom: 10px;
    }

    .top-right {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* ===== NAVBAR ===== */
.navbar {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--purple);
}

.logo-icon {
    background: var(--purple);
    border-radius: 12px;
    padding: 6px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
}
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-logo {
    max-width: 60px;
    height: auto;
}

.nova { color: var(--purple); }
.tech { color: #111; }

/* ===== DESKTOP MENU ===== */
.menu {
    display: flex;
    gap: 35px;
    font-weight: 500;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    text-decoration: none;
    color: #222;
    transition: color 0.3s;
    position: relative;
}

.menu a:hover,
.menu a.active {
    color: #ffcc29;
}

.menu a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ffcc29;
    border-radius: 3px;
}

/* ===== DROPDOWN (desktop) ===== */
.menu .menu-item-has-children {
    position: relative;
}

.menu .menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.3s;
}

@media (min-width: 993px) {
    .menu .menu-item-has-children:hover > a::after {
        transform: rotate(180deg);
    }
}

.menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 220px;
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    z-index: 1000;
}

.menu .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    white-space: nowrap;
}

.menu .sub-menu a:hover {
    background: #f5f5f5;
    color: #ffcc29;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    width: 50px;
    height: 50px;
    background: var(--purple);
    border-radius: 50%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    position: relative;
}

.hamburger:hover {
    background: var(--purple);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.hamburger .bar {
    width: 26px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger .top-bar,
.hamburger .mid-bar,
.hamburger .bottom-bar {
    height: 3px;
}

.hamburger.open .top-bar {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open .mid-bar {
    opacity: 0;
    transform: scale(0);
}

.hamburger.open .bottom-bar {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== MOBILE MENU (max-width: 992px) ===== */
@media (max-width: 992px) {
    .contacts a {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 20px 40px 30px;
        gap: 15px;
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 999;
        overflow-y: auto;
    }

    .menu .sub-menu {
        display: none;
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }

    .menu .menu-item-has-children:hover > .sub-menu {
        display: none !important;
    }

    .menu .menu-item-has-children.active > .sub-menu {
        display: block !important;
    }

    .menu .menu-item-has-children.active > a::after {
        transform: rotate(180deg);
    }

    .menu.active {
        left: 0;
        padding: 30px;
    }

    .menu > li {
        width: 100%;
        margin-bottom: 5px;
    }

    .menu > li > a {
        display: block;
        font-size: 20px;
        font-weight: 600;
        padding: 12px 0;
        color: #222;
        border-bottom: 1px solid #eee;
        transition: color 0.3s;
    }

    .menu > li > a:hover,
    .menu > li > a.active {
        color: var(--purple);
    }

    .menu a.active::after {
        display: none;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }

    body.no-scroll {
        overflow: hidden;
    }
}
/* ===== DESKTOP SLIDER (подчёркивание) ===== */
@media (min-width: 993px) {
    .menu {
        position: relative; /* для позиционирования ползунка */
    }

    /* скрываем старое подчёркивание у активной ссылки */
    .menu a.active::after {
        display: none;
    }

    /* сам ползунок */
    .menu-slider {
        position: absolute;
        top: 30px;       
        left: 0;
        height: 3px;
        background: #ffcc29;
        border-radius: 3px;
        transition: left 0.25s ease, width 0.25s ease;
        pointer-events: none; /* чтобы не мешал кликам */
        z-index: 10;
    }

    /* если активной ссылки нет – ползунок скрыт (будет управляться через style) */
    .menu-slider.hidden {
        opacity: 0;
        transition: none;
    }
}