/* =========================================================
   STEPUP POST GRID & SLIDER v1.4.0
   ========================================================= */

.stepup-pgs-wrap,
.stepup-pgs-wrap * {
    box-sizing: border-box;
}

.stepup-pgs-wrap {
    width: 100%;
    font-family: 'DM Sans', Arial, sans-serif;
}

/* GRID */
.stepup-pgs-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--stepup-columns, 3), minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* CARD */
.stepup-pgs-card {
    min-width: 0;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    transition: none !important;
    transform: none !important;
}

.stepup-pgs-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* FEATURED IMAGE */
.stepup-pgs-image-link {
    display: block;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #f1f1f1;
    text-decoration: none !important;
}

.stepup-pgs-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center;
    transition: transform .5s ease !important;
}

.stepup-pgs-card:hover .stepup-pgs-image {
    transform: scale(1.08) !important;
}

/* CONTENT */
.stepup-pgs-body {
    padding: 17px 15px 18px;
    background: #fff;
}

.stepup-pgs-body .stepup-pgs-title a{
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-family: 'IBM Plex Sans'!important;
    font-size: 18px !important;
    line-height: 1.45 !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    color:#000!important;
}

.stepup-pgs-title a {
    color: #111 !important;
    text-decoration: none !important;
}

.stepup-pgs-title a:hover {
    color: #111 !important;
}

/* AUTHOR */
.stepup-pgs-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    color: #222;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.stepup-pgs-author-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    overflow: hidden;
    border-radius: 50%;
}

.stepup-pgs-author-avatar-img,
.stepup-pgs-author-avatar img {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    object-fit: cover;
}

.stepup-pgs-author-name {
    display: inline-block;
}

/* DATE */
.stepup-pgs-date {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 13px;
    color: #222;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.stepup-pgs-date-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 15px;
    color: #111;
}

.stepup-pgs-date-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* EXCERPT: maximum 10 words from PHP */
.stepup-pgs-excerpt {
    margin: 0 0 13px !important;
    padding: 0 !important;
    color: #111 !important;
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.7 !important;
}

/* READ MORE */
.stepup-pgs-read-more {
    display: inline-block;
    margin: 0 !important;
    padding: 0 !important;
    color: #ff6400 !important;
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
}

.stepup-pgs-read-more:hover {
    color: #111 !important;
}

/* VIEW ALL */
.stepup-pgs-view-all-wrap {
    text-align: center;
    margin-top: 28px;
}

.stepup-pgs-view-all {
    min-width: 120px;
    padding: 11px 28px !important;
    border: 1px solid #ff6400 !important;
    border-radius: 24px !important;
    background: #ff6400 !important;
    color: #fff !important;
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer;
}

.stepup-pgs-view-all:hover {
    background: #000 !important;
    border-color: #000 !important;
}

/* PAGINATION */
.stepup-pgs-pagination {
    margin-top: 30px;
    text-align: center;
}

.stepup-pgs-pagination ul {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.stepup-pgs-pagination li {
    margin: 0 !important;
    padding: 0 !important;
}

.stepup-pgs-pagination a,
.stepup-pgs-pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 14px;
    text-decoration: none !important;
}

.stepup-pgs-pagination .current,
.stepup-pgs-pagination a:hover {
    background: #ff6400;
    border-color: #ff6400;
    color: #fff;
}

/* SLIDER */
.stepup-pgs-slider-wrap {
    position: relative;
    width: 100%;
    padding: 0 52px;
}

.stepup-pgs-slider-viewport {
    width: 100%;
    overflow: hidden;
}

.stepup-pgs-slider-track {
    display: flex;
    gap: 20px;
    transition: transform .5s ease;
    will-change: transform;
}

.stepup-pgs-slide {
    flex: 0 0 calc((100% - (20px * (var(--stepup-columns, 3) - 1))) / var(--stepup-columns, 3));
}

.stepup-pgs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 50%;
    background: #ff6400 !important;
    color: #fff !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer;
    box-shadow: none !important;
}

.stepup-pgs-arrow:hover {
    background: #000 !important;
}

.stepup-pgs-prev { left: 0; }
.stepup-pgs-next { right: 0; }

.stepup-pgs-hidden-card {
    display: none !important;
}

.stepup-pgs-empty {
    width: 100%;
    padding: 20px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

/* TABLET */
@media (max-width: 1024px) {
    .stepup-pgs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stepup-pgs-slide {
        flex-basis: calc((100% - 20px) / 2);
    }
}

/* MOBILE */
@media (max-width: 767px) {
    /* Grid becomes a swipeable horizontal slider on mobile */
    .stepup-pgs-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        gap: 16px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 0 0 8px !important;
        scrollbar-width: none;
    }

    .stepup-pgs-grid::-webkit-scrollbar {
        display: none;
    }

    .stepup-pgs-grid .stepup-pgs-card {
        flex: 0 0 88% !important;
        width: 88% !important;
        scroll-snap-align: start;
    }

    .stepup-pgs-image-link {
        height: 220px;
    }

    .stepup-pgs-body {
        padding: 16px 15px 18px;
    }

    .stepup-pgs-title {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }

    .stepup-pgs-slider-wrap {
        padding: 0 42px;
    }

    .stepup-pgs-slider-track {
        --stepup-columns: 1 !important;
        gap: 0;
    }

    .stepup-pgs-slide {
        flex-basis: 100%;
    }

    .stepup-pgs-arrow {
        width: 34px;
        height: 34px;
        font-size: 17px !important;
    }
}
