/* ===== PROJECT SECTION - ENHANCED HOVER EFFECTS ===== */


/* Main Projects Section */

.projects {
    background: linear-gradient(180deg, #161a20 0%, #0f1115 100%);
    padding: 6rem 9% 4rem;
    position: relative;
}


/* ===== PROJECT GRID ===== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}


/* ===== PROJECT CARD ===== */

.project-card {
    background: #161a20;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(59, 199, 242, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* Card glow effect on hover */

.project-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #3bc7f2, #1ea6d9, #f63b3b, #3bc7f2);
    background-size: 300% 300%;
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: projectBorderGradient 4s ease infinite;
}

@keyframes projectBorderGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.project-card:hover::before {
    opacity: 0.6;
}


/* Card shine effect */

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

.project-card:hover::after {
    animation: projectShine 0.8s ease-in-out;
    opacity: 1;
}

@keyframes projectShine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}


/* Enhanced card hover effect */

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #3bc7f2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(59, 199, 242, 0.2);
}


/* Card glow pulse animation */

@keyframes cardGlowPulse {
    0%,
    100% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 199, 242, 0.15);
    }
    50% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(59, 199, 242, 0.3);
    }
}

.project-card:hover {
    animation: cardGlowPulse 2s ease-in-out infinite;
}


/* Card overlay gradient on hover */

.project-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(59, 199, 242, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
    border-radius: 15px;
}

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


/* ===== PROJECT IMAGE ===== */

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.4s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.project-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}


/* Image zoom pulse on hover */

@keyframes imageZoom {
    0%,
    100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.15);
    }
}

.project-card:hover img {
    animation: imageZoom 2s ease-in-out infinite;
}


/* ===== PROJECT CONTENT ===== */

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.project-card:hover .project-content {
    transform: translateY(-5px);
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.3;
    transition: all 0.3s ease;
    position: relative;
}


/* Title glow on hover */

.project-card:hover .project-content h3 {
    text-shadow: 0 0 15px rgba(59, 199, 242, 0.5);
    color: #3bc7f2;
}

.project-content p {
    font-size: 0.95rem;
    color: #b0b0b0;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    transition: all 0.3s ease;
}

.project-card:hover .project-content p {
    color: #d0d0d0;
    text-shadow: 0 0 8px rgba(176, 176, 176, 0.3);
}


/* ===== TECH STACK ===== */

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    margin-top: auto;
    transition: all 0.3s ease;
}


/* Tech stack items stagger animation */

.tech-stack span {
    padding: 0.3rem 0.8rem;
    background: rgba(59, 199, 242, 0.15);
    color: #3bc7f2;
    font-size: 0.8rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(59, 199, 242, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


/* Tech item glow on hover */

.tech-stack span::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-card:hover .tech-stack span::before {
    left: 100%;
}

.tech-stack span:hover {
    background: rgba(59, 199, 242, 0.3);
    border-color: #3bc7f2;
    box-shadow: 0 0 15px rgba(59, 199, 242, 0.4);
    transform: translateY(-2px);
}


/* ===== PROJECT BUTTON ===== */

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #72dde2, #fe0612);
    color: #0f1115;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}


/* Button shine effect */

.project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.project-btn:hover::before {
    left: 100%;
}


/* Button arrow animation */

.project-btn .btn-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-btn:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(59, 199, 242, 0.5);
    background: linear-gradient(135deg, #060909, #f23d3d);
}

.project-btn:hover .btn-arrow {
    transform: translateX(5px);
}


/* Button pulse animation */

@keyframes btnPulse {
    0%,
    100% {
        box-shadow: 0 8px 25px rgba(59, 199, 242, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(59, 199, 242, 0.6);
    }
}

.project-btn:hover {
    animation: btnPulse 1.5s ease-in-out infinite;
}

.project-btn.disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.project-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    animation: none;
}


/* ===== RESPONSIVE STYLES ===== */

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects {
        padding: 5rem 6% 3rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .project-card img {
        height: 180px;
    }
    .project-content h3 {
        font-size: 1.2rem;
    }
    .project-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-card img {
        height: 160px;
    }
    .project-content {
        padding: 1.2rem;
    }
}