/* Filter Wrapper */
.filter__wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter__title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter__title i {
    color: var(--gold);
    font-size: 20px;
}

.filter__stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

.filter__stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter__stats i {
    color: var(--gold);
}

/* Categories Filter */
.categories__filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category__badge__filter {
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 25px;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    padding-right: 15px;
}

.category__badge__filter.has-close {
    padding-right: 40px;
}

.category__badge__filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.category__badge__filter:hover::before {
    left: 100%;
}

.category__badge__filter:hover {
    background: var(--gold);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.category__badge__filter.active {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4);
}

.category-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.category__badge__filter.active .category-close,
.category__badge__filter:hover .category-close {
    opacity: 1;
}

.category-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.category-item.hidden {
    display: none;
}

/* Tags Filter */
.tags__filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.filter__label {
    font-weight: 600;
    margin-right: 10px;
    color: #333;
    font-size: 14px;
}

.tag__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    padding-right: 12px;
}

.tag__badge.has-close {
    padding-right: 32px;
}

.tag__badge:hover,
.tag__badge.active {
    background: var(--gold);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.tag-close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.tag__badge.active .tag-close,
.tag__badge:hover .tag-close {
    opacity: 1;
}

.tag-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.tag-item.hidden {
    display: none;
}

/* Show More Buttons */
.show-more-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark) 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4);
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Advanced Search */
.advanced__search {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.advanced__search .form-control,
.advanced__search .btn {
    height: 45px;
}

.advanced__search .btn-block {
    width: 100%;
}

/* Project Cards */
.project__card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.project__card__image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project__card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project__card:hover .project__card__image img {
    transform: scale(1.1);
}

.project__card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project__card:hover .project__card__overlay {
    opacity: 1;
}

.view__btn {
    padding: 12px 30px;
    background: #fff;
    color: #333;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view__btn:hover {
    background: var(--gold);
    color: #fff;
    text-decoration: none;
}

.category__badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    background: var(--dark);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.project__card__content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project__card__content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.project__card__content h4 a {
    color: #333;
    transition: color 0.3s ease;
    text-decoration: none;
}

.project__card__content h4 a:hover {
    color: var(--gold);
}

.project__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.project__meta i {
    color: var(--gold);
    margin-right: 5px;
}

.project__excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.project__kpis {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.kpi__item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid var(--gold);
    flex: 1;
    min-width: 80px;
}

.kpi__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
}

.kpi__label {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.tag__mini {
    display: inline-block;
    padding: 4px 10px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
}

.no__results {
    text-align: center;
    padding: 80px 20px;
}

.no__results i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.no__results h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.no__results p {
    color: #666;
    margin-bottom: 30px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading-spinner.active {
    display: block;
}

.loading-spinner i {
    font-size: 40px;
    color: var(--gold);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-more-projects {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    display: none;
}

.no-more-projects.active {
    display: block;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-item,
.tag-item {
    animation: fadeInUp 0.3s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .filter__wrapper {
        padding: 20px 15px;
    }

    .filter__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category__badge__filter,
    .tag__badge {
        font-size: 13px;
        padding: 8px 16px;
    }

    .category__badge__filter.has-close {
        padding-right: 36px;
    }

    .tag__badge.has-close {
        padding-right: 30px;
    }

    .show-more-btn {
        width: 100%;
        justify-content: center;
    }

    .advanced__search .btn-block {
        margin-top: 10px;
    }

    .project__card__image {
        height: 200px;
    }
}