/* Project Gallery Enhancements */

/* Large Project Card for Komplettlösungen */
.project-card-large {
    grid-column: auto; /* align with standard cards */
    min-height: auto;  /* use natural height */
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 400px;
}

.gallery-main {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
}

.gallery-main .project-before-after {
    height: 100%;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    height: 80px;
}

.thumb {
    flex: 1;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumb:hover {
    border-color: #ff8c00;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

/* Project Stats */
.project-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 140, 0, 0.1);
    color: #ff8c00;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

/* Enhanced Service Grid for more cards */
.services-grid-elegant {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

/* Projects Grid Enhancement */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px; /* Consistent with projects.css */
    row-gap: 40px; /* Explicit row gap */
    margin-top: 0; /* Remove since filter has margin-bottom */
}

/* Enhanced Project Image for single images */
.project-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.8) 0%, rgba(255, 165, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: #ff8c00;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Filter Button Enhancements */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 20px; /* Consistent with projects.css */
    margin-bottom: 40px; /* Consistent spacing */
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #5a6c7d;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff8c00;
    color: white;
    border-color: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .project-card-large {
        grid-column: auto;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 30px;
        row-gap: 35px;
    }
    
    .services-grid-elegant {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        row-gap: 30px;
    }
    
    .project-gallery {
        height: 350px;
    }
    
    .gallery-thumbs {
        height: 60px;
    }
    
    .project-stats {
        gap: 0.5rem;
    }
    
    .stat {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .filter-buttons {
        gap: 15px; /* Consistent with projects.css */
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .services-grid-elegant {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        gap: 20px;
        row-gap: 25px;
    }
    
    .filter-buttons {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .project-card-large {
        min-height: auto;
    }
    
    .project-gallery {
        height: 300px;
    }
    
    .gallery-thumbs {
        height: 50px;
        gap: 0.25rem;
    }
    
    .project-image {
        height: 250px;
    }
}

/* Animation Enhancements */
.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.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; }

/* Service Card Animation Delays */
.service-card-elegant:nth-child(1) { animation-delay: 0.1s; }
.service-card-elegant:nth-child(2) { animation-delay: 0.2s; }
.service-card-elegant:nth-child(3) { animation-delay: 0.3s; }
.service-card-elegant:nth-child(4) { animation-delay: 0.4s; }
.service-card-elegant:nth-child(5) { animation-delay: 0.5s; }
.service-card-elegant:nth-child(6) { animation-delay: 0.6s; }
.service-card-elegant:nth-child(7) { animation-delay: 0.7s; }
.service-card-elegant:nth-child(8) { animation-delay: 0.8s; }
.service-card-elegant:nth-child(9) { animation-delay: 0.9s; }
