/* ===== ОСНОВНЫЕ СТИЛИ СЛАЙДЕРА ===== */

.adaptive-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.adaptive-slider .slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ===== SLIDES WRAPPER ===== */

.adaptive-slider .slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ===== OVERLAY GRID ===== */

.adaptive-slider .slider-arrows-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}

/* Grid управляется JavaScript */
.adaptive-slider .slider-left-column,
.adaptive-slider .slider-right-column {
    pointer-events: auto;
    z-index: 15;
}

/* ===== SLIDES ===== */

.adaptive-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1;
}

.adaptive-slider .slide.active {
    opacity: 1;
    z-index: 2;
}

/* ===== BACKGROUND ===== */

.adaptive-slider .slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.adaptive-slider .slide-background img {
    all: initial !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: unset !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
    /* Сохраняем JavaScript управление transform для анимации */
}

/* ===== IMAGE OVERLAY ===== */

.adaptive-slider .slide-background.overlay-light::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.adaptive-slider .slide-background.overlay-medium::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.adaptive-slider .slide-background.overlay-strong::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* ===== *** НОВАЯ ГРАДИЕНТНАЯ НАКЛАДКА *** ===== */

.adaptive-slider .slide-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* ===== CONTENT WRAPPER ===== */

.adaptive-slider .slide-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
}

.adaptive-slider .slide-content-wrapper.position-left {
    justify-content: flex-start;
}

.adaptive-slider .slide-content-wrapper.position-center {
    justify-content: center;
    text-align: center;
}

.adaptive-slider .slide-content-wrapper.position-right {
    justify-content: flex-end;
}

/* ===== SLIDE CONTENT ===== */

.adaptive-slider .slide-content {
    color: #ffffff;
    position: relative;
    z-index: 6;
    flex: 1;
    min-width: 0;
}

/* Выравнивание текста JavaScript управляемое */
.adaptive-slider .slide-content.text-left {
    text-align: left;
}

.adaptive-slider .slide-content.text-center {
    text-align: center;
}

.adaptive-slider .slide-content.text-right {
    text-align: right;
}

.adaptive-slider .slide-content.text-justify {
    text-align: justify;
    hyphens: auto;
}

/* ===== TYPOGRAPHY ===== */

.adaptive-slider .slide-title {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.adaptive-slider .slide-text {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    line-height: 1.6;
}

.adaptive-slider h3 {
    font-size: 1.3em;
    padding: 5px 0;
    margin: 0 !important;
}

/* ===== LINKS & BUTTONS ===== */

.adaptive-slider .slide-link-wrapper {
    margin-top: 10px;
}

.adaptive-slider .slide-link {
    display: inline-block;
    color: #ffffff;
    text-decoration: underline;
    /* JavaScript применяет стили ссылок */
}

.adaptive-slider .slide-button {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 1rem;
    transition: all 0.3s ease;
    /* JavaScript применяет стили кнопок */
}

.adaptive-slider .slide-button:hover {
    background-color: #0056b3;
}

/* ===== SECOND IMAGE ===== */

.adaptive-slider .slide-second-image-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    z-index: 6;
    /* JavaScript применяет позиционирование и размеры */
}

.adaptive-slider .slide-second-image-wrapper img,
.adaptive-slider .slider-second-image {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: relative !important;
    display: block !important;
    /* Убираем сброс для второго изображения, чтобы JS стили работали */
}

/* ===== NAVIGATION ARROWS ===== */

.adaptive-slider .slider-arrow {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: static; /* будет изменено на absolute через JavaScript */
}

/* Стили стрелок управляются JavaScript */

/* ===== NAVIGATION DOTS ===== */

.adaptive-slider-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    /* JavaScript применяет позиционирование */
}

.adaptive-slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    /* JavaScript применяет стили буллетов */
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 767px) {
    .adaptive-slider .slide-content-wrapper {
        padding: 15px;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
    }

    .adaptive-slider .slide-content {
        flex: none;
        margin: 15px 0 !important;
    }

    .adaptive-slider .slide-second-image-wrapper {
        margin: 20px 0 0 0 !important;
    }

    .adaptive-slider .slide-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .adaptive-slider .slide-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .adaptive-slider .slide-content.text-justify {
        text-align: left;
        hyphens: none;
    }

    .adaptive-slider .slider-arrows-overlay {
        grid-template-columns: 60px 1fr 60px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .adaptive-slider .slide-title {
        font-size: 2rem;
    }

    .adaptive-slider .slide-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .adaptive-slider .slide-content-wrapper {
        padding: 10px;
    }

    .adaptive-slider .slide-content {
        margin: 10px 0 !important;
    }

    .adaptive-slider .slide-second-image-wrapper {
        margin: 15px 0 0 0 !important;
    }

    .adaptive-slider .slide-title {
        font-size: 1.3rem;
    }

    .adaptive-slider .slide-text {
        font-size: 1.2rem;
    }
    .adaptive-slider .slide-text span {
        display: none;
    }

    /* Стрелки для самых маленьких экранов */
    .adaptive-slider .slider-arrows-overlay {
        grid-template-columns: 50px 1fr 50px !important;
    }
}

/* ===== Z-INDEX HIERARCHY ===== */

.adaptive-slider .slide-background {
    z-index: 1;
}

.adaptive-slider .slide-content-wrapper {
    z-index: 5;
}

.adaptive-slider .slider-arrows-overlay {
    z-index: 10;
}

/* Overlay контроллеры */
.adaptive-slider .slider-left-column,
.adaptive-slider .slider-right-column {
    z-index: 15;
}

.adaptive-slider .adaptive-slider-dots {
    z-index: 20;
}

/* ===== UTILITY STYLES ===== */

.adaptive-slider .slide-no-image {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

.adaptive-slider .slide-no-image::before {
    content: "Нет изображения";
    color: #999;
    font-size: 16px;
    font-style: italic;
}

/* ===== ANIMATIONS ===== */

@keyframes kenBurns {
    /* Кен Бёрнс анимация управляется JavaScript */
}

.adaptive-slider .slide {
    transition-property: opacity, transform;
    transition-timing-function: ease;
    /* JavaScript применяет длительность и функцию сглаживания */
}

/* ===== STATE STYLES ===== */

.adaptive-slider .slider-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
    z-index: 100;
}

.adaptive-slider .slider-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ff0000;
    background-color: #ffe6e6;
    padding: 20px;
    text-align: center;
    z-index: 100;
}

/* ===== DEBUG STYLES (for development only) ===== */

.adaptive-slider .slider-arrows-overlay {
    /* border: 2px solid rgba(0, 255, 0, 0.3); */
}