/* public/css/pages/books.css - Books page specific styles */

/* CSS Variables for Books Page */
:root {
    --book-primary: #1B4E3B;
    --book-secondary: #267055;
    --book-accent: #3EB489;
    --book-light: #7CD2B3;
    --book-very-light: #9EDEC6;
    --book-text-dark: #333333;
    --book-text-light: #666666;
    --book-border: #e9ecef;
    --book-shadow: 0 4px 20px rgba(27, 78, 59, 0.1);
    --book-hover-shadow: 0 8px 30px rgba(27, 78, 59, 0.15);
}

/* ========================================
   PAGE HEADER & BREADCRUMB STYLES
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--book-primary) 0%, var(--book-secondary) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.page-stats {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--book-accent);
}

/* Breadcrumb */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid var(--book-border);
}

.breadcrumb {
    background: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--book-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--book-secondary);
}

.breadcrumb-item.active {
    color: var(--book-text-light);
}

/* ========================================
   FILTER & SEARCH STYLES
   ======================================== */
.filter-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Search Box - Books Page Specific */
.search-container {
    margin-bottom: 2rem;
}

.books-search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.books-search-input {
    width: 100%;
    padding: 1rem 4rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: var(--book-text-dark);
}

.books-search-input::placeholder {
    color: var(--book-text-light);
}

.books-search-input:focus {
    outline: none;
    border-color: var(--book-accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.1);
}

/* Icon search di sebelah kiri */
.books-search-box > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--book-text-light);
    font-size: 1rem;
    z-index: 2;
}

.books-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--book-accent), var(--book-light));
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.books-search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(62, 180, 137, 0.3);
}

.books-search-btn i {
    font-size: 0.9rem;
    color: white;
}

/* Filters */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--book-text-dark);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: white;
    color: var(--book-text-dark);
    border: 2px solid var(--book-border);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--book-accent);
    background: rgba(62, 180, 137, 0.1);
}

.filter-btn.active {
    background: var(--book-primary);
    color: white;
    border-color: var(--book-primary);
}

.filter-btn i {
    font-size: 0.8rem;
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--book-border);
    border-radius: 10px;
    background: white;
    font-size: 0.9rem;
    color: var(--book-text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--book-accent);
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.1);
}

/* ========================================
   BOOKS GRID & CARD STYLES
   ======================================== */
.books-content {
    margin-bottom: 4rem;
}

/* Featured Section */
.featured-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    color: var(--book-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: var(--book-accent);
}

.results-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.search-term, .filter-term {
    background: rgba(62, 180, 137, 0.1);
    color: var(--book-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(62, 180, 137, 0.3);
}

.total-results {
    color: var(--book-text-light);
    font-weight: 500;
}

/* Featured Carousel */
.featured-carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--book-shadow);
}

.featured-book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    margin: 0 0.5rem;
}

.featured-book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--book-hover-shadow);
}

.featured-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-book-card:hover .featured-image img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 78, 59, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-book-card:hover .book-overlay {
    opacity: 1;
}

.featured-content {
    padding: 1.5rem;
}

.featured-content .book-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-content .book-title a {
    color: var(--book-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content .book-title a:hover {
    color: var(--book-primary);
}

.featured-content .book-author {
    color: var(--book-text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.featured-content .book-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.featured-content .badge {
    background: var(--book-primary) !important;
    color: white;
    border: none;
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(27, 78, 59, 0.3);
}

.featured-carousel .carousel-control-prev,
.featured-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(27, 78, 59, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.featured-carousel .carousel-control-prev {
    left: 15px;
}

.featured-carousel .carousel-control-next {
    right: 15px;
}

.featured-carousel .carousel-control-prev:hover,
.featured-carousel .carousel-control-next:hover {
    background: rgba(27, 78, 59, 0.9);
}

/* ========================================
   REGULAR BOOKS GRID
   ======================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* Default 3 kolom, akan diubah oleh JavaScript */
    gap: 2rem;
    margin-bottom: 3rem;
}

.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--book-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--book-hover-shadow);
}

.book-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-image .book-overlay {
    background: rgba(27, 78, 59, 0.9);
}

.book-actions {
    display: flex;
    gap: 0.5rem;
}

.book-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-badge {
    background: rgba(62, 180, 137, 0.9);
    color: white;
    border: 1px solid rgba(62, 180, 137, 0.5);
    font-weight: 600;
}

.year-badge {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.5);
}

.book-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.book-title a {
    color: var(--book-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-title a:hover {
    color: var(--book-primary);
}

.book-author {
    color: var(--book-text-light);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.book-synopsis {
    color: var(--book-text-light);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.book-meta {
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.book-meta small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--book-text-light);
}

.book-footer {
    margin-top: auto;
}

.read-more-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--book-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.read-more-btn:hover {
    background: var(--book-secondary);
    color: white;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--book-text-light);
}

.empty-icon {
    margin-bottom: 2rem;
}

.empty-state h4 {
    color: var(--book-text-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 2rem;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */
.sidebar {
    padding-left: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--book-border);
    box-shadow: var(--book-shadow);
}

.widget-title {
    color: var(--book-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(62, 180, 137, 0.2);
    display: flex;
    align-items: center;
}

.widget-title i {
    color: var(--book-accent);
}

.widget-content {
    color: var(--book-text-dark);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list li:last-child {
    margin-bottom: 0;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--book-text-dark);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-list a:hover {
    background: rgba(62, 180, 137, 0.1);
    border-color: rgba(62, 180, 137, 0.3);
}

.category-list a.active {
    background: var(--book-primary);
    color: white;
}

.count {
    background: rgba(108, 117, 125, 0.2);
    color: var(--book-text-light);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-list a.active .count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Recent Books */
.recent-books,
.popular-books,
.category-books {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-book-item,
.popular-book-item,
.category-book-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.recent-book-item:hover,
.popular-book-item:hover,
.category-book-item:hover {
    background: rgba(62, 180, 137, 0.05);
}

.recent-book-item:last-child,
.popular-book-item:last-child,
.category-book-item:last-child {
    margin-bottom: 0;
}

.recent-book-image,
.popular-book-image,
.category-book-image {
    position: relative;
    width: 60px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.recent-book-image img,
.popular-book-image img,
.category-book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-book-image .badge,
.popular-book-image .badge {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    background: rgba(62, 180, 137, 0.95);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    z-index: 2;
    max-width: calc(100% - 12px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-book-content,
.popular-book-content,
.category-book-content {
    flex: 1;
    min-width: 0;
}

.recent-book-content h6,
.popular-book-content h6,
.category-book-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.recent-book-content h6 a,
.popular-book-content h6 a,
.category-book-content h6 a {
    color: var(--book-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-book-content h6 a:hover,
.popular-book-content h6 a:hover,
.category-book-content h6 a:hover {
    color: var(--book-primary);
}

.recent-book-meta,
.popular-book-meta,
.category-book-meta {
    font-size: 0.75rem;
    color: var(--book-text-light);
}

/* Back to Home/List Cards */
.back-to-home-card,
.back-to-list-card {
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 50%, #f0fbf8 100%);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(62, 180, 137, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.back-to-home-card::before,
.back-to-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(62, 180, 137, 0.05) 0%, rgba(27, 78, 59, 0.08) 100%);
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.back-to-home-card:hover,
.back-to-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(62, 180, 137, 0.15);
    border-color: rgba(62, 180, 137, 0.2);
}

.back-to-home-card:hover::before,
.back-to-list-card:hover::before {
    opacity: 1;
}

.back-to-home-card h5,
.back-to-list-card h5 {
    color: var(--book-primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    text-align: center;
}

.back-to-home-card h5 i,
.back-to-list-card h5 i {
    font-size: 2.5rem;
    color: var(--book-accent);
    padding: 1rem;
    background: rgba(62, 180, 137, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-home-card:hover h5 i,
.back-to-list-card:hover h5 i {
    transform: scale(1.1);
    background: rgba(62, 180, 137, 0.2);
    color: var(--book-primary);
}

.back-to-home-card h5 span,
.back-to-list-card h5 span {
    font-size: 1rem;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.back-to-home-card:hover h5 span,
.back-to-list-card:hover h5 span {
    color: var(--book-secondary);
}

.back-to-home-card p,
.back-to-list-card p {
    color: var(--book-text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
}

.back-to-home-card .btn,
.back-to-list-card .btn {
    background: linear-gradient(135deg, var(--book-primary) 0%, var(--book-secondary) 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(27, 78, 59, 0.2);
    position: relative;
    z-index: 2;
    overflow: hidden;
    min-width: 120px;
}

.back-to-home-card .btn::before,
.back-to-list-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.back-to-home-card .btn:hover,
.back-to-list-card .btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(27, 78, 59, 0.3);
    background: linear-gradient(135deg, var(--book-secondary) 0%, var(--book-accent) 100%);
}

.back-to-home-card .btn:hover::before,
.back-to-list-card .btn:hover::before {
    left: 100%;
}

.back-to-home-card .btn:active,
.back-to-list-card .btn:active {
    transform: translateY(0) scale(0.98);
}

.back-to-home-card .btn i,
.back-to-list-card .btn i {
    transition: transform 0.3s ease;
}

.back-to-home-card .btn:hover i,
.back-to-list-card .btn:hover i {
    transform: translateX(-3px);
}

/* ========================================
   BOOK DETAIL PAGE STYLES
   ======================================== */
.book-detail-section {
    margin-bottom: 4rem;
}

.book-detail {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--book-shadow);
    margin-bottom: 2rem;
}

.book-header {
    margin-bottom: 3rem;
}

.book-cover {
    position: relative;
    text-align: center;
}

.book-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 500px;
}

.book-cover .book-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-info {
    padding-left: 2rem;
}

.book-info .book-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--book-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.book-meta {
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item i {
    color: var(--book-accent);
    font-size: 1rem;
    width: 20px;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.meta-label {
    font-weight: 600;
    color: var(--book-text-dark);
    min-width: 120px;
    flex-shrink: 0;
}

.meta-value {
    color: var(--book-text-light);
    flex: 1;
}

.meta-value a {
    color: var(--book-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-value a:hover {
    color: var(--book-secondary);
}

.book-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.book-actions .btn {
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.book-actions .btn:hover {
    transform: translateY(-2px);
}

/* Book Synopsis */
.book-synopsis {
    margin-bottom: 3rem;
}

.book-synopsis .section-title {
    color: var(--book-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(62, 180, 137, 0.3);
}

.synopsis-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--book-text-dark);
}

/* Share Section */
.share-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(62, 180, 137, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(62, 180, 137, 0.2);
}

.share-section h5 {
    color: var(--book-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: scale(1.1);
    color: white;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.copy { background: #6c757d; }

/* Related Books */
.related-books {
    margin-top: 3rem;
}

.related-books .section-title {
    color: var(--book-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(62, 180, 137, 0.3);
}

.related-book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--book-border);
    height: 100%;
}

.related-book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--book-hover-shadow);
}

.related-book-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.related-book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-book-content {
    padding: 1.5rem;
}

.related-book-content h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.related-book-content h6 a {
    color: var(--book-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-book-content h6 a:hover {
    color: var(--book-primary);
}

.related-book-content p {
    color: var(--book-text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Sidebar Detail Page */
.book-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(62, 180, 137, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--book-text-dark);
    flex-shrink: 0;
}

.detail-value {
    color: var(--book-text-light);
    text-align: right;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Badge responsive adjustments */
@media (max-width: 576px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .book-badges {
        gap: 0.25rem;
    }
    
    .recent-book-image .badge,
    .popular-book-image .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        max-width: 80px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        padding-left: 1rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    .sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
    
    .book-info {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .book-info .book-title {
        font-size: 2rem;
    }
    
    .book-actions {
        justify-content: center;
    }
    
    .page-stats {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .book-detail {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .filter-card {
        padding: 1.5rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .book-detail {
        padding: 1.5rem;
    }
    
    .book-info .book-title {
        font-size: 1.5rem;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .meta-label {
        min-width: auto;
    }
    
    /* Back to Home Card Mobile Optimizations */
    .back-to-home-card,
    .back-to-list-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
        min-height: 160px;
    }
    
    .back-to-home-card h5,
    .back-to-list-card h5 {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .back-to-home-card h5 i,
    .back-to-list-card h5 i {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        padding: 0.75rem;
    }
    
    .back-to-home-card h5 span,
    .back-to-list-card h5 span {
        font-size: 0.95rem;
    }
    
    .back-to-home-card p,
    .back-to-list-card p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        max-width: 160px;
    }
    
    .back-to-home-card .btn,
    .back-to-list-card .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-book-card {
        margin: 0;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .book-actions .btn {
        min-width: auto;
        width: 100%;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .results-info {
        justify-content: center;
        text-align: center;
    }
}

/* ========================================
   PAGINATION STYLES
   ======================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    border: 2px solid #e9ecef;
    color: var(--book-text);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.pagination .page-link:hover {
    border-color: var(--book-accent);
    color: var(--book-primary);
    background: rgba(62, 180, 137, 0.1);
}

.pagination .page-item.active .page-link {
    background: var(--book-primary);
    border-color: var(--book-primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: var(--book-text-light);
    background: #f8f9fa;
    border-color: #e9ecef;
}

.pagination .page-item:first-child .page-link {
    border-radius: 10px;
}

.pagination .page-item:last-child .page-link {
    border-radius: 10px;
}

/* ========================================
   LOADING & ANIMATION STATES
   ======================================== */
.book-card,
.featured-book-card,
.related-book-card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover animations */
.book-card:hover .book-title a,
.featured-book-card:hover .book-title a,
.related-book-card:hover h6 a {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

/* Focus states for accessibility */
.book-card:focus-within,
.featured-book-card:focus-within,
.related-book-card:focus-within {
    outline: 3px solid rgba(62, 180, 137, 0.3);
    outline-offset: 2px;
}

.back-to-home-card .btn:focus,
.back-to-list-card .btn:focus {
    outline: 3px solid rgba(62, 180, 137, 0.4);
    outline-offset: 3px;
}

.back-to-home-card:focus-within,
.back-to-list-card:focus-within {
    border-color: var(--book-accent);
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.1);
}

/* Print styles */
@media print {
    .book-detail {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .book-actions,
    .share-section,
    .sidebar {
        display: none;
    }
}
