/* Proje filtreleme sayfası (/Proje/devam-eden/, /Proje/tamamlandi/)
   CSP inline <style> bloklarını engellediği için harici dosyaya taşındı. */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1400px;
}

.project-item {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
}

.project-item.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.project-item:hover .img-wrapper img {
    transform: scale(1.05);
}

.project-status-banner {
    position: absolute;
    top: 15px;
    right: -10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-end;
    pointer-events: none;
    padding: 0;
}

.status-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* style.css'teki ".project-item img { width: 100% }" kuralını ezmek için özgüllük artırıldı */
.project-item .status-banner-img {
    height: 36px;
    width: auto;
}

.status-text {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    font-weight: 500;
    color: #000;
    white-space: nowrap;
    text-transform: capitalize;
    text-align: center;
}

.status-active .status-banner-img {
    filter: hue-rotate(85deg) saturate(1.2);
}

.status-completed .status-banner-img {
    filter: hue-rotate(180deg) saturate(1.2);
}

.status-sale .status-banner-img {
    filter: hue-rotate(-15deg) saturate(1.4);
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.project-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.project-content p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-content .btn {
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #333;
    color: #fff;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.project-content .btn:hover {
    background: #000;
    transform: translateY(-2px);
}

.section-title {
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #333;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 15px;
    }

    .project-status-banner {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .status-text {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 100px;
    }

    .project-content {
        padding: 15px;
    }

    .project-content h3 {
        font-size: 16px;
    }

    .project-content p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .project-content .btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* Sayfa yükleme performansı için lazy loading göstergesi */
.lazy-load-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
