/* Enhanced Featured Projects Cards */

.featured-projects-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #faf9f6 0%, #ffffff 50%, #f8f7f4 100%);
    position: relative;
    overflow: hidden;
}

.featured-projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(81, 133, 76, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(26, 61, 106, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(81, 133, 76, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #51854c 0%, #6ba065 50%, #51854c 100%);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.project-card:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(81, 133, 76, 0.15), 0 0 0 1px rgba(81, 133, 76, 0.1);
    border-color: rgba(81, 133, 76, 0.3);
}

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

.project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f7f4 0%, #f0ede8 50%, #faf9f6 100%);
    position: relative;
    isolation: isolate;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(81, 133, 76, 0.05) 0%, rgba(26, 61, 106, 0.05) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-image:empty::before {
    content: '\f1c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: #8a8a8a;
    opacity: 0.2;
    z-index: 0;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 61, 106, 0) 0%, rgba(26, 61, 106, 0.1) 50%, rgba(26, 61, 106, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.98) saturate(1.05);
}

.project-card:hover .project-image img {
    transform: scale(1.15) translateY(-5px);
    filter: brightness(1.05) saturate(1.1);
}

.project-content {
    padding: 2.5rem 2.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.project-category {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #51854c 0%, #6ba065 100%);
    color: var(--white);
    padding: 0.65rem 1.5rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(81, 133, 76, 0.25), 0 2px 4px rgba(81, 133, 76, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.project-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.project-card:hover .project-category {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(81, 133, 76, 0.35), 0 3px 8px rgba(81, 133, 76, 0.2);
}

.project-card:hover .project-category::before {
    left: 100%;
}

.project-content h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
    color: #1a3d6a;
    line-height: 1.3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.project-card:hover .project-content h3 {
    color: #51854c;
    transform: translateX(4px);
}

.project-content p {
    color: #5a5a5a;
    margin: 0;
    line-height: 1.8;
    flex: 1;
    font-size: 0.98rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-content p {
    color: #2c2c2c;
}

.project-card .btn-link {
    margin-top: auto;
    padding: 0.85rem 0;
    color: #51854c;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card .btn-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #51854c, #6ba065);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card .btn-link:hover {
    color: #6ba065;
    gap: 1rem;
    transform: translateX(4px);
}

.project-card .btn-link:hover::before {
    width: 100%;
}

.project-card .btn-link i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
}

.project-card:hover .btn-link i {
    transform: translateX(8px);
}

.project-card .btn-link:hover i {
    transform: translateX(12px);
}

/* Responsive */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 968px) {
    .featured-projects-section {
        padding: 4rem 0;
    }

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

    .project-image {
        height: 240px;
    }

    .project-content {
        padding: 2rem 1.75rem 1.5rem;
        gap: 1.25rem;
    }

    .project-content h3 {
        font-size: 1.5rem;
    }

    .project-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

@media (max-width: 768px) {
    .featured-projects-section {
        padding: 3rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-image {
        height: 250px;
    }

    .project-content {
        padding: 2rem 1.75rem 1.5rem;
        gap: 1.25rem;
    }

    .project-content h3 {
        font-size: 1.5rem;
    }

    .project-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

@media (max-width: 480px) {
    .featured-projects-section {
        padding: 2rem 0;
    }

    .projects-grid {
        gap: 1.5rem;
    }

    .project-card {
        border-radius: 16px;
    }

    .project-image {
        height: 220px;
    }

    .project-content {
        padding: 1.75rem 1.5rem 1.5rem;
        gap: 1rem;
    }

    .project-content h3 {
        font-size: 1.35rem;
    }

    .project-category {
        padding: 0.55rem 1.25rem;
        font-size: 0.65rem;
    }

    .project-card:hover {
        transform: translateY(-6px) scale(1.005);
    }
}
