/* ============================================
   DESKTOP NAVIGATION - Современный дизайн
   Для экранов ≥ 1280px (включая большие планшеты)
   ============================================ */

@media (min-width: 1280px) {
    /* Force solid header background on desktop */
    .header {
        background: var(--bg-color) !important;
    }

    .header-main {
        background: var(--bg-color) !important;
    }

    [data-theme="dark"] .header {
        background: #0f172a !important;
    }

    [data-theme="dark"] .header-main {
        background: #0f172a !important;
    }

    /* Main Navigation */
    .main-nav {
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: center;
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 8px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        position: relative;
    }

    /* Nav Links */
    .nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        border-radius: 10px;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #0ea5e9, #0284c7);
        transform: translateX(-50%);
        transition: width 0.3s ease;
    }

    .nav-link:hover {
        color: #0ea5e9;
        background: rgba(14, 165, 233, 0.05);
    }

    .nav-link:hover::before {
        width: 80%;
    }

    /* Dropdown Arrow */
    .dropdown-arrow {
        transition: transform 0.3s ease;
        opacity: 0.6;
    }

    .nav-dropdown:hover .dropdown-arrow,
    .nav-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
        opacity: 1;
    }

    /* Dropdown Menu */
    .nav-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                    0 0 0 1px rgba(0, 0, 0, 0.05);
        padding: 12px;
        min-width: 280px;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        display: flex;
        gap: 16px;
    }

    [data-theme="dark"] .nav-dropdown-menu {
        background: #1e293b;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown.active .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* Multi-column layout for large dropdowns */
    .nav-dropdown-menu:has(.dropdown-section:nth-child(2)) {
        min-width: 500px;
    }

    .nav-dropdown-menu:has(.dropdown-section:nth-child(3)) {
        min-width: 650px;
    }

    /* Dropdown Sections */
    .dropdown-section {
        flex: 1;
        min-width: 0;
    }

    .dropdown-section + .dropdown-section {
        border-left: 1px solid var(--border-color);
        padding-left: 16px;
    }

    .dropdown-title {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        margin: 0 0 10px 12px;
    }

    /* Dropdown Links */
    .dropdown-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        color: var(--text-color);
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.2s ease;
        font-size: 14px;
        font-weight: 500;
    }

    .dropdown-link:hover {
        background: rgba(14, 165, 233, 0.1);
        color: #0ea5e9;
        transform: translateX(4px);
    }

    .dropdown-icon {
        font-size: 18px;
        flex-shrink: 0;
        transition: transform 0.2s ease;
    }

    .dropdown-link:hover .dropdown-icon {
        transform: scale(1.1);
    }

    /* Header Actions */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Modern Button Styles */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.2s ease;
        border: 2px solid transparent;
        cursor: pointer;
        white-space: nowrap;
    }

    .btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-ghost {
        background: transparent;
        color: var(--text-color);
        border-color: transparent;
    }

    .btn-ghost:hover {
        background: rgba(14, 165, 233, 0.1);
        color: #0ea5e9;
    }

    .btn-outline {
        background: transparent;
        color: var(--text-color);
        border-color: var(--border-color);
    }

    .btn-outline:hover {
        border-color: #0ea5e9;
        color: #0ea5e9;
        background: rgba(14, 165, 233, 0.05);
    }

    .btn-primary {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        color: white;
        border-color: #0ea5e9;
        box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    }

    .btn-primary:hover {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        border-color: #0284c7;
        box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
        transform: translateY(-2px);
    }

    .btn:active {
        transform: scale(0.98);
    }

    /* User Account Dropdown */
    .user-account-dropdown {
        position: relative;
    }

    .user-account-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        background: transparent;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        color: var(--text-color);
    }

    .user-account-btn:hover {
        border-color: #0ea5e9;
        background: rgba(14, 165, 233, 0.05);
    }

    .user-avatar-small {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
        font-size: 14px;
        overflow: hidden;
    }

    .user-avatar-small img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .user-name-text {
        font-weight: 600;
        font-size: 14px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-dropdown-arrow {
        transition: transform 0.3s ease;
        opacity: 0.6;
    }

    .user-account-dropdown:hover .user-dropdown-arrow,
    .user-account-dropdown.active .user-dropdown-arrow {
        transform: rotate(180deg);
        opacity: 1;
    }

    /* User Dropdown Menu */
    .user-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                    0 0 0 1px rgba(0, 0, 0, 0.05);
        padding: 8px;
        min-width: 240px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    [data-theme="dark"] .user-dropdown-menu {
        background: #1e293b;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .user-account-dropdown:hover .user-dropdown-menu,
    .user-account-dropdown.active .user-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* User Dropdown Header */
    .user-dropdown-header {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 4px;
    }

    .user-dropdown-name {
        font-weight: 700;
        font-size: 15px;
        color: var(--text-color);
        margin-bottom: 4px;
    }

    .user-dropdown-email {
        font-size: 13px;
        color: var(--text-secondary);
    }

    /* User Dropdown Link */
    .user-dropdown-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        color: var(--text-color);
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.2s ease;
        font-size: 14px;
        font-weight: 500;
    }

    .user-dropdown-link:hover {
        background: rgba(14, 165, 233, 0.1);
        color: #0ea5e9;
        transform: translateX(4px);
    }

    .user-dropdown-link svg {
        flex-shrink: 0;
        opacity: 0.7;
        transition: opacity 0.2s ease;
    }

    .user-dropdown-link:hover svg {
        opacity: 1;
    }

    .user-dropdown-separator {
        height: 1px;
        background: var(--border-color);
        margin: 4px 0;
    }

    .user-dropdown-link.logout {
        color: #ef4444;
    }

    .user-dropdown-link.logout:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
    }

    /* Sticky Header Enhancement - Solid Background */
    .header-main[data-sticky] {
        background: var(--bg-color);
    }

    .header-main[data-sticky].is-sticky {
        background: var(--bg-color);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    }

    [data-theme="dark"] .header-main[data-sticky] {
        background: #0f172a;
    }

    [data-theme="dark"] .header-main[data-sticky].is-sticky {
        background: #0f172a;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }

    /* Animation for dropdown items */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-dropdown:hover .dropdown-link,
    .nav-dropdown.active .dropdown-link {
        animation: slideDown 0.3s ease forwards;
    }

    .nav-dropdown:hover .dropdown-link:nth-child(1) { animation-delay: 0.05s; }
    .nav-dropdown:hover .dropdown-link:nth-child(2) { animation-delay: 0.1s; }
    .nav-dropdown:hover .dropdown-link:nth-child(3) { animation-delay: 0.15s; }
    .nav-dropdown:hover .dropdown-link:nth-child(4) { animation-delay: 0.2s; }
    .nav-dropdown:hover .dropdown-link:nth-child(5) { animation-delay: 0.25s; }

    /* Header Content Layout */
    .header-content {
        display: flex;
        align-items: center;
        gap: 32px;
        padding: 16px 0;
    }

    /* Logo Enhancement */
    .logo {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        transition: opacity 0.3s ease;
    }

    .logo:hover {
        opacity: 0.9;
    }

    .logo-icon svg {
        filter: drop-shadow(0 2px 8px rgba(14, 165, 233, 0.3));
        transition: filter 0.3s ease;
    }

    .logo:hover .logo-icon svg {
        filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.5));
        gap: 2px;
    }

    .logo-name {
        font-size: 20px;
        font-weight: 700;
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .logo-tagline {
        font-size: 11px;
        color: var(--text-secondary);
        font-weight: 500;
    }
}

/* Extra polish for larger screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .nav-list {
        gap: 12px;
    }

    .nav-link {
        padding: 12px 20px;
        font-size: 16px;
    }

    .header-content {
        gap: 48px;
    }
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 1280px) {
    .mobile-menu-btn,
    .mobile-sidebar {
        display: none !important;
    }
}
