﻿/* =============================================
   PROJELER - MODERN 3D HEX GRID TASARIM v3
   3D Flip Animasyonu + Sayfalama Düzeltmesi
   ============================================= */

/* Ana Section */
.projects-modern-section {
    position: relative;
    padding: 100px 0 120px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

    /* Animasyonlu Arka Plan Partikülleri */
    .projects-modern-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(circle at 20% 80%, rgba(30, 77, 121, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(37, 38, 56, 0.4) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(30, 77, 121, 0.2) 0%, transparent 30%);
        animation: bgPulse 15s ease-in-out infinite;
    }

@keyframes bgPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Floating Particles */
.projects-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

    .particle:nth-child(1) {
        left: 10%;
        animation-delay: 0s;
        animation-duration: 25s;
    }

    .particle:nth-child(2) {
        left: 20%;
        animation-delay: 2s;
        animation-duration: 20s;
    }

    .particle:nth-child(3) {
        left: 30%;
        animation-delay: 4s;
        animation-duration: 28s;
    }

    .particle:nth-child(4) {
        left: 40%;
        animation-delay: 1s;
        animation-duration: 22s;
    }

    .particle:nth-child(5) {
        left: 50%;
        animation-delay: 3s;
        animation-duration: 24s;
    }

    .particle:nth-child(6) {
        left: 60%;
        animation-delay: 5s;
        animation-duration: 26s;
    }

    .particle:nth-child(7) {
        left: 70%;
        animation-delay: 2.5s;
        animation-duration: 21s;
    }

    .particle:nth-child(8) {
        left: 80%;
        animation-delay: 0.5s;
        animation-duration: 23s;
    }

    .particle:nth-child(9) {
        left: 90%;
        animation-delay: 3.5s;
        animation-duration: 27s;
    }

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Section Title */
.projects-modern-section .section-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 60px;
}

    .projects-modern-section .section-header h2 {
        font-size: 48px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 20px;
        text-transform: uppercase;
        letter-spacing: 3px;
        position: relative;
        display: inline-block;
    }

        .projects-modern-section .section-header h2::after {
            content: '';
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, transparent, #1E4D79, #4a90c2, #1E4D79, transparent);
            border-radius: 2px;
        }

/* Tab Navigation - Modern Pills */
.projects-tab-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.project-tab-btn {
    position: relative;
    padding: 16px 40px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

    .project-tab-btn::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-tab-btn:hover::before {
        left: 100%;
    }

    .project-tab-btn:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .project-tab-btn.active {
        color: #fff;
        background: linear-gradient(135deg, #1E4D79 0%, #2d6da3 100%);
        border-color: transparent;
        box-shadow: 0 10px 40px rgba(30, 77, 121, 0.4);
    }

    .project-tab-btn .tab-icon {
        margin-right: 10px;
        font-size: 18px;
    }

/* Tab Content */
.projects-tab-content {
    position: relative;
    z-index: 2;
}

.project-tab-pane {
    display: none;
    animation: fadeInUp 0.6s ease forwards;
}

    .project-tab-pane.active {
        display: block;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3D Projects Grid */
.projects-3d-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    perspective: 2000px;
}

/* =============================================
   CARD WRAPPER - 3D FLİP CONTAINER
   ============================================= */
.project-card-wrapper {
    position: relative;
    height: 420px;
    cursor: pointer;
    perspective: 2000px;
}

/* Project Card - 3D Transform Container */
.project-card-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* =============================================
   3D FLİP ANİMASYONU - HOVER'DA DÖNER
   ============================================= */
.project-card-wrapper:hover .project-card-3d {
    transform: rotateY(180deg);
}

/* Hover'da gölge efekti */
.project-card-wrapper:hover {
    z-index: 10;
}

/* Card Front & Back - Ortak Stiller */
.project-card-front,
.project-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Card Front */
.project-card-front {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transform: rotateY(0deg);
}

    .project-card-front .card-image {
        position: relative;
        height: 60%;
        overflow: hidden;
    }

        .project-card-front .card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }

.project-card-wrapper:hover .project-card-front .card-image img {
    transform: scale(1.1);
}

.project-card-front .card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.9), transparent);
}

/* Status Badge */
.project-status-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    z-index: 5;
}

    .project-status-badge.ongoing {
        background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
        color: #fff;
        box-shadow: 0 5px 20px rgba(243, 156, 18, 0.4);
        animation: pulse-badge 2s infinite;
    }

    .project-status-badge.completed {
        background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
        color: #fff;
        box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
    }

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Card Content */
.project-card-front .card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.project-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

    .project-location i {
        color: #1E4D79;
    }

.project-card-front .card-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Flip Indicator - Döndürme İpucu */
.flip-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    animation: rotateHint 3s ease-in-out infinite;
    z-index: 5;
}

@keyframes rotateHint {
    0%, 100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(20deg);
    }
}

/* =============================================
   CARD BACK - ARKA YÜZ (180° döndürülmüş)
   ============================================= */
.project-card-back {
    background: linear-gradient(135deg, #1E4D79 0%, #2d6da3 50%, #1E4D79 100%);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

    /* Arka yüz parlaklık efekti */
    .project-card-back::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
        animation: shimmer 3s ease-in-out infinite;
    }

@keyframes shimmer {
    0%, 100% {
        transform: translate(-30%, -30%);
    }

    50% {
        transform: translate(30%, 30%);
    }
}

.project-card-back .back-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.1);
    }
}

.project-card-back .back-icon i {
    font-size: 36px;
    color: #fff;
}

.project-card-back h4 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.project-card-back p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Detay Butonu */
.project-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: #fff;
    color: #1E4D79;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

    .project-detail-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(30, 77, 121, 0.1), transparent);
        transition: left 0.5s ease;
    }

    .project-detail-btn:hover::before {
        left: 100%;
    }

    .project-detail-btn:hover {
        background: #252638;
        color: #fff;
        transform: scale(1.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .project-detail-btn i {
        transition: transform 0.3s ease;
    }

    .project-detail-btn:hover i {
        transform: translateX(5px);
    }

/* Progress Bar for Ongoing Projects */
.project-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.project-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    border-radius: 0 2px 2px 0;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* =============================================
   PAGINATION / SAYFALAMA
   ============================================= */
.projects-carousel-nav {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
}

.project-nav-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

    .project-nav-btn:hover:not(:disabled) {
        background: #1E4D79;
        border-color: #1E4D79;
        transform: scale(1.1);
        box-shadow: 0 10px 30px rgba(30, 77, 121, 0.4);
    }

    .project-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }

.projects-counter {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

    .projects-counter .current {
        font-size: 24px;
        font-weight: 700;
        color: #fff;
    }

/* View All Button */
.projects-view-all {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    position: relative;
    z-index: 5;
}

.view-all-projects-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 45px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s ease;
}

    .view-all-projects-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #1E4D79, #2d6da3);
        transition: left 0.4s ease;
        z-index: -1;
    }

    .view-all-projects-btn:hover::before {
        left: 0;
    }

    .view-all-projects-btn:hover {
        border-color: transparent;
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(30, 77, 121, 0.4);
    }

    .view-all-projects-btn i {
        transition: transform 0.3s ease;
    }

    .view-all-projects-btn:hover i {
        transform: translateX(5px);
    }

/* =============================================
   SCROLL ANİMASYONU - Sayfalama için
   ============================================= */
.project-card-wrapper {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .project-card-wrapper.animate-in {
        opacity: 1;
        transform: translateY(0);
    }

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1200px) {
    .projects-3d-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .projects-modern-section {
        padding: 80px 0 100px;
    }

        .projects-modern-section .section-header h2 {
            font-size: 36px;
            letter-spacing: 2px;
        }

    .projects-tab-nav {
        flex-wrap: wrap;
    }

    .project-tab-btn {
        padding: 14px 30px;
        font-size: 14px;
    }

    .projects-3d-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .project-card-wrapper {
        height: 380px;
    }
}

@media (max-width: 767px) {
    .projects-modern-section {
        padding: 60px 0 80px;
    }

        .projects-modern-section .section-header h2 {
            font-size: 28px;
            letter-spacing: 1px;
        }

    .projects-tab-nav {
        gap: 10px;
    }

    .project-tab-btn {
        padding: 12px 20px;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }

        .project-tab-btn .tab-icon {
            display: none;
        }

    .projects-3d-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card-wrapper {
        height: 400px;
    }

    .view-all-projects-btn {
        padding: 14px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .project-card-front .card-content {
        padding: 20px;
    }

        .project-card-front .card-content h4 {
            font-size: 18px;
        }

    .project-card-back {
        padding: 30px 20px;
    }

        .project-card-back h4 {
            font-size: 20px;
        }
}

/* =============================================
   MOBİL TOUCH DESTEĞİ
   ============================================= */
@media (hover: none) and (pointer: coarse) {
    /* Mobilde dokunarak flip için aktif state */
    .project-card-wrapper:active .project-card-3d {
        transform: rotateY(180deg);
    }
}
