/* Обновлено сейчас для каталога выполненных проектов. */
#example-project-list .example-card-link {
    display: block;
    color: #000;
    text-decoration: none;
}

#example-project-list .image_card {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#example-project-list .image_card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#example-project-list .example-card-title {
    position: relative;
    top: -20px;
    padding: 0 8px;
    background: #c4c4c4;
    text-align: center;
}

#example-project-list .card_project_name {
    font-size: 30px;
    line-height: 1.2;
    color: #000;
}

#example-project-list .example-card:hover .card_project_name {
    color: #646464;
}

/* Новая разметка пагинации: отдельные строки при любой ширине без наложения кнопок. */
.example-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    padding: 0 12px;
}

.example-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 579px) {
    .example-pagination a:first-child,
    .example-pagination a:last-child {
        display: none;
    }
}

/* Вертикальные кадры вписываются целиком в тот же формат галереи 16:9. */
.example-house-page .detail_images .det_img_cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.example-house-page .detail_images .det_img_cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Центрируем только миниатюры вертикальных фотографий. */
.example-house-page .other_images .other_img_cell.portrait-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Компактная квадратная кнопка, как в других полноэкранных галереях сайта. */
.carouselOfComplete #closeFullCustom {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.75);
    z-index: 2001;
}

.carouselOfComplete #closeFullCustom .flickity-button-icon {
    position: static;
    display: block;
    width: 17px;
    height: 17px;
    flex: none;
}

/* Высота слайда не меняется во время загрузки вертикальных и горизонтальных снимков. */
.carouselOfComplete .carousel-modal .flickity-viewport,
.carouselOfComplete .carousel-modal .flickity-slider {
    height: 100% !important;
}

@media (max-width: 767px) {
    .carouselOfComplete #closeFullCustom {
        width: 34px;
        height: 34px;
    }

    .carouselOfComplete #closeFullCustom .flickity-button-icon {
        width: 21px;
        height: 21px;
    }
}

@media (max-width: 600px) {
    #example-project-list .example-card-title {
        padding: 0 4px;
    }

    #example-project-list .card_project_name {
        font-size: 26px;
    }
}

@media (max-width: 380px) {
    #example-project-list .card_project_name {
        font-size: 24px;
    }
}
