/* Fonts */
@font-face {
    font-family: 'PT Sans';
    src: url('../fonts/PTSans-Italic.woff2') format('woff2'),
    url('../fonts/PTSans-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'PT Sans';
    src: url('../fonts/PTSans-BoldItalic.woff2') format('woff2'),
    url('../fonts/PTSans-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Futura Book';
    src: url('../fonts/futurabookc-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Futura Demi';
    src: url('../fonts/futurademic-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

/* Main wrap */
.b-specproject {
    padding: 0 5px;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-smoothing: antialiased;
}

@media (max-width: 1030px) {
    .b-specproject {
        padding: 0;
    }
}

/* Reset */
.b-specproject * {
    margin: 0;
    padding: 0;
    font: inherit;
    box-sizing: border-box;
}

/* Header */
.b-specproject__header {
    width: 700px;
    height: 180px;
    margin: 0 0 20px;
    color: #000;
    background: #fff;
}

.b-specproject__header-title {
    margin: 0 0 10px;
    font: normal 400 24px/1 'Futura Demi', sans-serif;
    text-transform: uppercase;
    color: #e84e0e;
}

.b-specproject__header-text {
    font: normal 400 19px/24px 'Futura Book', sans-serif;
    text-align: justify;
}

.b-specproject__header-text strong {
    font-weight: 700;
}

@media (max-width: 1030px) {
    .b-specproject__header {
        width: 100%;
        height: auto;
        padding: 15px 15px 0;
        text-align: center;
    }

    .b-specproject__header-title {
        font-size: 16px;
    }

    .b-specproject__header-text {
        font-size: 14px;
        text-align: center;
    }
}

@media (max-width: 320px) {
    .b-specproject__header-title {
        font-size: 14px;
    }

    .b-specproject__header-text {
        font-size: 12px;
    }
}

/* Tiles */
.b-specproject__tiles-row {
    display: flex;
    margin: 0 0 20px;
}

.b-specproject__tiles-col {
    flex: 0 0 auto;
}

.b-specproject__tiles-col + .b-specproject__tiles-col {
    margin-left: 20px;
}

.b-specproject__tiles-col--w1 {
    width: 700px;
}

.b-specproject__tiles-col--w2 {
    width: 300px;
}

.b-specproject__tile {
    position: relative;
    width: 100%;
    height: 400px;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.b-specproject__tile + .b-specproject__tile {
    margin-left: 20px;
}

.b-specproject__tile--w0 {
    width: 760px;
    height: 400px;
}

.b-specproject__tile--w1 {
    width: 700px;
    height: 400px;
}

.b-specproject__tile--w2 {
    width: 500px;
    height: 400px;
}

.b-specproject__tile--w3 {
    width: 300px;
    height: 600px;
}

.b-specproject__tile--w4 {
    width: 240px;
    height: 400px;
}

.b-specproject__tile-wrap-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: inherit;
}

.b-specproject__tile-wrap-link:hover {
    color: inherit;
}

.b-specproject__tile-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 25px 5px 25px 25px;
    color: #fff;
    background: linear-gradient(rgba(0, 0, 0, 0) 11.25%, rgba(0, 0, 0, 0.9) 100%);
}

.b-specproject__tile-title {
    margin: 0 0 10px;
    font: normal 400 24px/1 'Futura Demi', sans-serif;
}

.b-specproject__tile-text {
    margin: 0 0 15px;
    font: normal 400 18px/1 'Futura Book', sans-serif;
}

.b-specproject__tile-link {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 160px;
    height: 50px;
    font: normal 400 12px/1 'Futura Demi', sans-serif;
    text-decoration: none;
    text-transform: uppercase;
}

.b-specproject__tile-link:before,
.b-specproject__tile-link:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1.25s;
}

.b-specproject__tile-link:before {
    background: #f4bd6d linear-gradient(30deg, #f4bd6d, #cc7f29);
}

.b-specproject__tile-link:after {
    opacity: 0;
    background: #cc7f29 linear-gradient(30deg, #cc7f29, #f4bd6d);
}

.b-specproject__tile-wrap-link:hover .b-specproject__tile-link:after,
.b-specproject__tile-link:hover:after {
    opacity: 1;
}

.b-specproject__tile-link-text {
    position: relative;
    z-index: 1;
    color: #691918;
}

@media (max-width: 1030px) {
    .b-specproject__tiles-row {
        flex-wrap: wrap;
    }

    .b-specproject__tiles-col {
        width: 100%;
        margin: 0;
    }

    .b-specproject__tiles-col + .b-specproject__tiles-col {
        margin: 20px 0 0;
    }

    .b-specproject__tile {
        width: 100%;
        margin: 0;
        background-size: cover;
    }

    .b-specproject__tile + .b-specproject__tile {
        margin: 20px auto 0;
    }

    .b-specproject__tile-content {
        padding: 30px 15px;
    }

    .b-specproject__tile-content br {
        display: none;
    }
}

/* Secret Santa */
.b-specproject__secret-santa {
    position: relative;
    width: 1020px;
    height: 660px;
    padding: 30px 0;
    color: #fff;
    background: #e84e10 url(https://static.sobaka.ru/uploads/specprojects/dltnewyear/secret-santa.png) no-repeat 37px 110px;
}

.b-specproject__secret-santa-title {
    margin: 0 0 10px;
    font: normal 400 24px/1 'Futura Demi', sans-serif;
    text-align: center;
}

.b-specproject__secret-santa-text {
    font: normal 400 18px/1 'Futura Book', sans-serif;
    text-align: center;
    color: #f2d5ab;
}

.b-specproject__secret-santa-gifts {
    width: 100%;
    height: 530px;
    cursor: pointer;
}

.b-specproject__secret-santa-popup {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    transform: scale(1);
    transition: top 0s, transform 0.3s 0s;
}

.b-specproject__secret-santa-popup--hidden {
    top: -9999px;
    transform: scale(0);
    transition: transform 0.3s, top 0s 0.3s;
}

.b-specproject__secret-santa-popup-dialog {
    position: absolute;
    top: 25%;
    left: 50%;
    width:  680px;
    height: 460px;
    padding: 20px;
    background: #fff repeating-linear-gradient(-45deg, #fff, #fff 15px, #b50f28 15px, #b50f28 30px);
    box-shadow: 12px 12px 0 0 rgba(0, 0, 0, 0.37);
    transform: translate(-50%, 0);
}

.b-specproject__secret-santa-popup-close {
    position: absolute;
    top: 35px;
    right: 35px;
    z-index: 1;
    color: #b50f28;
    background: none;
    border: none;
}

.b-specproject__secret-santa-popup-close svg {
    display: block;
    fill: currentColor;
    stroke: currentColor;
}

.b-specproject__secret-santa-popup-content {
    display: flex;
    justify-content: center;
    height: 100%;
    color: #484848;
    background: #fff;
}

.b-specproject__secret-santa-popup-col:nth-child(1) {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 180px;
    padding: 0 0 20px 15px;
}

.b-specproject__secret-santa-popup-col:nth-child(2) {
    width: 355px;
    padding: 85px 10px 20px 15px;
}

.b-specproject__secret-santa-popup-image {
    position: absolute;
    top: 0;
    right: 0;
}

.b-specproject__secret-santa-popup-clink {
    color: inherit;
    text-decoration: underline;
}

.b-specproject__secret-santa-popup-clink:hover {
    text-decoration: none;
}

.b-specproject__secret-santa-popup-brand {
    position: relative;
    margin: 0 0 5px;
    font: italic 700 13px/1 'PT Sans', sans-serif;
    text-transform: uppercase;
    white-space: nowrap;
}

.b-specproject__secret-santa-popup-title {
    position: relative;
    margin: 0 0 5px;
    font: italic 400 13px/1 'PT Sans', sans-serif;
    white-space: nowrap;
}

.b-specproject__secret-santa-popup-price {
    position: relative;
    font: italic 700 13px/1 'PT Sans', sans-serif;
    white-space: nowrap;
}

.b-specproject__secret-santa-popup-story {
    font: normal 400 16px/18px 'Futura Book', sans-serif;
}

.b-specproject__secret-santa-popup-story strong {
    display: block;
    margin: 0 0 5px;
    font: normal 400 18px/22px 'Futura Demi', sans-serif;
    color: #b50f28;
}

@media (max-width: 1030px) {
    .b-specproject__secret-santa {
        width: 100%;
        height: auto;
        padding: 35px 0 20px;
        background-image: none;
    }

    .b-specproject__secret-santa-title {
        margin: 0 0 10px;
        font: normal 400 24px/1 'Futura Demi', sans-serif;
        text-align: center;
    }

    .b-specproject__secret-santa-text {
        max-width: 80%;
        margin: 0 auto;
        font: normal 400 18px/1 'Futura Book', sans-serif;
        text-align: center;
        color: #f2d5ab;
    }

    .b-specproject__secret-santa-text br {
        display: none;
    }

    .b-specproject__secret-santa-gifts {
        max-width: 100%;
        width: 629px;
        height: auto;
        background: url(https://static.sobaka.ru/uploads/specprojects/dltnewyear/secret-santa-compact.png) no-repeat;
        background-size: contain;
    }

    .b-specproject__secret-santa-gifts:before {
        content: '';
        display: block;
        width: 100%;
        padding: calc(508 / 629 * 100%) 0 0;
    }

    .b-specproject__secret-santa-popup {
        padding: 10px;
    }

    .b-specproject__secret-santa-popup-dialog {
        position: relative;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        min-height: 100%;
        width:  auto;
        height: auto;
        padding: 10px;
        background: #fff repeating-linear-gradient(-45deg, #fff 10px, #fff 25px, #b50f28 0px, #b50f28 40px);
        box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.37);
        transform: none;
    }

    .b-specproject__secret-santa-popup-close {
        top: 20px;
        right: 20px;
    }

    .b-specproject__secret-santa-popup-content {
        flex: 1 1 auto;
        display: block;
        padding: 10px 0 20px;
    }

    .b-specproject__secret-santa-popup-col:nth-child(1) {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 0 10px;
        padding: 0;
    }

    .b-specproject__secret-santa-popup-col:nth-child(2) {
        width: 80%;
        margin: 0 auto;
        padding: 0;
    }

    .b-specproject__secret-santa-popup-image-wrap {
        position: relative;
        max-width: 238px;
        width: 25%;
        margin: 0 auto;
    }

    .b-specproject__secret-santa-popup-image-wrap:before {
        content: '';
        display: block;
        width: 100%;
        padding: calc(364 / 238 * 100%) 0 0;
    }

    .b-specproject__secret-santa-popup-image {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        margin: auto;
    }

    .b-specproject__secret-santa-popup-clink {
        position: absolute;
        right: 10px;
        bottom: 0;
        max-width: 25%;
    }

    .b-specproject__secret-santa-popup-brand,
    .b-specproject__secret-santa-popup-title,
    .b-specproject__secret-santa-popup-price {
        font-size: 10px;
        white-space: normal;
    }

    .b-specproject__secret-santa-popup-story {
        font-size: 14px;
        text-align: center;
    }

    .b-specproject__secret-santa-popup-story strong {
        display: inline;
        font-size: inherit;
        line-height: inherit;
    }

    .b-specproject__secret-santa-popup-story br {
        display: none;
    }
}

/* Share */
.b-specproject__share {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 30px;
}

.b-specproject__share-title {
    font: normal 400 14px/1 'Futura Demi', sans-serif;
}

.b-specproject__share-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 0 20px;
}

.b-specproject__share-btn {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
    font-size: 1px;
    color: #fff;
    background: #e4a654;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    transition: background 0.3s;
}

.b-specproject__share-btn + .b-specproject__share-btn {
    margin-left: 5px;
}

.b-specproject__share-btn:focus:active {
    outline: none;
}

.b-specproject__share-btn:hover {
    background: #cc802b;
}

.b-specproject__share-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    fill: currentColor;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* Hide the search form of the main layout */
#search-form {
    display: none;
}