.projects-section {
    position: relative;
}

.projects-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.projects-first-row, .projects-second-row, .projects-third-row  {
    width: 100%;
    height: 341px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.projects-first-row .project-card:first-child, .projects-third-row .project-card:last-child {
    flex: 2;
}

.project-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    flex: 1;
    background-color: rgb(148, 159, 170, 0.7);
    border-radius: 20px;
    padding: 30px;
    gap: 10px;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: end;
    color: var(--white-elements-color);
    transition: background-color 1s ease;
}

.project-card:hover {
    background-color: #2c3e50;
}

.project-more-info {
    position: absolute;
    bottom: -200px;
    left: 0;
    opacity: 0;
    padding: 30px;
    justify-content: end;
    transition: all 1.5s ease;
}

.project-card:hover .project-more-info {
    bottom: 0;
    opacity: 1;
    justify-content: end;
}

.project-main-info {
    z-index: 1;
    margin: 0;
    padding: 0;
    transition: all 1.5s ease;
}

.project-card:hover .project-main-info {
    margin-bottom: 200px;
}

.project-card h1 {
    color: var(--white-elements-color);
}

.project-more-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 30px;
    z-index: 1;
}

.project-more-info-block {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100% !important;
}

.white-variant-btn {
    border: none !important;
}

.white-variant-btn:hover {
    background: var(--second-background-color);
    color: var(--main-color);
}

.project-more-info-title {
    font-weight: bold;
}

.detail-project-info {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.detail-project-text {
    width: 100%;
    background: var(--second-background-color);
    border-radius: 20px;
    padding: 60px 30px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 30px;
    text-wrap: balance;
}

.card {
    width: 100%;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
}

.why-us-list {
    justify-content: space-between;
    height: 100%;
}

.central-justify {
    justify-content: center !important;
}

.pretty-text {
    text-wrap: pretty;
}

.detail-project-section {
    padding: 10px;
}

.main-card {
    justify-content: unset !important;
}

.projects-background {
    object-fit: cover;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    z-index: 0;
    filter: brightness(60%);
}

.automobilist .projects-background {
    height: auto;
}

.automobilist:hover .project-main-info {
    margin-bottom: 150px;
}

@media (max-width: 1439px) {
    .projects-first-row .project-card:first-child, .projects-third-row .project-card:last-child {
        flex: 1;
    }
}

@media (max-width: 1023px) {
    .project-more-info-block {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .projects-first-row, .projects-second-row, .projects-third-row  {
        flex-direction: column;
        height: fit-content;
    }

    .projects-block {
        gap: 10px;
    }

    .project-more-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: start;
        gap: 20px;
    }

    .detail-project-info {
        flex-direction: column;
    }

    .detail-project-text {
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .project-more-info-block {
        flex-direction: column;
        gap: 10px;
    }

    .card {
        text-align: center;
        align-items: center;
    }
}