﻿/* 
 * style.css - Main Stylesheet for Phule Shahu Ambedkar Website
 * ============================================================
 * 
 * This file contains ALL CSS styles for the website.
 * 
 * FILES USING THIS CSS:
 * 1. header.php - For all pages (header navigation and layout)
 * 2. index.php - Homepage (hero section, news grid, books carousel, etc.)
 * 3. All other pages that include header.php
 * 
 * FILE STRUCTURE:
 * 1. Header Styles (previously inline in header.php)
 * 2. Base Styles (variables, reset, body)
 * 3. Homepage Specific Styles (hero, news, books, sidebar)
 * 4. Responsive Design
 * 
 * Created: 2026-04-03
 * Updated: 2026-04-03
 */

/* ===== ACCESSIBILITY ===== */



.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f39c12;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ===== HEADER STYLES (previously inline in header.php) ===== */
.site-header {
    background: linear-gradient(135deg, #0f2b5e 0%, #1a3c7a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #f39c12;
    font-family: 'Noto Sans Devanagari', 'Inter', 'Segoe UI', sans-serif;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 30px;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.logo h1 {
    font-size: 2.4rem;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff 0%, #ffd166 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo h1 a {
    color: transparent;
    text-decoration: none;
}

.tagline {
    font-size: 1.1rem;
    color: #d1e0ff;
    margin: 0;
    max-width: 500px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(243, 156, 18, 0.15);
    color: #ffd166;
}

.nav-link.active {
    background: rgba(243, 156, 18, 0.25);
    color: #ffd166;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 5px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 10px 15px;
    width: 200px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .tagline {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0f2b5e 0%, #1a3c7a 100%);
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 12px 12px;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
}

/* ===== BASE STYLES ===== */
:root {
    --primary-color: #0f2b5e;
    --secondary-color: #f39c12;
    --accent-color: #1a3c7a;
    --light-color: #f8f9fa;
    --dark-color: #0a1f3d;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 18px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans Devanagari', 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f5f7fa;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
    border-bottom: 3px solid var(--secondary-color);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ffffff 0%, #ffd166 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #d1e0ff;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #cbd5e0;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 5px solid rgba(255, 255, 255, 0.1);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

/* ===== SECTION STYLES ===== */
.section {
    margin-bottom: 80px;
    position: relative;
}

.section-header {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    padding-bottom: 25px;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 2px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title i {
    color: var(--secondary-color);
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e67e22 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 10px;
    border-radius: 50%;
    background-color: rgba(243, 156, 18, 0.1);
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* Latest News Section Specific */
.latest-news-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.latest-news-section .section-header::after {
    width: 120px;
    background: linear-gradient(90deg, #f39c12 0%, #e74c3c 100%);
}

/* Responsive Section Styles */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.2rem;
        max-width: 600px;
    }
    
    .latest-news-section {
        padding: 50px 30px;
    }
}

@media (max-width: 768px) {
    .section {
        margin-bottom: 60px;
    }
    
    .section-title {
        font-size: 1.9rem;
        gap: 15px;
    }
    
    .section-title i {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        max-width: 500px;
    }
    
    .latest-news-section {
        padding: 40px 20px;
    }
    
    .section-header {
        margin-bottom: 40px;
        padding-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.7rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .latest-news-section {
        padding: 30px 15px;
    }
}

/* ===== NEWS GRID ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--secondary-color);
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.news-meta i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.news-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    flex: 1;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s;
}

.news-read-more:hover {
    gap: 12px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: inline-block;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 45px;
    height: 45px;
    padding: 0 18px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 43, 94, 0.15);
}

.pagination-item.active .pagination-link {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.25);
}

.pagination-item.disabled .pagination-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.pagination-item.disabled .pagination-link:hover {
    background: #f5f5f5;
    color: #999;
    border-color: var(--border-color);
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-link.prev,
.pagination-link.next {
    min-width: 120px;
    padding: 0 25px;
    font-weight: 600;
}

.pagination-ellipsis .pagination-link {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
    min-width: 30px;
    padding: 0 5px;
}

.pagination-ellipsis .pagination-link:hover {
    background: transparent;
    color: var(--primary-color);
    border: none;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--text-light);
    text-align: center;
    padding: 10px 20px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .pagination-link {
        min-width: 40px;
        height: 40px;
        padding: 0 15px;
        font-size: 0.9rem;
    }
    
    .pagination-link.prev,
    .pagination-link.next {
        min-width: 100px;
        padding: 0 20px;
    }
    
    .pagination-list {
        gap: 6px;
    }
}

@media (max-width: 576px) {
    .pagination-link.prev,
    .pagination-link.next {
        min-width: 80px;
        padding: 0 15px;
        font-size: 0.85rem;
    }
    
    .pagination-link {
        min-width: 35px;
        height: 35px;
        padding: 0 12px;
    }
    
    .pagination-info {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}

/* ===== BOOKS CAROUSEL ===== */
.books-carousel-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 50px;
    border-radius: var(--radius);
    margin-bottom: 60px;
}

.books-carousel-container {
    position: relative;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.books-carousel {
    flex: 1;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.book-card {
    flex: 0 0 calc(25% - 22.5px);
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.book-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.book-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-content {
    padding: 20px;
}

.news-page-container .book-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.book-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.book-title a:hover {
    color: var(--secondary-color);
}

.book-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.book-meta {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.book-meta i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.book-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s;
}

.book-link:hover {
    gap: 12px;
}

.carousel-nav {
    background: white;
    border: 2px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--primary-color);
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Note: Additional CSS from indexCss.css continues... */
/* The file contains complete styles for responsive design and other components */
/* ===== CAROUSEL DOTS ===== */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-dot.active {
    background: var(--secondary-color);
    transform: scale(1.2);
}

/* ===== EVENTS SECTION ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.event-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: var(--shadow);
}

.event-date {
    min-width: 78px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}

.event-day {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    display: block;
    font-size: 0.85rem;
    opacity: 0.95;
    margin-top: 6px;
}

.event-title {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin: 0 0 6px;
}

.event-description {
    margin: 0;
    color: var(--text-light);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.widget-header {
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
}

.widget-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.widget-content {
    padding: 16px;
}

.sidebar-image {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.image-caption {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.news-page-container .popular-list,
.news-page-container .categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.popular-item {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
}

.news-page-container .popular-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.popular-title {
    margin: 0 0 4px;
    font-size: 0.96rem;
}

.popular-title a,
.category-link,
.info-link {
    color: var(--primary-color);
    text-decoration: none;
}

.popular-title a:hover,
.category-link:hover,
.info-link:hover {
    color: var(--secondary-color);
}

.news-page-container .category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== CATEGORIES TOGGLE BUTTON ===== */
.categories-toggle {
    margin-top: 16px;
    text-align: center;
}

.categories-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.categories-toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.categories-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.toggle-text {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

/* Hidden categories */
.hidden-category {
    display: none;
}

.subscription-description,
.subscription-note,
.info-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

.subscription-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.subscription-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
}

.subscription-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

.subscription-btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--secondary-color);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.info-links {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    max-width: 360px;
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    box-shadow: var(--shadow-lg);
}

.notification-success {
    background: #16a34a;
}

.notification-error {
    background: #dc2626;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
    .book-card {
        flex: 0 0 calc(33.333% - 20px);
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .news-page-container .sidebar {
        position: static;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .book-card {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 52px 0;
        margin-bottom: 36px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .books-carousel-section {
        padding: 22px 16px;
    }

    .carousel-wrapper {
        gap: 10px;
    }

    .carousel-nav {
        width: 42px;
        height: 42px;
    }

    /* Categories toggle button on mobile */
    .categories-toggle-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .book-card {
        flex: 0 0 100%;
    }

    .news-card-content {
        padding: 18px;
    }

    .widget-content {
        padding: 14px;
    }

    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}



/* ---- Latest News Width Fix ---- */
.main-content {
    min-width: 0;
}

.latest-news-section {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.latest-news-section .section-header {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.latest-news-section .section-subtitle {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.latest-news-section .news-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    gap: 24px;
}

.latest-news-section .news-card {
    width: 100%;
    min-width: 0;
}

@media (max-width: 768px) {
    .latest-news-section .section-header,
    .latest-news-section .section-subtitle {
        max-width: 100%;
    }

    .latest-news-section .news-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

/* ===== NEWS DETAILS PAGE ===== */
.news-page-container {
    max-width: 1320px;
    margin: 28px auto 0;
    padding: 0 20px;
}

.news-page-container .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #5b6677;
}

.news-page-container .breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.news-page-container .breadcrumb a:hover {
    color: var(--secondary-color);
}

.news-page-container .breadcrumb .current {
    color: #1f2b3d;
    font-weight: 700;
}

.news-page-container .main-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 28px;
    align-items: start;
}

.news-page-container .main-content {
    min-width: 0;
}

.news-article {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.news-article .article-header {
    border-bottom: 1px solid #e9edf3;
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.news-article .article-title {
    font-size: clamp(1.65rem, 1.3rem + 1.2vw, 2.4rem);
    line-height: 1.35;
    color: #10294e;
    margin: 0;
}

.news-article .article-content {
    color: #1f2d3d;
    font-size: 1.08rem;
    line-height: 1.95;
    word-break: break-word;
}

.news-article .article-content img,
.news-article .article-content iframe,
.news-article .article-content video,
.news-article .article-content table {
    max-width: 100%;
}

.news-article .article-content p {
    margin: 0 0 1.15rem;
}

.news-article .article-content h2,
.news-article .article-content h3,
.news-article .article-content h4 {
    margin: 1.7rem 0 0.7rem;
    color: #10294e;
}

.news-article .article-content ul,
.news-article .article-content ol {
    padding-left: 1.4rem;
    margin: 0 0 1.1rem;
}

.news-article .article-content blockquote {
    margin: 1rem 0;
    padding: 12px 16px;
    background: #f7f9fd;
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
}

.news-article .article-meta {
    margin-top: 26px;
    padding: 14px 16px;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    color: #334155;
    font-size: 0.95rem;
}

.news-article .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.news-article .article-meta i {
    color: var(--secondary-color);
}

.news-page-container .social-share-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #d8e1ed;
}

.news-page-container .social-share-section .share-title {
    margin: 0 0 12px;
    font-size: 1.06rem;
    color: #1c355e;
}

.news-page-container .share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-page-container .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-page-container .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.news-page-container .facebook-btn { background: #1877f2; }
.news-page-container .twitter-btn { background: #111827; }
.news-page-container .whatsapp-btn { background: #22c55e; }
.news-page-container .email-btn { background: #475569; }

.news-page-container .sidebar .featured-image-widget {
    overflow: hidden;
}

.news-page-container .featured-image-widget img {
    width: 100%;
    height: auto;
    display: block;
}

.news-page-container .featured-image-content {
    padding: 14px 16px 16px;
}

.news-page-container .featured-image-content h3 {
    margin: 0 0 8px;
    color: #153f73;
    font-size: 1.05rem;
}

.news-page-container .featured-image-content p {
    margin: 0;
    color: #5b6677;
    font-size: 0.94rem;
    line-height: 1.75;
}

.news-page-container .sidebar-widget .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8fbff, #f0f4fa);
    border-bottom: 1px solid #e4e9f0;
    font-size: 1rem;
}

.news-page-container .latest-list,
.news-page-container .books-list,
.news-page-container .categories-list,
.news-page-container .popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-page-container .popular-list,
.news-page-container .latest-list,
.news-page-container .books-list,
.news-page-container .categories-list {
    display: grid;
    gap: 10px;
}

.news-page-container .popular-link,
.news-page-container .latest-link,
.news-page-container .book-link,
.news-page-container .category-link {
    display: block;
    text-decoration: none;
    color: #0f2b5e;
    padding: 10px 11px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.news-page-container .popular-link:hover,
.news-page-container .latest-link:hover,
.news-page-container .book-link:hover,
.news-page-container .category-link:hover {
    border-color: #dbe2ee;
    background: #fff;
    box-shadow: 0 3px 8px rgba(15, 43, 94, 0.08);
    color: #0f2b5e;
}

.news-page-container .popular-rank {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    background: #e8eef9;
    color: #153f73;
    border-radius: 20px;
    padding: 3px 8px;
    font-weight: 700;
}

.news-page-container .popular-title,
.news-page-container .latest-title,
.news-page-container .book-title {
    display: block;
    line-height: 1.55;
    font-size: 0.94rem;
}

.news-page-container .latest-date {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.8rem;
}

.news-page-container .book-link i {
    margin-right: 6px;
    color: var(--secondary-color);
}

.news-page-container .category-hidden {
    display: none;
}

.news-page-container .show-more-categories {
    margin-top: 12px;
}

.news-page-container .more-categories-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #12396d;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.news-page-container .more-categories-btn:hover {
    background: #0f2b5e;
}

@media (max-width: 1100px) {
    .news-page-container .main-layout {
        grid-template-columns: 1fr;
    }

    .news-page-container .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .news-page-container {
        padding: 0 12px;
        margin-top: 18px;
    }

    .news-page-container .breadcrumb {
        font-size: 0.88rem;
    }

    .news-article {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .news-article .article-content {
        font-size: 1rem;
        line-height: 1.82;
    }

    .news-article .article-meta {
        gap: 10px 14px;
        font-size: 0.9rem;
    }

    .news-page-container .share-btn {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }
}



/* ===== NEWS POPULAR WIDGET FIX ===== */
.news-page-container .popular-widget .popular-item {
    display: block;
}

.news-page-container .popular-widget .popular-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.news-page-container .popular-widget .popular-rank {
    width: auto;
    height: auto;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    align-self: flex-start;
    line-height: 1.2;
    font-size: 0.76rem;
    background: #e8eef9;
    color: #153f73;
}

.news-page-container .popular-widget .popular-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0f2b5e;
}

/* ===== INDEX CATEGORIES WIDGET FIX ===== */
.categories-widget .categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.categories-widget .category-item {
    margin: 0;
}

.categories-widget .category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--primary-color);
    background: #f8fafc;
    border: 1px solid transparent;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.categories-widget .category-link i {
    color: var(--secondary-color);
    font-size: 0.95rem;
    min-width: 16px;
    text-align: center;
}

.categories-widget .category-link:hover {
    background: #ffffff;
    border-color: #dbe2ee;
    box-shadow: 0 3px 8px rgba(15, 43, 94, 0.08);
    color: #0f2b5e;
}

.categories-widget .no-categories p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

/* ===== BOOK PAGE (MIGRATED FROM bookCss.css) ===== */
.book-page-container {
    max-width: 1320px;
    margin: 28px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
}

.book-main-content {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}

.book-sidebar {
    display: grid;
    gap: 18px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.book-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e7ebf1;
}

.book-main-title {
    margin: 0;
    color: #10294e;
    line-height: 1.35;
    font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.3rem);
}

.book-subtitle {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 1.05rem;
}

.book-meta-info {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.book-meta-info .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.92rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e5eaf2;
    border-radius: 999px;
    padding: 6px 12px;
}

.book-meta-info .meta-item i {
    color: var(--secondary-color);
}

.book-content {
    color: #1f2d3d;
    font-size: 1.08rem;
    line-height: 1.9;
    word-break: break-word;
}

.book-content p {
    margin: 0 0 1.1rem;
}

.book-content img,
.book-content iframe,
.book-content table,
.book-content video {
    max-width: 100%;
    height: auto;
}

.book-content h2,
.book-content h3,
.book-content h4 {
    margin: 1.7rem 0 0.75rem;
    color: #12396d;
}

.book-content ul,
.book-content ol {
    margin: 0 0 1.1rem;
    padding-left: 1.35rem;
}

.book-main-content .social-share-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #d8e1ed;
}

.book-main-content .social-share-title {
    margin: 0 0 12px;
    font-size: 1.06rem;
    color: #1c355e;
}

.book-main-content .social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.book-main-content .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-main-content .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.book-main-content .share-btn.facebook { background: #1877f2; }
.book-main-content .share-btn.twitter { background: #111827; }
.book-main-content .share-btn.whatsapp { background: #22c55e; }
.book-main-content .share-btn.telegram { background: #1d9bf0; }
.book-main-content .share-btn.email { background: #475569; }

.book-pagination-section {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #f8fafc;
}

.pagination-title {
    margin: 0 0 12px;
    color: #0f2b5e;
    font-size: 1.02rem;
}

.book-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    background: #fff;
    color: #0f2b5e;
    border: 1px solid #dbe2ee;
    font-weight: 600;
}

.pagination-link:hover {
    background: #0f2b5e;
    color: #fff;
    border-color: #0f2b5e;
}

.pagination-link.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.pagination-link.disabled,
.pagination-link.disabled:hover {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #64748b;
    border-color: #dbe2ee;
}

.pagination-info {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.book-page-container .books-carousel-section {
    margin-top: 24px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f2b5e 0%, #1a3c7a 100%);
}

.book-page-container .carousel-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.16rem;
}

.book-page-container .carousel-title i {
    color: #ffd166;
}

.book-page-container .books-carousel {
    position: relative;
}

.book-page-container .carousel-container {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 8px;
}

.book-page-container .carousel-container::-webkit-scrollbar {
    height: 6px;
}

.book-page-container .carousel-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.book-page-container .carousel-item {
    flex: 0 0 240px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.book-page-container .carousel-item a {
    display: block;
    text-decoration: none;
}

.book-page-container .carousel-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.book-page-container .carousel-content {
    padding: 12px;
}

.book-page-container .carousel-book-title {
    margin: 0;
    color: #0f2b5e;
    line-height: 1.45;
    font-size: 0.94rem;
}

.book-page-container .carousel-meta {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 0.78rem;
}

.book-page-container .carousel-pages {
    color: var(--secondary-color);
    font-weight: 700;
}

.book-page-container .carousel-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #0f2b5e;
}

.book-page-container .carousel-nav.disabled {
    opacity: 0.45;
}

.book-sidebar .sidebar-widget,
.book-sidebar .subscribe-widget,
.book-sidebar .featured-image-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.book-sidebar .widget-header {
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8fbff, #f0f4fa);
    border-bottom: 1px solid #e4e9f0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f2b5e;
}

.book-sidebar .widget-header h3 {
    margin: 0;
    font-size: 1rem;
}

.book-sidebar .widget-content {
    padding: 12px;
}

.book-sidebar .featured-image-widget img {
    width: 100%;
    display: block;
}

.book-sidebar .featured-image-content {
    padding: 12px;
}

.book-sidebar .featured-image-content h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #153f73;
}

.book-sidebar .featured-image-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.book-sidebar .popular-list,
.book-sidebar .news-list,
.book-sidebar .books-list,
.book-sidebar .categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.book-sidebar .popular-item,
.book-sidebar .news-item,
.book-sidebar .book-item,
.book-sidebar .category-item {
    margin: 0;
}

.book-sidebar .popular-item {
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.book-sidebar .popular-rank {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e8eef9;
    color: #153f73;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.book-sidebar .popular-content h4,
.book-sidebar .news-item h4,
.book-sidebar .book-item h4 {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.book-sidebar .popular-content h4 a,
.book-sidebar .news-item h4 a,
.book-sidebar .book-item h4 a,
.book-sidebar .category-tag {
    color: #0f2b5e;
    text-decoration: none;
}

.book-sidebar .popular-meta,
.book-sidebar .news-date {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

.book-sidebar .book-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-sidebar .book-icon {
    color: var(--secondary-color);
}

.book-sidebar .category-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.book-sidebar .categories-action {
    margin-top: 8px;
}

.book-sidebar .show-more-btn,
.book-sidebar .show-less-btn {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 9px 11px;
    background: #12396d;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.book-sidebar .show-more-btn:hover,
.book-sidebar .show-less-btn:hover {
    background: #0f2b5e;
}

.book-sidebar .subscribe-widget {
    padding: 14px;
    text-align: center;
}

.book-sidebar .subscribe-icon {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.book-sidebar .subscribe-title {
    margin: 0;
    color: #0f2b5e;
    font-size: 1.05rem;
}

.book-sidebar .subscribe-description {
    margin: 8px 0 12px;
    color: #64748b;
    font-size: 0.9rem;
}

.book-sidebar .subscribe-form {
    display: grid;
    gap: 8px;
}

.book-sidebar .subscribe-form input[type="email"] {
    width: 100%;
    border: 1px solid #dbe2ee;
    border-radius: 9px;
    padding: 10px 11px;
}

.book-sidebar .subscribe-form button {
    border: 0;
    border-radius: 9px;
    padding: 10px 11px;
    background: #0f2b5e;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.book-sidebar .site-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5eaf2;
    color: #64748b;
    font-size: 0.82rem;
    text-align: left;
}

.book-sidebar .hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .book-page-container {
        grid-template-columns: 1fr;
    }

    .book-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .book-page-container {
        padding: 0 12px;
        margin-top: 18px;
    }

    .book-main-content {
        padding: 16px 14px;
    }

    .book-content {
        font-size: 1rem;
        line-height: 1.82;
    }

    .book-main-content .social-share-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .book-main-content .share-btn {
        justify-content: center;
    }
}

/* ===== BOOK MORE BOOKS FIX ===== */
.book-page-container .books-carousel {
    padding: 0 46px;
}

.book-page-container .carousel-container {
    gap: 18px;
    scroll-snap-type: x mandatory;
}

.book-page-container .carousel-item {
    flex: 0 0 clamp(220px, 28vw, 280px);
    scroll-snap-align: start;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 16px rgba(15, 43, 94, 0.14);
}

.book-page-container .carousel-nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(15, 43, 94, 0.2);
}

.book-page-container .carousel-nav.prev { left: 0; }
.book-page-container .carousel-nav.next { right: 0; }

@media (max-width: 768px) {
    .book-page-container .books-carousel {
        padding: 0;
    }

    .book-page-container .carousel-nav {
        display: none;
    }

    .book-page-container .carousel-item {
        flex-basis: 78%;
    }
}

/* ===== BOOK PAGINATION + RESPONSIVE FIX ===== */
.book-page-container .book-pagination-section {
    text-align: center;
}

.book-page-container .book-pagination {
    width: 100%;
    justify-content: center !important;
}

.book-page-container .pagination-link {
    min-width: 42px;
}

@media (max-width: 992px) {
    .book-page-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .book-sidebar {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    .book-page-container .book-pagination {
        gap: 6px;
    }

    .book-page-container .pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.88rem;
    }

    .book-page-container .pagination-link .fas {
        font-size: 0.78rem;
    }
}

/* ===== BOOK PAGE FINAL RESPONSIVE HARD FIX ===== */
.book-page-container,
.book-page-container * {
    box-sizing: border-box;
}

.book-page-container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.book-page-container .book-main-content,
.book-page-container .book-content-wrapper,
.book-page-container .book-content,
.book-page-container .book-sidebar {
    min-width: 0;
}

.book-page-container .book-main-content {
    overflow: hidden;
}

.book-page-container .book-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.book-page-container .book-content img,
.book-page-container .book-content video,
.book-page-container .book-content iframe,
.book-page-container .book-content canvas,
.book-page-container .book-content svg {
    max-width: 100% !important;
    height: auto !important;
}

.book-page-container .book-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.book-page-container .book-content pre,
.book-page-container .book-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
}

.book-page-container .book-pagination-section {
    width: 100%;
    text-align: center;
}

.book-page-container .book-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 0 auto;
}

.book-page-container .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    max-width: 100%;
    white-space: nowrap;
}

.book-page-container .books-carousel-section {
    width: 100%;
}

.book-page-container .books-carousel {
    width: 100%;
    padding: 0 46px;
}

.book-page-container .carousel-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.book-page-container .carousel-item {
    flex: 0 0 clamp(220px, 30vw, 280px);
    max-width: 280px;
}

.book-page-container .carousel-book-title {
    word-break: break-word;
}

@media (max-width: 1100px) {
    .book-page-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .book-page-container .book-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 768px) {
    .book-page-container {
        margin-top: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .book-page-container .book-main-content {
        padding: 16px 14px;
    }

    .book-page-container .book-main-title {
        font-size: 1.35rem;
        line-height: 1.45;
    }

    .book-page-container .book-meta-info {
        gap: 8px;
    }

    .book-page-container .book-main-content .social-share-buttons {
        grid-template-columns: 1fr;
        display: grid;
    }

    .book-page-container .book-main-content .share-btn {
        width: 100%;
        justify-content: center;
    }

    .book-page-container .books-carousel {
        padding: 0;
    }

    .book-page-container .carousel-nav {
        display: none;
    }

    .book-page-container .carousel-item {
        flex-basis: 80%;
        max-width: none;
    }

    .book-page-container .book-pagination {
        gap: 6px;
    }

    .book-page-container .pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.86rem;
    }
}
