/* AiBlitzo Slider Fixes v1.0.0 (kept in v1.0.6) — Trending carousel (vertical Swiper, 4 visible, fixed height).
   Long titles wrap to 3-4 lines and need ~130px but each slot is ~110-115px, so titles
   overflow into the next slide. Clamp to 2 lines so the title + date fit the slot. */
#blogsy-hero-elastic-carousel .post-item h6.title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* v1.0.2 (kept in v1.0.6) — Slider reveal rule for logged-out visitors.
   The theme hides every slider with `.blogsy-posts-wrapper .swiper { opacity: 0 }` and reveals
   it with `.blogsy-posts-wrapper .swiper.swiper-initialized { opacity: 1 }` once Swiper starts.
   LiteSpeed's UCSS keeps the opacity:0 rule but STRIPS the reveal rule, because its crawler sees
   the pre-JS page where no .swiper-initialized class exists yet. Signed-in users get the full
   stylesheets so their sliders appear; visitors get the stripped UCSS so Main, Trending and
   "You May Have Missed" stay invisible forever. This restores the theme's own rule, served to
   visitors via the excluded stylesheet. */
.blogsy-posts-wrapper .swiper.swiper-initialized,
.blogsy-posts-wrapper .swiper.swiper-initialized + .carousel-nav-wrapper {
    opacity: 1 !important;
}

/* v1.0.4 (kept in v1.0.6) — Trending carousel height (the actual root cause of the blank Trending column).
   Measured live for visitors: the Trending .swiper is 34px tall and Swiper sets its slides to
   16px, so only a sliver of the first item shows. Why: the carousel's height is content-driven
   and the content is the slides themselves, so Swiper measures a collapsed box and the collapse
   is self-perpetuating — re-measuring (v1.0.3) just re-reads the same 34px. The hero row is
   557px tall and the Main slider fills it with a fixed 560px box; the Trending column is the
   same height but its widget is only as tall as its (collapsed) content. Fix: make the Trending
   column a flex column, stretch the widget to fill it, and let the carousel take the remaining
   height after the heading (~498px, matching Main). The 480px min-height is the fallback for
   stacked/mobile layouts where the column has no definite height. */
#blogsy-hero .pt-col-md-3:has(.blogsy-post-elastic-widget.hero-trending) {
    display: flex;
    flex-direction: column;
}
.blogsy-post-elastic-widget.hero-trending {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.blogsy-post-elastic-widget.hero-trending .blogsy-posts-wrapper.layout-carousel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.blogsy-post-elastic-widget.hero-trending .blogsy-posts-carousel-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#blogsy-hero-elastic-carousel .swiper {
    flex: 1 1 auto;
    min-height: 480px;
    max-height: 500px;
}

/* v1.0.4 (kept in v1.0.6) — AOS reveal rule for the article list.
   Measured live for visitors: the AOS library runs fine (all 13 data-aos elements get
   .aos-animate on scroll) but the articles stay at opacity:0, so the whole main article list
   is blank white for visitors. LiteSpeed's UCSS keeps AOS's hiding rule
   (html:not(.no-js) [data-aos^=fade]{opacity:0}) but STRIPS the reveal rule
   ([data-aos].aos-animate{opacity:1}), the same state-dependent stripping as the slider
   reveal. This restores it. */
html:not(.no-js) [data-aos^=fade][data-aos^=fade].aos-animate,
[data-aos].aos-animate {
    opacity: 1 !important;
    transform: translateZ(0) !important;
}

/* v1.0.5 — Swiper vertical-layout rule.
   Measured live for visitors after v1.0.4: the Trending .swiper is now 498px tall (the flex
   fix worked) but 2,549px WIDE, with its 15 slides laid out side-by-side in a row instead of
   stacked — so the 324px column shows an empty slice and no titles. Cause: Swiper's own rule
   `.swiper-vertical > .swiper-wrapper { flex-direction: column; }` appears ZERO times in the
   visitors' trimmed stylesheet (UCSS). Its crawler sees the pre-JS page, where no element has
   the swiper-vertical class yet, and strips the rule as unused — the same state-dependent
   stripping as the slider reveal (v1.0.2) and the AOS reveal (v1.0.4). Without it the wrapper
   stays a row, slides keep full width, and the flex item cannot shrink below the row's
   min-content width. This restores it. */
.swiper-vertical > .swiper-wrapper {
    flex-direction: column;
}

/* v1.0.6 — Cap the Trending carousel height (stops the re-measurement runaway).
   Measured live for visitors after v1.0.5: the Trending .swiper blew up to 17,895,316px tall
   and the sections below it collapsed to 0px. Cause, confirmed in Swiper's own source
   (updateSize/updateSlides): slide height = (container height - gaps) / 4, while the
   container's height is content-driven (the 15 slides stacked in a column). So each
   re-measurement grows the container ~3.75x — init, the load re-measure, and resize events
   multiply it until the page is millions of pixels tall. A max-height breaks the loop: the
   container can never grow past 500px (matching Main's 498px), so Swiper always measures
   ~500px and the slides stay ~113px. The 480px min-height + 500px max-height together pin
   the carousel to the design height on desktop and on stacked/mobile layouts alike. */
