/* Стили для слайдера клиентов */
.clients-section {
    background-color: #ffffff;
}

.clients-section .title-h2-main {
    font-size: 22px;
    font-weight: 700;
    font-family: Inter, sans-serif;
    margin-bottom: 20px;
    padding-top: 0;
}

.clients-slider {
    position: relative;
}

.clients-slider .slick-list {
    margin: 0 -15px;
}

.clients-slider .slick-slide {
    padding: 0 15px;
}

.client-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none;
    cursor: pointer;
}

.client-image {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.client-image:hover {
    transform: scale(1.05);
}

.client-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.client-name {
    color: #515151;
    text-align: center;
    font-family: Inter, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 22px;
}

/* Стили для стрелок основного слайдера */
.clients-slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.clients-slider .slick-arrow:hover {
    opacity: 0.7;
}

.clients-slider .slick-prev {
    left: -50px;
}

.clients-slider .slick-next {
    right: -50px;
}

.clients-slider .slick-arrow svg {
    width: 24px;
    height: 24px;
}

/* Стили для галереи (модальное окно) - полноэкранный режим */
.client-gallery-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
    overflow: hidden;
}

.client-gallery-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* На десктопе - горизонтальная раскладка */
@media (min-width: 768px) {
    .client-gallery-content {
        flex-direction: row;
    }
}

.client-gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.client-gallery-close:hover {
    color: #ccc;
}

.client-gallery-counter {
    position: absolute;
    top: 20px;
    left: 47%;
    transform: translateX(-47%);
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    z-index: 10001;
    font-family: Inter, sans-serif;
}

.client-gallery-main {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 0;
    height: 100%;
    width: 100%;
    padding-top: 60px;
    padding-bottom: 80px;
    box-sizing: border-box;
}

.client-gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.client-gallery-slider .slick-list {
    height: 100%;
}

.client-gallery-slider .slick-track {
    height: 100%;
    display: flex;
    align-items: center;
}

.client-gallery-slider .slick-slide {
    height: 100%;
}

.client-gallery-slider .slick-slide > div {
    height: 100%;
}

.client-gallery-slide {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    outline: none;
}

.gallery-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 0 80px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.client-gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.gallery-caption {
    color: #fff;
    font-size: 18px;
    margin-top: 20px;
    text-align: center;
    font-family: Inter, sans-serif;
    padding: 0 60px;
}

.gallery-nav-prev,
.gallery-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    z-index: 10001;
    padding: 0;
}

.gallery-nav-prev:hover,
.gallery-nav-next:hover {
    opacity: 0.7;
}

.gallery-nav-prev {
    left: 0;
}

.gallery-nav-next {
    right: 10px;
}

.gallery-nav-prev svg,
.gallery-nav-next svg {
    width: 48px;
    height: 48px;
}

/* Подпись с названием клиента внизу */
.gallery-client-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-family: Inter, sans-serif;
    padding: 20px;
    z-index: 10001;
}

/* Разделительная полоса между основным изображением и миниатюрами */
.gallery-divider {
    display: none;
    width: 1px;
    height: 100vh;
    background-color: #fff;
    flex-shrink: 0;
    z-index: 100002;
}


.client-gallery-thumbnails {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 80px 10px 20px;
    width: 149px;
    min-width: 149px;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    position: relative;
    z-index: 100001;
}

.client-gallery-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.client-gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.client-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.client-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Убеждаемся, что миниатюры всегда видны */
.client-gallery-thumbnails {
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 100px;
}

.gallery-thumbnail:hover {
    opacity: 0.8;
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: #fff;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.gallery-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Десктоп версия */
@media (min-width: 768px) {
    .client-gallery-content {
        flex-direction: row;
        padding: 0;
        align-items: stretch;
    }
    
    .client-gallery-close {
        top: 20px;
        right: 160px;
        z-index: 100003;
    }
    
    .client-gallery-counter {
        top: 20px;
        left: 47%;
        transform: translateX(-47%);
        z-index: 100002;
    }
    
    .client-gallery-main {
        flex: 1;
        margin: 0;
        margin-right: 0;
        margin-bottom: 0;
        order: 1;
        height: 100vh;
        position: relative;
        min-width: 0;
        overflow: hidden;
        padding-top: 60px;
    }
    
    .gallery-divider {
        display: block !important;
        order: 2;
    }
    
    .client-gallery-thumbnails {
        width: 149px !important;
        min-width: 149px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        order: 3;
        padding: 80px 10px 20px;
        position: relative;
        z-index: 100001;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
    }
    
    .gallery-image-container {
        padding: 0 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(100vh - 140px);
        overflow: hidden;
    }
    
    .client-gallery-slide img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }
    
    .gallery-client-name {
        width: 100%;
    }
    
    .gallery-nav-prev {
        left: 10px;
    }
    
    .gallery-nav-next {
        right: 10px;
    }
    
    .gallery-image-container {
        padding: 0 80px;
        height: 100%;
    }
}

/* Мобильная версия */
/* Адаптивные стили для слайдера клиентов */
@media (max-width: 767px) {
    .clients-section {
        padding: 40px 0;
    }

    .clients-section .title-h2-main {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .clients-slider .slick-list {
        margin: 0 -10px;
    }

    .clients-slider .slick-slide {
        padding: 0 10px;
    }

    .clients-slider .slick-prev {
        left: -30px;
    }

    .clients-slider .slick-next {
        right: -30px;
    }
}

@media (max-width: 480px) {
    .clients-slider .slick-prev {
        left: -20px;
    }

    .clients-slider .slick-next {
        right: -20px;
    }
}

/* Адаптивные стили для галереи */
@media (max-width: 767px) {
    .client-gallery-content {
        padding: 0;
        flex-direction: column;
    }
    
    /* Разделительная полоса - горизонтальная внизу на мобильных */
    .gallery-divider {
        display: block !important;
        width: 100%;
        height: 1px;
        order: 2;
    }
    
    .client-gallery-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 30px;
        height: 30px;
    }
    
    .client-gallery-counter {
        top: 10px;
        font-size: 16px;
    }
    
    .client-gallery-main {
        margin-bottom: 0;
        min-height: calc(100vh - 120px);
        height: calc(100vh - 120px);
        order: 1;
        padding-top: 50px;
    }
    
    .gallery-image-container {
        padding: 0 50px;
        height: calc(100vh - 200px);
    }
    
    .gallery-client-name {
        right: 0;
        bottom: 0;
        padding: 10px;
        font-size: 14px;
    }
    
    .gallery-nav-prev,
    .gallery-nav-next {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav-prev {
        left: 0;
    }
    
    .gallery-nav-next {
        right: 0;
    }
    
    .gallery-nav-prev svg,
    .gallery-nav-next svg {
        width: 32px;
        height: 32px;
    }
    
    .client-gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: 120px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        gap: 8px;
        order: 3;
        background-color: rgba(0, 0, 0, 0.5);
        height: auto;
    }
    
    .client-gallery-thumbnails::-webkit-scrollbar {
        height: 6px;
        width: auto;
    }
    
    .gallery-thumbnail {
        width: 100px;
        flex-shrink: 0;
        aspect-ratio: 1;
    }
}

@media (max-width: 480px) {
    .gallery-image-container {
        padding: 0 40px;
    }
    
    .gallery-nav-prev {
        left: 5px;
    }
    
    .gallery-nav-next {
        right: 5px;
    }
    
    .gallery-thumbnail {
        width: 80px;
    }
}

