/* =========================================
   E-BOOKS PAGE STYLES
   ========================================= */

.ebook-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: 100%;
}

/* Hero Section */
.ebook-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    padding: 100px 40px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.ebook-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.ebook-hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Featured Section */
.featured-section {
    padding: 60px 0;
}

.featured-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 60px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.feat-img {
    flex-shrink: 0;
    width: 280px;
    border-radius: var(--radius-md);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.2);
    transform: rotate(-3deg);
    transition: var(--transition);
}

.feat-img:hover {
    transform: rotate(0deg) scale(1.05);
}

.feat-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.feat-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.feat-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Library Grid */
.library-section {
    padding: 80px 0;
}

.section-title-bar {
    text-align: center;
    margin-bottom: 60px;
}

.section-title-bar h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.book-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.book-tag {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 4px 12px;
    background: #10b981;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    z-index: 10;
}

.tag-premium {
    background: #f59e0b;
}

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.book-details-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.book-author {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.book-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--light-bg);
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.book-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-feature-download {
    width: auto;
    padding: 16px 32px;
    background: var(--primary-color);
    color: var(--white);
}

/* =========================================
   RESPONSIVENESS (Laptops & Mobile)
   ========================================= */

/* Laptop Screens (Max 1280px) */
@media (max-width: 1280px) {
    .featured-wrapper {
        gap: 40px;
        padding: 40px;
    }

    .feat-img {
        width: 240px;
    }

    .feat-content h2 {
        font-size: 2rem;
    }
}

/* Tablets (Max 992px) */
@media (max-width: 992px) {
    .featured-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    .feat-img {
        width: 220px;
        transform: rotate(0);
        margin-bottom: 2rem;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Mobile Devices (Max 600px) */
@media (max-width: 600px) {
    .ebook-hero {
        padding: 60px 20px;
    }

    .featured-wrapper {
        padding: 30px 15px;
    }

    .feat-content h2 {
        font-size: 1.5rem;
    }

    .book-card {
        padding: 1.5rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }
}