/* ============================================
   Blue Posts Slider - С ПРЕЛОАДЕРОМ
   Префикс: bps-
   ============================================ */

/* Обнуление */
.bps-wrapper,
.bps-wrapper * {
    box-sizing: border-box;
}

/* Основной контейнер */
.bps-wrapper {
    position: relative;
    margin: -50px 0 0 0;
    width: 100%;
    clear: both;
}

/* ПРЕЛОАДЕР - скрываем слайдер до инициализации */
.bps-slider:not(.slick-initialized) {
    opacity: 0;
    visibility: hidden;
    max-height: 660px;
    overflow: hidden;
}

.bps-slider.slick-initialized {
    opacity: 1;
    visibility: visible;
    max-height: none;
    overflow: visible;
    transition: opacity 0.3s ease-in-out;
}

/* Контейнер слайдера - СИНИЙ ФОН */
.bps-slider-container {
    position: relative;
    background: #2e75b6 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Слайдер */
.bps-slider {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    background: #2e75b6 !important;
}

.bps-slider .slick-list {
    margin: 0 !important;
    padding: 0 !important;
    background: #2e75b6 !important;
}

.bps-slider .slick-track {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #2e75b6 !important;
}

/* Один слайд */
.bps-slide-item {
    position: relative;
    outline: none;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #2e75b6 !important;
}

/* ИЗОБРАЖЕНИЕ */
.bps-slide-image {
    width: 100%;
    height: 499px !important;
    min-height: 499px !important;
    max-height: 499px !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.bps-slide-image img {
    width: 100% !important;
    height: 499px !important;
    min-height: 499px !important;
    max-height: 499px !important;
    object-fit: cover !important;
    display: block !important;
}

/* БЛОК С ТЕКСТОМ */
.bps-slide-caption {
    position: relative !important;
    width: 100% !important;
    background: transparent !important;
    padding: 20px 25px 0px 25px !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Заголовок */
.bps-slide-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #ffffff !important;
}

.bps-slide-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.bps-slide-title a:hover {
    color: #d83645 !important;
}

/* Отрывок */
.bps-slide-excerpt {
    margin-top: 10px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* СТРЕЛКИ - скрыты до инициализации */
.bps-wrapper .slick-prev,
.bps-wrapper .slick-next {
    position: absolute !important;
    top: 250px !important;
    transform: translateY(-50%) !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 1001 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Показываем стрелки ТОЛЬКО после инициализации */
.bps-slider.slick-initialized ~ .slick-prev,
.bps-slider.slick-initialized ~ .slick-next,
.slick-initialized .slick-prev,
.slick-initialized .slick-next {
    opacity: 0.7 !important;
    visibility: visible !important;
}

.bps-wrapper .slick-prev {
    left: 20px !important;
}

.bps-wrapper .slick-next {
    right: 20px !important;
}

.bps-wrapper .slick-prev:hover,
.bps-wrapper .slick-next:hover {
    background: rgba(46, 117, 182, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(46, 117, 182, 0.4) !important;
}

.bps-wrapper .slick-prev:active,
.bps-wrapper .slick-next:active {
    transform: translateY(-50%) scale(0.95) !important;
    background: rgba(216, 54, 69, 0.9) !important;
}

/* Скрываем Font Awesome иконки */
.bps-wrapper .slick-prev:before,
.bps-wrapper .slick-next:before {
    display: none !important;
}

/* SVG стрелка ВЛЕВО */
.bps-wrapper .slick-prev::after {
    content: '';
    display: block;
    width: 26px !important;
    height: 26px !important;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="%23ffffff"><path d="M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
    transform: rotate(180deg) !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)) !important;
}

/* SVG стрелка ВПРАВО */
.bps-wrapper .slick-next::after {
    content: '';
    display: block;
    width: 26px !important;
    height: 26px !important;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="%23ffffff"><path d="M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)) !important;
}

/* ПАГИНАЦИЯ - скрыта до инициализации */
.bps-wrapper .slick-dots {
    position: absolute !important;
    bottom: auto !important;
    top: 475px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
    z-index: 999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    list-style: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease-in-out !important;
}

/* Показываем точки после инициализации */
.slick-initialized .slick-dots {
    opacity: 1 !important;
    visibility: visible !important;
}

.bps-wrapper .slick-dots li {
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    pointer-events: auto !important;
}

/* ТОЧКИ */
.bps-wrapper .slick-dots li button {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    display: block !important;
}

.bps-wrapper .slick-dots li button:before {
    display: none !important;
    content: '' !important;
}

.bps-wrapper .slick-dots li button:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.2) !important;
}

/* АКТИВНАЯ ТОЧКА */
.bps-wrapper .slick-dots li.slick-active button {
    background: #d83645 !important;
    width: 10px !important;
    height: 10px !important;
    box-shadow: 0 2px 8px rgba(216, 54, 69, 0.6) !important;
}

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

/* Планшеты (720-999px) */
@media (min-width: 720px) and (max-width: 999px) {
    .bps-wrapper {
        margin: -40px 0 0 0;
    }

    .bps-slider:not(.slick-initialized) {
        max-height: 460px;
    }

    .bps-slide-image,
    .bps-slide-image img {
        height: 400px !important;
        min-height: 400px !important;
        max-height: 400px !important;
    }

    .bps-slide-caption {
        padding: 18px 20px !important;
    }

    .bps-slide-title {
        font-size: 20px !important;
    }

    .bps-wrapper .slick-prev,
    .bps-wrapper .slick-next {
        top: 200px !important;
        width: 48px !important;
        height: 48px !important;
    }

    .bps-wrapper .slick-prev {
        left: 15px !important;
    }

    .bps-wrapper .slick-next {
        right: 15px !important;
    }

    .bps-wrapper .slick-prev::after,
    .bps-wrapper .slick-next::after {
        width: 22px !important;
        height: 22px !important;
    }

    .bps-wrapper .slick-dots {
        top: 381px !important;
    }
}

/* Мобильные (480-720px) */
@media (max-width: 720px) {
    .bps-wrapper {
        margin: 0;
    }

    .bps-slider:not(.slick-initialized) {
        max-height: 320px;
    }

    .bps-slide-image,
    .bps-slide-image img {
        height: 250px !important;
        min-height: 250px !important;
        max-height: 250px !important;
    }

    .bps-slide-caption {
        padding: 18px 15px !important;
    }

    .bps-slide-title {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .bps-slide-excerpt {
        font-size: 14px !important;
    }

    .bps-wrapper .slick-prev,
    .bps-wrapper .slick-next {
        top: 125px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }

    .bps-wrapper .slick-prev {
        left: 10px !important;
    }

    .bps-wrapper .slick-next {
        right: 10px !important;
    }

    .bps-wrapper .slick-prev::after,
    .bps-wrapper .slick-next::after {
        width: 20px !important;
        height: 20px !important;
    }

    .bps-wrapper .slick-dots {
        top: 238px !important;
        gap: 8px !important;
    }
}

/* Узкие экраны (480-650px) */
@media (max-width: 650px) {
    .bps-slide-title {
        font-size: 15px !important;
    }

    .bps-wrapper .slick-dots {
        gap: 7px !important;
    }

    .bps-wrapper .slick-dots li button {
        width: 8px !important;
        height: 8px !important;
    }

    .bps-wrapper .slick-dots li.slick-active button {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Очень узкие экраны (до 480px) */
@media (max-width: 480px) {
    .bps-slider:not(.slick-initialized) {
        max-height: 300px;
    }

    .bps-slide-image,
    .bps-slide-image img {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
    }

    .bps-slide-caption {
        padding: 16px 12px !important;
    }

    .bps-slide-title {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .bps-wrapper .slick-prev,
    .bps-wrapper .slick-next {
        top: 120px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .bps-wrapper .slick-prev {
        left: 8px !important;
    }

    .bps-wrapper .slick-next {
        right: 8px !important;
    }

    .bps-wrapper .slick-prev::after,
    .bps-wrapper .slick-next::after {
        width: 18px !important;
        height: 18px !important;
    }

    .bps-wrapper .slick-dots {
        top: 228px !important;
        gap: 6px !important;
    }

    .bps-wrapper .slick-dots li button {
        width: 7px !important;
        height: 7px !important;
    }

    .bps-wrapper .slick-dots li.slick-active button {
        width: 7px !important;
        height: 7px !important;
    }
}

/* Экстремально узкие экраны (до 360px) */
@media (max-width: 360px) {
    .bps-slider:not(.slick-initialized) {
        max-height: 280px;
    }

    .bps-slide-image,
    .bps-slide-image img {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }

    .bps-slide-caption {
        padding: 15px 10px !important;
    }

    .bps-slide-title {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    .bps-wrapper .slick-prev,
    .bps-wrapper .slick-next {
        top: 110px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .bps-wrapper .slick-prev {
        left: 6px !important;
    }

    .bps-wrapper .slick-next {
        right: 6px !important;
    }

    .bps-wrapper .slick-prev::after,
    .bps-wrapper .slick-next::after {
        width: 16px !important;
        height: 16px !important;
    }

    .bps-wrapper .slick-dots {
        top: 209px !important;
        gap: 5px !important;
    }

    .bps-wrapper .slick-dots li button {
        width: 6px !important;
        height: 6px !important;
    }

    .bps-wrapper .slick-dots li.slick-active button {
        width: 6px !important;
        height: 6px !important;
    }
}
