*,
*::before,
*::after {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Lovelace';
    src: url('../assets/fonts/Lovelace-Medium.woff2') format('woff2'),
    url('../assets/fonts/Lovelace-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

a:active,
a:hover,
a {
    text-decoration: none;
}

body {
    min-height: 100vh;
    max-width: 1920px;
    line-height: 1.5;
    background-color: #4A2428;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

body:after {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-image: url('../images/background.png');
    background-repeat: no-repeat;
    z-index: 1;
}

.projects-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 39px;
    margin-bottom: 115px;
    position: relative;
    z-index: 3;
}

.projects-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

.projects-card {
    width: 100%;
    height: 562px;
    max-width: 384px;
    background: #431C20;
    cursor: pointer;
    transition: all 220ms ease-in-out;
}

.projects-card.card {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.projects-card.card.active {
    scale: 1.3;
    position: relative;
    z-index: 3;
}

.projects-card.card.active .projects-card__title {
    opacity: 1;
}

.projects-card.image .projects-card__title {
    text-align: center;
}

.projects-card__title {
    font-size: 20px;
    font-family: Lovelace;
    color: #FFFFFF;
    opacity: .3;
}

.projects-card-image {
    width: 100%;
    height: 562px;
    position: relative;
    z-index: 2;
    opacity: .7;
    transition: all 220ms ease-in-out;
}

.projects-card-image.active {
    scale: 1.3;
    position: relative;
    z-index: 3;
    opacity: 1;
}

.projects-card-image:has(.projects-card__soon) img {
    opacity: .3;
}

.projects-card-image:has(.projects-card__soon) .projects-card__soon {
    opacity: 1;
}

.projects-card__soon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-family: Lovelace;
    color: #FFFFFF;
    white-space: nowrap;
}

.projects-card-image.active .projects-card__title {
    opacity: 1;
    font-size: 24px;
}

.projects-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media screen and (max-width: 1600px) {
    .projects-card-image {
        height: 462px;
    }

    .projects-card {
        height: 462px;
    }

    .projects-card__soon {
        font-size: 23px;
    }
}

@media screen and (max-width: 1200px) {
    .projects-card-image {
        height: 362px;
    }

    .projects-card {
        height: 362px;
    }

    .projects-card__soon {
        font-size: 23px;
    }
}

@media screen and (max-width: 900px) {
    .projects-card-image {
        height: 300px;
    }

    .projects-card {
        height: 300px;
    }

    .projects-card__soon {
        font-size: 17px;
    }
}

@media screen and (max-width: 768px) {
    .projects-container {
        flex-direction: column;
        gap: 71px
    }

    .projects-header {
        margin-bottom: 80px;
    }

    .projects-card {
        max-width: 360px;
        height: 500px;
    }

    .projects-card-image {
        height: 500px;
        opacity: 1;
    }

    .projects-card-image.active .projects-card__title {
        opacity: 1;
        font-size: 20px;
    }

    .projects-card-image .projects-card__title {
        opacity: 1;
        font-size: 20px;
    }

    .projects-card-image.active {
        scale: 1;
    }

    .projects-card.card.active {
        scale: 1;
    }

    .projects-card.card .projects-card__title {
        opacity: 1;
    }

    .projects-card:first-child {
        order: 1;
    }

    .projects-card:last-child {
        order: 2;
        margin-bottom: 30px;
    }

    .projects-card:nth-child(3) {
        order: -1;
    }

    body {
        overflow: auto;
    }

    .projects-card__soon {
        font-size: 27px;
    }
}

@media screen and (max-width: 415px) {

    .projects-header {
        margin-bottom: 65px;
    }

    .projects-container {
        gap: 31px
    }

    .projects-card.card {
        max-width: 180px;
        height: 260px;
    }

    .projects-card-image {
        max-width: 180px;
        height: 260px;
    }
    .projects-card.image {
        background: transparent;
        height: 300px;
    }

    .projects-card {
        display: flex;
        justify-content: center;
    }

    .projects-card__soon {
        font-size: 15px;
    }
}
