/* ========================================
   PROJECTS SECTION
   Project filter buttons and project cards grid
   ======================================== */

/* Projects Section */
#projects {
    background: var(--light);
}

#projects .section-title {
    background: #001fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Project Category Filter Buttons */
.project-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.category-btn {
    padding: 12px 12px;
    border: 1px solid #9b9b9b;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
	font-family:'Prompt', sans-serif;
    /* border-radius: 30px; */
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

@media (max-width: 768px) {
    .project-category-filter {
        gap: 8px;
    }
    .category-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* Project Category Badge */
.project-category-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project Card Animation for Filter */
.project-card-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card-link.hidden {
    display: none;
}

.project-card-link.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.project-card-link.fade-in {
    animation: fadeInProject 0.4s ease forwards;
}

@keyframes fadeInProject {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

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

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.project-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
//    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
//    border: 2px solid rgba(37, 99, 235, 0.15);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
//    box-shadow: 0 25px 70px rgba(37, 99, 235, 0.3);
	box-shadow: rgba(14, 63, 126, 0.04) 0px 0px 0px 1px, rgba(42, 51, 69, 0.04) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.04) 0px 6px 6px -3px, rgba(14, 63, 126, 0.04) 0px 12px 12px -6px, rgba(14, 63, 126, 0.04) 0px 24px 24px -12px;
}

.project-card:hover::after {
    opacity: 0;
}

.project-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

@media (max-width: 768px) {
    .project-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 200px;
    }
}

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

.project-image::after {
    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-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card:hover .project-image::after {
    left: 100%;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-info {
    padding: 10px;
}

@media (max-width: 768px) {
    .project-info {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .project-info {
        padding: 6px;
    }
}

.project-title {
    font-size: 1rem;
    color: #535353;
}

body.th .project-title {
    font-size: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 6px 16px;
    background: rgba(249, 115, 22, 0.1);
    color: var(--secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1.5px solid var(--secondary);
    transition: all 0.3s ease;
    font-weight: 600;
}

.tag:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

@media (max-width: 768px) {
    .tag {
        font-size: 0.8rem;
        padding: 5px 14px;
    }
}

@media (max-width: 480px) {
    .tag {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}
