/* Book Carousel WordPress Plugin Styles */

/* CSS Custom Properties */
.book-carousel-wrapper {
    --bc-burgundy: #8B1538;
    --bc-yellow: #F4B942;
    --bc-blue: #2C5F7C;
    --bc-green: #4A7C59;
    --bc-orange: #D97236;
    --bc-teal: #3E7B8B;
    --bc-overlay-dark: rgba(0, 0, 0, 0.4);
}

/* Wrapper Reset */
.book-carousel-wrapper {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.5;
}

.book-carousel-wrapper *,
.book-carousel-wrapper *::before,
.book-carousel-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Carousel Container */
.book-carousel-wrapper .carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 780px;
    overflow: hidden;
}

/* Carousel Slides */
.book-carousel-wrapper .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    pointer-events: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.book-carousel-wrapper .carousel-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.book-carousel-wrapper .carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bc-overlay-dark);
    z-index: 1;
}

.book-carousel-wrapper .carousel-slide.light-overlay::before {
    background: rgba(0, 0, 0, 0.2);
}

.book-carousel-wrapper .carousel-slide.no-overlay::before {
    background: transparent;
}

/* Slide Content Layout */
.book-carousel-wrapper .slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 100px;
}

/* Text Content */
.book-carousel-wrapper .text-content {
    flex: 1;
    max-width: 750px;
    color: white;
}

.book-carousel-wrapper .carousel-slide.active .text-content {
    animation: bc-fadeInFromTop 0.8s ease-out;
}

.book-carousel-wrapper .slide-title {
    font-family: 'Lato', sans-serif;
    font-size: 40px;
    font-weight: 500;
    line-height: 1.5em;
    letter-spacing: 10px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: white;
}

.book-carousel-wrapper .slide-author {
    font-family: 'Cormorant Garamond', sans-serif;
    font-size: 1.6rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: white;
}

.book-carousel-wrapper .slide-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: normal;
    color: white;
}

.book-carousel-wrapper .slide-date {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    color: white;
}

/* Buy Button */
.book-carousel-wrapper .buy-button {
    font-family: 'Lato', sans-serif;
    background: white;
    color: #333;
    border: none;
    padding: 18px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.book-carousel-wrapper .buy-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Book Container */
.book-carousel-wrapper .book-container {
    flex: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    perspective: 1500px;
    perspective-origin: center center;
    padding-right: 50px;
}

.book-carousel-wrapper .carousel-slide.active .book-container {
    animation: bc-slideInFromRight 0.8s ease-out;
}

.book-carousel-wrapper .book-container > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* 3D Book Structure */
.book-carousel-wrapper .book-3d {
    position: relative;
    width: 360px;
    height: 504px;
    transform-style: preserve-3d;
    transform: translateZ(0) skewY(3deg) skewX(-2deg) rotateY(-15deg);
    transform-origin: top right;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.book-carousel-wrapper .book-3d:hover {
    transform-origin: top right;
    animation: bc-lightBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    cursor: pointer;
}

.book-carousel-wrapper .book-3d.book-secondary {
    width: 252px;
    height: 360px;
}

/* Light bounce animation for hover */
@keyframes bc-lightBounce {
    0% {
        transform: translateZ(0) skewY(3deg) skewX(-2deg) rotateY(-15deg) translateY(0);
        transform-origin: top right;
    }
    50% {
        transform: translateZ(0) skewY(3deg) skewX(-2deg) rotateY(-15deg) translateY(-12px);
        transform-origin: top right;
    }
    100% {
        transform: translateZ(0) skewY(3deg) skewX(-2deg) rotateY(-15deg) translateY(-8px);
        transform-origin: top right;
    }
}

/* Book Cover (Front) */
.book-carousel-wrapper .book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateZ(25px);
    overflow: hidden;
}

/* Book Pages (Right Side) */
.book-carousel-wrapper .book-pages {
    position: absolute;
    height: 100%;
    right: 10px;
    top: 0;
    transform: translateX(100%) translateZ(0);
    transform-origin: left center;
}

.book-carousel-wrapper .book-pages-image {
    display: block;
    height: 100%;
    width: 24px;
}

/* Placeholder colors for book covers */
.book-carousel-wrapper .book-cover[data-color="burgundy"] {
    background: linear-gradient(135deg, var(--bc-burgundy) 0%, #661129 100%);
}

.book-carousel-wrapper .book-cover[data-color="yellow"] {
    background: linear-gradient(135deg, var(--bc-yellow) 0%, #d99a2a 100%);
}

.book-carousel-wrapper .book-cover[data-color="blue"] {
    background: linear-gradient(135deg, var(--bc-blue) 0%, #1a4d66 100%);
}

.book-carousel-wrapper .book-cover[data-color="green"] {
    background: linear-gradient(135deg, var(--bc-green) 0%, #3a5f47 100%);
}

.book-carousel-wrapper .book-cover[data-color="orange"] {
    background: linear-gradient(135deg, var(--bc-orange) 0%, #b35a28 100%);
}

.book-carousel-wrapper .book-cover[data-color="teal"] {
    background: linear-gradient(135deg, var(--bc-teal) 0%, #2c5f6d 100%);
}

/* Add soft light gradient from top left */
.book-carousel-wrapper .book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at top left,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 30%,
        transparent 60%
    );
    z-index: 2;
    pointer-events: none;
}

/* Book Spine (Side) */
.book-carousel-wrapper .book-spine {
    position: absolute;
    width: 50px;
    height: 100%;
    background: inherit;
    right: 0;
    top: 0;
    transform: rotateY(90deg) translateZ(-25px);
    transform-origin: right;
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 0 3px 3px 0;
}

.book-carousel-wrapper .book-cover[data-color="burgundy"] ~ .book-spine {
    background: linear-gradient(to right, #4a0d1f 0%, var(--bc-burgundy) 100%);
}

.book-carousel-wrapper .book-cover[data-color="yellow"] ~ .book-spine {
    background: linear-gradient(to right, #8a6218 0%, var(--bc-yellow) 100%);
}

.book-carousel-wrapper .book-cover[data-color="blue"] ~ .book-spine {
    background: linear-gradient(to right, #0f2d3d 0%, var(--bc-blue) 100%);
}

.book-carousel-wrapper .book-cover[data-color="green"] ~ .book-spine {
    background: linear-gradient(to right, #2a4735 0%, var(--bc-green) 100%);
}

.book-carousel-wrapper .book-cover[data-color="orange"] ~ .book-spine {
    background: linear-gradient(to right, #7a3e1b 0%, var(--bc-orange) 100%);
}

.book-carousel-wrapper .book-cover[data-color="teal"] ~ .book-spine {
    background: linear-gradient(to right, #244752 0%, var(--bc-teal) 100%);
}

/* Navigation Arrows */
.book-carousel-wrapper .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-carousel-wrapper .nav-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.book-carousel-wrapper .nav-arrow-left {
    left: 30px;
}

.book-carousel-wrapper .nav-arrow-right {
    right: 30px;
}

/* Dot Indicators */
.book-carousel-wrapper .dot-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.book-carousel-wrapper .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.book-carousel-wrapper .dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.book-carousel-wrapper .dot.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
}

/* Animations */
@keyframes bc-fadeInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bc-slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .book-carousel-wrapper .slide-content {
        padding: 50px 110px 60px;
    }
    
    .book-carousel-wrapper .slide-title {
        font-size: 36px;
    }
    
    .book-carousel-wrapper .book-3d {
        width: 252px;
        height: 360px;
    }
    
    .book-carousel-wrapper .book-3d.book-secondary {
        width: 216px;
        height: 315px;
    }
}

@media (max-width: 968px) {
    .book-carousel-wrapper .slide-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 80px 70px 150px;
    }
    
    .book-carousel-wrapper .text-content {
        max-width: 100%;
        margin-top: 2.5rem;
        order: 2;
    }
    
    .book-carousel-wrapper .slide-title {
        font-size: 28px;
        line-height: 1.4em;
        letter-spacing: 2px;
        margin-bottom: 1.5rem;
    }
    
    .book-carousel-wrapper .slide-author {
        font-size: 1.3rem;
        font-style: normal;
        margin-bottom: 1rem;
    }
    
    .book-carousel-wrapper .slide-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .book-carousel-wrapper .book-container {
        padding-right: 0;
        order: 1;
    }
    
    .book-carousel-wrapper .book-3d.book-secondary {
        display: none;
    }

    .book-carousel-wrapper .nav-arrow {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        background: transparent;
        border-radius: 0;
        backdrop-filter: none;
        width: 40px;
        height: 40px;
        opacity: 0.7;
    }
    
    .book-carousel-wrapper .nav-arrow:hover {
        background: transparent;
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
    
    .book-carousel-wrapper .nav-arrow-left {
        left: 25px;
    }
    
    .book-carousel-wrapper .nav-arrow-right {
        right: 25px;
    }
    
    /* Course slide mobile - center background and text at bottom */
    .book-carousel-wrapper .carousel-slide.course {
        background-position: center center;
    }
    
    .book-carousel-wrapper .carousel-slide.course .slide-content {
        position: relative;
        display: block;
        height: 100%;
        padding: 0 40px;
    }
    
    .book-carousel-wrapper .carousel-slide.course .text-content {
        position: absolute;
        bottom: 130px;
        left: 40px;
        right: 40px;
        margin: 0;
    }
}

@media (max-width: 640px) {
    .book-carousel-wrapper .slide-content {
        padding: 80px 70px 150px;
    }
    
    .book-carousel-wrapper .slide-title {
        font-size: 22px;
        line-height: 1.3em;
        letter-spacing: 1.5px;
        margin-bottom: 1.2rem;
    }
    
    .book-carousel-wrapper .slide-author {
        font-size: 1.2rem;
        font-style: normal;
        margin-bottom: 0.8rem;
    }
    
    .book-carousel-wrapper .slide-description {
        font-size: 0.95rem;
        margin-bottom: 1.8rem;
    }
    
    .book-carousel-wrapper .text-content {
        margin-top: 2rem;
    }
    
    .book-carousel-wrapper .buy-button {
        padding: 14px 40px;
        font-size: 0.95rem;
    }
    
    .book-carousel-wrapper .book-3d {
        width: 180px;
        height: 261px;
    }
    
    .book-carousel-wrapper .nav-arrow {
        width: 36px;
        height: 36px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        background: transparent;
        border-radius: 0;
        backdrop-filter: none;
        opacity: 0.7;
    }
    
    .book-carousel-wrapper .nav-arrow:hover {
        background: transparent;
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
    
    .book-carousel-wrapper .nav-arrow-left {
        left: 20px;
    }
    
    .book-carousel-wrapper .nav-arrow-right {
        right: 20px;
    }
    
    .book-carousel-wrapper .dot-indicators {
        bottom: 36px;
    }
    
    /* Course slide - text at bottom */
    .book-carousel-wrapper .carousel-slide.course .slide-content {
        padding: 0 70px;
    }
    
    .book-carousel-wrapper .carousel-slide.course .text-content {
        bottom: 120px;
        left: 68px;
        right: 68px;
    }
}

@media (max-width: 400px) {
    .book-carousel-wrapper .slide-content {
        padding: 70px 30px 140px;
    }
    
    .book-carousel-wrapper .slide-title {
        font-size: 18px;
        line-height: 1.3em;
        letter-spacing: 1px;
    }
    
    .book-carousel-wrapper .slide-author {
        font-size: 1.1rem;
        font-style: normal;
    }
    
    .book-carousel-wrapper .slide-description {
        font-size: 0.85rem;
    }
    
    .book-carousel-wrapper .text-content {
        margin-top: 1.5rem;
    }
    
    .book-carousel-wrapper .buy-button {
        padding: 12px 35px;
        font-size: 0.9rem;
    }
    
    .book-carousel-wrapper .book-3d {
        width: 153px;
        height: 220px;
    }
    
    .book-carousel-wrapper .nav-arrow {
        width: 32px;
        height: 32px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        background: transparent;
        border-radius: 0;
        backdrop-filter: none;
        opacity: 0.7;
    }
    
    .book-carousel-wrapper .nav-arrow:hover {
        background: transparent;
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
    
    .book-carousel-wrapper .nav-arrow-left {
        left: 16px;
    }
    
    .book-carousel-wrapper .nav-arrow-right {
        right: 16px;
    }
    
    /* Course slide - text at bottom */
    .book-carousel-wrapper .carousel-slide.course .slide-content {
        padding: 0 44px;
    }
    
    .book-carousel-wrapper .carousel-slide.course .text-content {
        bottom: 110px;
        left: 44px;
        right: 44px;
    }
}

