/* Modern Advanced Filters Styles */
.modern-filter-sidebar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(98, 173, 225, 0.08);
    border: 1px solid rgba(98, 173, 225, 0.12);
    overflow: hidden;
    margin-bottom: 30px;
}

.filter-header-modern {
    background: linear-gradient(135deg, #62ADE1 0%, #4A9BD1 100%);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-icon {
    color: #ffffff;
    font-size: 20px;
}

.filter-title h4 {
    color: #ffffff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reset-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.reset-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.modern-filter-form {
    padding: 0;
}

.filter-section {
    border-bottom: 1px solid rgba(98, 173, 225, 0.08);
}

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

.filter-section-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: #ffffff;
}

.filter-section-header:hover {
    background: rgba(98, 173, 225, 0.02);
}

.filter-section-header.active {
    background: rgba(98, 173, 225, 0.04);
    border-bottom: 1px solid rgba(98, 173, 225, 0.12);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    color: #62ADE1;
    font-size: 16px;
}

.section-title span {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.toggle-arrow {
    color: #62ADE1;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}

.filter-section-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
}

.filter-section-content.active {
    max-height: 400px;
    padding: 20px 24px 24px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.modern-checkbox:hover {
    background: rgba(98, 173, 225, 0.06);
}

.modern-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-modern {
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modern-checkbox:hover .checkmark-modern {
    border-color: #62ADE1;
    box-shadow: 0 0 0 3px rgba(98, 173, 225, 0.1);
}

.modern-checkbox input:checked ~ .checkmark-modern {
    background-color: #62ADE1;
    border-color: #62ADE1;
    box-shadow: 0 2px 8px rgba(98, 173, 225, 0.3);
}

.checkmark-modern:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.modern-checkbox input:checked ~ .checkmark-modern:after {
    display: block;
}

.option-text {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.modern-checkbox:hover .option-text {
    color: #2d3748;
}

.modern-checkbox input:checked ~ .option-text {
    color: #2d3748;
    font-weight: 600;
}

.modern-filter-btn {
    width: 100%;
    background: linear-gradient(135deg, #62ADE1 0%, #4A9BD1 100%);
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
}

.modern-filter-btn:hover {
    background: linear-gradient(135deg, #4A9BD1 0%, #3A8BC1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(98, 173, 225, 0.3);
}

.modern-filter-btn:active {
    transform: translateY(0);
}

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

/* Responsive Design */
@media (max-width: 991.98px) {
    .modern-filter-sidebar {
        margin-bottom: 20px;
    }

    .filter-header-modern {
        padding: 20px;
    }

    .filter-section-header {
        padding: 16px 20px;
    }

    .filter-section-content.active {
        padding: 16px 20px 20px;
    }
}

@media (max-width: 767.98px) {
    .filter-header-modern {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .filter-title h4 {
        font-size: 16px;
    }

    .filter-section-header {
        padding: 14px 16px;
    }

    .filter-section-content.active {
        padding: 14px 16px 18px;
    }

    .modern-filter-btn {
        padding: 14px 20px;
        font-size: 13px;
    }
}

/* Animation for smooth transitions */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section-content.active .filter-options {
    animation: slideDown 0.3s ease-out;
}

/* Custom scrollbar for filter options */
.filter-section-content::-webkit-scrollbar {
    width: 4px;
}

.filter-section-content::-webkit-scrollbar-track {
    background: rgba(98, 173, 225, 0.1);
    border-radius: 2px;
}

.filter-section-content::-webkit-scrollbar-thumb {
    background: #62ADE1;
    border-radius: 2px;
}

.filter-section-content::-webkit-scrollbar-thumb:hover {
    background: #4A9BD1;
}

/* Loading state for filter button */
.modern-filter-btn.loading {
    position: relative;
    color: transparent;
}

.modern-filter-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced focus states for accessibility */
.modern-checkbox input:focus + .checkmark-modern {
    outline: 2px solid #62ADE1;
    outline-offset: 2px;
}

.filter-section-header:focus {
    outline: 2px solid #62ADE1;
    outline-offset: -2px;
}

.modern-filter-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Better spacing for filter options */
.filter-options {
    max-height: 300px;
    overflow-y: auto;
}

/* Sticky Search Form */
.sticky-search-section {
    transition: all 0.3s ease;
    z-index: 998;
}

.sticky-search-section.sticky {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    /* background: #ffffff; */
    /* box-shadow: 0 2px 20px rgba(98, 173, 225, 0.15); */
    /* border-bottom: 1px solid rgba(98, 173, 225, 0.1); */
    /* padding: 15px 0; */
}

.sticky-search-section.sticky .container {
    max-width: 1140px;
}

/* Offset for content when search is sticky */
.search-sticky-offset {
    padding-top: 12px;
}

/* Enhanced mobile experience */
@media (max-width: 575.98px) {
    .modern-filter-sidebar {
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .filter-header-modern {
        padding: 14px;
    }

    .filter-title h4 {
        font-size: 15px;
    }

    .reset-link {
        font-size: 12px;
        padding: 6px 12px;
    }

    .filter-section-header {
        padding: 12px 14px;
    }

    .section-title span {
        font-size: 14px;
    }

    .filter-section-content.active {
        padding: 12px 14px 16px;
    }

    .modern-checkbox {
        padding: 6px 8px;
    }

    .option-text {
        font-size: 13px;
    }

    .modern-filter-btn {
        padding: 12px 18px;
        font-size: 12px;
    }
}
