/* projects/css/projects.css - Enhanced Projects Page Styling */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Search and Filter Container */
.search-filter-container {
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(13, 17, 23, 0.8);
    border: 2px solid rgba(48, 54, 61, 0.5);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4285F4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    background: rgba(13, 17, 23, 0.95);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    pointer-events: none;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn i {
    font-size: 0.875rem;
}

.filter-btn.active {
    background: linear-gradient(135deg, #4285F4 0%, #3b82f6 100%);
    color: white;
    border-color: #4285F4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.filter-btn:not(.active) {
    background: rgba(75, 85, 99, 0.3);
    color: #9CA3AF;
    border-color: rgba(75, 85, 99, 0.3);
}

.filter-btn:not(.active):hover {
    background: rgba(75, 85, 99, 0.5);
    color: white;
    border-color: rgba(107, 114, 128, 0.5);
    transform: translateY(-2px);
}

/* Project Stats */
.projects-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(66, 133, 244, 0.5);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* Category Container Enhancement */
.category-container {
    margin-bottom: 3rem;
}

.category-header {
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-left: 4px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.category-header:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border-left-color: #4285F4;
}

.category-header.category-expanded {
    border-left-color: #4285F4;
    background: rgba(22, 27, 34, 1);
}

.category-icon {
    transition: transform 0.4s ease;
    width: 1.5rem;
    height: 1.5rem;
    color: #4285F4;
}

.category-expanded .category-icon {
    transform: rotate(90deg);
}

.category-title-wrapper {
    flex: 1;
}

.category-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.25rem;
}

.category-description {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin: 0;
}

.category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    padding-left: 2rem;
    margin-left: 1rem;
    border-left: 2px solid rgba(75, 85, 99, 0.3);
}

.category-content.expanded {
    max-height: 10000px;
    padding-top: 1rem;
}

/* Add spacing to allow proper hover expansion for first row */
.category-content .grid {
    padding-top: 1rem;
}

/* Enhanced Project Card */
.project-card {
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
    z-index: 10;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(66, 133, 244, 0.5);
    z-index: 10;
}

.project-card:active {
    transform: translateY(-6px) scale(0.98);
}

.project-gallery {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: rgba(13, 17, 23, 0.8);
}

.project-gallery img,
.project-gallery video {
    transition: transform 0.5s ease;
}

.project-card:hover .project-gallery img,
.project-card:hover .project-gallery video {
    transform: scale(1.1);
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    transition: color 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: #4285F4;
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(66, 133, 244, 0.15);
    color: #4285F4;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(66, 133, 244, 0.3);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: rgba(66, 133, 244, 0.25);
    border-color: rgba(66, 133, 244, 0.5);
    transform: translateY(-1px);
}

/* Featured Badge */
.featured-badge,
.latest-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.featured-badge {
    background: linear-gradient(135deg, #4285F4, #3b82f6);
    color: white;
}

.latest-badge {
    background: linear-gradient(135deg, #34A853, #22c55e);
    color: white;
}

/* Gallery Navigation */
.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.project-card:hover .gallery-navigation {
    opacity: 1;
    pointer-events: all;
}

.gallery-prev,
.gallery-next {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(66, 133, 244, 0.9);
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #4B5563;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #D1D5DB;
}

.empty-state p {
    font-size: 1rem;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.project-card:nth-child(2) {
    animation-delay: 0.1s;
}

.project-card:nth-child(3) {
    animation-delay: 0.2s;
}

.project-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(
        90deg,
        rgba(75, 85, 99, 0.2) 0%,
        rgba(75, 85, 99, 0.3) 50%,
        rgba(75, 85, 99, 0.2) 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-container {
        padding: 1.5rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .category-header {
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .category-content {
        padding-left: 1rem;
        margin-left: 0.5rem;
    }

    .projects-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .project-gallery {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }

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

/* Print Styles */
@media print {
    .search-filter-container,
    .gallery-navigation {
        display: none;
    }

    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .category-content {
        max-height: none !important;
    }
}

/* Accessibility */
.filter-btn:focus,
.search-input:focus {
    outline: 2px solid #4285F4;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
