/* Projects Stats Section */
.projects-stats {
    padding: 50px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stats-wrapper {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.stat-item:hover .stat-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: rotateY(360deg);
}

.stat-content .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-content .label {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Fixed Project Images - Single Image Display for Lists */
.project-images {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
}

.project-image-single {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image-single img {
    transform: scale(1.05);
}

/* Fixed Project Card Layout */
.project-card {
    display: flex;
    flex-direction: column;
    min-height: 450px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.project-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* Keep comparison styles for project details pages */
.image-comparison {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
}

.before-image {
    left: 0;
    z-index: 1;
}

.after-image {
    left: 0;
    z-index: 2;
    width: 50%;
    clip-path: inset(0 0 0 0);
    transition: width 0.3s ease;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Progress Overlay */
.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-color-rgb), 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .progress-overlay {
    opacity: 1;
}

.progress-info {
    color: var(--white);
    text-align: center;
}

.progress-info i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.progress-info span {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Project Content */
.project-content {
    padding: 30px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.project-meta i {
    color: var(--primary-color);
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.project-title a:hover {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.project-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

/* Section Styles */
.ongoing-projects,
.completed-projects {
    padding: 80px 0;
}

.completed-projects {
    background-color: var(--light-bg);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 10px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--white);
    color: var(--secondary-color);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.page-link:hover,
.page-item.active .page-link {
    background: var(--primary-color);
    color: var(--white);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .stat-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    .projects-stats {
        margin-top: -30px;
    }

    .stats-wrapper {
        padding: 20px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .stat-content .number {
        font-size: 1.5rem;
    }

    .project-images {
        height: 200px;
    }

    .project-content {
        padding: 20px;
    }
}

@media (max-width: 575.98px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .project-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation Classes */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }