/* Book Page Modern CSS - Phule Shahu Ambedkar Website */
/* This file contains all CSS for book.php page */

/* ===== BOOK PAGE LAYOUT ===== */
.book-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.book-main-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    overflow: hidden;
}

.book-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===== BOOK HEADER ===== */
.book-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.book-main-title {
    font-size: 2.8rem;
    color: #1e3c72;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.book-subtitle {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 25px;
    font-weight: 400;
    font-style: italic;
}

.book-meta-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 1rem;
}

.meta-item i {
    color: #f39c12;
    font-size: 1.2rem;
}

/* ===== BOOK CONTENT ===== */
.book-content-area {
    margin-bottom: 50px;
}

.book-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.book-content p {
    margin-bottom: 25px;
    text-align: justify;
}

.book-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.book-content h2, .book-content h3 {
    color: #1e3c72;
    margin: 35px 0 20px;
    font-weight: 600;
}

.book-content h2 {
    font-size: 1.8rem;
    border-left: 5px solid #f39c12;
    padding-left: 15px;
}

.book-content h3 {
    font-size: 1.5rem;
}

/* ===== SOCIAL MEDIA SHARE BUTTONS ===== */
.social-share-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid #f39c12;
}

.social-share-title {
    font-size: 1.4rem;
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-share-title i {
    color: #f39c12;
}

.social-share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.share-btn i {
    font-size: 1.2rem;
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5cb6 100%);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.share-btn.email {
    background: linear-gradient(135deg, #ea4335 0%, #d23c2e 100%);
}

/* ===== BOOK PAGINATION ===== */
.book-pagination-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.pagination-title {
    font-size: 1.4rem;
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-title i {
    color: #f39c12;
}

.book-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
    transform: translateY(-2px);
}

.pagination-link.active {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.pagination-link.disabled:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #e9ecef;
    transform: none;
}

.pagination-info {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 1rem;
}

/* ===== BOOKS CAROUSEL ===== */
.books-carousel-section {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #1e3c72 0%, #2c3e50 100%);
    border-radius: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.carousel-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-title i {
    color: #f39c12;
}

.books-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-container {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    scrollbar-width: none; /* Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.carousel-item {
    flex: 0 0 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.carousel-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.carousel-content {
    padding: 20px;
}

.carousel-book-title {
    font-size: 1.2rem;
    color: #1e3c72;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.carousel-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

.carousel-pages {
    color: #f39c12;
    font-weight: 600;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3c72;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-nav.disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
}

/* ===== SIDEBAR WIDGETS ===== */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.widget-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2c3e50 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-header h3 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.widget-header i {
    color: #f39c12;
    font-size: 1.2rem;
}

.widget-content {
    padding: 20px;
}

/* Featured Image Widget (same as index.php and news.php) */
.featured-image-widget {
    text-align: center;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.featured-image-widget img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 15px 15px 0 0;
    display: block;
}

.featured-image-content {
    padding: 20px;
}

.featured-image-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.featured-image-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Widget 1: Phule-Shahu-Ambedkar Image */
.widget-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin-bottom: 15px;
}

.widget-image-caption {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Widget 2: Popular Articles */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-rank {
    background: #f39c12;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popular-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    line-height: 1.4;
}

.popular-content h4 a {
    color: #1e3c72;
    text-decoration: none;
    transition: color 0.3s;
}

.popular-content h4 a:hover {
    color: #f39c12;
}

.popular-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.85rem;
}

/* Widget 3: Top News */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.4;
}

.news-item h4 a {
    color: #1e3c72;
    text-decoration: none;
    transition: color 0.3s;
}

.news-item h4 a:hover {
    color: #f39c12;
}

.news-date {
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Widget 4: Books */
.books-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.book-item:last-child {
    border-bottom: none;
}

.book-icon {
    color: #f39c12;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.book-item h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.book-item h4 a {
    color: #1e3c72;
    text-decoration: none;
    transition: color 0.3s;
}

.book-item h4 a:hover {
    color: #f39c12;
}

/* Widget 5: Categories */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
    transform: translateY(-2px);
}

/* Widget 6: Email Subscription */
.subscribe-widget {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.subscribe-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
}

.subscribe-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.subscribe-description {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0; /* Allows flex item to shrink below content size */
}

.subscribe-form button {
    background: #1e3c72;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 1;
    max-width: 100%;
}

.subscribe-form button:hover {
    background: #2c3e50;
}

.site-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== CATEGORIES SHOW MORE/LESS ===== */
.hidden-category {
    display: none !important;
}

.categories-action {
    margin-top: 15px;
    text-align: center;
}

.show-more-btn, .show-less-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.show-more-btn:hover, .show-less-btn:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.show-more-btn i, .show-less-btn i {
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .book-page-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .book-main-content {
        padding: 30px;
    }
    
    .book-main-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .book-page-container {
        margin: 20px auto;
        padding: 0 15px;
        gap: 20px;
    }
    
    .book-main-content {
        padding: 20px;
    }
    
    .book-main-title {
        font-size: 2rem;
    }
    
    .book-subtitle {
        font-size: 1.2rem;
    }
    
    .book-meta-info {
        gap: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .social-share-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-btn {
        justify-content: center;
    }
    
    .carousel-item {
        flex: 0 0 250px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-nav.prev {
        left: 5px;
    }
    
    .carousel-nav.next {
        right: 5px;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form input[type="email"],
    .subscribe-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .book-main-title {
        font-size: 1.8rem;
    }
    
    .book-content {
        font-size: 1.1rem;
    }
    
    .carousel-item {
        flex: 0 0 220px;
    }
    
    .carousel-image {
        height: 150px;
    }
}