/* Photo Slider Module Styles - Carousel Version */
.photo-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    height: 478px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 478px;
    margin: 0 auto;
    display: flex;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

.slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Скрываем клоны от скринридеров */
.slide-clone {
    visibility: visible !important;
}

.slide-clone[aria-hidden="true"] {
    visibility: visible !important;
}

.slide-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Фильтр затемнения поверх изображения */
.slide-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Text overlay */
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    padding: 40px 20px 20px;
    z-index: 2;
}

.slide-content {
    max-width: 1200px;
    margin: 0 auto;
    color: white;
    position: relative;
    z-index: 3;
}

.slide-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.slide-title--h2 {
    font-size: 30px;
    text-transform: uppercase;
    line-height: 1.25;
    padding-bottom: 25px;
    text-decoration: overline;
}

.slide-title--h1 {
    font-size: 24px;
    line-height: 1.25;
    padding-bottom: 25px;
    margin-bottom: 25px;
    text-indent: 50px;
}

.slide-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.slide-link:hover {
    color: #ffd700;
}

/* Новые стили для управления слайдером в правом нижнем углу */
.slider-controls {
    position: absolute;
    bottom: 20px;
    right: calc(50% - 600px);
    top: auto;
    display: flex;
    align-items: center;
    gap: 20px;
   
}

.slider-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
}

/* Navigation arrows */
.slider-prev,
.slider-next {
    background: none;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    
    border-radius: 50%;
}

.slider-prev:hover,
.slider-next:hover {
    
       
    transform: scale(1.1);
}

/* Счетчик слайдов */
.slider-counter {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 0 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.current-slide,
.total-slides {
    min-width: 20px;
    text-align: center;
}

.counter-separator {
    opacity: 0.7;
}

/* Navigation dots */
.slider-navigation {
    display: flex;
    gap: 8px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-dot.active,
.nav-dot:hover {
    background: white;
    transform: scale(1.2);
}

/* Container styles for proper centering */
.photo-slider-container {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 478px;
}

.module-photo-slider {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    height: 478px;
}

/* Visually hidden for accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Responsive design */
@media (max-width: 1200px) {
    .slide-content {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .slider-controls {
        right: calc(50% - 70px);
    }
}

@media (max-width: 768px) {
    .photo-slider,
    .slider-container,
    .photo-slider-container,
    .module-photo-slider {
        height: 350px;
    }
    
    .slide-overlay {
        padding: 30px 15px 15px;
    }
    
    .slide-title {
        font-size: 20px;
    }
    
    .slider-controls {
        bottom: 15px;
        right: 15px;
        gap: 15px;
    }
    
    .slider-arrows {
        gap: 8px;
    }
    
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .slider-counter {
        font-size: 14px;
        padding: 0 8px;
    }
    
    .slider-navigation {
        gap: 6px;
    }
    
    .nav-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .photo-slider,
    .slider-container,
    .photo-slider-container,
    .module-photo-slider {
        height: 250px;
    }
    
    .slide-overlay {
        padding: 20px 10px 10px;
    }
    
    .slide-title {
        font-size: 18px;
    }
    
    .slider-controls {
        bottom: 10px;
        right: 10px;
        gap: 10px;
        flex-direction: column-reverse;
        align-items: flex-end;
    }
    
    .slider-arrows {
        gap: 5px;
    }
    
    .slider-prev,
    .slider-next {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .slider-counter {
        font-size: 12px;
        padding: 0 5px;
    }
    
    .nav-dot {
        width: 8px;
        height: 8px;
    }
}

/* Accessibility */
.slider-prev:focus,
.slider-next:focus,
.nav-dot:focus {
    
    outline-offset: 2px;
}

/* Hide navigation when only one slide */
.photo-slider-single .slider-controls {
    display: none !important;
}