/* Portfolio Page Styles */
.portfolio-hero {
    height: 50vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    background-color: #8B7355;
    overflow: hidden;
}

.portfolio-hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.portfolio-hero p {
    font-size: 1.5rem;
}

.gallery {
    padding: 4rem 2rem;
    background-color: #9A8164;
}

.gallery-filters {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid white;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background: white;
    color: #8B7355;
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(100%);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Filter buttons animation */
.filter-button {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.filter-button:hover {
    transform: translateY(-2px);
}

.filter-button.active {
    background: white;
    color: #8B7355;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-hero {
        height: 40vh;
    }

    .portfolio-hero h1 {
        font-size: 2.5rem;
    }

    .portfolio-hero p {
        font-size: 1.2rem;
    }

    .gallery {
        padding: 2rem 1rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .filter-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    /* Reset cursor for mobile */
    .gallery-item,
    .filter-button {
        cursor: pointer;
    }
}