/* =========== PROJECTS GALLERY =========== */
.projects-section {
    padding: 8rem 0;
    background-color: var(--light);
    position: relative;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(252, 237, 1, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(252, 237, 1, 0.05) 0%, transparent 25%);
    pointer-events: none;
}

.projects-header {
    text-align: center;
    margin-bottom: 6rem;
}

.projects-title {
    font-size: 4.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.projects-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1.5rem;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary);
}

.projects-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.8rem;
    color: var(--gray);
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.filter-button {
    padding: 1rem 2rem;
    background-color: var(--light-gray);
    border: none;
    color: var(--dark);
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}

.project-item {
    position: relative;
    background-color: var(--light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.project-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-category {
    position: absolute;
    top: 2rem;
    left: 0;
    background-color: var(--primary);
    color: var(--dark);
    padding: 0.5rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-content {
    padding: 3rem;
}

.project-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.project-description {
    font-size: 1.6rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.project-date {
    font-size: 1.4rem;
    color: var(--gray);
}

.project-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.6rem;
    text-transform: uppercase;
    text-decoration: none;
    padding-right: 3.5rem;
    transition: var(--transition);
}

.project-link::before {
    content: '→';
    position: absolute;
    right: 0;
    font-size: 2rem;
    transition: var(--transition);
}

.project-item:hover .project-link {
    color: var(--primary);
}

.project-item:hover .project-link::before {
    right: -5px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--light);
    padding: 1.5rem;
    text-align: center;
    font-size: 1.6rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--dark);
    border: none;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--light);
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--primary);
    color: var(--dark);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =========== MOBILE ADJUSTMENTS =========== */
@media screen and (max-width: 992px) {
    .projects-title {
        font-size: 3.6rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .projects-title {
        font-size: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}

@media screen and (max-width: 576px) {
    .projects-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}