/**
 * ==========================================================================
 * STYLES FOR THE [book_authors] SHORTCODE (v6 - Final Polished Design)
 * ==========================================================================
 * This version is production-ready, responsive, and incorporates the theme's brand identity.
 */

/* Use the theme's primary font */
.author-grid, .author-grid * {
    font-family: "Almarai", sans-serif;
    box-sizing: border-box;
}

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

.author-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 0.75rem; /* rounded-xl */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #f7f8fa; /* Light grey background from screenshot */
    border: 1px solid #e2e8f0; /* slate-200 */
    overflow: hidden; /* Prevents content from spilling out on hover */
}

.author-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
}

.author-card {
    padding: 1.5rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.author-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 9999px; /* rounded-full */
    background-color: #e2e8f0; /* slate-200 */
    color: #475569; /* slate-600 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700; /* Bolder initials */
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px #e2e8f0;
    flex-shrink: 0;
}

.author-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #190D06; /* Dark brand color */
    margin: 0;
}

.book-count {
    font-size: 0.875rem; /* text-sm */
    color: #7A7A7A; /* Main text brand color */
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.25rem 0 0 0;
}

.book-count .fa-book-open {
    font-size: 0.8rem;
    color: #C1B198; /* Light accent brand color */
}

.author-bio {
    font-size: 0.9rem;
    color: #513838; /* Secondary text brand color */
    line-height: 1.7;
    margin: 1rem 0 0 0; /* Add margin-top to separate from header */
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0; /* slate-200 */
}

/* --- Book Preview Section --- */
.author-books-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0; /* slate-200 */
    flex-grow: 1; /* Pushes the footer down */
}

.author-books-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7A7A7A;
    margin: 0 0 1rem 0;
    text-align: right;
}

.author-books-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.author-book-link {
    display: block;
    text-decoration: none;
}

.author-book-image-wrapper {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-book-link:hover .author-book-image-wrapper {
    /*transform: scale(1.05);*/
    /*box-shadow: 0 6px 12px rgba(0,0,0,0.15);*/
}

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

.author-book-title {
    display: none; /* Title is not shown in the new design */
}

.author-card-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.author-view-all-button {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    background-color: #CE5A07; /* Primary Brand Color */
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.author-card-link:hover .author-view-all-button {
    background-color: #82522a; /* Accent Brand Color */
}



