/* =========================================================
   HOME - LATEST LIBRARY BOOKS
   Completely isolated from the rest of the website
========================================================= */

.library-home-latest-section {
    width: 100%;
    margin: 55px 0 0;
    padding: 0;
}


/* =========================================================
   HEADER
========================================================= */

.library-home-latest-header {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
}

.library-home-latest-heading {
    min-width: 0;
}

.library-home-latest-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 7px;

    font-size: 12px;
    font-weight: 700;

    color: #777;

    letter-spacing: .2px;
}

.library-home-latest-eyebrow::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;
}

.library-home-latest-heading h2 {
    margin: 0;

    font-size: 25px;
    font-weight: 800;

    line-height: 1.6;

    color: #1f1f1f;
}

.library-home-latest-heading p {
    margin: 4px 0 0;

    font-size: 13px;
    font-weight: 400;

    line-height: 1.8;

    color: #777;
}


/* =========================================================
   MORE LINK
========================================================= */

.library-home-latest-more {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 15px;

    border: 1px solid #e8e8e8;
    border-radius: 12px;

    background: #fff;

    color: #333;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.library-home-latest-more i {
    font-size: 15px;

    transition: transform .25s ease;
}

.library-home-latest-more:hover {
    color: #222;

    border-color: #d8d8d8;

    transform: translateY(-2px);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .06);
}

.library-home-latest-more:hover i {
    transform: translateX(-4px);
}


/* =========================================================
   SLIDER WRAPPER
========================================================= */

.library-home-latest-slider {
    position: relative;

    width: 100%;

    overflow: hidden;

    padding: 3px 2px 45px;
}


/* =========================================================
   SWIPER
========================================================= */

.library-home-latest-slider .swiper {
    width: 100%;
    overflow: visible;
}

.library-home-latest-slider .swiper-wrapper {
    align-items: stretch;
}

.library-home-latest-slider .swiper-slide {
    height: auto;

    display: flex;
    justify-content: center;
}


/* =========================================================
   BOOK CARD
   فقط جلد کتاب
========================================================= */

.library-home-book-card {
    position: relative;

    display: block;

    width: 155px;
    max-width: 155px;

    overflow: hidden;

    background: transparent;

    border: none;
    border-radius: 12px;

    text-decoration: none;

    box-shadow: none;

    transition:
        transform .3s ease,
        filter .3s ease;
}

.library-home-book-card:hover {
    color: inherit;
    text-decoration: none;

    transform: translateY(-5px);

    box-shadow: none;
}


/* =========================================================
   COVER
========================================================= */

.library-home-book-cover {
    position: relative;

    width: 155px;
    height: 215px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #f6f6f6,
            #eaeaea
        );

    border-radius: 12px;
}

.library-home-book-cover img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .55s cubic-bezier(.2, .7, .2, 1);
}

.library-home-book-card:hover
.library-home-book-cover img {
    transform: scale(1.055);
}


/* =========================================================
   COVER OVERLAY
========================================================= */

.library-home-book-cover-overlay {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 14px;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .62),
            rgba(0, 0, 0, 0) 55%
        );

    opacity: 0;

    transition: opacity .3s ease;
}

.library-home-book-card:hover
.library-home-book-cover-overlay {
    opacity: 1;
}

.library-home-book-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 13px;

    border-radius: 9px;

    background: rgba(255, 255, 255, .95);

    color: #222;

    font-size: 11px;
    font-weight: 700;

    transform: translateY(7px);

    transition:
        transform .3s ease,
        background .3s ease;
}

.library-home-book-card:hover
.library-home-book-read {
    transform: translateY(0);
}

.library-home-book-read i {
    font-size: 13px;
}


/* =========================================================
   NO COVER
========================================================= */

.library-home-book-no-cover {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #b1b1b1;

    font-size: 42px;
}


/* =========================================================
   HIDE OLD CONTENT
========================================================= */

.library-home-book-content {
    display: none !important;
}


/* =========================================================
   NAVIGATION
========================================================= */

.library-home-latest-prev,
.library-home-latest-next {
    position: absolute;

    top: calc(50% - 23px);

    z-index: 10;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 50%;

    background: rgba(255, 255, 255, .96);

    color: #333;

    box-shadow:
        0 7px 22px rgba(0, 0, 0, .10);

    cursor: pointer;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.library-home-latest-prev:hover,
.library-home-latest-next:hover {
    background: #fff;

    transform: scale(1.08);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, .15);
}

.library-home-latest-prev {
    right: 8px;
}

.library-home-latest-next {
    left: 8px;
}

.library-home-latest-prev i,
.library-home-latest-next i {
    font-size: 17px;
}


/* =========================================================
   PAGINATION
========================================================= */

.library-home-latest-pagination {
    position: absolute !important;

    bottom: 7px !important;

    left: 0 !important;
    right: 0 !important;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 5px;
}

.library-home-latest-pagination
.swiper-pagination-bullet {
    width: 7px;
    height: 7px;

    margin: 0 !important;

    opacity: 1;

    background: #d6d6d6;

    transition:
        width .3s ease,
        border-radius .3s ease;
}

.library-home-latest-pagination
.swiper-pagination-bullet-active {
    width: 22px;

    border-radius: 10px;

    background: #555;
}


/* =========================================================
   EMPTY
========================================================= */

.library-home-latest-empty {
    width: 100%;

    padding: 55px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px dashed #dedede;
    border-radius: 18px;

    color: #888;

    text-align: center;
}

.library-home-latest-empty i {
    margin-bottom: 12px;

    font-size: 38px;
}

.library-home-latest-empty strong {
    font-size: 14px;
}

.library-home-latest-empty span {
    margin-top: 5px;

    font-size: 11px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .library-home-latest-section {
        margin-top: 45px;
    }

    .library-home-latest-header {
        margin-bottom: 20px;
    }

    .library-home-latest-heading h2 {
        font-size: 22px;
    }

    .library-home-latest-slider {
        padding-bottom: 42px;
    }

    .library-home-latest-prev,
    .library-home-latest-next {
        width: 38px;
        height: 38px;
    }

    .library-home-latest-prev {
        right: 6px;
    }

    .library-home-latest-next {
        left: 6px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .library-home-latest-section {
        margin-top: 38px;
    }

    .library-home-latest-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;
    }

    .library-home-latest-heading h2 {
        font-size: 20px;
    }

    .library-home-latest-heading p {
        font-size: 12px;
    }

    .library-home-latest-more {
        padding: 8px 12px;

        font-size: 11px;
    }

    .library-home-latest-slider {
        padding:
            3px 18px
            42px;
    }

    /* جلد کوچک‌تر در موبایل */
    .library-home-latest-slider .swiper-slide {
        justify-content: center;
    }

    .library-home-book-card {
        width: 105px;
        max-width: 105px;
    }

    .library-home-book-cover {
        width: 105px;
        height: 158px;

        border-radius: 9px;
    }

    .library-home-latest-prev,
    .library-home-latest-next {
        width: 35px;
        height: 35px;

        top: calc(50% - 20px);
    }

    .library-home-latest-prev {
        right: 1px;
    }

    .library-home-latest-next {
        left: 1px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .library-home-latest-slider {
        padding-left: 15px;
        padding-right: 15px;
    }

    .library-home-book-card {
        width: 90px;
        max-width: 90px;
    }

    .library-home-book-cover {
        width: 90px;
        height: 135px;

        border-radius: 8px;
    }

    .library-home-latest-prev,
    .library-home-latest-next {
        width: 32px;
        height: 32px;
    }

    .library-home-latest-prev i,
    .library-home-latest-next i {
        font-size: 14px;
    }
}