/**
 * Unlimited E-Books Library Styles
 * Colors: #1C9DA0 (teal), #16083A (dark purple)
 * Font: Source Sans Pro
 */

/* Import Source Sans Pro font */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

/* General Section Styles */
.unlimited-ebooks-section {
    font-family: 'Source Sans Pro', sans-serif;
    margin: 40px 0;
    padding: 0 20px;
}

.unlimited-ebooks-section .section-title {
    font-size: 32px;
    font-weight: 700;
    color: #16083A;
    margin-bottom: 30px;
    text-align: center;
}

/* Message Styles */
.unlimited-ebooks-message,
.no-ebooks-message {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.no-ebooks-message p {
    margin: 0;
    line-height: 1.6;
}

.no-ebooks-message a {
    color: #1C9DA0;
    text-decoration: underline;
    font-weight: 600;
}

.no-ebooks-message a:hover {
    color: #16083A;
}

/* Category Filters */
.ebook-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent !important;
    border: 2px solid #1C9DA0 !important;
    color: #1C9DA0 !important;
    padding: 10px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

.filter-btn:hover {
    background-color: #1C9DA0 !important;
    color: #fff !important;
}

.filter-btn.active {
    background-color: #1C9DA0 !important;
    color: #fff !important;
}

/* Ebooks Grid */
.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .ebooks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ebooks-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ebook Card */
.ebook-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ebook-card-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebook-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ebook-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
}

.ebook-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ebook-title {
    font-size: 20px;
    font-weight: 700;
    color: #16083A;
    margin: 0 0 10px 0;
    line-height: 1.3;
    font-family: 'Source Sans Pro', sans-serif;
}

.ebook-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    flex-grow: 1;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Buttons */
.ebook-button {
    margin-top: auto;
}

.btn-read-now,
.btn-learn-more,
.btn-unavailable {
    display: block;
    width: 100%;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border: none !important;
    text-transform: none !important;
}

.btn-read-now {
    background-color: #16083A !important;
    color: #fff !important;
}

.btn-read-now:hover {
    background-color: #0f0527 !important;
    transform: scale(1.02);
}

.btn-learn-more {
    background-color: transparent !important;
    color: #16083A !important;
    border: 2px solid #16083A !important;
}

.btn-learn-more:hover {
    background-color: #16083A !important;
    color: #fff !important;
}

.btn-unavailable {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
}

/* Pagination */
.ebook-pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.ebook-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.ebook-pagination li {
    margin: 0;
}

.ebook-pagination a,
.ebook-pagination span {
    display: block;
    padding: 10px 16px !important;
    background-color: transparent !important;
    border: 2px solid #1C9DA0 !important;
    color: #1C9DA0 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.ebook-pagination a:hover {
    background-color: #1C9DA0 !important;
    color: #fff !important;
}

.ebook-pagination .current {
    background-color: #1C9DA0 !important;
    color: #fff !important;
}

/* Loading Indicator */
#ebook-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #1C9DA0;
}

#ebook-loading p {
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .unlimited-ebooks-section .section-title {
        font-size: 28px;
    }
    
    .ebook-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .ebooks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Hide full-access-block if user has Master Access */
body.has-master-access .full-access-block {
    display: none !important;
}


