/* Portfolio Page Styles */

:root {
    --olive: #8B8C2C;
    --dark-olive: #6B6B20;
    --light-olive: #A5A642;
    --beige: #F5E6D3;
    --light-beige: #FAF0E6;
    --white: #FFFFFF;
    --dark-text: #2C2C2C;
    --light-text: #666;
}

.portfolio-page {
    min-height: 100vh;
    padding: 120px 0 80px 0;
    background: var(--light-beige);
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--olive);
    margin-bottom: 3rem;
    font-weight: 300;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--olive);
    border-radius: 2px;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--dark-text);
    border: 2px solid var(--beige);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--olive);
    color: white;
    border-color: var(--olive);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 140, 44, 0.3);
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--olive), var(--light-olive));
    z-index: 1;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item-content {
    padding: 1.5rem;
}

.portfolio-item h3 {
    margin: 0 0 0.5rem 0;
    color: var(--olive);
    font-size: 1.2rem;
    font-weight: 400;
}

.portfolio-item p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.portfolio-item-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--olive);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-image {
    max-width: 90%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--olive);
}

.modal-caption {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding: 0 2rem;
    max-width: 90%;
}

/* Порожній стан портфоліо */
.portfolio-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--light-text);
}

.portfolio-empty p {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-page {
        padding-top: 80px;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .portfolio-filter {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .portfolio-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .portfolio-item img {
        height: 250px;
    }
    
    .portfolio-item-content {
        padding: 1rem;
    }
    
    .image-modal {
        padding: 0.5rem;
    }
    
    .modal-image {
        max-width: 95%;
        max-height: calc(100vh - 100px);
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-caption {
        font-size: 1rem;
        margin-top: 0.8rem;
        padding: 0 1rem;
    }
}