.latest-sites-section {
    position: relative;
}
.latest-sites-section .swiper-container-wrapper {
    position: relative;
    margin: 0 -15px;
    padding: 0 15px;
}
.latest-sites-section .latest-sites-swiper {
    padding: 0;
    position: relative;
}
.latest-sites-section .swiper-slide {
    height: auto;
}

/* Переопределяем стили Swiper для кнопок */
.latest-sites-section .swiper-container-wrapper .swiper-button-next,
.latest-sites-section .swiper-container-wrapper .swiper-button-prev {
    color: #6c757d;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%);
    z-index: 10;
    margin-top: 0 !important;
}

/* Убираем стандартные отступы Swiper */
.latest-sites-section .swiper-horizontal .swiper-container-wrapper .swiper-button-next,
.latest-sites-section .swiper-horizontal .swiper-container-wrapper .swiper-button-prev,
.latest-sites-section .swiper-horizontal ~ .swiper-container-wrapper .swiper-button-next,
.latest-sites-section .swiper-horizontal ~ .swiper-container-wrapper .swiper-button-prev {
    margin-top: 0 !important;
    top: 50% !important;
}

.latest-sites-section .swiper-container-wrapper .swiper-button-next:hover,
.latest-sites-section .swiper-container-wrapper .swiper-button-prev:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.latest-sites-section .swiper-container-wrapper .swiper-button-next:after,
.latest-sites-section .swiper-container-wrapper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

.latest-sites-section .swiper-container-wrapper .swiper-button-prev {
    left: 5px;
}

.latest-sites-section .swiper-container-wrapper .swiper-button-next {
    right: 5px;
}

.latest-sites-section .swiper-button-next, 
.latest-sites-section .swiper-button-prev {
    svg {
        height: 50%;
        object-fit: contain;
        transform-origin: center;
        width: 50%;
        fill: currentColor;
        pointer-events: none;
    }
}
.latest-sites-section .card {
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 10px;
}
.latest-sites-section .card:hover {
    color: #212529 !important;
}
/* Убираем отступ у последней карточки в мобильной версии */
.latest-sites-section .card:last-child {
    margin-bottom: 0 !important;
}
.latest-sites-section .flex-grow-1 {
    min-width: 0;
}
/* Стили для иконок сайтов */
.latest-sites-section .site-icon {
    width: 74px !important;
    height: 74px !important;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}
/* Стиль для текста описания */
.latest-sites-section .description-text {
    font-size: 12.5px;
    line-height: 1.3;
}
/* Выравнивание текста по левому краю */
.latest-sites-section .text-left {
    text-align: left !important;
}
/* Обрезка текста с многоточием для заголовка (одна строка) */
.latest-sites-section .text-truncate-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
/* Обрезка текста с многоточием для описания (три строки) */
.latest-sites-section .text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 3.9em;
    text-align: left;
}
/* Для браузеров, не поддерживающих -webkit-line-clamp */
@supports not (-webkit-line-clamp: 3) {
    .latest-sites-section .text-truncate-3 {
        position: relative;
        max-height: 3.9em;
        overflow: hidden;
        text-align: left;
    }
    .latest-sites-section .text-truncate-3::after {
        content: '...';
        position: absolute;
        bottom: 0;
        right: 0;
        background: white;
        padding-left: 4px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .latest-sites-section .swiper-container-wrapper .swiper-button-next,
    .latest-sites-section .swiper-container-wrapper .swiper-button-prev {
        display: none;
    }
    
    .latest-sites-section .swiper-container-wrapper {
        margin: 0;
        padding: 0 15px 0 0; /* Добавляем отступ справа чтобы показать часть следующего слайда */
        overflow: visible;
    }
    
    .latest-sites-section .latest-sites-swiper {
        overflow: visible;
    }
    
    .latest-sites-section .swiper-slide {
        /* Добавляем небольшой отступ между слайдами на мобильных */
        padding-right: 10px;
    }
    
    /* Показываем часть следующего слайда */
    .latest-sites-swiper .swiper-wrapper {
        overflow: visible;
    }
}