/*
 * SmartPlan Engineers & Architects - Portfolio Section Styles
 * Modern, engaging design for the "Featured Projects" section
 */

/* Main section styling */
#projects {
    position: relative;
    padding: 80px 0;
    background-color: #fff;
    overflow: hidden;
}

#projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(130, 189, 66, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(112, 114, 116, 0.03) 0%, transparent 20%);
    pointer-events: none;
}

/* Filter buttons */
.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    margin: 5px;
    font-weight: 500;
    color: #707274;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #82BD42;
    transition: all 0.3s ease;
    z-index: -1;
    border-radius: 30px;
}

.filter-btn:hover {
    color: white;
}

.filter-btn:hover::before {
    width: 100%;
}

.filter-btn.active {
    background-color: #82BD42;
    color: white;
    box-shadow: 0 4px 10px rgba(130, 189, 66, 0.3);
}

/* Portfolio grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Portfolio item */
.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    height: 350px;
    cursor: pointer;
}

.portfolio-img-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(70px);
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-category {
    display: inline-block;
    background-color: #82BD42;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.portfolio-item:hover .portfolio-category {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-title {
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 700;
}

.portfolio-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s ease 0.1s;
}

.portfolio-item:hover .portfolio-desc {
    max-height: 80px;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.2s ease 0.15s;
}

.portfolio-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-link {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-link:hover i {
    transform: translateX(5px);
}

/* View All Button */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background-color: #82BD42;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(130, 189, 66, 0.3);
    color: white;
}

.view-all-btn:hover::before {
    width: 100%;
}

.view-all-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.view-all-btn:hover i {
    transform: translateX(5px);
}

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

.portfolio-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.portfolio-item:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-item:nth-child(2) {
    animation-delay: 0.3s;
}

.portfolio-item:nth-child(3) {
    animation-delay: 0.5s;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    #projects {
        padding: 60px 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .portfolio-item {
        height: 300px;
    }
}

@media (max-width: 767.98px) {
    #projects {
        padding: 40px 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-item {
        height: 280px;
    }

    .portfolio-info {
        padding: 20px;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }
}
