/* Portfolio Filter CSS */
.portfolio-filter-wrapper {
    margin-bottom: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.filter-btn.active:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.filter-count {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Filter Status */
.filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #f3f4f6;
}

.showing-text {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

.current-filter {
    color: #3b82f6;
    font-weight: 600;
    margin-left: 5px;
}

.results-count {
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
}

/* Loading Spinner */
.filter-loading {
    text-align: center;
    padding: 30px;
    background: #f9fafb;
    border-radius: 10px;
    margin-top: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-text {
    display: block;
    color: #6b7280;
    font-size: 14px;
}

/* Portfolio Items Styling */
.portfolio-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-cats {
    margin-bottom: 10px;
}

.portfolio-cat {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 5px;
}

.portfolio-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.portfolio-title a {
    color: #1f2937;
    text-decoration: none;
}

.portfolio-title a:hover {
    color: #3b82f6;
}

.portfolio-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.portfolio-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.portfolio-read-more:hover {
    color: #2563eb;
    gap: 12px;
}

/* No Results */
.portfolio-no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results-message {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 20px;
}

.reset-filter-btn {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.reset-filter-btn:hover {
    background: #2563eb;
}

/* Elementor Compatibility */
.elementor-posts-container[data-is-portfolio] {
    position: relative;
    min-height: 200px;
}

.portfolio-ajax-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-status {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}