* {
    margin: 0;
    padding: 0;
} 
/*************************** Основные пункты **/
 
#header {
    position: relative;
    margin: auto;
    padding: 0;
    width: 100%;
 
}


#header ul, /* сбрасываем поля и отступы у списков */
#header ul ul,
#header ul ul li {
    list-style: none;
    padding: 0;
    margin: 0;
}
#header ul {
    clear: left;
    position: relative;
    right: 50%;
    height: 52px;
    float: right;
    text-align: center;
     font-family: Tahoma; /*  */
     font-size: 16px;
	
}
#header ul li {
    position: relative;
    left: 50%;
    float: left;
    height: 35px;
}
#header ul li:last-child {
    border: none;
    -webkit-box-shadow: none;
       -moz-box-shadow: none;
            box-shadow: none
}
#header ul li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 17px 10px 15px 15px;
}
#header ul > li:hover > a {
    background-color: #6f970e;
    color: #fafafa
}
 
/** Индикатор наличия подкатегорий верхнего уровня **/
 
#header > ul > li.parent > a::after {
    border-left: 1px solid #CCC;
    border-top: 1px solid #CCC;
    content: "";
    display: inline-block;
    vertical-align: top;
    margin: 4px 0 0 8px;
    -webkit-transform: rotate(-135deg);
       -moz-transform: rotate(-135deg);
        -ms-transform: rotate(-135deg);
         -o-transform: rotate(-135deg);
            transform: rotate(-135deg);
    height: 5px;
    width: 5px;
}
 
/*************************** Выпадающие подпункты **/
 
#header ul li ul {
    background: #494949;
    
    border-radius: 2px;
    transition: all .2s ease-in-out;
    text-transform: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    line-height: 18px;
    top: 50px;
    font-size: 14px;
    margin-top: 20px;
    height: auto;
    min-width: 175px;
    width: 100%
}
#header ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transition: margin 0.3s ease 0s;
    margin: 0;
    z-index: 11;
}
#header ul li ul li {
    border: none;
    box-shadow: 0 1px 0 #111, 0 2px 0 #666;
    position: relative;
    left: 0;
    float: none;
    height: auto;
    text-align: left !important;
}
#header ul li ul li:last-child {
    box-shadow: none;
}
#header ul li ul li a {
    padding: 10px 15px;
    border: none
}
 
/*************************** Выпадающие пункты второго уровня **/
 
#header ul li ul li ul {
    top: 0;
    left: 100%;
    margin: 0 0 0 20px;
    _margin: 0;
    /*IE6 only*/
    box-shadow: -1px 0 0 rgba(255, 255, 255, .3);
}
 
/** Индикатор наличия подкатегорий 2 уровня **/
 
#header > ul > li ul li.parent > a::after {
    border-left: 1px solid #CCC;
    border-top: 1px solid #CCC;
    content: "";
    display: inline-block;
    vertical-align: top;
    margin: 7px 0px 0px 8px;
    -webkit-transform: rotate(135deg);
       -moz-transform: rotate(135deg);
        -ms-transform: rotate(135deg);
         -o-transform: rotate(135deg);
            transform: rotate(135deg);
    height: 5px;
    width: 5px;
    float: right;
}
 
/********************** Стрелочки на подпунктах **/
 
#header ul ul li:first-child > a {
    border-radius: 3px 3px 0 0;
    -moz-border-radius: 3px 3px 0 0;
    -o-border-radius: 3px 3px 0 0;
    -ms-border-radius: 3px 3px 0 0;
    -webkit-border-radius: 3px 3px 0 0;
}
#header ul li > ul > li:first-child > a:before {
    content: '';
    position: absolute;
    left: 40px;
    top: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #000;
}
#header ul ul ul li:first-child a:before {
    left: -6px;
    top: 50%;
    margin-top: -6px;
    border-left: 0;
    border-bottom: 6px solid transparent;
    border-top: 6px solid transparent;
    border-right: 6px solid #3b3b3b;
}
#header ul ul li:first-child a:hover:before {
    border-bottom-color: #000;
}
#header ul ul ul li:first-child a:hover:before {
    border-right-color: #494949;
    border-bottom-color: transparent;
}
#header ul ul li:last-child > a {
    -moz-border-radius: 0 0 3px 3px;
    -webkit-border-radius: 0 0 3px 3px;
    border-radius: 0 0 3px 3px;
}

#header > ul > li.parent:hover > a::before {
    visibility: visible;
    -webkit-transition: all .5s ease .2s;
       -moz-transition: all .5s ease .2s;
         -o-transition: all .5s ease .2s;
            transition: all .5s ease .2s;
}


#header li.active a {
	background-color:#6f970e; /* цвет активной ссылки 1-го уровня */	
}

#header li.active li.active a {
	background-color: #6f970e; /* цвет активной ссылки 2-го уровня */	
}
#header li.active li a {
	background-color:#565656; /* цвет (серый) раскрытия для 2-го уровня */	
}

#header li.active li.active li a {
	background-color:#565656; /* цвет (серый) раскрытия для 3-го уровня */	
}

#header li.active li.active li.active a {
	background-color: #6f970e; /* цвет активной ссылки 3-го уровня */	
}






