body {
    background-color: var(--bg-soft);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.gradient-text {
    color: var(--primary-color);
    font-weight: 900;
}

.search-hub {
    position: relative;
    z-index: 10;
}

.filter-form {
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 6px 14px -14px rgba(15, 23, 42, 0.22);
    transition: transform 0.3s ease;
}

.input-group-modern .form-control,
.input-group-modern .form-select {
    box-shadow: none !important;
    font-weight: 500;
    font-size: 1rem;
}

@media (min-width: 992px) {
    .border-start-lg {
        border-left: 1px solid #f1f5f9 !important;
    }
}

.category-filter {
    position: relative;
}

.category-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    min-height: 56px;
    padding: 0.9rem 1rem;
    border: 1.5px solid #e2e0e0;
    border-radius: var(--ui-radius);
    background: #fff;
    color: #0f172a;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.category-filter-toggle:hover,
.category-filter-toggle:focus {
    border-color: var(--primary-color);
    box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.24);
    transform: translateY(-1px);
    background: #fff;
}

.category-filter.is-open .category-filter-toggle {
    border-color: var(--primary-color);
    box-shadow: 0 14px 28px -18px rgba(15, 23, 42, 0.3);
}

.category-filter-toggle-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-filter-toggle-text {
    flex: 1;
    text-align: left;
    font-weight: 800;
    font-size: 1rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-filter-toggle-chevron {
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}

.category-filter.is-open .category-filter-toggle-chevron {
    transform: rotate(180deg);
}

.category-filter-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    z-index: 50;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--ui-radius);
    box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.category-filter-search-wrap {
    padding: 0.95rem 0.95rem 0.7rem;
    border-bottom: 1px solid #f1f5f9;
}

.category-filter-search {
    width: 100%;
    border: 0;
    outline: none;
    padding: 0;
    font-size: 0.96rem;
    font-weight: 500;
    color: #0f172a;
    background: transparent;
}

.category-filter-search::placeholder {
    color: #94a3b8;
}

.category-filter-options {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.category-filter-option {
    width: 100%;
    display: block;
    border: 0;
    background: #fff;
    color: #1f2937;
    padding: 0.65rem 0.95rem;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.category-filter-option:hover,
.category-filter-option:focus {
    background: #f8fafc;
    color: #0f172a;
}

.category-filter-option.is-active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
}

.category-filter-options::-webkit-scrollbar {
    width: 10px;
}

.category-filter-options::-webkit-scrollbar-track {
    background: #f8fafc;
}

.category-filter-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 2px solid #f8fafc;
}

.btn-primary-gradient {
    background: var(--primary-color);
    border: none;
    color: white;
    box-shadow: 0 5px 12px -10px rgba(15, 23, 42, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-primary-gradient:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 7px 15px -11px rgba(15, 23, 42, 0.32);
    color: white;
}

.tags-filter-wrap {
    padding-inline: 6px;
    overflow: visible;
    white-space: normal;
}

.tag-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: var(--ui-radius);
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 0 0 auto;
}

.tag-filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #0f172a;
    transform: translateY(-1px);
}

.tag-filter-btn.is-active {
    background: var(--primary-color);
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.14), 0 8px 18px -10px rgba(15, 23, 42, 0.2);
    border-color: transparent;
    color: #fff;
}

.empty-icon-wrapper {
    width: 120px;
    height: 120px;
    background: #f1f5f9;
    border-radius: var(--ui-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-wrapper .pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination-wrapper .page-item .page-link {
    border: none;
    background: white;
    color: #64748b;
    border-radius: var(--ui-radius);
    padding: 10px 18px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.pagination-wrapper .page-item.active .page-link {
    background: var(--primary-color);
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.16), 0 10px 20px -10px rgba(15, 23, 42, 0.2);
    color: white;
}

.pagination-wrapper .page-item .page-link:hover:not(.active) {
    background: #f1f5f9;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .index-wrapper .container {
        max-width: 100% !important;
    }

    .search-hub {
        margin-bottom: 1.75rem !important;
        padding-top: 1rem !important;
    }

    .filter-form {
        padding: 1rem !important;
    }

    .border-start-lg {
        border-left: 0 !important;
        margin-top: 0.75rem;
    }

    .filter-form .row {
        row-gap: 0.9rem !important;
    }

    .filter-form .col-lg-5,
    .filter-form .col-lg-4,
    .filter-form .col-lg-3 {
        width: 100%;
    }

    .input-group-modern {
        border-radius: var(--ui-radius);
        overflow: hidden;
    }

    .input-group-modern .form-control {
        font-size: 0.95rem;
        padding-top: 0.95rem;
        padding-bottom: 0.95rem;
    }

    .category-filter-toggle {
        min-height: 52px;
        padding-inline: 0.9rem;
    }

    .btn-primary-gradient {
        min-height: 52px;
        width: 100% !important;
    }

    .tags-filter-wrap {
        gap: 0.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .search-hub {
        padding-top: 0.5rem !important;
    }

    .filter-form {
        padding: 0.85rem !important;
    }

    .input-group-modern .input-group-text {
        padding-left: 0.9rem !important;
    }

    .category-filter-toggle {
        gap: 0.55rem;
    }

    .category-filter-toggle-text {
        font-size: 0.9rem;
    }

    .tag-filter-btn {
        padding: 0.38rem 0.68rem;
        font-size: 0.74rem;
    }

    .tags-filter-wrap {
        padding-bottom: 0.15rem;
    }

    .empty-state {
        padding: 1.5rem !important;
    }
}
