/* Premium Books Section Styles */

#books-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

#books-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="books-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M10,10 L40,10 L40,40 L10,40 Z" fill="none" stroke="rgba(102,126,234,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23books-pattern)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

#books-section .container {
    position: relative;
    z-index: 2;
}

#books-section .section-title {
    color: #333;
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

#books-section .section-subtitle {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-weight: 400;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.book-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform: translateY(0);
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.book-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.4s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-link:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.book-info {
    padding: 2rem;
}

.book-title {
    color: #333;
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.book-subtitle {
    color: #888;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.book-author {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.book-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.book-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.book-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.book-button:active {
    transform: translateY(0);
}

/* Premium animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: fadeInUp 0.6s ease-out;
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }

/* AdSense styling for Books section */
#ad-slot-books {
    margin: 3rem auto;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    #books-section {
        padding: 3rem 0;
    }
    
    #books-section .section-title {
        font-size: 2.2rem;
    }
    
    #books-section .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .book-image {
        height: 250px;
    }
    
    .book-info {
        padding: 1.5rem;
    }
    
    .book-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    #books-section {
        padding: 2.5rem 0;
    }
    
    #books-section .section-title {
        font-size: 1.9rem;
    }
    
    .books-grid {
        gap: 1.5rem;
    }
    
    .book-card {
        border-radius: 16px;
    }
    
    .book-image {
        height: 220px;
    }
    
    .book-info {
        padding: 1.2rem;
    }
    
    .book-title {
        font-size: 1.1rem;
    }
    
    .book-description {
        font-size: 0.9rem;
    }
    
    .book-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* Special styling for book covers */
.book-image img[src*="Zora_Nova"] {
    object-position: center top;
}

.book-image img[src*="Pip"] {
    object-position: center center;
}

.book-image img[src*="Cinderella"] {
    object-position: center center;
}

