/* Structures Page Filters CSS - Redesigned */

/* Main Filter Section - Compact & Modern */
.filters-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    -webkit-box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    -moz-box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(76, 175, 80, 0.15);
    position: relative;
    overflow: hidden;
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #66BB6A, #81C784, #4CAF50);
    background-size: 300% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.filters-section.filters-horizontal {
    position: static;
}

.filters-section.filters-horizontal .filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filters-section.filters-horizontal .filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.875rem;
    align-items: stretch;
}

/* Filter Card Styles - Compact & Elegant */
.filter-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    -webkit-border-radius: 14px;
    -moz-border-radius: 14px;
    border-radius: 14px;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.filter-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-card:hover {
    -webkit-transform: translateY(-3px);
    -moz-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
    -moz-box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.25);
}

.filter-card:hover::after {
    opacity: 1;
}

.filter-card-location {
    grid-column: 1 / -1;
}

.filter-card-services {
    grid-column: 1 / -1;
}

.filter-card-header {
    padding: 0.875rem 1rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.5) 100%);
}

.filter-icon-wrapper {
    width: 40px;
    height: 40px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.filter-card:hover .filter-icon-wrapper {
    -webkit-transform: scale(1.05) rotate(5deg);
    -moz-transform: scale(1.05) rotate(5deg);
    -ms-transform: scale(1.05) rotate(5deg);
    transform: scale(1.05) rotate(5deg);
}

.filter-icon {
    font-size: 1.2rem;
}

/* Icon wrapper color variations - Vibrant gradients */
.bg-primary-soft {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
}

.bg-success-soft {
    background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%);
    color: white;
}

.bg-warning-soft {
    background: linear-gradient(135deg, #FFA726 0%, #FFB74D 100%);
    color: white;
}

.bg-info-soft {
    background: linear-gradient(135deg, #26C6DA 0%, #4DD0E1 100%);
    color: white;
}

.bg-orange-soft {
    background: linear-gradient(135deg, #FB8C00 0%, #FF9800 100%);
    color: white;
}

.bg-star-soft {
    background: linear-gradient(135deg, #FFB300 0%, #FFC107 100%);
    color: white;
}

.bg-purple-soft {
    background: linear-gradient(135deg, #8E24AA 0%, #AB47BC 100%);
    color: white;
}

.filter-header-content {
    flex: 1;
    min-width: 0;
}

.filter-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: block;
    line-height: 1.2;
}

.filter-description {
    font-size: 0.75rem;
    color: #95a5a6;
    margin: 0.15rem 0 0 0;
    line-height: 1.2;
}

.filter-card-body {
    padding: 1rem;
}

/* Modern Form Controls - Sleek & Compact */
.form-select-modern,
.form-control-modern,
.filters-section .form-control,
.filters-section .form-select {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    border: 1.5px solid #e8ecef;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: #f8fafb;
    font-weight: 500;
}

.form-select-modern:focus,
.form-control-modern:focus,
.filters-section .form-control:focus,
.filters-section .form-select:focus {
    border-color: #4CAF50;
    -webkit-box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.08);
    -moz-box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.08);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.08);
    background-color: white;
    outline: none;
}

.form-label-sm {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #5a6c7d;
    margin-bottom: 0.4rem;
    display: block;
}

/* Input Group Modern */
.input-group-modern {
    position: relative;
}

.input-group-modern .input-group-text {
    border: none;
    background: transparent;
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: 10;
    padding-left: 0.875rem;
    color: #95a5a6;
    font-size: 1rem;
}

.input-group-modern .form-control {
    padding-left: 2.5rem;
}

/* Services Checkbox Grid - Compact */
.services-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.625rem;
}

.form-check-modern {
    background: #f8fafb;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.form-check-modern:hover {
    background: #ecf0f3;
    border-color: rgba(76, 175, 80, 0.3);
    -webkit-transform: translateY(-1px);
    -moz-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
    transform: translateY(-1px);
}

.form-check-modern .form-check-input:checked~.form-check-label {
    font-weight: 600;
    color: #4CAF50;
}

.form-check-modern .form-check-input:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.form-check-modern:has(.form-check-input:checked) {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    -webkit-box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    -moz-box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.form-check-modern .form-check-input {
    margin-top: 0.1rem;
    width: 1.1rem;
    height: 1.1rem;
}

.form-check-modern .form-check-label {
    font-size: 0.8125rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Price Input Group - Compact */
.price-input-group {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.price-input-wrapper {
    position: relative;
    flex: 1;
}

.price-prefix {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    font-weight: 600;
    color: #95a5a6;
    pointer-events: none;
    z-index: 10;
    font-size: 0.875rem;
}

.form-control-price {
    padding-left: 1.75rem !important;
}

.price-separator {
    font-weight: 700;
    color: #bdc3c7;
    font-size: 1rem;
}

/* Filter Actions - Compact */
.filters-section.filters-horizontal .filters-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.btn-filter-apply {
    min-width: 180px;
    padding: 0.75rem 1.75rem;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9375rem;
    -webkit-box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    -moz-box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border: none;
}

.btn-filter-apply:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
    -moz-box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
}

.btn-filter-apply:active {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.btn-filter-reset {
    min-width: 120px;
    padding: 0.75rem 1.25rem;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #bdc3c7;
    color: #5a6c7d;
    transition: all 0.25s ease;
    background: white;
}

.btn-filter-reset:hover {
    background: #f8fafb;
    border-color: #95a5a6;
    color: #2c3e50;
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* Responsive Design - Optimized */
@media (max-width: 1200px) {
    .filters-section.filters-horizontal .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    .filters-section {
        padding: 1.25rem;
    }

    .filters-section.filters-horizontal .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .filter-card-header {
        padding: 0.75rem 0.875rem 0.625rem;
    }

    .filter-card-body {
        padding: 0.875rem;
    }
}

@media (max-width: 768px) {
    .filters-section {
        padding: 1rem;
        -webkit-border-radius: 16px;
        -moz-border-radius: 16px;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .filters-section.filters-horizontal .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-card-location,
    .filter-card-services {
        grid-column: 1;
    }

    .services-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .price-input-group {
        flex-direction: row;
    }

    .filters-section.filters-horizontal .filters-actions {
        flex-direction: column;
        gap: 0.625rem;
    }

    .btn-filter-apply,
    .btn-filter-reset {
        width: 100%;
    }

    .filter-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .filter-icon {
        font-size: 1.1rem;
    }

    .filter-label {
        font-size: 0.875rem;
    }

    .filter-description {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .filter-card-header {
        padding: 0.75rem 0.75rem 0.625rem;
        gap: 0.625rem;
    }

    .filter-card-body {
        padding: 0.75rem;
    }

    .filter-label {
        font-size: 0.8125rem;
    }

    .filter-description {
        font-size: 0.6875rem;
    }

    .filter-icon-wrapper {
        width: 34px;
        height: 34px;
    }

    .filter-icon {
        font-size: 1rem;
    }

    .services-checkbox-grid {
        gap: 0.5rem;
    }

    .form-check-modern {
        padding: 0.5rem 0.75rem;
    }
}