/**
 * Book Hover 3D Widget Styles
 */

/* ── Wrapper ─────────────────────────────────────────────── */

.book-wrapper {
    position: relative;
    margin: 0 auto;
    padding: 4px;
    width: 100%;
}

/* ── Book Items ──────────────────────────────────────────── */

.book-items {
    position: relative;
    cursor: default;
    padding: 16px;
    margin: 0;
    display: grid;
    break-inside: avoid;
}

.main-book-wrap {
    position: relative;
}

/* ── Book Cover ──────────────────────────────────────────── */

.book-cover {
    position: relative;
}

/* Book Inside (pages effect) */
.book-cover .book-inside {
    position: absolute;
    width: 90%;
    height: 96%;
    top: 1%;
    left: 16px;
    border: 1px solid #808080;
    border-radius: 2px 6px 6px 2px;
    background: #ffffff;
    box-shadow: 10px 40px 40px -10px rgba(0,0,0,0.19), 
                inset -2px 0 0 #808080,
                inset -3px 0 0 #dbdbdb, 
                inset -4px 0 0 #ffffff, 
                inset -5px 0 0 #dbdbdb,
                inset -6px 0 0 #ffffff, 
                inset -7px 0 0 #dbdbdb, 
                inset -8px 0 0 #ffffff,
                inset -9px 0 0 #dbdbdb;
}

/* ── Book Image ──────────────────────────────────────────── */

.book-cover .book-image {
    line-height: 0;
    position: relative;
    border-radius: 2px 6px 6px 2px;
    box-shadow: 6px 6px 18px -2px rgba(0, 0, 0, 0.2),
                24px 28px 40px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    transform: perspective(2000px) rotateY(-15deg) translateX(-10px) scaleX(0.94);
    cursor: pointer;
}

.book-image img {
    grid-row: 1 / -1;
    grid-column: 1;
    width: 100%;
    border-radius: 2px 6px 6px 2px;
    display: block;
	position: relative;
	z-index: 2;
}

/* ── Book Hover ──────────────────────────────────────────── */

.book-image:hover {
    transform: perspective(2000px) rotateY(0deg) translateX(0px) scaleX(1);
    transform-style: preserve-3d;
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.1),
                40px 14px 16px -6px rgba(0, 0, 0, 0.1);
}

.book-image:hover .effect {
    margin-left: 14px;
}

/* ── Effects Overlay ─────────────────────────────────────── */

.effect {
    position: absolute;
    width: 20px;
    height: 100%;
    margin-left: 16px;
    top: 0;
    left: 0;
    border-left: 2px solid rgba(0,0,0,0.06);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.5s ease;
    z-index: 5;
}

.light {
    width: 90%;
    height: 100%;
    position: absolute;
    border-radius: 3px;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    top: 0;
    right: 0;
    opacity: 0.1;
    transition: all 0.5s ease;
    z-index: 4;
}

/* ── Book Title ──────────────────────────────────────────── */

.book-title {
    margin-top: 8px;
    font-size: 14px;
    color: #333333;
    text-align: center;
    font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .book-wrapper {
        column-count: 2 !important;
    }
}

@media (max-width: 480px) {
    .book-wrapper {
        column-count: 1 !important;
    }
}