/* Projelerimiz Bölümü - Modern Project Gallery */

/* Projeler Section */
.projects-section {
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Section Header */
.projects-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(80px);
    transition: all 1.2s ease;
}

.projects-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.projects-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    overflow: hidden;
}

.projects-title-main {
    background: linear-gradient(135deg, var(--quaternary-color), var(--gradient-orange), var(--tertiary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite alternate;
    display: inline-block;
    margin-right: 15px;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.projects-title-accent {
    color: var(--quaternary-color);
    display: inline-block;
}

.projects-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(80px);
    transition: all 1.2s ease;
}

.project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation for Cards */
.project-card:nth-child(1).animate-in { transition-delay: 0.1s; }
.project-card:nth-child(2).animate-in { transition-delay: 0.2s; }
.project-card:nth-child(3).animate-in { transition-delay: 0.3s; }
.project-card:nth-child(4).animate-in { transition-delay: 0.4s; }
.project-card:nth-child(5).animate-in { transition-delay: 0.5s; }
.project-card:nth-child(6).animate-in { transition-delay: 0.6s; }

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--quaternary-color-rgb), 0.1);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(var(--quaternary-color-rgb), 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(var(--quaternary-color-rgb), 0.2);
}

/* Project Image */
.project-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Placeholder for image */
.project-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--primary-text-color);
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.7;
}

.project-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Project Content */
.project-content {
    padding: 30px 25px;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text-color);
    margin-bottom: 15px;
    transition: color 0.4s ease;
}

.project-card:hover .project-title {
    color: var(--secondary-text-color);
}

.project-description {
    font-size: 1rem;
    color: var(--secondary-text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-feature {
    display: inline-block;
    background: rgba(var(--quaternary-color-rgb), 0.2);
    color: var(--primary-text-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover .project-feature {
    background: rgba(var(--quaternary-color-rgb), 0.3);
    transform: scale(1.05);
}

.project-link {
    display: inline-block;
    background: var(--quaternary-color);
    color: var(--primary-text-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.project-card:hover .project-link {
    background: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(var(--quaternary-color-rgb), 0.3);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.project-card:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}

.project-card:nth-child(even) {
    animation: float 6s ease-in-out infinite 3s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-section {
        padding: 100px 0 60px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
        margin-bottom: 60px;
    }
    
    .project-content {
        padding: 25px 20px;
    }
    
    .projects-header {
        margin-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding: 80px 0 50px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .project-card {
        margin: 0 10px;
        transform: none !important;
    }
    
    .project-card:hover {
        transform: none !important;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 20px 15px;
    }
    
    .project-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .project-description {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .projects-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    .projects-section {
        padding: 60px 0 40px;
    }
    
    .project-card {
        margin: 0 5px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 15px 10px;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-features {
        gap: 5px;
    }
    
    .project-feature {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* Animation delay for cards */
.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.5s; }
.project-card:nth-child(3) { animation-delay: 1s; }
.project-card:nth-child(4) { animation-delay: 1.5s; }
.project-card:nth-child(5) { animation-delay: 2s; }
.project-card:nth-child(6) { animation-delay: 2.5s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-link,
    .projects-header {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .project-card:hover {
        transform: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .project-card {
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(0, 0, 0, 0.8);
    }
    
    .project-description {
        color: var(--primary-text-color);
    }
}

/* Referanslar Bölümü - References Section */
.references-section {
    padding: 40px 0 80px;
    position: relative;
    overflow: hidden;
}

.references-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* References Header */
.references-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(80px);
    transition: all 1.2s ease;
}

.references-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.references-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    overflow: hidden;
}

.references-title-main {
    background: linear-gradient(135deg, var(--gradient-blue), var(--quaternary-color), var(--gradient-green));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift-references 4s ease-in-out infinite alternate;
    display: inline-block;
    margin-right: 15px;
}

@keyframes gradient-shift-references {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.references-title-accent {
    color: var(--quaternary-color);
    display: inline-block;
}

.references-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* References Container */
.references-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* Reference Item */
.reference-item {
    flex: 0 0 calc(16.666% - 17px); /* 6 items per row */
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.2s ease;
}

.reference-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation for References */
.reference-item:nth-child(1).animate-in { transition-delay: 0.1s; }
.reference-item:nth-child(2).animate-in { transition-delay: 0.2s; }
.reference-item:nth-child(3).animate-in { transition-delay: 0.3s; }
.reference-item:nth-child(4).animate-in { transition-delay: 0.4s; }
.reference-item:nth-child(5).animate-in { transition-delay: 0.5s; }
.reference-item:nth-child(6).animate-in { transition-delay: 0.6s; }

.reference-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--quaternary-color-rgb), 0.1);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 15px;
}

.reference-item:hover::before {
    opacity: 1;
}

.reference-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-8px);
    border-color: rgba(var(--quaternary-color-rgb), 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(var(--quaternary-color-rgb), 0.2);
}

.reference-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: all 0.4s ease;
    margin-bottom: 5px;
}

.reference-item:hover img {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.05);
}

/* Floating Animation for References */
@keyframes float-reference {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.reference-item:nth-child(odd) {
    animation: float-reference 8s ease-in-out infinite;
}

.reference-item:nth-child(even) {
    animation: float-reference 8s ease-in-out infinite 4s;
}

/* Responsive Design for References */
@media (max-width: 1200px) {
    .reference-item {
        flex: 0 0 calc(20% - 16px); /* 5 items per row */
    }
}

@media (max-width: 991px) {
    .references-container {
        gap: 15px;
    }
    
    .reference-item {
        flex: 0 0 calc(33.333% - 10px); /* 3 items per row */
        height: 100px;
    }
    
    .reference-item img {
        height: 60px;
    }
}

@media (max-width: 768px) {
    .references-section {
        padding: 80px 0 50px;
    }
    
    .references-container {
        padding: 0 15px;
        gap: 12px;
    }
    
    .reference-item {
        flex: 0 0 calc(50% - 6px); /* 2 items per row */
        height: 90px;
        padding: 10px;
        transform: none !important;
    }
    
    .reference-item:hover {
        transform: none !important;
    }
    
    .reference-item img {
        height: 50px;
    }
    
    .references-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    .references-section {
        padding: 60px 0 40px;
    }
    
    .reference-item {
        flex: 0 0 calc(50% - 6px);
        height: 80px;
        padding: 8px;
    }
    
    .reference-item img {
        height: 45px;
    }
}

/* Reduced motion support for references */
@media (prefers-reduced-motion: reduce) {
    .reference-item,
    .references-header {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .reference-item:hover {
        transform: none;
    }
}

/* High contrast support for references */
@media (prefers-contrast: high) {
    .reference-item {
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(0, 0, 0, 0.8);
    }
}