﻿:root {
    --topmenu-bg: #2e466e;
    --topmenu-bg-hover: #415989;
    --topmenu-accent: #5a7cb8;
    --topmenu-text: #ffffff;
    --topmenu-text-muted: #c8d5e8;
    --topmenu-border: #3a5578;
    --topmenu-dropdown-bg: #364d6f;
    --topmenu-dropdown-hover: #5a7cb8;
}

.topmenu-navbar {
    background: linear-gradient(135deg, var(--topmenu-bg) 0%, #3a557a 100%);
    border-bottom: 2px solid var(--topmenu-border);
    box-shadow: 0 4px 12px rgba(46, 70, 110, 0.2);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topmenu-nav-toggler {
    border: 1px solid var(--topmenu-border);
    border-radius: 8px;
    background: transparent;
}

.topmenu-nav-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(200,213,232,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.topmenu-nav-link {
    color: var(--topmenu-text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    border: 2px solid transparent;
    background: transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.topmenu-nav-link:hover,
.topmenu-nav-link:focus {
    background: rgba(90, 124, 184, 0.15);
    color: #ffffff;
    border-color: var(--topmenu-accent);
    box-shadow: 0 4px 12px rgba(90, 124, 184, 0.25);
    transform: translateY(-3px);
    text-decoration: none;
}

.topmenu-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--topmenu-accent) 0%, #6b8cc6 100%);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(90, 124, 184, 0.4);
    font-weight: 600;
    transform: none;
}

.topmenu-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.3rem;
    transition: all 0.3s ease;
}

.topmenu-nav-link:hover .topmenu-icon-container {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(90, 124, 184, 0.4);
}

.topmenu-nav-link.active .topmenu-icon-container {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

.topmenu-nav-icon {
    font-size: 1.15rem;
    color: var(--topmenu-text-muted);
    transition: color 0.3s;
}

.topmenu-nav-link:hover .topmenu-nav-icon,
.topmenu-nav-link.active .topmenu-nav-icon {
    color: #ffffff;
}

.topmenu-nav-text {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: inherit;
    transition: color 0.3s;
}

.topmenu-dropdown-menu {
    background: var(--topmenu-dropdown-bg);
    border: 1px solid var(--topmenu-border);
    box-shadow: 0 8px 24px rgba(46, 70, 110, 0.3);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 0.6rem 0;
    min-width: 220px;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topmenu-dropdown-item {
    color: var(--topmenu-text-muted);
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    margin: 0.15rem 0.6rem;
    width: calc(100% - 1.2rem);
    font-weight: 500;
    font-size: 0.93rem;
    transition: all 0.2s ease;
}

.topmenu-dropdown-item i {
    color: var(--topmenu-accent);
    opacity: 0.9;
    width: 1.5em;
    text-align: center;
}

.topmenu-dropdown-item:hover,
.topmenu-dropdown-item:focus {
    background: var(--topmenu-dropdown-hover);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(90, 124, 184, 0.2);
}

.topmenu-dropdown-divider {
    border-color: var(--topmenu-border);
    opacity: 0.3;
}

@@media (max-width: 992px) {
    .topmenu-navbar {
        padding: 0.5rem 0;
    }

    .topmenu-nav-link {
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
        padding: 0.6rem 0.8rem;
        margin: 0.3rem 0;
        border-radius: 8px;
        border: none;
        background: transparent;
    }

    .topmenu-icon-container {
        height: 32px;
        width: 32px;
        margin-bottom: 0;
        margin-right: 0.7rem;
    }

    .topmenu-nav-icon {
        font-size: 1rem;
    }

    .topmenu-nav-text {
        font-size: 1rem;
    }

    .topmenu-dropdown-menu {
        background: var(--topmenu-bg-hover);
        border: none;
        box-shadow: 0 2px 8px rgba(62,198,249,0.10);
        border-radius: 8px;
        margin: 0.3rem 0.5rem 0.3rem 1.5rem;
        padding: 0.4rem;
    }

    .topmenu-dropdown-item {
        border-radius: 6px;
        padding: 0.5rem 1rem;
    }
}