/* ============================================
   E-Books Page Styles
   ============================================ */

/* Hero Section */
.ebooks-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

.ebooks-hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.ebooks-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.ebooks-hero .container {
    position: relative;
    z-index: 3;
}

.ebooks-hero .hero-content {
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.15em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.ebooks-intro {
    padding: 4rem 0;
    background: #fff;
    text-align: center;
}

.ebooks-intro h1 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.ebooks-intro p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

/* E-Books Section */
.ebooks-section {
    padding: 4rem 0;
    background: #fff;
}

.ebooks-section.alt-bg {
    background: #f8f9fa;
}

.ebooks-section h2 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #2e7d32;
    text-align: center;
    font-style: italic;
    margin-bottom: 2.5rem;
}

/* E-Books Grid */
.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.ebook-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-color: #ff9800;
}

.ebook-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.ebook-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ebook-card:hover .ebook-cover img {
    transform: scale(1.05);
}

.ebook-info {
    padding: 1.5rem;
    flex: 1;
}

.ebook-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.ebook-info h3 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ebook-info h3 a:hover {
    color: #ffc107;
}

.ebook-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.ebook-action {
    padding: 0 1.5rem 1.5rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffc107;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #ffca28;
    color: #1a1a1a !important;
    transform: translateX(4px);
}

.btn-download i {
    font-size: 0.9rem;
}

/* CTA Section */
.ebooks-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    text-align: center;
}

.ebooks-cta .cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.ebooks-cta h2 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

.ebooks-cta p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffc107;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background: #ffca28;
    color: #1a1a1a !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .ebooks-hero {
        min-height: 250px;
    }

    .hero-badge {
        letter-spacing: 0.1em;
    }

    .ebooks-intro,
    .ebooks-section,
    .ebooks-cta {
        padding: 3rem 0;
    }

    .ebooks-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
}

@media (max-width: 480px) {
    .ebooks-hero {
        min-height: 200px;
    }

    .hero-badge {
        font-size: 1.5rem;
    }

    .ebook-card {
        border-width: 1px;
    }

    .ebook-info {
        padding: 1rem;
    }

    .ebook-action {
        padding: 0 1rem 1rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}
