.projects {
    background: transparent;
    width: 100%;
    max-width: 100%;
}

.projects-layout {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 24px);
    margin-top: 40px;
    align-items: start;
    width: 100%;
    max-width: 100%;
}

.projects-layout > * {
    min-width: 0;
}

.projects-heading {
    text-align: center;
}

.projects-heading p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
    gap: clamp(12px, 2vw, 20px);
    column-gap: clamp(12px, 2.5vw, 34px);
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    aspect-ratio: 874 / 548;
}

.project-card {
    width: 100%;
    min-width: 0;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}


.project-card.large {
    grid-row: 1 / 3;
    height: 100%;
    min-height: 0;
}

.project-bg {
    width: 100%;
    height: 100%;
    background: var(--dark-card2);
    position: absolute;
    inset: 0;
}

.project-bg-1 {
    background-image: url("../../img/Mask%20group/Mask%20group1.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.project-bg-2 {
    background-image: url("../../img/Mask%20group/Mask%20group2.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.project-bg-3 {
    background-image: url("../../img/Mask%20group/Mask%20group3.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.project-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
}

/* Вырез оверлея 258×68 у правого нижнего угла, скругление 30px у top-left выреза — см. img/project-cta-overlay-cutout.svg */
.project-card--has-cta .project-overlay {
    -webkit-mask-image: url('../../img/project-cta-overlay-cutout.svg');
    mask-image: url('../../img/project-cta-overlay-cutout.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.project-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: white;
}

.project-info {
    position: absolute;
    inset: 0;                        /* растягиваем на всю карточку */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;     /* контент начинается сверху */
    align-items: center;
    text-align: center;
    padding: 20px;                   /* горизонтальные отступы, вертикальные зададим отдельно */
    gap: 5px;                        /* расстояние между заголовком и подзаголовком */
}
/* Большая карточка – 392px от верха */
.project-card.large .project-info {
    padding-top: 392px;
}

/* Вторая карточка (верхняя правая) – 149px */
.project-card:nth-child(2) .project-info {
    padding-top: 149px;
}

/* Третья карточка (нижняя правая) – 108px */
.project-card:nth-child(3) .project-info {
    padding-top: 108px;
}
.project-title {
    font-size: 32px;
    font-weight: 500;
    color: #fff;
    line-height: 1.25;
    width: 100%;
    z-index: 3;
}

.project-subtitle {
    font-size: 18px;
    color: rgba(252, 252, 252, 1);
    width: 100%;
    font-weight: 400;
    z-index: 3;
}

.projects-cta {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 0;
    line-height: 0;
}
.projects-cta:before {
    display: block;
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 258px;
    height: 63px;
    background: rgba(255, 241, 231, 1);
    z-index: -1;
    border-top-left-radius: 30px;
}
/* Whole project card is a link into the objects catalog (filtered by type);
   the "Смотреть проекты" CTA sits above it and goes to all objects. */
.project-card__link {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
}
.project-card { cursor: pointer; }
.projects-cta { z-index: 5; }
