/* ===================================
   Article Page - Enhanced Styles
   Apple-Inspired Design System
   =================================== */

/* --- Article Header & Layout --- */
.article-header {
    position: fixed;
    top: 5px;
    left: 0;
    right: 0;
    width: calc(100% - 16px);
    max-width: var(--container-max);
    margin: 0 auto 0;
    z-index: 1000;
    transition: all var(--transition-base);
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
}

.article-hero {
    text-align: center;
    padding: calc(80px + var(--space-4xl)) var(--space-lg) var(--space-3xl);
    background: radial-gradient(circle at 50% 0%, var(--accent-subtle) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    --dot-space: 16px;
    background: radial-gradient(circle at var(--dot-size) var(--dot-size), 
        var(--border-default) calc(var(--dot-size) / 2), transparent 0);
    background-size: var(--dot-space) var(--dot-space);
    mask-image: linear-gradient(to top, black 0%, transparent 60%);
}

.article-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    max-width: 20ch;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.article-description {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--text-secondary);
    max-width: 65ch;
    margin: var(--space-lg) auto 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: var(--space-lg);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.article-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}
 
.article-layout {
    display: flex;
    flex-direction: column;
}

.article-content-wrapper { 
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
} 

.article-toc {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin: 0 var(--space-lg) var(--space-3xl);
    z-index: 10;
}

.article-toc-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 var(--space-md) 0;
    color: var(--text-primary);
}

.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc-item {
    margin-bottom: var(--space-sm);
}

.article-toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    display: block;
    padding: var(--space-xs) 0;
    border-left: 2px solid transparent;
    padding-left: var(--space-sm);
}

.article-toc-link:hover {
    color: var(--accent-primary);
}

.article-toc-link.active {
    color: var(--accent-primary);
    font-weight: 600;
    border-left-color: var(--accent-primary);
}

/* Indent H3 links for hierarchy */
.article-toc-link.toc-h3 {
    padding-left: var(--space-xl);
}

.article-toc-link.toc-h3.active {
    padding-left: calc(var(--space-xl) - 2px); /* Account for border */
}

/* Desktop Two-Column Layout */
@media (min-width: 1100px) {
    .article-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: var(--space-4xl);
        max-width: 1100px;
        margin: 0 auto;
        padding: var(--space-xl) var(--space-lg) 0;
        align-items: flex-start; /* Important for sticky positioning */
    }

    .article-content-wrapper {
        max-width: none; /* Let the grid control the width */
        margin: 0;
    }

    .article-toc {
        position: sticky;
        top: 100px; /* Adjust this value based on your header height */
        height: fit-content;
        margin: 0;
    }
}

/* --- Article Body --- */
.article-body {
    max-width: 720px;
    margin: var(--space-xl) auto var(--space-5xl);
    padding: 0 var(--space-lg);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-body > * + * {
    margin-top: 1.75em;
}

.article-body h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.2;
    margin-top: 2.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-default);
    width: 100%;
}

.article-body h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.5em;
    width: 100%;
}

.article-body p {
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
}

.article-body a:not(.btn-book-primary):not(.btn-hero-primary) {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid var(--accent-subtle);
    transition: all var(--transition-fast);
}

.article-body a:not(.btn-book-primary):not(.btn-hero-primary):hover {
    background-color: var(--accent-subtle);
    border-radius: 2px;
    padding: 0 2px;
    margin: 0 -2px;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body ul, .article-body ol {
    padding-left: 1.5em;
}

.article-body li {
    margin-bottom: 0.5em;
}

.article-body li::marker {
    color: var(--accent-primary);
}

/* --- Block: Image --- */
.article-image-block {
    margin: 2.5em 0;
}

.article-image {
    width: 100%;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
}

.article-image:hover {
    transform: scale(1.01);
}

.article-image-caption {
    font-size: 14px;
    text-align: center;
    color: var(--text-tertiary);
    margin-top: var(--space-md);
}

/* --- Block: Quote --- */
.article-quote-block {
    margin: 2em 2em 2em 0;
    padding-left: 1.5em;
    border-left: 4px solid var(--accent-primary);
    position: relative;
    background: radial-gradient(20% 65% at -9% 50%, var(--accent-subtle), var(--bg-primary));
}

.article-quote-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
}

.article-quote-author {
    font-style: normal;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5em;
}

.article-quote-author::before {
    content: "— ";
}

/* --- Block: InfoBox --- */
.article-infobox-block {
    background: linear-gradient(135deg, var(--bg-secondary50), var(--bg-elevated));
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin: 2em 0;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.article-infobox-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-infobox-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    opacity: 0.8;
}

h3.infobox-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-primary);
    margin: 0 0 var(--space-md) 0;
}

.infobox-title svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

/* --- ENHANCED Block: Feature Showcase --- */
.feature-showcase-block {
    --offset: var(--space-3xl);
    margin: 3em calc(-1 * var(--offset));
    max-width: calc(100vw - (2 * (var(--offset) + 16px)));
    
    background: linear-gradient(135deg, 
        var(--bg-secondary) 0%, 
        var(--bg-elevated) 100%);

    border-radius: var(--radius-2xl);
    padding: var(--space-2xl); 
    position: relative;
    overflow: hidden;
} 

.feature-showcase-block .infobox-title {
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-xl);
    font-size: 2.1rem;
    font-weight: 900;
    display: block;
}

.feature-showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    position: relative;
    z-index: 1;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: all var(--transition-base);
    overflow: hidden;
}

/* Glass morphism effect on hover */
.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        var(--accent-primary50) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary50);
}

.feature-card:hover::after {
    opacity: 0.05;
}

.feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: var(--radius-md);
    padding: 10px;
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: rotate(-5deg) scale(1.1);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    color: white;
}

.feature-content {
    flex: 1;
}

.feature-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    letter-spacing: -0.3px;
}

.feature-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Grid layouts for different screen sizes */
@media (min-width: 640px) {
    .feature-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (min-width: 960px) {
    .feature-showcase-block {
        padding: var(--space-3xl);
    }
    
    .feature-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}

/* --- Block: CTA Banner --- */
.article-cta-block {
    --offset: var(--space-3xl);
    margin: 3em calc(-1 * var(--offset));
    max-width: calc(100vw - (2 * (var(--offset) + 16px)));
    text-align: center; 
    padding: var(--space-3xl);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-default);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
}

.article-cta-block::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(circle at 100% 0%, var(--accent-primary50) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, var(--accent-subtle) 0%, transparent 40%);
    opacity: 0.3;
}

.article-cta-headline {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.article-cta-description {
    max-width: 50ch;
    margin: 0 auto var(--space-xl);
    position: relative;
    z-index: 1;
    font-size: clamp(16px, 2vw, 18px);
}

.article-cta-block .action-buttons {
    position: relative;
    z-index: 1;
}

/* --- Block: FAQ --- */
.article-faq-block {
    margin-top: 3em;
    border: none;
    padding: 0;
    background: transparent;
}

.article-faq-block .section-headline {
    border: none;
    margin-bottom: var(--space-xl);
}

.article-faq-block .faq-container {
    max-width: 100%;
}

.article-faq-block .faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
}

.article-faq-block .faq-item:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.article-faq-block .faq-item[open] {
    border-color: var(--accent-primary50);
    box-shadow: var(--shadow-md);
}

/* --- Final CTA Section --- */
.article-final-cta-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: var(--space-4xl) 0 0;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .article-hero {
        padding: calc(80px + var(--space-3xl)) var(--space-md) var(--space-2xl);
    }
    
    .article-title {
        font-size: clamp(32px, 8vw, 48px);
    }
    
    .article-description {
        font-size: 18px;
    }
    
    .article-body {
        font-size: 16px;
        line-height: 1.7;
        
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .article-body > p{
        margin: 0 var(--space-3xl);
    }
    .article-body > h2{
        margin-left: var(--space-3xl);
        margin-right: var(--space-3xl);
        width: calc(100% - (var(--space-3xl) * 2));
    }
    .article-body > h3{
        margin-left: var(--space-3xl);
        margin-right: var(--space-3xl);
        width: calc(100% - (var(--space-3xl) * 2));
    }
    
    .article-body h2 {
        font-size: 1.75rem;
    }
    
    .article-body h3 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .feature-showcase-block {
        padding: var(--space-xl);
        margin: 2em -var(--space-md);
        border-radius: 0;
    }
    
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: var(--space-md);
    }
    
    .article-infobox-block {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        padding: var(--space-2xl) var(--space-3xl);
    }
    
    .article-cta-block {
        padding: var(--space-2xl) var(--space-lg);
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 32px;
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
    }
    
    .feature-name {
        font-size: 1rem;
    }
    
    .feature-description {
        font-size: 0.875rem;
    }
}

/* --- Dark Mode Enhancements --- */
@media (prefers-color-scheme: dark) {
    .feature-showcase-block {
        background: radial-gradient(80% 70% at 50% 110%, var(--accent-primary) -100%, transparent 100%), linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    }
    
    .feature-card {
        background: var(--bg-secondary);
    }
    
    .feature-card:hover {
        background: var(--bg-tertiary);
    }
    
    .article-infobox-block {
        background: linear-gradient(135deg, 
            var(--bg-tertiary), 
            var(--bg-secondary));
    }
    
    .article-cta-block {
        background: linear-gradient(135deg, 
            var(--bg-secondary), 
            var(--bg-tertiary));
    }
    .article-quote-block { 
        background: radial-gradient(20% 65% at -9% 50%, var(--accent-active), var(--bg-primary));
    }
}

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

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    .feature-showcase-block::before {
        animation: none;
    }
    
    .feature-card,
    .feature-icon,
    .article-image,
    .article-infobox-block {
        transition: none;
    }
}

/* Focus states for keyboard navigation */
.feature-card:focus-within {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feature-card {
        border-width: 2px;
    }
    
    .article-infobox-block {
        border-width: 2px;
    }
}

/* ===================================
   Enhanced Book Recommendation Block
   Premium Apple-Inspired Design
   =================================== */

.book-recommendation-block {
    --book-gradient-angle: 135deg;
    position: relative;
    display: flex;
    flex-direction: column;
    
    --offset: var(--space-3xl);
    margin: 1em calc(-1 * var(--offset));
    max-width: calc(100vw - (2 * (var(--offset) + 16px))); 

    padding: 0;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    isolation: isolate;
    
    /* Glassmorphism background */
    background: 
        linear-gradient(var(--book-gradient-angle), 
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 100%),
        var(--bg-elevated);
    
    /* Premium border with gradient */
    border: 1px solid transparent;
    background-clip: padding-box;
    
    /* Elegant shadow layering */
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    /* Smooth transitions */
    transition: 
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth),
        background var(--transition-smooth);
}

/* Animated gradient border */
.book-recommendation-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: calc(var(--radius-2xl) - 2px);
    padding: 1px;
    background: linear-gradient(
        var(--book-gradient-angle),
        var(--accent-primary),
        var(--accent-gradient-end),
        transparent 60%
    );
    mask: linear-gradient(#fff 0 0) content-box, 
          linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

/* Glow orb effect */
.book-glow-orb {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(
        ellipse at center,
        var(--accent-primary50) 0%,
        transparent 70%
    );
    filter: blur(60px);
    opacity: 0.3;
    animation: float-glow 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-glow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-10%, 5%) scale(1.1); }
    66% { transform: translate(5%, -5%) scale(0.95); }
}

/* Editor's Pick Badge */

/* Trust Badges */
.trust-badges { 
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: calc(100% - (2 * var(--space-lg)));
    z-index: 10;
    display: flex;
    gap: var(--space-md); 
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.trust-badge svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

.book-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-left: auto;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gradient-end));
    color: white;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.book-badge svg {
    width: 14px;
    height: 14px;
}

/* Content Wrapper */
.book-content-wrapper {
    display: flex;
    gap: var(--space-2xl);
    padding: var(--space-2xl);
    position: relative;
    z-index: 2;
}

/* Book Details Section */
.book-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.book-meta {
    margin-top: var(--space-xl); /* Space for badge */
}

.book-recommendation-block h3.book-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        var(--text-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin: 0 0 var(--space-xs) 0;
    letter-spacing: -1px;
}

.book-author {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.book-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
}

.book-description p {
    margin: 0;
}

/* Rating Section */
.book-rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rating-stars {
    display: flex;
    gap: 2px;
    font-size: 18px;
}

.star-filled {
    color: #FFB800;
    filter: drop-shadow(0 1px 2px rgba(255, 184, 0, 0.3));
}

.star-half {
    position: relative;
    color: var(--border-default);
}

.star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #FFB800;
}

.rating-text {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* CTA Section */
.book-cta-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.btn-book-primary {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gradient-end));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 43px var(--accent-subtle);
}

.btn-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.btn-price {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateY(100%);
    transition: transform 0.6s;
}

.btn-book-primary:hover {
    box-shadow: 
        0 8px 20px rgba(0, 113, 227, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2), 
        inset 0 0 43px var(--accent-subtle);
}

.btn-book-primary:hover .btn-shine {
    transform: rotate(45deg) translateY(-100%);
}

/* Book Cover Section */
.book-cover-wrapper {
    position: relative;
    flex-basis: 200px;
    flex-shrink: 0;
    align-self: center;
}

.book-cover-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        ellipse at center,
        var(--accent-primary50) 0%,
        transparent 70%
    );
    filter: blur(30px);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.book-cover-wrapper:hover .book-cover-glow {
    opacity: 0.5;
}

.book-cover-image {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-smooth);
}

.book-cover-wrapper:hover .book-cover-image {
    transform: perspective(420px) rotateY(-15deg) scale(1.05);
}

.book-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(2px);
    border-radius: 64px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.book-cover-wrapper:hover .book-cover-overlay {
    opacity: 1;
}

.overlay-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hover Effects for the entire block */
.book-recommendation-block:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.book-recommendation-block:hover::before {
    opacity: 1;
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .book-recommendation-block {
        background: 
            linear-gradient(var(--book-gradient-angle), 
                rgba(255, 255, 255, 0.02) 0%,
                rgba(255, 255, 255, 0) 100%),
            var(--bg-secondary);
            
        box-shadow: 
            0 1px 2px rgba(0, 0, 0, 0.2),
            0 4px 8px rgba(0, 0, 0, 0.3),
            0 12px 24px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    
    .book-recommendation-block h3.book-title {
        background: linear-gradient(
            135deg,
            var(--text-primary) 0%,
            var(--accent-primary) 100%
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .trust-badge {
        background: var(--bg-tertiary);
        border-color: var(--border-default);
    }
    
    .book-cover-overlay {
        background: var(--bg-glass);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-content-wrapper {
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-xl);
    }
    
    .book-badge {
        top: var(--space-md);
        left: var(--space-md);
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .book-meta {
        margin-top: var(--space-lg);
        text-align: center;
    }
    
    .book-recommendation-block h3.book-title {
        font-size: 1.5rem;
    }
    
    .book-author {
        font-size: 1rem;
    }
    
    .book-details {
        align-items: center;
        text-align: center;
    }
    
    .book-cover-wrapper {
        order: -1;
        width: 160px;
        margin: 0 auto;
    }
    
    .book-rating {
        justify-content: center;
    }
    
    .trust-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-book-primary {
        width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .book-glow-orb,
    .book-badge,
    .btn-shine {
        animation: none;
    }
    
    .book-recommendation-block,
    .book-recommendation-block::before,
    .book-cover-image,
    .book-cover-glow,
    .book-cover-overlay,
    .btn-book-primary {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .book-recommendation-block {
        border-width: 2px;
        border-color: var(--border-default);
    }
    
    .btn-book-primary {
        border: 2px solid white;
    }
}