/* Book Reflections Styles */

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    background-color: var(--light-olive);
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info {
    padding: 1rem;
}

.book-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
}

.book-author {
    font-size: 0.9rem;
    color: var(--light-olive);
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--cream);
    margin: 5% auto;
    padding: 0;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--light-olive);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
}

.close-modal:hover {
    color: var(--autumn-leaf);
}

.reflection-content {
    padding: 3rem;
}

.reflection-content h2 {
    color: var(--olive-leaf);
    margin-bottom: 0.5rem;
}

.reflection-content .author {
    color: var(--light-olive);
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.reflection-content .date {
    color: var(--light-olive);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.reflection-content hr {
    border: none;
    border-top: 2px solid var(--autumn-leaf);
    margin: 1.5rem 0;
}

.reflection-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--dark-brown);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    .modal-content {
        margin: 10% 1rem;
    }
    
    .reflection-content {
        padding: 2rem 1.5rem;
    }
}