/* Carousel контейнер */
.carousel-container {
    width: 100%;
    max-width: 100%;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.tiny-slider-wrapper {
    width: 100%;
}

/* Слайды */
.slide-item {
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.slide-item picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.slide-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.slide-image:hover {
    opacity: 0.9;
}

/* Описание под каруселью */
.carousel-description {
    max-width: 1200px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    text-align: center;
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 30px;
    transition: opacity 0.3s ease;
}

.carousel-description:empty {
    display: none;
}

/* Стили Tiny Slider - Кнопки навигации */
.tns-controls {
    text-align: center;
    margin: 1rem;
}

.tns-controls button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tns-controls button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.tns-controls button[data-controls="prev"]::before {
    content: '‹';
    font-size: 2rem;
    line-height: 1;
    color: #333;
}

.tns-controls button[data-controls="next"]::before {
    content: '›';
    font-size: 2rem;
    line-height: 1;
    color: #333;
}

/* Стили Tiny Slider - Индикаторы */
.tns-nav {
    text-align: center;
    margin-top: 1rem;
}

.tns-nav button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(180, 180, 180, 0.8);
    cursor: pointer;
    margin: 0 5px;
    padding: 0;
    transition: all 0.3s ease;
}

.tns-nav button:hover {
    background: rgba(0, 0, 0, 0.5);
}

.tns-nav button.tns-nav-active {
    background: rgba(0, 0, 0, 0.8);
    width: 12px;
    height: 12px;
}

/* Полноэкранный режим */
.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.fullscreen-gallery.active {
    display: flex;
}

.fullscreen-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Описание в полноэкранном режиме */
.fullscreen-description {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fullscreen-description:empty {
    display: none;
}

/* Скрытие описания при наведении на изображение */
.fullscreen-content:hover .fullscreen-description {
    opacity: 0;
    pointer-events: none;
}

/* Кнопка закрытия */
.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-close svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

/* Кнопки навигации в полноэкранном режиме */
.fullscreen-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-btn svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.fullscreen-btn-prev {
    left: 30px;
}

.fullscreen-btn-next {
    right: 30px;
}

/* Счетчик изображений */
.fullscreen-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10000;
}

@media (max-width: 1800px) {
    .slide-item {
        height: 650px;
    }
}

/* Мобильные устройства - вертикальная ориентация */
@media (max-width: 768px) and (orientation: portrait) {
    .slide-item {
        height: 600px;
    }
    
    .carousel-description {
        font-size: 0.9rem;
        margin: 0.5rem auto 1.5rem;
    }
    
    .tns-controls button {
        width: 40px;
        height: 40px;
    }
    
    .fullscreen-btn {
        width: 48px;
        height: 48px;
    }
    
    .fullscreen-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .fullscreen-btn-prev {
        left: 10px;
    }
    
    .fullscreen-btn-next {
        right: 10px;
    }
    
    .fullscreen-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .fullscreen-close svg {
        width: 24px;
        height: 24px;
    }
    
    .fullscreen-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .fullscreen-description {
        bottom: 60px;
        max-width: 90%;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}

/* Мобильные устройства - горизонтальная ориентация */
@media (max-width: 768px) and (orientation: landscape) {
    .slide-item {
        height: 290px;
    }
    
    .carousel-description {
        font-size: 0.85rem;
        margin: 0.5rem auto 1rem;
    }
    
    .tns-controls button {
        width: 36px;
        height: 36px;
    }
    
    .tns-controls button[data-controls="prev"]::before,
    .tns-controls button[data-controls="next"]::before {
        font-size: 1.5rem;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .slide-item {
        height: 500px;
    }
}
