/* Портфолио */
.portfolio {
    padding: 6rem 0;
    background: #f8f9fa;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37, #F4D03F);
    border-radius: 2px;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio__item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

.portfolio__item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37, #F4D03F);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.portfolio__item:hover::before {
    opacity: 1;
}

.portfolio__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.portfolio__item:hover .portfolio__image {
    transform: scale(1.05);
}

/* Стили для модального окна (если нужно для полноразмерного просмотра) */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.portfolio-modal.active {
    display: flex;
}

.portfolio-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.portfolio-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.portfolio-modal__image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

/* Дополнительный стиль для улучшенного эффекта наведения */
.portfolio__item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
            to bottom,
            rgba(212, 175, 55, 0) 0%,
            rgba(212, 175, 55, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio__item:hover::after {
    opacity: 1;
}