/* project.css */
.project-container {
    max-width: 1300px;
    margin: 150px auto 100px auto;
    padding: 20px;
}

.project-title {
    text-align: center;
    margin-bottom: 50px;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 60px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--green);
    color: var(--dark);
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.project-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #111;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(114, 211, 128, 0.2);
}

/* Custom sizes requested by user */
.project-item.instagram {
    --item-width: 360px;
    --item-height: 480px;
    width: var(--item-width);
    height: var(--item-height);
}

.project-item.youtube {
    --item-width: 360px;
    --item-height: 640px;
    width: var(--item-width);
    height: var(--item-height);
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item.youtube img {
    /* To show YouTube thumbnails nicely */
    object-position: center;
}

.project-item:hover img {
    transform: scale(1.05);
}

.project-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-item:hover .overlay {
    opacity: 1;
}

.overlay-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.overlay-category {
    font-size: 0.9rem;
    color: var(--green);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(114, 211, 128, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.play-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--dark);
    margin-left: 5px; /* Adjust triangle center */
}

.project-item.youtube:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Image Fullscreen Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-content iframe {
    width: 80vw;
    height: 45vw; /* 16:9 ratio approximately */
    max-width: 1200px;
    max-height: 675px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 40px;
    font-weight: 100;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--green);
}

@media (max-width: 768px) {
    .project-item.instagram, .project-item.youtube {
        width: 100%;
        max-width: 360px;
        height: auto;
        aspect-ratio: 3/4;
    }
    
    .project-item.youtube {
        aspect-ratio: 9/16;
    }
}
