/* Reset default margins and paddings for consistency */
/* Author profile section */
.author-profile {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Author image styling */
.author-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Author name styling */
.author-name {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Author info (birth date, nationality) styling */
.author-info {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 10px;
}

.author-info strong {
    color: #212529;
    font-weight: 500;
}

/* Author bio/description styling */
.author-description {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #34495e;
    line-height: 1.6;
    padding: 10px 0;
}

/* Author books section heading */
.author-books h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Author books row - Ensure left-to-right flow */
.author-books .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
}

/* Column styling for book cards - Compact and aligned */
.author-books .col-md-3 {
    flex: 0 0 auto;
    width: 160px;
    margin-bottom: 20px;
}

/* Book card styling - Compact and fixed size */
.book-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 160px;
    height: 260px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    margin: 0;
}

/* Hover effect for book card - Pop-up effect */
.book-card:hover {
    transform: translateY(-10px) scale(1.05); /* Lifts up and slightly enlarges */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Stronger shadow for depth */
    border: 1px solid #007bff; /* Subtle blue border for highlight */
}

/* Book card link styling */
.book-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

/* Book cover image styling - Fixed size */
.card-img-top {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: opacity 0.3s ease; /* Smooth image transition on hover */
}

.book-card:hover .card-img-top {
    opacity: 0.95; /* Slight fade for visual feedback */
}

/* Book card body styling */
.card-body {
    padding: 10px;
    text-align: center;
}

/* Book title styling - Compact */
.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease; /* Smooth color transition on hover */
}

.book-card:hover .card-title {
    color: #007bff; /* Blue title on hover for emphasis */
}

/* Book price styling - Compact */
.card-text {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 500;
    transition: color 0.3s ease; /* Smooth color transition on hover */
}

.book-card:hover .card-text {
    color: #c0392b; /* Darker red for price on hover */
}

/* Empty state styling */
.author-books .col p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #7f8c8d;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .author-profile {
        padding: 15px;
    }

    .author-name {
        font-size: 1.8rem;
    }

    .author-info {
        font-size: 1rem;
    }

    .author-books h2 {
        font-size: 1.5rem;
    }

    .author-books .col-md-3 {
        width: 140px;
    }

    .book-card {
        width: 140px;
        height: 230px;
    }

    .card-img-top {
        height: 140px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .author-image {
        max-width: 100%;
        margin-bottom: 15px;
    }
}
