.modern-filter-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.filter-wrapper {
    padding: 0;
}

.filter-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    gap: 16px;
}

.filter-left-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.modern-filter-toggle {
    background: linear-gradient(135deg, #2ab1ad 0%, #238f8c 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 177, 173, 0.2);
}

.modern-filter-toggle:hover {
    background: linear-gradient(135deg, #238f8c 0%, #1d7572 100%);
    box-shadow: 0 6px 20px rgba(42, 177, 173, 0.3);
}

.modern-filter-toggle .arrow-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.modern-filter-toggle.active .arrow-icon {
    transform: rotate(180deg);
}

.quick-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-chip {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-chip input[type="checkbox"] {
    display: none;
}

.filter-chip label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.filter-chip.active {
    background: linear-gradient(135deg, #2ab1ad 0%, #238f8c 100%);
    border-color: #2ab1ad;
    color: white;
}

.filter-chip:hover {
    border-color: #2ab1ad;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 177, 173, 0.15);
}

.clear-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: #c82333;
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

.filter-right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.results-count {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-wrapper label {
    color: #495057;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modern-sort-dropdown {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 35px;
}

.modern-sort-dropdown:focus {
    outline: none;
    border-color: #2ab1ad;
    box-shadow: 0 0 0 3px rgba(42, 177, 173, 0.1);
}

.modern-sort-dropdown:hover {
    border-color: #2ab1ad;
}

.expandable-filters {
    padding: 24px;
    background: #ffffff;
    border-top: 1px solid #f1f3f4;
    display: none;
}

.expandable-filters.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.category-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-option.active {
    background: linear-gradient(135deg, #2ab1ad 0%, #238f8c 100%);
    border-color: #2ab1ad;
    color: white;
}

.category-option input[type="radio"] {
    display: none;
}

.category-option label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: block;
}

.category-option:hover {
    border-color: #2ab1ad;
    box-shadow: 0 4px 15px rgba(42, 177, 173, 0.1);
}

@media (max-width: 768px) {
    .filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .filter-left-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-right-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .quick-filters {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sort-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .modern-sort-dropdown {
        width: 100%;
    }

    .category-filter-grid {
        grid-template-columns: 1fr;
    }

    .expandable-filters {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .filter-header {
        padding: 16px;
    }

    .modern-filter-toggle {
        width: 100%;
        justify-content: center;
    }

    .filter-chip {
        flex: 1;
        text-align: center;
    }

    .results-count {
        text-align: center;
    }
}

.filter-form {
    transition: all 0.3s ease;
}

.filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

.filter-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2ab1ad;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

.filter-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    padding: 4px 0;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-dropdown {
    width: 100%;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}