/* Custom CSS for Tools Filter System */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

#clearFilters, #toggleFilters{
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
}
/* Sidebar Styles */
.filter-sidebar {
    background: white;
    border-right: 1px solid var(--border-color);
    /* height: 90vh; */
    /* padding: 1rem 0.75rem; */
    /* overflow-y: auto; */
    transition: var(--transition);
}

.filter-sidebar.hidden {
    margin-left: -100%;
    opacity: 0;
    pointer-events: none;
}

/* Main content expansion when filters are hidden */
.main-content.expanded {
    flex: 0 0 100%;
    max-width: 100%;
}

.filter-container {
    height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-title {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    font-size: 1.9rem;
}

.filter-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

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

.filter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
    display: block;
    font-size: 1.2rem;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    transition: var(--transition);
    font-size: 1.2rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.price-presets {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.preset-btn, .preset-btn-mobile {
    font-size: 1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    transition: var(--transition);
    flex: 1;
}

.preset-btn:hover, .preset-btn-mobile:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Category Checkboxes */
.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 12rem;
    overflow-y: auto;
}

.form-check {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

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

.form-check-label {
    font-size: 1.2rem;
    color: #495057;
    cursor: pointer;
    line-height: 1.4;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input {
    width: 1rem;
    height: 1rem;
}

.form-check-label {
    margin-left: 0.25rem;
}

/* Main Content */
.main-content {
    padding: 2rem 1rem;
    height: 80vh;
    overflow-y: auto;
}

.page-title {
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}

.content-header {
    margin-bottom: 2rem;
}

.results-info .badge {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Tool Cards */
.tool-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #20c997);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tool-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.5;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: capitalize;
}

.tool-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--success-color);
}

.tool-price.free {
    color: var(--primary-color);
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffc107;
    font-size: 1.3rem;
}

.star.empty {
    color: #e9ecef;
}

.rating-text {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 500;
}

/* Animation */
.tool-card {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results */
#noResults i {
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .filter-sidebar {
        display: none;
    }
    
    .filter-sidebar.hidden {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .main-content.expanded {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .tool-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-presets {
        justify-content: center;
    }
    
    .preset-btn, .preset-btn-mobile {
        min-width: auto;
    }
    
    .main-content {
        padding: 1rem 0.75rem;
    }
    
    .filter-sidebar {
        padding: 1rem 0.5rem;
    }
}

/* Mobile Filter Styles */
.mobile-filters .filter-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Scrollbar */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Smooth Transitions */
* {
    transition: var(--transition);
}

.page-link{
    font-size: 1.4rem;
}