/* Base slider container */
.news-slider-container {
    background-color: #F3FAFA;
    margin-top: 5px;
    overflow: hidden;
}

/* Full-width modifier */
.news-slider-container.full-width {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
}

/* Preview container */
.news-slider-preview {
    max-width: 100%;
    overflow: hidden;
    margin-top: 5px;
    margin-bottom: 20px;
}

/* Images: force fit and remove external margins */
.news-slider-container img,
.news-slider-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    margin: 0 !important;     /* kill any gutter on the image itself */
}

/* === Slick overrides to keep slides contained === */

/* 1) Make the viewport really clip overflow */
.news-slider-container .slick-list {
    overflow: hidden;
    width: 100%;
}

/* 2) Clamp the track width and enforce flex layout */
.news-slider-container .slick-track {
    display: flex !important;
    width: 100% !important;
}

/* 3) Allow each slide to shrink, and add gutters via padding */
.news-slider-container .slick-slide {
    box-sizing: border-box;
    padding: 0 5px;           /* half the original 10px margin on each side */
    min-width: 0;             /* flex children can shrink below content size */
}

/* === Modal styles === */
.news-slider-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.news-slider-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.news-slider-modal-content {
    position: relative;
    z-index: 2;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.news-slider-modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.news-slider-modal-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    margin: auto;
}

.news-slider-modal-close {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
}

.news-slider-modal-prev,
.news-slider-modal-next {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
}

.news-slider-modal-navigation {
    position: absolute;
    height: 100%;
    width: 70%;
}

/* Responsive tweaks */
@media (max-width: 756px) {
    .news-slider-modal-content {
        max-width: 90%;
        max-height: 90%;
    }
    .news-slider-modal-image-container {
        flex-direction: column;
    }
    .news-slider-modal-prev,
    .news-slider-modal-next {
        margin: 10px;
    }
}

@media (max-width: 1400px) {
    .text-container {
        grid-template-columns: 85% 15% !important;
    }
}
