#content-wrap {
    width: 100%;
}

#content {
    width: 940px;
    padding: 20px;
    margin: 0 auto;
    min-height: 500px;
    background-color: #fff;
}

#content:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
}

#main-menu-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 600;
}

#main-menu {
    width: 980px;
    margin: 0 auto;
}

#main-menu>ul {
    margin: 0;
    padding: 1em 0;
    list-style-type: none;
    text-align: right;
    position: relative;
}

#main-menu>ul>li {
    position: relative;
    font-size: 1em;
    line-height: 2em;
    border-radius: .25em;
    background-color: rgba(255,255,255,.3);
    display: inline-block;
    vertical-align: middle;
}

#main-menu>ul>li:hover {
    background-color: rgba(255,255,255,.4);
}

#main-menu>ul>li>a:link,
#main-menu>ul>li>a:visited {
    border-radius: .25em;
    display: inline-block;
    padding: 0 .5em;
    color: #fff;
    text-decoration: none;
}

#main-menu>ul>li:first-child {
    position: absolute;
    top: 1em;
    left: .5em;
    border: none;
    background-color: transparent;
}

#main-menu>ul>li:first-child>a {
    padding: 0;
}

#main-menu>ul>li:first-child>a>img {
    height: 2em;
}

#footer-wrap {
    width: 100%;
}

#footer {
    width: 980px;
    margin: 0 auto;
    color: #666;
    border-top: .5em solid #fc0;
    text-align: center;
    padding: 1em 0;
}

#footer span { /* для предотвращения масштабирования на мобилах */
    display: inline-block;
}

#header-wrap {
    width: 100%;
    background-image: url(/i/header.bg.jpg);
    background-size: cover;
    background-color: transparent;
    background-position: center center;
}

#header {
    width: 980px;
    margin: 0 auto;
    position: relative;
}

#header-head {
    height: 4.5em;
    background-size: cover;
    background-color: transparent;
    background-position: center center;
    padding: 5.5em 0 0 9.5em;
    color: #fff;
    text-shadow: 0 0 .1em rgba(0, 0, 0, 1);
    overflow: hidden;
}

#header-title {
    font-size: 2em;
    line-height: 130%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1.5em;
}

#header-subtitle {
    font-size: 1em;
    line-height: 150%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 3em;
}

#header-logo {
    position: absolute;
    padding: .3em;
    top: 4em;
    left: 1em;
    background: #fc0;
    border-radius: .5em;
}

#header-logo img {
    width: 7em;
    height: 7em;
    border-radius: .3em;
}

#header-age {
    position: absolute;
    top: 7em;
    right: 0;
}

#header-age img {
    width: 2em;
    height: 2em;
}

#header-logo-remove,
#header-logo-change {
    color: transparent;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
    padding: .5em .75em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

#header-logo-remove {
    top: 0;
    text-align: right;
    border-top-left-radius: .5em;
    border-top-right-radius: .5em;
}

#header-logo-change {
    bottom: 0;
    border-bottom-left-radius: .5em;
    border-bottom-right-radius: .5em;
}

#header-logo-remove i,
#header-logo-change i {
    color: #fff;
    text-shadow: 0 0 .5em rgba(0, 0, 0, .6);
}

#header-logo-remove:hover,
#header-logo-change:hover {
    color: #fff;
    text-shadow: none;
    background-color: rgba(0, 0, 0, .5);
}

#header-menu {
    padding: 0 0 0 9em;
    overflow: hidden;
    background-color: #fc0!important;
    white-space: nowrap;
}

#header-menu a:link, 
#header-menu a:visited {
    color: #333;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    padding: .5em .5em .25em .5em;
    border-bottom: .25em solid #fc0;
}

#header-menu a:hover, 
#header-menu a:active {
    color: #333;
    border-bottom: .25em solid #333;
}

#header-menu a br {
    display: none;
}

#content-main {
    float: left;
    width: 60%;
}

#content-right {
    float: right;
    width: 35%;
}

@media screen and (max-width: 980px) {
    #main-menu,
    #header,
    #content,
    #footer {
        width: auto;
    }

    #main-menu>ul {
        padding: 1em;
    }

    #header-title {
        padding-right: 2em;
    }
    #header-subtitle {
        padding-right: 3em;
    }

    #header-age {
        right: 1em;
    }
}

@media screen and (max-width: 640px) {
    body {
        font-family: 'PT Sans Narrow', Helvetica, Arial, sans-serif;
    }
    #main-menu>ul {
        padding: .5em;
    }
    #main-menu>ul>li {
        font-size: .8em;
    }
    #main-menu>ul>li>a>span {
        /* display: none; */
    }
    #header-head {
        height: 3.8em;
        padding: 4.2em 0 0 7em;
    }
    #header-head.embed {
        min-height: 5.5em;
        padding: 0 3em 0 6.5em;
    }
    #header-title {
        font-size: 1.5em;
        padding-right: 0;
    }
    #header-subtitle {
        padding-right: 0;
    }
    #header-logo {
        top: 4em;
        left: .5em;
    }
    #header-logo img {
        width: 5.5em;
        height: 5.5em;
    }
    #header-age {
        top: 8.75em;
        right: .5em;
    }
    #header-menu {
        padding-left: 6.5em;
    }
    #header-menu a br {
        display: inline;
    }
    #header-menu a span {
        display: none;
    }
    #content-main,
    #content-right {
        float: none;
        width: auto;
    }
}

/*
 * Embed extension
 */
body.embed {
    padding: .5em;
    background-color: #fff;
}

/*
#header-wrap.embed {
    background-image: none;
    background-color: #fff;
    margin-bottom: 1em;
} 
*/

#header.embed {
    width: auto;
}

#header-head.embed {
    height: auto;
    min-height: 5.5em;
    padding: .5em 3em .5em 6.5em;
}

#header-logo.embed {
    top: .5em;
    left: .5em;
    padding: .25em;
}

#header-logo.embed img {
    width: 5em;
    height: 5em;
}

#header-title.embed {
    white-space: normal;
    padding-right: 0;
    line-height: 120%;
}

#header-subtitle.embed {
    white-space: normal;
    padding-right: 0;
}

#header-age.embed {
    top: .5em;
    right: .5em;
}

#content.embed {
    width: auto;
    padding: 1em 0;
    min-height: 300px;
}

#content-main.embed {
    float: none;
    width: auto;
}

#footer.embed {
    width: 100%;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    background-color: #fff;
    border-top: 1px solid #ccc;
    text-align: left;
    font-size: 80%;
    line-height: 120%;
}

#footer.embed div:first-child {
    display: flex;
    flex: 1 1 auto;
}

#footer.embed div:first-child a {
    flex: 1 1 auto;
}

#footer.embed div:last-child {
    flex: 1 0 auto;
}

