/* ============================================
   BOOKS PAGE STYLES - PMC Inspires
   Modern, responsive styling for book collections
============================================ */


/* Books Main Container */

.books-main {
    padding-top: 100px;
    background: var(--light-color);
    min-height: 100vh;
    width: 100%;
}


/* Books Hero Section */

.books-hero {
    background: linear-gradient(135deg, rgba(10, 36, 99, 0.95) 0%, rgba(30, 64, 175, 0.9) 100%);
    color: var(--light-color);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.books-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><path fill="rgba(255,255,255,0.05)" d="M0,0 L1200,0 L1200,600 Q600,800 0,600 Z"/></svg>');
    background-size: cover;
    z-index: 1;
}

.books-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--light-color);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}


/* Buttons */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: var(--light-color);
    color: var(--light-color);
}

.btn-secondary:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}


/* Books Section */

.books-section {
    padding: 6rem 0;
    background: var(--primary-color);
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    width: 100%;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--light-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}


/* Books Grid */

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* Book Card */

.book-card {
    background: var(--light-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.book-cover {
    position: relative;
    height: 300px;
    overflow: hidden;
    width: 100%;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient-secondary);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    z-index: 2;
}


/* Book Info */

.book-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.book-info h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.book-author {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.book-summary {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}


/* Book Meta */

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.book-tag {
    background: rgba(10, 36, 99, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.book-tag:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-2px);
}


/* Book Actions */

.book-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(10, 36, 99, 0.1);
    width: 100%;
}

.book-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.book-price::before {
    content: '₦';
    font-size: 1.5rem;
    vertical-align: top;
}

.btn-buy {
    background: var(--gradient-primary);
    color: var(--light-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(10, 36, 99, 0.2);
}

.btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(10, 36, 99, 0.3);
}


/* Call to Action Section */

.books-cta {
    background: var(--gradient-primary);
    color: var(--light-color);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.books-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path fill="rgba(255,255,255,0.03)" d="M0,500 Q250,300 500,500 T1000,500 L1000,1000 L0,1000 Z"/></svg>');
    background-size: cover;
    z-index: 1;
}

.books-cta .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.books-cta h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--light-color);
}

.books-cta p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.books-cta .btn-primary {
    background: var(--gradient-secondary);
    border: none;
    font-size: 1.2rem;
    padding: 1.3rem 3rem;
    min-width: 220px;
    color: var(--primary-color);
}

.books-cta .btn-primary:hover {
    transform: translateY(-3px);
}


/* Book Rating Stars */

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.stars {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.rating-text {
    color: var(--dark-gray);
    font-size: 0.9rem;
    font-weight: 600;
}


/* Responsive Design */

@media (max-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .books-hero {
        padding: 5rem 0;
    }
    .hero-content h1 {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .books-section {
        padding: 5rem 0;
    }
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .books-main {
        padding-top: 80px;
    }
    .books-hero {
        padding: 4rem 0;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .books-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .book-card {
        max-width: 400px;
        margin: 0 auto;
    }
    .book-actions {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .book-price {
        font-size: 2.5rem;
    }
    .btn-buy {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .hero-description {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 1.1rem;
    }
    .book-info h3 {
        font-size: 1.5rem;
    }
    .books-cta h2 {
        font-size: 2rem;
    }
    .books-cta p {
        font-size: 1.1rem;
    }
}


/* Animations */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Smooth Scrolling */

html {
    scroll-behavior: smooth;
}


/* Performance Optimizations */

.book-cover img {
    will-change: transform;
}

.btn-buy {
    will-change: transform;
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}