/* =========================================================
   Skill Tandem – Blog Enhancements
   - Reading Progress Bar
   - Back-to-Top smooth + show/hide
   - Related Posts Swiper
   - Lightbox for Blog Images
   ========================================================= */

/* --------- Reading Progress Bar (top of viewport) --------- */
.st-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #7ccaed 0%, #47b2e4 100%);
    z-index: 9999;
    transition: width .08s linear;
    pointer-events: none;
    opacity: .9;
}

/* --------- Back-to-Top: smoother transition --------- */
.back-to-top {
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease !important;
}
.back-to-top:hover {
    transform: translateY(-2px);
}

/* --------- Related Posts Swiper --------- */
.related-posts-full {
    background: #f5f8fc;
    margin-top: 3rem;
    padding: 3rem 0 3.5rem;
    border-top: 1px solid #e2e8f0;
}
.related-posts-full .related-posts-title {
    text-align: center;
    margin-bottom: 1.75rem;
    font-weight: 700;
}
.related-posts .swiper {
    position: relative;
    padding: 10px 0 44px;
    overflow: hidden;
}
.related-posts .swiper-slide {
    height: auto;
    display: flex;
}
.related-posts .swiper-slide .related-post-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.related-posts .swiper-slide .related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(1, 41, 112, .12);
}
.related-posts .swiper-pagination {
    bottom: 6px !important;
}
.related-posts .swiper-pagination-bullet-active {
    background: #47b2e4 !important;
}
.related-posts .swiper-button-prev,
.related-posts .swiper-button-next {
    color: #47b2e4;
    background: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    top: calc(50% - 22px);
}
.related-posts .swiper-button-prev {
    left: 6px;
}
.related-posts .swiper-button-next {
    right: 6px;
}
.related-posts .swiper-button-prev::after,
.related-posts .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}
.related-posts .swiper-button-disabled {
    opacity: 0 !important;
    pointer-events: none;
}
@media (max-width: 768px) {
    .related-posts .swiper-button-prev,
    .related-posts .swiper-button-next {
        display: none;
    }
}

/* --------- Lightbox for Blog-Content Images --------- */
.post-body-inner img {
    cursor: zoom-in;
    transition: transform .2s ease;
}
.post-body-inner img:hover {
    transform: scale(1.01);
}
.st-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity .2s ease;
    cursor: zoom-out;
}
.st-lightbox.open {
    display: flex;
    opacity: 1;
}
.st-lightbox img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: st-lightbox-in .22s ease;
}
.st-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
    transition: opacity .15s ease;
}
.st-lightbox-close:hover {
    opacity: 1;
}
@keyframes st-lightbox-in {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
