/* Books Page Specific Styles */

.books-header {
    background: var(--gradient-main);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.books-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.books-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.books-section {
    padding: 40px 20px;
}

.books-container {
    max-width: 1200px;
    margin: 0 auto;
}

.books-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.books-filters {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-subtle);
    height: fit-content;
    border: 1px solid var(--border-light);
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: 'Merriweather', serif;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-input, .filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 90, 139, 0.1);
}

.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.filter-checkbox label {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-clear-filters, .btn-apply-filters {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-filters {
    background: var(--accent-color);
    color: white;
}

.btn-clear-filters:hover {
    background: var(--accent-color);
    color: white;
}

.btn-apply-filters:hover {
    background: var(--primary-color);
}

.books-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.book-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #e8e8e8;
    display: grid;
    grid-template-columns: 1fr 240px;
    min-height: 320px;
    position: relative;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.book-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    position: relative;
}

.book-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.book-cover {
    width: 180px;
    height: 240px;
    background: var(--gradient-main);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover {
    transform: perspective(1000px) rotateY(0deg);
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
}

.book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    border-radius: 12px;
}

.book-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.book-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-family: 'Merriweather', serif;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-author::before {
    content: '👤';
    font-size: 12px;
    opacity: 0.7;
}

.book-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.book-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    background: rgba(0, 90, 139, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 90, 139, 0.1);
}

.book-meta-item i {
    color: var(--accent-color);
    width: 16px;
    font-size: 14px;
}

.book-actions {
    display: flex;
    gap: 15px;
    margin-top: 0;
}

.book-btn {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.book-btn:hover::before {
    left: 100%;
}

.book-btn.primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 90, 139, 0.3);
}

.book-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 90, 139, 0.4);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.book-btn:not(.primary) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.book-btn:not(.primary):hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 90, 139, 0.3);
}

.book-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.book-btn:hover i {
    transform: scale(1.1);
}

/* Results Header Styles */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.publish-book-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-subtle);
}

.publish-book-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-normal);
}

.publish-book-btn i {
    font-size: 12px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

/* Home Button Styles */
.home-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(0, 90, 139, 0.1);
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: var(--accent-color);
    color: white !important;
}

.home-btn i {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .books-content {
        grid-template-columns: 1fr;
    }

    .books-filters {
        order: 2;
    }

    .books-list {
        order: 1;
    }

    .book-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .book-image {
        justify-content: center;
        padding: 25px;
        order: 1;
    }

    .book-content {
        order: 2;
        padding: 25px;
    }

    .book-cover {
        width: 160px;
        height: 220px;
        transform: none;
    }

    .book-card:hover .book-cover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .book-actions {
        flex-direction: column;
    }

    .book-meta {
        flex-direction: column;
        gap: 10px;
    }

    .home-btn span {
        display: none;
    }
}
