/* Стили для слайдера услуг на странице объявления */

/* Заголовок секции услуг */
.services-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.all-services-link {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #2c5aa0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.all-services-link:hover {
    background-color: #2c5aa0;
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .services-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .all-services-link {
        align-self: flex-end;
    }
}

/* Контейнер для слайдера услуг */
.services-slider-container {
    position: relative;
    overflow: hidden;
    margin: 10px 0px 20px 0px;
}

/* Левый градиент (по умолчанию скрыт) */
.services-slider-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, #fff, transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Правый градиент (по умолчанию скрыт) */
.services-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to left, #fff, transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Показываем градиенты при наличии классов */
.services-slider-container.has-left-gradient::before {
    opacity: 1;
}

.services-slider-container.has-right-gradient::after {
    opacity: 1;
}

/* Стили для слайдера */
.services-slider-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    margin: 0px 10px;
}

/* Скрытие полосы прокрутки */
.services-slider-track::-webkit-scrollbar {
    display: none;
}
.services-slider-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ссылка на услугу */
.service-tile-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-shrink: 0;
}

/* Стили кнопок навигации - как на homepage */
.services-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #228B22;
    color: #228B22;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    display: none;
}

.services-slider-arrow.left {
    left: 0px;
}

.services-slider-arrow.right {
    right: 0px;
}

/* Стили плиток услуг - точно как на homepage */
.service-tile {
    flex: 0 0 auto;
    width: 280px;
    position: relative;
}

.service-image {
    width: 100%;
    height: 200px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.service-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.service-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.service-info {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    margin-top: 8px;
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0 0 4px 0;
}

.service-price {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin: 0;
}

/* Заголовок секции */
.services-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 30px 10px 15px 10px;
}

/* Темная тема */
body.dark-theme .service-title {
    color: #f5f5f5;
}

body.dark-theme .services-section-title {
    color: #f5f5f5;
}

body.dark-theme .services-slider-arrow {
    background: transparent;
    color: #228B22;
    border-color: #228B22;
}

body.dark-theme .services-slider-container::before {
    background: linear-gradient(to right, #383a3f, transparent);
}

body.dark-theme .services-slider-container::after {
    background: linear-gradient(to left, #383a3f, transparent);
}

/* Адаптивность */
@media (max-width: 768px) {
    .services-slider-container {
        margin: 15px 0;
    }
    
    .service-tile {
        width: 250px;
    }
    
    .services-section-title {
        font-size: 20px;
        margin: 20px 10px 10px 10px;
    }
    
    .services-slider-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .service-tile {
        width: 220px;
    }
    
    .service-image {
        height: 160px;
    }
}
