.completed-projects-item-info {
    border: 2px solid #ffc000;
    padding: 20px;
    margin: 0 0 20px 0;
    min-height: 200px;
}

.completed-projects-item-info-title {
    font-weight: bold;
    font-size: 22px;
    margin: 0 0 16px 0;
}

.completed-projects-item-info-planning-image img {
    max-height: 80px;
}

.completed-projects-item-info-text {
    font-size: 16px;
}

.completed-projects-item-info-text ul {
    margin: 0;
    padding: 0 0 0 12px;
}

.completed-projects-item-info-sub-title {
    font-weight: bold;
    font-size: 20px;
    line-height: 1.2;
    max-width: 300px;
    margin: 0 auto 14px;
}

.completed-projects-item-action a.btn {
    padding: 14px 20px;
    font-size: 16px;
    line-height: 16px;
}

.completed-projects-gallery {
    overflow: hidden;
}

.swiper-button-next, .swiper-button-prev {
    color: black;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 30px;
}

.preview-item {
    margin-bottom: 10px;
}

@media (min-width: 992px) {
    .completed-projects-item-info {
        padding: 16px;
    }

    .completed-projects-item-info-title {
        font-size: 20px;
    }

    .completed-projects-item-info-sub-title {
        font-size: 18px;
    }

    .col-md-2.no-gutters-md {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-md-2.no-gutters-md {
        padding-left: 0;
        padding-right: 0;
    }
}

.gallery-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* Выравниваем по высоте */
}

.gallery-main, .gallery-thumbs {
    display: flex;
    flex-direction: column;
}

/* Контейнер основного слайдера */
.gallery-main {
    padding-right: 15px;
}

/* Контейнер превью */
.gallery-thumbs {
    padding-left: 15px;
    justify-content: center;
}

/* Сетка превью */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -8px -5px; /* Компенсируем margin элементов */
}

.preview-item {
    width: calc(33.333% - 10px);
    margin: 8px 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.preview-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1; /* Фиксированное соотношение сторон для квадратных превью */
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.preview-item {
    opacity: 0.6;
}

.preview-item.active {
    opacity: 1;
    border: 2px solid #ffc000;
}

/* Адаптация для мобильных */
@media (max-width: 767px) {
    .gallery-main {
        width: 100%;
        padding: 0;
    }

    .gallery-main {
        margin-bottom: 15px;
    }

    .preview-item {
        width: calc(50% - 18px);
    }
}

.swiper-button-next, .swiper-button-prev {
    color: black;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 20px;
}

@media (min-width: 768px) and (max-width: 991px) {
    .gallery-thumbs {
        padding-right: 15px;
    }

    .main-swiper {
        margin-bottom: 30px;
    }
}

.main-swiper {
    height: 100%;
    max-height: 400px;
    width: 100%;
}

.flex-offer .completed-projects-item-info.offer-description {
    margin-top: 0;
}