/* ============================================================
   ph_simpleblog_carousel — homepage blog carousel styles
   Bootstrap 5.3 + Swiper (warehouse theme)
   Swiper navigation/pagination styles are inherited from the theme.
   ============================================================ */

/* ── Section ──────────────────────────────────────────────── */
/* .sb-blog-carousel {
    background-color: #f8f9fa;
} */

.sb-carousel-title {
    font-size: 1.75rem;
    font-weight: 700;
    /* letter-spacing: -0.01em; */
}

.sb-post-card__title a:hover,
.sb-carousel-title a:hover {
    text-decoration: underline !important;
}

.sb-blog-carousel a:not(.badge) {
    color: #007bff !important;
}

.sb-blog-carousel a.badge:hover {
    background-color: #000 !important;
}


/* ── Swiper container: bottom padding for pagination dots ─── */
.sb-swiper-blog {
    overflow: hidden;
    padding-bottom: 48px;
}

/* ── Pre-JS layout — matches Swiper config to prevent CLS ───
   Swiper adds .swiper-initialized once it runs; until then we
   replicate the same slidesPerView + spaceBetween (24px) per
   breakpoint so the page doesn't jump when JS kicks in.
   Swiper's bundled CSS already sets .swiper-wrapper { display:flex }.
   ─────────────────────────────────────────────────────────── */
.sb-swiper-blog:not(.swiper-initialized) .swiper-wrapper {
    gap: 24px;          /* matches spaceBetween: 24 in JS */
    flex-wrap: nowrap;  /* keep slides in one row, clipped by overflow:hidden */
}

/* mobile — 1 slide (default) */
.sb-swiper-blog:not(.swiper-initialized) .swiper-slide {
    flex-shrink: 0;
    width: 100%;
}

/* ≥576px — 2 slides: width = (100% - 1×gap) / 2 */
@media (min-width: 576px) {
    .sb-swiper-blog:not(.swiper-initialized) .swiper-slide {
        width: calc(50% - 12px);
    }
}

/* ≥992px — 3 slides: width = (100% - 2×gap) / 3 */
@media (min-width: 992px) {
    .sb-swiper-blog:not(.swiper-initialized) .swiper-slide {
        width: calc(33.3333% - 16px);
    }
}

/* ── Post card ────────────────────────────────────────────── */
.sb-post-card {
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sb-post-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-3px);
}

/* ── Thumbnail ────────────────────────────────────────────── */
.sb-post-card__image-link {
    border-radius: 0.5rem 0.5rem 0 0;
}

.sb-post-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sb-post-card__image-link:hover .sb-post-card__img {
    transform: scale(1.04);
}

/* ── Title link colour ────────────────────────────────────── */
.sb-post-card__title a {
    color: inherit;
    transition: color 0.2s ease;
}

.sb-post-card__title a:hover {
    color: var(--bs-primary, #0d6efd);
}

/* ── Excerpt: clamp to ~4 lines ───────────────────────────── */
.sb-post-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ── "See more" button ────────────────────────────────────── */
.sb-blog-carousel .text-center .btn-primary {
    min-width: 180px;
}
