/* ============================================================
   ND Premium — Projects Section
   /assets/css/nd-premium/projects.css

   Сетка 5 карточек, base 1200px контент:
   Ряд 1: [карточка 1, 47%] [карточка 2, 53%]   фото 564 / 640
   Ряд 2: [карточка 3, 100%]                     фото 1200×611
   Ряд 3: [карточка 4, 55%] [карточка 5, 45%]   фото 640 / 517
   ============================================================ */

.ndp-proj {
    background: #1a1a1a;
    width: 100%;
    overflow: hidden;
    margin-top: -1px;
}

.ndp-proj__block {
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
    padding-bottom: 100px;
    padding-top: 70px;
}


.ndp-proj .section-header__title {
 white-space: wrap; 
}



/* ── Сетка ── */
.ndp-proj__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 1280px;   
    padding: 0 40px;
}

/* ── Ряды ── */
.ndp-proj__row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
}

/* Ряд 2 — полная ширина, отступ сверху по макету */
.ndp-proj__row--2 {
    margin-top: 100px;
}

/* Ряд 3 — отступ сверху */
.ndp-proj__row--3 {

flex-direction: row-reverse;
}

/* ── Карточки — пропорции из макета ── */

/* Ряд 1 */
.ndp-proj__card--1 { flex: 0 0 calc(47% - 12px); margin-top:120px; }   /* 564 / 1200 ≈ 47% */
.ndp-proj__card--2 { flex: 0 0 calc(53% - 12px); }   /* 640 / 1200 ≈ 53% */

/* Ряд 2 — полная ширина */
.ndp-proj__card--3 { flex: 0 0 100%; }

/* Ряд 3 */
.ndp-proj__card--4 { flex: 0 0 calc(55% - 12px); margin-top: -65px;}   /* 640 / 1157 ≈ 55% */
.ndp-proj__card--5 { flex: 0 0 calc(45% - 12px); margin-top:486px;  }   /* 517 / 1157 ≈ 45% */

/* ── Фото в карточке ── */
.ndp-proj__photo {
    width: 100%;
    background: #3b3b3b;
    overflow: hidden;
    position: relative;
}

/* Высоты фото по макету (aspect-ratio) */
.ndp-proj__card--1 .ndp-proj__photo { aspect-ratio: 564 / 564; }   /* квадрат */
.ndp-proj__card--2 .ndp-proj__photo { aspect-ratio: 640 / 811; }   /* высокое */
.ndp-proj__card--3 .ndp-proj__photo { aspect-ratio: 1200 / 611; }  /* широкое */
.ndp-proj__card--4 .ndp-proj__photo { aspect-ratio: 640 / 407; }
.ndp-proj__card--5 .ndp-proj__photo { aspect-ratio: 517 / 564; }

.ndp-proj__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Инфо-блок под фото ── */
.ndp-proj__info {
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Строка: тип — — — адрес */
.ndp-proj__meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ndp-proj__type {
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: 1.25;
    font-weight: 400;
}

/* Разделитель — горизонтальная линия */
.ndp-proj__sep {
    flex: 1 1 auto;
    max-width: 62px;
    height: 1px;
    background: rgba(255,255,255,0.3);
    display: block;
}

.ndp-proj__address {
    color: #473109;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: 1.1;
    font-weight: 400;
}

.ndp-proj__desc {
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(14px, 1.04vw, 24px);
    line-height: 1.25;
    font-weight: 400;
    margin: 0;
    max-width: 433px;
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1640px){
   .ndp-proj .section-header__title { max-width: 834px;}
.ndp-proj .section-header { margin-left: -432px;}
}

@media (max-width: 1366px){
   .ndp-proj .section-header__title { max-width: 650px;}
.ndp-proj .section-header { margin-left: -116px;}
.ndp-proj__desc { max-width: 300px;}
.ndp-proj__card--5 { margin-top:410px;  }  


}

@media (max-width: 1024px){
.ndp-proj .section-header__title {
    max-width: 531px;
}
}
@media (max-width: 900px) {
    .ndp-proj__row--1,
    .ndp-proj__row--3 {
        flex-direction: column;
        gap: 40px;
    }

    .ndp-proj__card--1,
    .ndp-proj__card--2,
    .ndp-proj__card--4,
    .ndp-proj__card--5 {
        flex: 0 0 100%;
    }

    /* На мобайле все фото становятся 4:3 */
    .ndp-proj__card--2 .ndp-proj__photo,
    .ndp-proj__card--5 .ndp-proj__photo {
        aspect-ratio: 4 / 3;
    }

    .ndp-proj__desc { max-width: none; }
    
.ndp-proj__card--1 { margin-top: 0; }  
.ndp-proj__card--4 {  margin-top: 40px;}  
.ndp-proj__card--5 {  margin-top: 0;  }  
.ndp-proj__row--2 { margin-top: 40px;}
}

@media (max-width: 600px) {
    .ndp-proj__block { gap: 0; padding-bottom: 60px; }
    .ndp-proj__grid  { padding: 0 24px; }
    .ndp-proj__row--2,
    .ndp-proj__row--3 { margin-top: 24px; }

.ndp-proj .section-header {
    margin-left: -85px;
}
}
