/* pages/main/promo/css/promo-section.css */

/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.promo-section {
    padding: 0;
    /* margin: var(--spacing-xl) 0; */
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Общие стили для промо */
.promo-single,
.promo-slide {
    position: relative;
    min-height: 260px;
    height: 200px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Изображение промо */
.promo-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.promo-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.promo-single:hover .promo-bg,
.promo-slide.active .promo-bg {
    transform: scale(1.05);
}

/* ===== КАРУСЕЛЬ ===== */
.promo-carousel {
    position: relative;
    overflow: hidden;
}

.promo-carousel.initialized .promo-track {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-track {
    display: flex;
    min-height: 200px;
    height: 200px;
    will-change: transform;
}

.promo-slide {
    min-width: 100%;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.promo-slide.active {
    opacity: 1;
    transform: translateX(0);
}

/* ===== ТОЧКИ НАВИГАЦИИ ===== */
.promo-dots {
    position: absolute;
    bottom: var(--spacing-md);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
}

.dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot.active {
    background: var(--color-yellow);
    transform: scale(1.2);
}

.dot.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Большие экраны (1440px и больше) */
@media (min-width: 1440px) {
    .promo-single,
    .promo-slide {
        min-height: 220px;
        height: 220px;
    }
    
    .promo-track {
        min-height: 220px;
        height: 220px;
    }
}

/* Планшеты (768px - 1023px) */
@media (max-width: 1023px) {
    .promo-section {
        margin: var(--spacing-lg) 0;
    }
    
    .promo-single,
    .promo-slide {
        min-height: 180px;
        height: 180px;
    }
    
    .promo-track {
        min-height: 180px;
        height: 180px;
    }
    
    .promo-dots {
        bottom: var(--spacing-sm);
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* Мобильные (576px - 767px) */
@media (max-width: 767px) {
    .promo-section {
        margin: var(--spacing-md) 0;
    }
    
    .promo-single,
    .promo-slide {
        min-height: 160px;
        height: 160px;
    }
    
    .promo-track {
        min-height: 160px;
        height: 160px;
    }
    
    .promo-dots {
        bottom: 12px;
    }
    
    .dot {
        width: 7px;
        height: 7px;
    }
    
    .dot::before {
        width: 16px;
        height: 16px;
    }
}

/* Маленькие мобильные (до 575px) */
@media (max-width: 575px) {
    .promo-single,
    .promo-slide {
        min-height: 140px;
        height: 140px;
    }
    
    .promo-track {
        min-height: 140px;
        height: 140px;
    }
    
    .promo-dots {
        bottom: 10px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .dot::before {
        width: 14px;
        height: 14px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .promo-single,
    .promo-slide {
        min-height: 120px;
        height: 120px;
    }
    
    .promo-track {
        min-height: 120px;
        height: 120px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .dot {
        background: rgba(255, 255, 255, 0.4);
    }
    
    .dot.active {
        background: var(--color-yellow);
    }
    
    .dot:hover {
        background: rgba(255, 255, 255, 0.6);
    }
}

/* Устройства без hover */
@media (hover: none) and (pointer: coarse) {
    .promo-single:active,
    .promo-slide:active {
        transform: scale(0.98);
    }
}

/* Анимация появления */
.promo-section {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Плавный параллакс эффект при скролле */
@media (prefers-reduced-motion: no-preference) {
    .promo-section {
        will-change: transform;
    }
}

/* Оптимизация для медленных соединений */
@media (prefers-reduced-motion: reduce) {
    .promo-carousel.initialized .promo-track,
    .promo-slide,
    .promo-bg,
    .dot {
        transition: none !important;
        animation: none !important;
    }
    
    .promo-section {
        animation: none;
    }
}