@font-face {
    font-family: 'AvenirLTStd55RomanRegular';
    src: url('../fonts/avenirltstd-roman-webfont.eot');
    src: url('../fonts/avenirltstd-roman-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/avenirltstd-roman-webfont.woff') format('woff'),
    url('../fonts/avenirltstd-roman-webfont.ttf') format('truetype'),
    url('../fonts/avenirltstd-roman-webfont.svg#AvenirLTStd55RomanRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BaskervilleLightItalic';
    src: url('../fonts/11491.eot');
    src: url('../fonts/11491.eot') format('embedded-opentype'),
    url('../fonts/11491.woff') format('woff'),
    url('../fonts/11491.ttf') format('truetype'),
    url('../fonts/11491.svg#BaskervilleLightItalic') format('svg');
}

@font-face {
    font-family: 'aleolight';
    src: url('../fonts/aleo-light-webfont.eot');
    src: url('../fonts/aleo-light-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/aleo-light-webfont.woff') format('woff'),
    url('../fonts/aleo-light-webfont.ttf') format('truetype'),
    url('../fonts/aleo-light-webfont.svg#aleolight') format('svg');
    font-weight: normal;
    font-style: normal;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'AvenirLTStd55RomanRegular', sans-serif;
    font-size: 13px;
    line-height: 132%;
    color: #9a9a9a;
    -webkit-font-smoothing: antialiased;
}

::-moz-selection {
    background: #555;
    color: #f4f4f4;
}
::selection {
    background: #555;
    color: #f4f4f4;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    font-weight: normal;
}

.clear {
    clear: both;
}

.wrapper {
    width: auto;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h2 {
    color: #333;
    text-align: center;
    font-size: 28px;
    line-height: 100%;
    font-family: 'BaskervilleLightItalic', serif;
}

.btn {
    font-size: 11px;
    text-shadow: 1px 0px #E7E7E7;
    text-transform: uppercase;
    text-decoration: none;
    color: #9e9e9e;
    cursor: pointer;
    -webkit-transition: all 150ms ease;
    -moz-transition: all 150ms ease;
    -ms-transition: all 150ms ease;
    -o-transition: all 150ms ease;
    transition: all 150ms ease;
}

.btn:hover {
    color: #333;
}

#footer {
    padding: 1px 0 99px 0;
    text-align: center;
}

.socials {
    margin-top: 1rem;
    margin-bottom: 5rem;
    line-height: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: center;
}
@media only screen and (max-width: 768px) {
    .socials {
        flex-direction: column;
    }
}

.socials a {
    display: inline;
    margin: 0 7px;
    line-height: 100%;
    text-shadow: 1px 0 #AAA;
    color: #333;
    text-decoration: none!important;
    text-transform: uppercase;
    font-size: 14px;
}

.socials a:hover {
    text-decoration: underline!important;
}

/* Сетка */
.grid {
    width: 1080px;
    position: relative;
}

.grid:before {
    content: " ";
    display: table;
}

.grid:after {
    content: " ";
    display: table;
    clear: both;
}

/* Элементы типа item */
.item {
    position: relative;
    float: left;
    margin: 0 40px 100px 0;
    overflow: hidden;
}

.item .image {
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-transition: all 400ms linear;
    -moz-transition: all 400ms linear;
    -ms-transition: all 400ms linear;
    -o-transition: all 400ms linear;
    transition: all 400ms linear;
}

.item .label {
    background: #ffffff;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#header {
    transition: all 0.4s ease;
    background: transparent;
    position: fixed;
    width: 100%;
    z-index: 12;
}

#header.alter {
    background: rgba(244,244,244,0.95);
}


body.admin-bar #header {
    top: 32px;
}

/* Mobile version Admin-Bar */
@media screen and (max-width: 782px) {
    body.admin-bar #header {
        top: 46px; /* Admin-Bar height on mobile devices */
    }
}

/* Очень маленькие экраны */
@media screen and (max-width: 600px) {
    body.admin-bar #header {
        position: fixed; /* Фиксация для очень маленьких экранов */
    }

    #wpadminbar {
        position: fixed !important; /* Фиксируем админ-бар для избежания проблем с прокруткой */
    }
}

#header #logo {
    height: 30px;
    width: 300px;
    margin: 23px 0;
    float: left;
    background: url(../img/sprite.png) repeat-y -140px -30px; /* Инверсное лого (светлое для темного фона) */
    transition: background-position 0.3s ease;
}

#header.alter #logo {
    background-position: -140px 0;
}

#header #logo.alter {
    background-position: 0 0;
}

#header ul {
    padding: 0;
    float: right;
    margin: 33px 0 0 0;
}

#header ul li {
    list-style: none;
    display: inline;
    padding: 0 5px;
    position: relative;
}

#header ul li span {
    cursor: default;
}

#header ul li a,
#header ul li span {
    text-decoration: none;
    color: #fff;
    padding: 5px 5px 10px 5px;
    font-size: 15px;
    -webkit-transition: all 150ms ease;
    -moz-transition: all 150ms ease;
    -ms-transition: all 150ms ease;
    -o-transition: all 150ms ease;
    transition: all 150ms ease;
    position: relative;
}

#header ul li a:after,
#header ul li span:after {
    content: '';
    height: 2px;
    bottom: 7px;
    left: 5px;
    right: 100%;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    -webkit-transition: right 350ms ease-in-out;
    -moz-transition: right 350ms ease-in-out;
    -ms-transition: right 350ms ease-in-out;
    -o-transition: right 350ms ease-in-out;
    transition: right 350ms ease-in-out;
}

/* Подменю */
#header ul li ul {
    max-height: 0;
    transition: max-height 175ms ease-out, padding 175ms ease-out;
    overflow: hidden;
    position: absolute;
    padding: 0 15px 0 5px;
    left: 0;
}

#header ul li ul li {
    display: block;
    padding: 3px 5px;
    opacity: 0;
    transition: all 75ms ease-out;
}

#header ul li ul li:first-child {
    padding-top: 0;
}

#header ul li ul li a {
    padding: 3px 5px;
    font-family: 'AvenirLTStd55RomanRegular';
    font-size: 14px;
    white-space: nowrap;
}

#header ul li ul li a:after {
    display: none;
}

#header ul li ul li a:before {
    content: '';
    height: 5px;
    width: 5px;
    top: 8px;
    left: -3px;
    background: rgba(244, 244, 244, 0.9);
    position: absolute;
    opacity: 0;
    -webkit-transition: all 150ms ease;
    -moz-transition: all 150ms ease;
    -ms-transition: all 150ms ease;
    -o-transition: all 150ms ease;
    transition: all 150ms ease;
}

#header ul li:hover ul {
    max-height: 128px;
    padding: 5px 15px 11px 5px;
    transition: max-height 175ms 175ms ease-out, padding 175ms 175ms ease-out;
}

#header ul li:hover ul li {
    opacity: 1;
    transition: all 100ms 350ms ease-out;
}

#header ul li:hover a:after,
#header ul li:hover span:after {
    right: 5px;
}

#header ul li:last-child {
    padding-right: 0;
}

#header ul li:last-child a {
    padding-right: 0;
}

#header ul li:last-child:hover a:after {
    right: 0;
}

#header ul li.current-menu-parent:last-child a:after,
#header ul li.current-menu-parent:last-child span:after,
#header ul li.current-menu-item:last-child a:after,
#header ul li.current-menu-item:last-child span:after {
    right: 0;
}

#header ul li.current-menu-parent a:after,
#header ul li.current-menu-parent span:after,
#header ul li.current-menu-item a:after,
#header ul li.current-menu-item span:after {
    right: 5px;
}

#header ul li.current-menu-parent ul li a:after,
#header ul li.current-menu-item ul li a:after {
    display: none;
}

/* Темная тема для хедера */
#header.dark_theme ul.menu li a,
#header.dark_theme ul.menu li span {
    color: #333;
}

#header.dark_theme ul.menu li a:after,
#header.dark_theme ul.menu li span:after {
    background: #444;
}

#header.dark_theme #logo {
    background-position: -140px 0;
}

/* Дополнительные классы для хедера */
#header.alter #this_bg {
    background: #f4f4f4;
    height: 100%;
    transition: height 200ms ease-in-out;
}

#header.alter ul li a,
#header.alter ul li span {
    color: #333;
}

#header.alter ul li a:hover,
#header.alter ul li span:hover {
    color: #000;
}

#header.alter ul li a:after,
#header.alter ul li span:after {
    background: rgba(46, 46, 49, 0.8);
}

#header #this_bg {
    height: 61px;
    position: absolute;
    width: 100%;
    z-index: -1;
    bottom: 0;
    left: 0;
    background: transparent;
    transition: height 0.3s ease, background-color 0.3s ease;
}

#header.alter #this_bg {
    background: #f4f4f4;
    height: 100%;
}

#header.alter ul li ul {
    background: rgba(244, 244, 244, 1);
}

#header.alter ul li ul li a:before {
    background: rgba(46, 46, 49, 0.8);
}

#header.alter #logo {
    background-position: -140px 0;
}

/* Обложка и параллакс */
#cover {
    position: relative;
    width: 100%;
    z-index: -2;
    background: #f4f4f4;
}

#cover #parallax {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: 1920px auto;
    overflow: hidden;
    background-position: 50% 0px;
    background-repeat: no-repeat;
}

#cover #cover_title {
    position: fixed;
    width: 100%;
    z-index: 2;
    top: 50%;
    text-align: center;
    text-indent: -9999px;
    height: 53px;
    background-repeat: no-repeat;
    background-position: center top;
}

/* Pages */
.page {
    padding: 0 0 0 0;
    background: rgba(244,244,244,1);
    /*margin-top: 253px !important;*/
}

body #header.third #this_bg,
body #header.alter ul li ul,
body #cover #second_title,
body .page {
    background: #f4f4f4;
}

body #header #logo {
    margin: 16px 0;
}

body #header ul {
    margin: 23px 0 0 0;
}

body #header ul ul {
    margin: 12px 0 0 -5px;
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 2px;
}

body #header ul li a,
#header ul li span {
    padding: 5px 5px 15px 5px;
}

body #header ul li a:after,
#header ul li span:after {
    bottom: 12px;
}

#cover #second_title {
    /*height: 253px;*/
}

body #cover #second_title {
    background-color: transparent !important;
    background-repeat: no-repeat;
    background-position: center 0;
}

/* Styles for the "Upster" button */
#back_to_top {
    text-align: center;
    line-height: 32px;
    color: #fff;
    font-size: 13px;
    position: fixed;
    bottom: 0;
    left: 50%;
    margin-left: -60px;
    width: 120px;
    height: 31px;
    background: #000000;
    margin-bottom: -31px;
    -webkit-transition: all 150ms ease;
    -moz-transition: all 150ms ease;
    -ms-transition: all 150ms ease;
    -o-transition: all 150ms ease;
    transition: all 150ms ease;
    z-index: 10;
}

#back_to_top:hover {
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

#back_to_top.active {
    margin-bottom: 0;
}

.ast-header-break-point .main-navigation ul .menu-item .menu-link {
    border-bottom-width: 0;
}