/* --- RUACH Standalone Book Section Styles --- */
/* Optimized for Dynamic JS Injection */

.ruach-books-container {
    padding: 20px 0 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter Bar Fix */
.ruach-books-filter-bar {
    margin-bottom: 50px;
    text-align: center;
    width: 100%;
}

.ruach-books-search {
    padding: 15px 25px;
    width: 100%;
    max-width: 450px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.ruach-books-search:focus {
    border-color: #F2C25C;
    box-shadow: 0 5px 20px rgba(242, 194, 92, 0.15);
}

/* Grid Logic: Prevents "Giant Book" if only one exists */
.ruach-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    min-height: 400px;
    justify-content: center; /* Centers cards in the row */
}

.ruach-book-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* CRITICAL FIX: Stops card from stretching full width */
    max-width: 350px;
    width: 100%;
    margin: 0 auto; 
    
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ruach-book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: #F2C25C;
}

/* Image Handling */
.ruach-book-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: #f9f9f9; /* Placeholder color while loading */
}

.ruach-book-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #121212;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: 3.4rem; /* Keeps titles aligned */
}

.stat-desc {
    color: #F2C25C; /* Your Primary Color */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    margin-bottom: 15px;
}

/* Buttons using your Secondary Color theme */
.ruach-amazon-btn {
    display: block;
    margin-top: auto; /* Pushes button to bottom of card */
    padding: 14px 25px;
    background: #14318c; /* Your Secondary Color */
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: 0.3s;
}

.ruach-amazon-btn:hover {
    background: #F2C25C;
    color: #14318c;
    transform: scale(1.02);
}

/* Pagination Buttons */
.ruach-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-bottom: 5px;
}

.page-btn {
    width: 45px;
    height: 45px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #121212;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.page-btn:hover, .page-btn.active {
    border-color: #F2C25C;
    background: #F2C25C;
    color: white;
    box-shadow: 0 5px 15px rgba(242, 194, 92, 0.3);
}