/* Book Preview Hero Component Styles - Full-width cinematic hero for preview pages */

/* ===================================
   CONTAINER & BASE STYLES
   =================================== */
.book-preview-hero-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
}

.book-preview-hero {
    position: relative;
    width: 100%;
    min-height: 70vh;
    max-height: 85vh;
    overflow: hidden;
}

/* ===================================
   SLIDE STRUCTURE
   =================================== */
.book-preview-hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 70vh;
}

/* ===================================
   BACKGROUND STYLING
   =================================== */
.book-preview-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Apply blur for cover images, but promotional images should be sharp */
    filter: blur(20px) saturate(1.2);
    transform: scale(1.05);
    z-index: 1;
}

/* If the background is a promotional image, remove blur */
.book-preview-hero-background[style*="unqbdpromobanners"] {
    filter: none;
    transform: scale(1.02);
}

/* Fallback gradient if no image */
.book-preview-hero-background:not([style*="url"]) {
    background: linear-gradient(120deg, #00b4ff 0%, #a3ffcb 100%);
    filter: none;
}

/* Loading spinner for hero */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   HERO CONTENT LAYOUT
   =================================== */
.book-preview-hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
    gap: 3rem;
}

/* Book section */
.book-preview-hero-book-section {
    flex-shrink: 0;
}

.book-preview-hero-book-image {
    max-height: 50vh;
    max-width: 280px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.4s ease;
}

.book-preview-hero-book-image:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.book-preview-hero-book-placeholder {
    max-width: 280px;
    width: 200px;
    height: 300px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
}

/* Info section */
.book-preview-hero-info-section {
    flex: 1;
    max-width: 650px;
}

.book-preview-hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 1rem 0;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.book-preview-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.book-preview-mode-badge {
    background: #fff;
    color: #00b4ff;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.book-preview-chapter-info {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* CTA Buttons */
.book-preview-hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.book-preview-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.book-preview-hero-cta:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.book-preview-hero-cta-free {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.book-preview-hero-cta-free:hover {
    background: linear-gradient(135deg, #239139 0%, #1cb386 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #fff;
}

.book-preview-hero-cta-premium {
    background: linear-gradient(135deg, #007bff 0%, #00b4ff 100%);
    color: #fff;
}

.book-preview-hero-cta-premium:hover {
    background: linear-gradient(135deg, #0069d9 0%, #009de6 100%);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: #fff;
}

/* Benefits list */
.book-preview-hero-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-preview-benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
}

.book-preview-benefit i {
    color: #28a745;
    font-size: 1.1rem;
}

/* ===================================
   DARK MODE STYLES
   =================================== */
body.dark-mode .book-preview-mode-badge {
    background: var(--card-bg, #2d2d2d);
    color: #60a5fa;
}

body.dark-mode .book-preview-hero-cta-free {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

body.dark-mode .book-preview-hero-cta-free:hover {
    background: linear-gradient(135deg, #1ea850 0%, #0e9f6e 100%);
}

/* ===================================
   RESPONSIVE STYLES - TABLET
   =================================== */
@media (max-width: 992px) {
    .book-preview-hero {
        min-height: 60vh;
    }
    
    .book-preview-hero-content {
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    
    .book-preview-hero-book-image {
        max-height: 40vh;
        max-width: 220px;
    }
    
    .book-preview-hero-title {
        font-size: 2.2rem;
    }
}

/* ===================================
   RESPONSIVE STYLES - MOBILE
   Force centered layout on mobile
   =================================== */
@media (max-width: 768px) {
    .book-preview-hero {
        min-height: 85vh;
        max-height: none;
    }
    
    /* Force centered layout on mobile */
    .book-preview-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        padding-top: 120px; /* Clear fixed nav */
        padding-bottom: 8rem;
        gap: 1.5rem;
    }
    
    .book-preview-hero-info-section {
        text-align: center;
    }
    
    .book-preview-hero-cta-group {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .book-preview-hero-book-image {
        max-height: 35vh;
        max-width: 180px;
        transform: none;
    }
    
    .book-preview-hero-book-image:hover {
        transform: scale(1.02);
    }
    
    .book-preview-hero-title {
        font-size: 1.8rem;
    }
    
    .book-preview-hero-meta {
        justify-content: center;
    }
    
    .book-preview-chapter-info {
        font-size: 1rem;
    }
    
    .book-preview-hero-cta {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .book-preview-hero-benefits {
        align-items: center;
    }
}

/* ===================================
   RESPONSIVE STYLES - SMALL MOBILE
   =================================== */
@media (max-width: 480px) {
    .book-preview-hero {
        min-height: 90vh;
    }
    
    .book-preview-hero-content {
        padding: 1.5rem 1rem;
        padding-top: 110px;
        padding-bottom: 7rem;
    }
    
    .book-preview-hero-book-image {
        max-height: 30vh;
        max-width: 150px;
    }
    
    .book-preview-hero-title {
        font-size: 1.5rem;
    }
    
    .book-preview-mode-badge {
        font-size: 0.8rem;
        padding: 0.3rem 1rem;
    }
    
    .book-preview-chapter-info {
        font-size: 0.9rem;
    }
    
    .book-preview-hero-cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ===================================
   ULTRA-WIDE SCREENS
   =================================== */
@media (min-width: 1800px) {
    .book-preview-hero {
        max-height: 90vh;
    }
    
    .book-preview-hero-content {
        max-width: 1600px;
    }
    
    .book-preview-hero-book-image {
        max-height: 55vh;
        max-width: 320px;
    }
    
    .book-preview-hero-title {
        font-size: 3.2rem;
    }
    
    .book-preview-hero-cta {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .book-preview-hero-book-image {
        transition: none;
    }
    
    .book-preview-hero-cta {
        transition: none;
    }
}
