/* Custom styles for textbook page */
.page-title-area {
    background-color: #f8f9fa;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.page-title-content h2 {
    font-size: 32px;
    margin-top: 10px;
    color: #333;
}

/* Sticky sidebar for desktop */
@media (min-width: 992px) {
    #filter-sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* Filter toggle button for mobile */
.filter-toggle-btn {
    background-color: var(--mainColor);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toggle-btn i {
    margin-right: 8px;
    font-size: 18px;
}

.filter-toggle-btn:hover {
    background-color: var(--mainColor);
}

/* Hide filter content on mobile by default */
@media (max-width: 991px) {
    .filter-content {
        display: none;
    }
}

.widget-area {
    overflow: hidden;
    padding: 5px;
}

.widget-area .widget {
    margin-bottom: 10px;
}

.widget {
    padding: 10px;
    margin-bottom: 25px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #eee;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 600;
}

.filter-section {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-heading {
    font-size: 16px;
    margin-bottom: 12px;
    color: #555;
    font-weight: 700;
}

.checkbox-list {
    max-height: 275px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.form-check {
    margin-bottom: 8px;
    padding-left: 25px;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 14px;
}

.form-check-input {
    border-color: #777 !important;
    opacity: 1; /* Prevent it from looking faded */
}

.form-check-input:checked {
    background-color: var(--mainTextColor) !important;
    border-color: var(--mainTextColor) !important;
    opacity: 1; /* Prevent it from looking faded */
}

.form-check-input:focus {
    border-color: var(--mainTextColorLight) !important;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(215, 165, 106, 0.25);
}

.count {
    color: #888;
    font-size: 0.9em;
}

.filter-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-outline-secondary {
    border-color: #ddd;
    color: #666;
    padding: 6px 15px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #333;
}

.single-courses-item {
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: row;
}

.single-courses-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.courses-image {
    width: 25%;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.courses-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
    background-color: #f9f9f9;
}

.single-courses-item:hover .courses-image img {
    transform: scale(1.05);
}

.courses-content {
    padding: 20px;
    width: 75%;
}

.courses-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.courses-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.courses-content h3 a:hover {
    color: #2878EB;
}

.short-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.author {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--mainTextColor);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.product-meta-item {
    font-size: 13px;
    color: #777;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.product-meta-item i {
    margin-right: 5px;
    color: var(--mainTextColor);
}


.pagination-area {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-area a, .pagination-area span {
    margin: 0 5px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 5px;
    background-color: #f8f9fa;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-area a:hover {
    background-color: #2878EB;
    color: #fff;
}

.pagination-area span.current {
    background-color: #2878EB;
    color: #fff;
}

.form-select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    color: #555;
    font-size: 14px;
    background-color: #fff;
}

.no-results {
    padding: 30px 0;
}

.alert-info {
    background-color: #e8f4fd;
    border-color: #d1e7fb;
    color: #0c63e4;
    padding: 15px 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.alert-info i {
    font-size: 20px;
    margin-right: 10px;
}

/* Custom scrollbar for checkbox lists */
.checkbox-list::-webkit-scrollbar {
    width: 5px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .single-courses-item {
        flex-direction: column;
    }
    
    .courses-image {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
    
    .courses-content {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .page-title-content h2 {
        font-size: 26px;
    }
    
    .widget-area {
        margin-bottom: 30px;
    }
    
    .courses-image {
        min-height: 250px;
    }
    
    .courses-image img {
        object-fit: contain;
    }
}

.textbook-master-checkbox-container {
    padding-left: 25px;
}