/* ===========================
   Projects Page Specific Styles
   =========================== */

/* Filters Section */
.filters-section {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(171, 178, 191, 0.2);
}

.filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: transparent;
    border: 1px solid var(--accent-gray);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover {
    background-color: rgba(199, 120, 221, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* Complete Projects Section */
.complete-projects {
    padding: var(--spacing-xl) 0;
}

.complete-projects .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-sm);
}

/* Small Projects Section */
.small-projects {
    padding: var(--spacing-xl) 0;
    background-color: rgba(30, 34, 40, 0.5);
}

.small-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

.small-project-card {
    border: 1px solid var(--accent-gray);
    padding: var(--spacing-sm);
    transition: var(--transition);
    background-color: var(--bg-primary);
}

.small-project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 16px rgba(199, 120, 221, 0.2);
}

.small-project-tags {
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--accent-gray);
    margin-bottom: var(--spacing-sm);
}

.small-project-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.small-project-title {
    font-size: var(--font-size-md);
    color: var(--text-primary);
    font-weight: 500;
}

.small-project-description {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.small-project-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.small-link {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.small-link:hover {
    color: var(--accent-primary);
}

/* Project Preview SVG Styles */
.project-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-preview svg {
    max-width: 100%;
    max-height: 100%;
}

/* Animation for filtered items */
.project-card,
.small-project-card {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card.hidden,
.small-project-card.hidden {
    display: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .filters {
        justify-content: center;
    }

    .filter-btn {
        padding: 6px var(--spacing-sm);
        font-size: var(--font-size-xs);
    }

    .complete-projects .projects-grid {
        grid-template-columns: 1fr;
    }

    .small-projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .filters {
        gap: var(--spacing-xs);
    }

    .filter-btn {
        flex: 1;
        min-width: 80px;
    }

    .project-links,
    .small-project-links {
        flex-direction: column;
    }

    .project-links .btn,
    .small-link {
        width: 100%;
        text-align: center;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(171, 178, 191, 0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Project Count Badge */
.section-header {
    position: relative;
}

.project-count {
    display: inline-block;
    margin-left: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 400;
}

/* Hover Effects Enhancement */
.project-card .project-image {
    overflow: hidden;
}

.project-card:hover .project-preview svg {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.small-project-card:hover .small-project-title {
    color: var(--accent-primary);
    transition: color var(--transition);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background-color: var(--accent-primary);
    border: none;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: rgba(199, 120, 221, 0.8);
    transform: translateY(-5px);
}

/* Project Tags in Grid */
.project-card .tag,
.small-project-card .tag {
    background-color: rgba(199, 120, 221, 0.1);
}

.project-card:hover .tag,
.small-project-card:hover .tag {
    background-color: rgba(199, 120, 221, 0.2);
}

/* Professional Case Badge */
.tag-professional {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 500;
    border: none;
}

.project-card:hover .tag-professional,
.small-project-card:hover .tag-professional {
    background: linear-gradient(135deg, #7c8ef5 0%, #8b5cb5 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}
