/* Базовые стили для слайдера */
.news_slider {
    position: relative;
    width: 100%;
    margin: 20px 0;
}



.news_slider .custom-swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding-bottom: 70px;
}

.news_slider .swiper-wrapper {
    box-sizing: border-box;
}

.news_slider .swiper-slide {
    width: 100% !important;
    display: none;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.news_slider .swiper-slide a{
    width: 100%;
    display: block;
    cursor: pointer;
}

.news_slider .swiper-slide.active {
    display: flex;
}

.news_slider .post-featured-image-news {
    justify-content: center;
    display: flex;
    width: 100%;
}

.news_slider .post-featured-image-news img {
    max-height: 300px;
    border-radius: 20px;
    width: 100%;
    object-fit: cover;
}

.news_slider .swiper-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news_slider .swiper-slide img:hover {
    transform: scale(1.02);
}

.news_slider .swiper-pagination {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background: white;
    color: #B1B1B1;
    padding: 9px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
	border: 1px solid #b1b1b1 !important;
    z-index: 10;
}

.news_slider .swiper1-button-next,
.news_slider .swiper1-button-prev { 
	position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: #B1B1B1;
    top: 90%;
    transform: translateY(-50%);
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: 1px solid #b1b1b1 !important;
    transition: background-color 0.3s ease;
}

.news_slider .swiper1-button-prev:hover,
.news_slider .swiper1-button-next:hover {
    background: rgb(9, 82, 127);
	color:white;
	border:  1px solid rgb(9, 82, 127) !important ;
}

.news_slider .swiper1-button-prev {
    left: 0px;
}

.news_slider .swiper1-button-next {
    right: 0px;
}

.news_slider * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .news_slider .swiper-slide img {
        height: 250px;
        border-radius: 5px;
    }
    
    .news_slider .swiper1-button-next,
    .news_slider .swiper1-button-prev {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Стили для кастомного лайтбокса (упрощенные) */
.custom-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
}

.custom-lightbox-overlay.active {
    display: flex;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.custom-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-lightbox-close {
    position: absolute;
	padding: unset;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.custom-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.custom-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.custom-lightbox-slides {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    box-sizing: border-box;
}

.custom-lightbox-slide {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.custom-lightbox-slide.active {
    display: flex;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%);
}

.custom-lightbox-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000000;
}

.custom-lightbox-loader.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Предотвращение скролла body */
body.custom-lightbox-open {
    overflow: hidden;
}

/* Адаптивность */
@media (max-width: 768px) {
	.news_slider {
		margin: 0px;
	}

    .custom-lightbox-slides {
        padding: 40px 15px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .custom-lightbox-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
    
    .custom-lightbox-counter {
        top: 15px;
    }
}