/* Основные стили секции */
.new-buildings {
    margin: 0 auto;
    position: relative;
    background: #FFFFFF;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.view-all {
    background: #FFD700;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 11;
    font-family: inherit;
    transition: transform 0.2s;
    white-space: nowrap;
}

.view-all:hover {
    transform: scale(1.05);
}

.newbuilding-card-name {
    font-size: 1.8vh;
    margin: 12px 0 6px;
    line-height: 1.3;
    color: #333;
    font-weight: 600;
}

.image-container {
    width: 100%;
    height: var(--image-height, 200px);
    position: relative;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background: #f5f5f5;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
}

.date {
    font-size: 14px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    position: absolute;
    bottom: 12px;
    left: 12px;
    backdrop-filter: blur(2px);
}

/* Контейнер слайдера */
.swiper-container {
    position: relative;
    overflow: visible;
    padding: 20px 0;
    margin-top: 2vh;
    width: 100%;
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
    gap: 20px;
    padding: 0 20px;
    height: 45vh;
    box-sizing: border-box;
}

.swiper-slide {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: none;
    user-select: none;
    flex: 0 0 auto;
    width: calc(100% - 40px);
    min-width: 280px;
    scroll-snap-align: start;
    align-items: center;
}

.newbuilding-card {
    background: rgba(238, 238, 238, 0.3);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 6px 10px 4px rgb(0 0 0 / 20%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 60%;
    transition: transform 0.2s;
    margin: 0 10px;
    width: 100%;
}

.newbuilding-card:hover {
    transform: translateY(-3px);
}

.newbuilding-card h3 {
    font-size: 1.8vh;
    margin: 12px 0 6px;
    line-height: 1.3;
    color: #333;
}

.newbuilding-card p {
    font-size: 1.6vh;
    color: #666;
    margin: 4px 0;
    line-height: 1.4;
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5vh;
    color: #666;
    margin-top: auto;
    padding-top: 12px;
}

.nb_round {
    color: #FFD700;
    font-size: 1.7vh;
    margin-right: 6px;
    display: inline-block;
}

.price {
    font-weight: 700;
    color: #000;
    white-space: nowrap;
}

/* Стили кнопок навигации */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 48px;
    height: 48px;
    z-index: 10;
    opacity: 0.9;
    transition: all 0.3s;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    outline: none;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    content: '';
    width: 16px;
    height: 16px;
    border: solid #333;
    border-width: 0 3px 3px 0;
    display: inline-block;
}

.swiper-button-prev::after {
    transform: rotate(135deg);
    margin-left: 4px;
}

.swiper-button-next::after {
    transform: rotate(-45deg);
    margin-right: 4px;
}

.swiper-button-prev {
    left: 0;
}

.swiper-button-next {
    right: 0;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
    transform: translateY(-50%) !important;
}

/* Мобильная адаптация */
@media (max-width: 575.98px) {
    .new-buildings {
        padding: 15px;
    }
    
    .view-all {
        position: relative;
        top: auto;
        right: auto;
        display: block;
        margin: 0 auto 15px;
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .swiper-container {
        padding: 10px 0;
        margin-top: 0;
    }
    
    .swiper-wrapper {
        gap: 15px;
        padding: 0 15px;
    }
    
    .swiper-slide {
        width: calc(100% - 30px);
        min-width: calc(100% - 30px);
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        width: 40px;
        height: 40px;
        top: 45%;
    }
    
    .swiper-button-prev {
        left: -5px;
    }
    
    .swiper-button-next {
        right: -5px;
    }
    
    .swiper-button-prev::after,
    .swiper-button-next::after {
        width: 14px;
        height: 14px;
    }
    
    .newbuilding-card {
        padding: 15px;
        margin: 0 5px;
    }
    
    .newbuilding-card h3 {
        font-size: 15px;
    }
    
    .newbuilding-card p {
        font-size: 13px;
    }
    
    .card-info {
        font-size: 13px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .swiper-slide {
        width: calc(50% - 20px);
        min-width: calc(50% - 20px);
    }
    
    .swiper-button-prev {
        left: 10px;
    }
    
    .swiper-button-next {
        right: 10px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .swiper-slide {
        width: calc(33.333% - 20px);
        min-width: calc(33.333% - 20px);
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .swiper-slide {
        width: calc(25% - 20px);
        min-width: calc(25% - 20px);
    }
}

@media (min-width: 1200px) {
    .swiper-slide {
        width: calc(20% - 20px);
        min-width: calc(20% - 20px);
    }
    
    .swiper-button-prev {
        left: 20px;
    }
    
    .swiper-button-next {
        right: 20px;
    }
}