/* Professional Projects Page Styles */

.page-header {
    background: linear-gradient(135deg, #001F3F 0%, #004E92 100%);
    padding: 140px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    margin-bottom: 0; /* Removed margin to minimize space */
}

.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Projects Section */
.projects-section {
    padding-top: 20px; /* Reduced from 60px */
    padding-bottom: 80px; /* Add space above footer */
}


/* Modern Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 0; /* Reduced from 40px */
    margin-bottom: 50px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #E2E8F0;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn::after {
    display: none; /* Remove previous style */
}

.filter-btn:hover {
    color: var(--color-primary);
    border-color: rgba(0, 78, 146, 0.3);
    box-shadow: none;
    transform: none;
}

.filter-btn.active {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--construction-orange);
    box-shadow: none;
}

/* Projects Grid - Modern */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Modern Project Card (Overlay Style) */
.project-card {
    position: relative;
    background: #000; /* Dark bg for image loading */
    border-radius: 0; /* Square/Sharp corners like Bechtel */
    overflow: hidden;
    height: 400px; /* Taller fixed height */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: none; /* Remove old border */
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Remove old rivets */
.project-card::before,
.project-card::after {
    display: none;
}

/* Full Card Image */
.project-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

/* Overlay Content */
.project-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    transition: all 0.4s ease;
    color: white;
}

.project-details .btn-link {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.project-details .btn-link:hover {
    color: var(--construction-orange);
    gap: 12px;
}

/* Category Badge - High Visibility */
.project-category {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #FF8C1A !important; /* Force orange background for visibility */
    color: #ffffff !important; /* Force white text */
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.project-category.infrastructure,
.project-category.energy,
.project-category.industrial,
.project-category.government {
    border: none;
}

/* Typography Overrides */
.project-name {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 5px; /* Reduced margin */
    transform: translateY(0);
    transition: transform 0.5s ease;
}

/* Description - Hidden by default (Collapsed) */
.project-description {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
    display: block; /* Change from webkit-box to allow height anim */
    overflow: hidden;
    opacity: 0;
    max-height: 0; /* Collapse */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth ease */
}

.project-card:hover .project-description {
    opacity: 1;
    max-height: 100px; /* Expand */
    margin-bottom: 20px;
}

/* Stats Row in Layout - Hidden by default (Collapsed) */
.project-stats {
    display: flex;
    flex-direction: row;
    gap: 20px;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,0.3);
    opacity: 0; 
    max-height: 0; /* Collapse */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-stats {
    opacity: 1;
    max-height: 60px; /* Expand */
    padding-top: 20px;
    margin-bottom: 0;
}

.stat-item {
    color: rgba(255,255,255,1);
    font-size: 0.85rem;
    white-space: nowrap;
}

.stat-item i {
    color: var(--construction-orange);
    margin-right: 6px;
}

.stat-item {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.stat-item i {
    color: var(--construction-orange);
}

/* Action Button - Visible on Hover (Scroll Up Effect) */
.btn-view-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    color: white;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--construction-orange);
    padding-bottom: 4px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: fit-content;
}

.project-card:hover .btn-view-project {
    opacity: 1;
    max-height: 40px;
    margin-top: 15px;
    transition-delay: 0.1s;
}

.btn-view-project:hover {
    color: var(--construction-orange);
}

/* Modern Hover Line (Keep) */
.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--construction-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 10;
    display: block !important; 
}

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

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

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .filter-controls {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 24px;
        font-size: 0.85rem;
    }
    
    .project-image-wrapper {
        height: 240px;
    }
    
    .project-details {
        padding: 25px;
    }
    
    .project-name {
        font-size: 1.4rem;
    }
}

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

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

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }
