/* =============== POST SLIDER FIXES =============== */
/* Horizontal Slider Container */


/* Arrows */


/* Custom Post Slider Layout */
.custom-post-slider {
    position: relative;
    width: 85%;
    margin: 0 auto;
    overflow: hidden;
}

/* Ensure full-width inner content */
.slider-inner {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    width: 100%;
    margin: 0 auto;
    gap:0px;

}
.slide {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: min-content min-content;
    gap: 20px;
    box-sizing: border-box;
    min-width: 100%;
    max-width: 100%;
}

.slider-item {
    background: #f5f5f5;
    padding: 1rem;
    box-sizing: border-box;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex;
    flex-direction: column;
}

.slider-item.large {
    grid-row: span 2;
}

.slider-item.large  .post-date{
    margin-top: auto;
    font-size: 0.8em;
    color: #888;    
}

.slider-item.large  img{
    aspect-ratio: 1 / 1;
    object-fit: cover;  
}

/* Arrows positioned *outside* of 80% container */
.slider-controls {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    display: none;
}

.slider-controls button {
    pointer-events: auto;
    background: none;
    border: none;
    font-size: 2rem;
    color: #003478;
    cursor: pointer;
    opacity: 0.8;
}
.slider-controls button:hover {
    opacity: 1;
}

/* =============== CUSTOM POST SLIDER SMALL ITEM LAYOUT =============== */
.slider-item.small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 15px;
    align-items: start;
}

.slider-item.small .post-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.slider-item.small .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-item.small .post-date {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.8em;
    color: #888;
    margin-top: auto;
    text-align: left;
}

/* Title and Date */
.slider-item .post-title {
    font-weight: bold;
    margin: 10px 0 5px;
    font-size: 2em !important;
    line-height: 1.2em !important;
    font-family: 'IBM Plex Serif' !important;
    font-weight: 300 !important;
}
.slider-item .post-title a {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;    
}

@media (min-width: 1300px) {
.slider-item .post-title a {
    -webkit-line-clamp: 8;   
}
}

@media (max-width: 767px) {
    .slider-inner {
        display: flex;
    }
    .slide {
        flex: 0 0 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        padding: 0 10px;
        box-sizing: border-box;
        grid-template-rows: min-content;
    }

    .slider-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .slider-item .post-thumb img {
        /* height: 180px; */
        object-fit: cover;
        width: 100%;
    }

    .slider-controls {
        position: relative;
        display: flex;
        justify-content: center;
        gap: 40px;
        margin-top: 20px;
        order: 99;
        width: 100%;
    }

    .custom-post-slider {
        padding: 0;
        width: 100%;
    }

    /* Remove extra space below slider wrapper, and make it a flex column */
    .custom-post-slider-wrapper {
        margin-bottom: 0;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    /* Adjust .slider-item.large layout for mobile */
    .slider-item.large {
        margin-bottom: 0;
        padding-bottom: 20px;
    }
    .slider-item.large .post-date {
        /* margin-top: auto; */
        margin-top:10px!important;
        margin-bottom: 0;
    }

  .slider-item.large {
    grid-row: auto !important;
    height: auto !important;
  }    
}

/* Remove extra vertical space below slider */
.custom-post-slider,
.slider-inner,
.slide {
    height: auto !important;
}

.custom-post-slider-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Category badge on post image */
.slider-item .post-thumb {
    position: relative;
}
.slider-item .post-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #357E44;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 4px 8px;
    z-index: 2;
    border-radius: 2px;
}